refactor(v2): 액션 모달로 전환한다
This commit is contained in:
@@ -326,23 +326,29 @@ struct CreatorChannelView: View {
|
||||
|
||||
|
||||
private var authConfirmDialog: some View {
|
||||
SodaDialog(
|
||||
SodaV2ActionModal(
|
||||
title: I18n.Chat.Auth.dialogTitle,
|
||||
desc: I18n.Chat.Auth.dialogDescription,
|
||||
confirmButtonTitle: I18n.Chat.Auth.goToVerification,
|
||||
confirmButtonAction: {
|
||||
isShowAuthConfirmView = false
|
||||
isShowAuthView = true
|
||||
},
|
||||
cancelButtonTitle: I18n.Common.cancel,
|
||||
cancelButtonAction: {
|
||||
isShowAuthConfirmView = false
|
||||
pendingAction = nil
|
||||
},
|
||||
textAlignment: .center
|
||||
message: I18n.Chat.Auth.dialogDescription,
|
||||
button1: SodaV2ActionModalButton(
|
||||
label: I18n.Chat.Auth.goToVerification,
|
||||
action: {
|
||||
isShowAuthConfirmView = false
|
||||
isShowAuthView = true
|
||||
}
|
||||
),
|
||||
button2: SodaV2ActionModalButton(
|
||||
label: I18n.Common.cancel,
|
||||
action: dismissAuthConfirmDialog
|
||||
),
|
||||
onDimmedTap: dismissAuthConfirmDialog
|
||||
)
|
||||
}
|
||||
|
||||
private func dismissAuthConfirmDialog() {
|
||||
isShowAuthConfirmView = false
|
||||
pendingAction = nil
|
||||
}
|
||||
|
||||
private var fanTalkDeleteDialog: some View {
|
||||
SodaV2ActionModal(
|
||||
title: I18n.MemberChannel.cheersDeleteTitle,
|
||||
@@ -549,6 +555,10 @@ struct CreatorChannelView: View {
|
||||
AppState.shared.setAppStep(step: .contentViewSettings)
|
||||
}
|
||||
|
||||
private func dismissCommunityDeleteConfirm() {
|
||||
communityViewModel.isShowDeleteConfirm = false
|
||||
}
|
||||
|
||||
private func showDonationDialog() {
|
||||
guard let creatorId = viewModel.response?.creator.creatorId else { return }
|
||||
channelDonationViewModel.setCreatorId(creatorId, shouldFetch: false)
|
||||
@@ -594,19 +604,21 @@ struct CreatorChannelView: View {
|
||||
}
|
||||
|
||||
if communityViewModel.isShowDeleteConfirm {
|
||||
SodaDialog(
|
||||
SodaV2ActionModal(
|
||||
title: I18n.Common.postDeleteTitle,
|
||||
desc: I18n.Common.confirmDeleteQuestion,
|
||||
confirmButtonTitle: I18n.Common.delete,
|
||||
confirmButtonAction: {
|
||||
communityViewModel.deleteCommunityPost(creatorId: creatorId)
|
||||
communityViewModel.isShowDeleteConfirm = false
|
||||
},
|
||||
cancelButtonTitle: I18n.Common.cancel,
|
||||
cancelButtonAction: {
|
||||
communityViewModel.isShowDeleteConfirm = false
|
||||
},
|
||||
textAlignment: .center
|
||||
message: I18n.Common.confirmDeleteQuestion,
|
||||
button1: SodaV2ActionModalButton(
|
||||
label: I18n.Common.delete,
|
||||
action: {
|
||||
communityViewModel.deleteCommunityPost(creatorId: creatorId)
|
||||
communityViewModel.isShowDeleteConfirm = false
|
||||
}
|
||||
),
|
||||
button2: SodaV2ActionModalButton(
|
||||
label: I18n.Common.cancel,
|
||||
action: dismissCommunityDeleteConfirm
|
||||
),
|
||||
onDimmedTap: dismissCommunityDeleteConfirm
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user