feat(settings): Preferences appearance setting
Reuses the existing local Appearance color-scheme picker instead of a second divergent implementation — this has always been a device-side preference in this app, not a server-synced one.
This commit is contained in:
@@ -245,6 +245,8 @@ struct SettingsView: View {
|
||||
|
||||
preferencesSubsection("Display") {
|
||||
languageRow
|
||||
Divider()
|
||||
appearanceRow
|
||||
}
|
||||
}
|
||||
.frame(maxWidth: 480, alignment: .leading)
|
||||
@@ -292,6 +294,30 @@ struct SettingsView: View {
|
||||
}
|
||||
}
|
||||
|
||||
/// Same `@AppStorage("outpost.appearance")` binding the standalone
|
||||
/// Appearance section already uses — this is a local-only, device-side
|
||||
/// preference (matches how this app has always handled it), not a
|
||||
/// server-synced Outline preference, so it doesn't need its own
|
||||
/// save call or error state.
|
||||
private var appearanceRow: some View {
|
||||
HStack {
|
||||
VStack(alignment: .leading, spacing: 2) {
|
||||
Text("Appearance")
|
||||
Text("Choose your preferred interface colour scheme.")
|
||||
.font(.caption)
|
||||
.foregroundStyle(.secondary)
|
||||
}
|
||||
Spacer()
|
||||
Picker("Appearance", selection: $appearance) {
|
||||
ForEach(AppAppearance.allCases) { option in
|
||||
Text(option.label).tag(option)
|
||||
}
|
||||
}
|
||||
.labelsHidden()
|
||||
.frame(width: 200)
|
||||
}
|
||||
}
|
||||
|
||||
private var languageBinding: Binding<String> {
|
||||
Binding(
|
||||
get: { session.userLanguage ?? "en_US" },
|
||||
|
||||
Reference in New Issue
Block a user