wip
This commit is contained in:
parent
4f379adfb7
commit
965b4d4f38
|
@ -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";
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue