mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-24 10:32:46 +02:00
Show rename info alert
This commit is contained in:
@@ -52,6 +52,8 @@ struct UserSessionNameBindings {
|
||||
var sessionName: String
|
||||
/// The currently displayed alert's info value otherwise `nil`.
|
||||
var alertInfo: AlertInfo<Int>?
|
||||
/// Specifies if the informational bottom sheet is onscreen or not
|
||||
var showBottomSheet: Bool = false
|
||||
}
|
||||
|
||||
enum UserSessionNameViewAction {
|
||||
@@ -59,6 +61,4 @@ enum UserSessionNameViewAction {
|
||||
case done
|
||||
/// The user tapped the cancel button.
|
||||
case cancel
|
||||
/// The user tapped the Learn More link.
|
||||
case learnMore
|
||||
}
|
||||
|
||||
@@ -34,8 +34,6 @@ class UserSessionNameViewModel: UserSessionNameViewModelType, UserSessionNameVie
|
||||
completion?(.updateName(state.bindings.sessionName))
|
||||
case .cancel:
|
||||
completion?(.cancel)
|
||||
case .learnMore:
|
||||
#warning("To be implemented as part of PSG-714.")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -30,6 +30,11 @@ struct UserSessionName: View {
|
||||
.navigationBarTitleDisplayMode(.inline)
|
||||
.toolbar { toolbar }
|
||||
.accentColor(theme.colors.accent)
|
||||
.bottomSheet(isPresented: $viewModel.showBottomSheet) {
|
||||
InfoView(title: VectorL10n.userSessionRenameSessionTitle,
|
||||
descripion: VectorL10n.userSessionRenameSessionDescription,
|
||||
action: .init(text: VectorL10n.userSessionGotIt, action: { viewModel.showBottomSheet = false }))
|
||||
}
|
||||
}
|
||||
|
||||
private var textFieldFooter: some View {
|
||||
@@ -39,7 +44,7 @@ struct UserSessionName: View {
|
||||
|
||||
InlineTextButton(VectorL10n.manageSessionNameInfo("%@"),
|
||||
tappableText: VectorL10n.manageSessionNameInfoLink) {
|
||||
viewModel.send(viewAction: .learnMore)
|
||||
viewModel.showBottomSheet = true
|
||||
}
|
||||
.foregroundColor(theme.colors.secondaryContent)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user