This commit is contained in:
fmodf 2024-10-07 17:21:26 +02:00
parent 4f379adfb7
commit 965b4d4f38
2 changed files with 29 additions and 2 deletions

View file

@ -77,4 +77,6 @@
"Settings.Main.title" = "Settings"; "Settings.Main.title" = "Settings";
"Settings.Section.Accounts.title" = "Accounts"; "Settings.Section.Accounts.title" = "Accounts";
"Settings.Section.Accounts.add" = "Add new account"; "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";

View file

@ -2,6 +2,7 @@ import SwiftUI
struct SettingsScreen: View { struct SettingsScreen: View {
@EnvironmentObject var clientsStore: ClientsStore @EnvironmentObject var clientsStore: ClientsStore
@Environment(\.router) var router
var body: some View { var body: some View {
ZStack { ZStack {
@ -38,7 +39,13 @@ struct SettingsScreen: View {
controlType: .none controlType: .none
) )
.onTapGesture { .onTapGesture {
print("Tapped createGroup") router.showAlert(
.confirmationDialog,
title: L10n.Settings.Section.Accounts.add,
subtitle: L10n.Settings.Section.Accounts.addHint
) {
addAccountSelector
}
} }
// Dev section // 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)
}
}
} }