Skip to content

Commit 4a37601

Browse files
authored
Merge pull request #116 from DSM-PICK/feature/(#113)-email_Timer
🔗 :: [#113] 이메일 인증 텍스트필드 타이머 , 레이아웃 통일
2 parents 4e33b6f + 0ac3c72 commit 4a37601

4 files changed

Lines changed: 53 additions & 49 deletions

File tree

Projects/Feature/ChangePassword/Sources/Scene/ChangePassword/ChangePasswordView.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ public struct ChangePasswordView: View {
106106
}
107107
)
108108
.padding(.horizontal, 24)
109-
.padding(.top, 75)
109+
.padding(.top, 50)
110110
}
111111

112112
private func codeTextField(_ viewStore: ViewStoreOf<ChangePasswordReducer>) -> some View {

Projects/Feature/ChangePassword/Sources/Scene/NewPassword/NewPasswordView.swift

Lines changed: 48 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -21,59 +21,63 @@ public struct NewPasswordView: View {
2121

2222
public var body: some View {
2323
WithViewStore(self.store, observe: { $0 }) { viewStore in
24-
VStack(alignment: .leading, spacing: 0) {
25-
headerSection
26-
newPasswordTextField(viewStore)
27-
newPasswordCheckTextField(viewStore)
24+
ZStack {
25+
VStack(alignment: .leading, spacing: 0) {
26+
headerSection
27+
newPasswordTextField(viewStore)
28+
newPasswordCheckTextField(viewStore)
2829

29-
if let errorMessage = viewStore.errorMessage {
30-
Text(errorMessage)
31-
.pickText(type: .body1, textColor: .Error.error)
32-
.padding(.horizontal, 24)
33-
.padding(.top, 8)
34-
}
30+
if let errorMessage = viewStore.errorMessage {
31+
Text(errorMessage)
32+
.pickText(type: .body1, textColor: .Error.error)
33+
.padding(.horizontal, 24)
34+
.padding(.top, 8)
35+
}
3536

36-
Spacer()
37-
changeButton(viewStore)
38-
}
39-
.frame(maxWidth: .infinity, alignment: .leading)
40-
.onChange(of: viewStore.isChangeSuccessful) { isSuccessful in
41-
if isSuccessful {
42-
showSuccessAlert = true
37+
Spacer()
38+
changeButton(viewStore)
4339
}
44-
}
45-
.navigationBarBackButtonHidden(true)
46-
.navigationBarTitleDisplayMode(.inline)
47-
.navigationTitle("비밀번호 변경")
48-
.toolbar(.hidden, for: .tabBar)
49-
.toolbar {
50-
ToolbarItem(placement: .navigationBarLeading) {
51-
Button(action: {
52-
dismiss()
53-
}) {
54-
Image(systemName: "chevron.left")
55-
.foregroundColor(.black)
40+
.frame(maxWidth: .infinity, alignment: .leading)
41+
.onChange(of: viewStore.isChangeSuccessful) { isSuccessful in
42+
if isSuccessful {
43+
showSuccessAlert = true
5644
}
5745
}
58-
}
59-
.alert("비밀번호 변경 완료", isPresented: $showSuccessAlert) {
60-
Button("확인", role: .cancel) {
61-
// router.path에 changePassword가 있으면 로그인 뷰에서 온 것
62-
if let changePasswordIndex = router.path.firstIndex(where: { route in
63-
if case .changePassword = route { return true }
64-
return false
65-
}) {
66-
router.path.removeSubrange(changePasswordIndex...)
67-
} else {
68-
// 전체 탭에서 온 경우 - dismiss를 두 번 호출
69-
dismiss()
70-
DispatchQueue.main.asyncAfter(deadline: .now() + 0.1) {
46+
.navigationBarBackButtonHidden(true)
47+
.navigationBarTitleDisplayMode(.inline)
48+
.navigationTitle("비밀번호 변경")
49+
.toolbar(.hidden, for: .tabBar)
50+
.toolbar {
51+
ToolbarItem(placement: .navigationBarLeading) {
52+
Button(action: {
53+
dismiss()
54+
}) {
55+
Image(systemName: "chevron.left")
56+
.foregroundColor(.black)
57+
}
58+
}
59+
}
60+
61+
if showSuccessAlert {
62+
PiCKDisappearAlert(
63+
successType: .success,
64+
message: "비밀번호가 성공적으로 변경되었습니다."
65+
)
66+
.onDisappear {
67+
showSuccessAlert = false
68+
if let changePasswordIndex = router.path.firstIndex(where: { route in
69+
if case .changePassword = route { return true }
70+
return false
71+
}) {
72+
router.path.removeSubrange(changePasswordIndex...)
73+
} else {
7174
dismiss()
75+
DispatchQueue.main.asyncAfter(deadline: .now() + 0.1) {
76+
dismiss()
77+
}
7278
}
7379
}
7480
}
75-
} message: {
76-
Text("비밀번호가 성공적으로 변경되었습니다.")
7781
}
7882
}
7983
}

Tuist/Package.resolved

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Tuist/Package.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ let package = Package(
4040
.package(url: "https://github.com/airbnb/lottie-ios", from: "4.3.3"),
4141
.package(url: "https://github.com/WenchaoD/FSCalendar.git", from: "2.8.4"),
4242
.package(url: "https://github.com/RxSwiftCommunity/RxDataSources.git", from: "5.0.0"),
43-
.package(url: "https://github.com/DSM-PICK/PiCK_iOS_DesignSystem.git", from: "1.2.6"),
43+
.package(url: "https://github.com/DSM-PICK/PiCK_iOS_DesignSystem.git", from: "1.2.7"),
4444
.package(url: "https://github.com/firebase/firebase-ios-sdk.git", from: "12.5.0"),
4545
.package(url: "https://github.com/daltoniam/Starscream.git", from: "4.0.6"),
4646
.package(url: "https://github.com/ReactorKit/ReactorKit.git", from: "3.0.0"),

0 commit comments

Comments
 (0)