diff --git a/ConversationsClassic/Resources/Strings/Localizable.strings b/ConversationsClassic/Resources/Strings/Localizable.strings index 7eb5d85..1aa2921 100644 --- a/ConversationsClassic/Resources/Strings/Localizable.strings +++ b/ConversationsClassic/Resources/Strings/Localizable.strings @@ -77,4 +77,6 @@ "Settings.Main.title" = "Settings"; "Settings.Section.Accounts.title" = "Accounts"; "Settings.Section.Accounts.add" = "Add new account"; - +"Settings.Section.Accounts.addHint" = "You can add an existed account, or create a new one."; +"Settings.Section.Accounts.addExists" = "Add exists"; +"Settings.Section.Accounts.addNew" = "Add new"; diff --git a/ConversationsClassic/View/Main/Settings/SettingsScreen.swift b/ConversationsClassic/View/Main/Settings/SettingsScreen.swift index 27b0512..4d2362b 100644 --- a/ConversationsClassic/View/Main/Settings/SettingsScreen.swift +++ b/ConversationsClassic/View/Main/Settings/SettingsScreen.swift @@ -2,6 +2,7 @@ import SwiftUI struct SettingsScreen: View { @EnvironmentObject var clientsStore: ClientsStore + @Environment(\.router) var router var body: some View { ZStack { @@ -38,7 +39,13 @@ struct SettingsScreen: View { controlType: .none ) .onTapGesture { - print("Tapped createGroup") + router.showAlert( + .confirmationDialog, + title: L10n.Settings.Section.Accounts.add, + subtitle: L10n.Settings.Section.Accounts.addHint + ) { + addAccountSelector + } } // Dev section @@ -63,4 +70,22 @@ struct SettingsScreen: View { } } } + + @ViewBuilder private var addAccountSelector: some View { + Button { + print("Add existing account") + } label: { + Text(L10n.Settings.Section.Accounts.addExists) + } + + Button { + print("Add new account") + } label: { + Text(L10n.Settings.Section.Accounts.addNew) + } + + Button(role: .cancel) {} label: { + Text(L10n.Global.cancel) + } + } }