From b9b61fa7ebb2716a013aacc410abe64a08d6f471 Mon Sep 17 00:00:00 2001 From: Shav Kinderlehrer Date: Sun, 7 Jan 2024 16:58:38 -0500 Subject: Add current user to SettingsView --- Jel/Views/Settings/SettingsView.swift | 32 ++++++++++++++++++++++++-------- 1 file changed, 24 insertions(+), 8 deletions(-) (limited to 'Jel/Views/Settings') diff --git a/Jel/Views/Settings/SettingsView.swift b/Jel/Views/Settings/SettingsView.swift index 676b977..6d246d1 100644 --- a/Jel/Views/Settings/SettingsView.swift +++ b/Jel/Views/Settings/SettingsView.swift @@ -17,26 +17,42 @@ struct SettingsView: View { var body: some View { NavigationStack { Form { + Section() { + LabeledContent("Username") { + Text("\(authState.username ?? "---")") + .textSelection(.enabled) + } + + LabeledContent("Auth Token") { + Text("\(authState.authToken ?? "---")") + .textSelection(.enabled) + } + + Button(role: .destructive) { + authState.loggedIn = false + authState.save() + } label: { + Text("Sign out") + } + } header: { + Text("Current User") + } + Section() { AppearancePicker() } header: { Text("Accessibility") } - Section { + Section() { NavigationLink { ConsoleView() .closeButtonHidden() } label: { Text("Logs") } - - Button(role: .destructive) { - authState.loggedIn = false - authState.save() - } label: { - Text("Sign out") - } + } header: { + Text("Debug") } } .navigationTitle("Settings") -- cgit v1.2.3