summaryrefslogtreecommitdiff
path: root/Jel/Views/Settings
diff options
context:
space:
mode:
authorShav Kinderlehrer <[email protected]>2024-01-07 16:58:38 -0500
committerShav Kinderlehrer <[email protected]>2024-01-07 16:58:38 -0500
commitb9b61fa7ebb2716a013aacc410abe64a08d6f471 (patch)
tree632eecba273f9103df041ba414a1c0f4aeef1f9b /Jel/Views/Settings
parent4d40b0c083fa78a90337273b83b44f450c3d3d9b (diff)
downloadjel-b9b61fa7ebb2716a013aacc410abe64a08d6f471.tar.gz
jel-b9b61fa7ebb2716a013aacc410abe64a08d6f471.zip
Add current user to SettingsView
Diffstat (limited to 'Jel/Views/Settings')
-rw-r--r--Jel/Views/Settings/SettingsView.swift32
1 files changed, 24 insertions, 8 deletions
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
@@ -18,25 +18,41 @@ struct SettingsView: 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")