feat(auth): 인증 후 콘텐츠 설정과 개발용 모의 인증을 추가한다
This commit is contained in:
@@ -6,7 +6,6 @@
|
||||
import SwiftUI
|
||||
|
||||
import Bootpay
|
||||
import BootpayUI
|
||||
import Kingfisher
|
||||
|
||||
struct MainView: View {
|
||||
@@ -148,7 +147,7 @@ struct MainView: View {
|
||||
ContentPlayerView(isShowing: $isShowPlayer, playlist: [])
|
||||
}
|
||||
}
|
||||
.fullScreenCover(isPresented: $isShowAuthView) {
|
||||
.fullScreenCover(isPresented: $isShowAuthView, onDismiss: mypageViewModel.presentAuthContentSettings) {
|
||||
authView
|
||||
}
|
||||
.valueChanged(value: appState.pushRoomId) { handlePushRoomId($0) }
|
||||
@@ -175,6 +174,7 @@ struct MainView: View {
|
||||
autohideIn: 2
|
||||
)
|
||||
}
|
||||
.authContentSettings(viewModel: mypageViewModel)
|
||||
}
|
||||
|
||||
private var shouldShowCreatorActionMenu: Bool {
|
||||
@@ -383,26 +383,25 @@ struct MainView: View {
|
||||
}
|
||||
|
||||
private var authView: some View {
|
||||
BootpayUI(payload: payload, requestType: BootpayRequest.TYPE_AUTHENTICATION)
|
||||
.onConfirm { _ in true }
|
||||
.onCancel { _ in isShowAuthView = false }
|
||||
.onError { _ in
|
||||
AuthVerificationView(
|
||||
payload: payload,
|
||||
onCancel: { isShowAuthView = false },
|
||||
onError: {
|
||||
appState.errorMessage = I18n.Main.Auth.authenticationError
|
||||
appState.isShowErrorPopup = true
|
||||
isShowAuthView = false
|
||||
}
|
||||
.onDone {
|
||||
DEBUG_LOG("onDone: \($0)")
|
||||
},
|
||||
onDone: {
|
||||
let action = pendingAction
|
||||
mypageViewModel.authVerify($0) {
|
||||
auth = true
|
||||
isShowAuthView = false
|
||||
if let action = pendingAction {
|
||||
pendingAction = nil
|
||||
action()
|
||||
}
|
||||
pendingAction = nil
|
||||
action?()
|
||||
}
|
||||
}
|
||||
.onClose { isShowAuthView = false }
|
||||
isShowAuthView = false
|
||||
},
|
||||
onClose: { isShowAuthView = false }
|
||||
)
|
||||
}
|
||||
|
||||
private func configurePayload() {
|
||||
|
||||
Reference in New Issue
Block a user