diff options
author | Iván Ávalos <avalos@disroot.org> | 2022-02-16 00:22:05 -0600 |
---|---|---|
committer | Iván Ávalos <avalos@disroot.org> | 2022-02-16 00:22:05 -0600 |
commit | de9eb9dc2b932066e8ef1668d71170230edd1d38 (patch) | |
tree | 050066a09cd85d598655309ea6b2d61059c26da8 /iosApp/iosApp/Session/UserInformationView.swift | |
parent | fe30451d02b541a51f35e8ea68100c9b04f046ba (diff) | |
download | etbsa-trackermap-mobile-de9eb9dc2b932066e8ef1668d71170230edd1d38.tar.gz etbsa-trackermap-mobile-de9eb9dc2b932066e8ef1668d71170230edd1d38.tar.bz2 etbsa-trackermap-mobile-de9eb9dc2b932066e8ef1668d71170230edd1d38.zip |
- Localized strings.
- Implemented account details, about and sign out.
- Map shows first on startup now.
- Save server URL on preferences.
- More improvements and fixes!
Diffstat (limited to 'iosApp/iosApp/Session/UserInformationView.swift')
-rw-r--r-- | iosApp/iosApp/Session/UserInformationView.swift | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/iosApp/iosApp/Session/UserInformationView.swift b/iosApp/iosApp/Session/UserInformationView.swift new file mode 100644 index 0000000..98d4bfd --- /dev/null +++ b/iosApp/iosApp/Session/UserInformationView.swift @@ -0,0 +1,50 @@ +// +// UserInformationView.swift +// iosApp +// +// Created by Iván on 15/02/22. +// Copyright © 2022 orgName. All rights reserved. +// + +import SwiftUI + +struct UserInformationView: View { + @Environment(\.presentationMode) var presentationMode + @State var action = Action.account + + enum Action { + case account + case about + } + + var body: some View { + NavigationView { + VStack { + switch action { + case .account: + AccountView() + case .about: + AboutView() + } + } + .navigationBarTitleView( + Picker(selection: $action) { + Text("account").tag(Action.account) + Text("about").tag(Action.about) + } label: { + EmptyView() + }.pickerStyle(SegmentedPickerStyle()) + ) + .navigationBarTitleDisplayMode(.inline) + .toolbar { + ToolbarItem(placement: .navigationBarTrailing) { + Button { + presentationMode.wrappedValue.dismiss() + } label: { + Text("done").bold() + } + } + } + } + } +} |