aboutsummaryrefslogtreecommitdiff
path: root/Map/Presentation/Preferences/MapPreferencesView.swift
diff options
context:
space:
mode:
authorRuben Beltran del Rio <git@r.bdr.sh>2025-07-07 13:09:13 +0200
committerRuben Beltran del Rio <git@r.bdr.sh>2025-07-07 13:09:13 +0200
commit3fdaeab6a7fa19b0c5424de487efc37c0994c86e (patch)
tree09af4c1d54924350b4e6c89fb4f284170e89b945 /Map/Presentation/Preferences/MapPreferencesView.swift
parent933078c10e99002c8a5f647e476819f0f1706a14 (diff)
More localization and map preferences
Diffstat (limited to 'Map/Presentation/Preferences/MapPreferencesView.swift')
-rw-r--r--Map/Presentation/Preferences/MapPreferencesView.swift36
1 files changed, 29 insertions, 7 deletions
diff --git a/Map/Presentation/Preferences/MapPreferencesView.swift b/Map/Presentation/Preferences/MapPreferencesView.swift
index fb5f8c2..f8c976e 100644
--- a/Map/Presentation/Preferences/MapPreferencesView.swift
+++ b/Map/Presentation/Preferences/MapPreferencesView.swift
@@ -16,14 +16,36 @@
import SwiftUI
struct MapPreferencesView: View {
+ @AppStorage("showMapBackground") private var showBackground = true
+ @AppStorage("useSmartEditor") private var useSmartEditor = false
+
var body: some View {
- VStack {
- Text("Map Preferences")
- .font(.largeTitle)
- .padding()
-
- Text("Map settings will be available here in a future version.")
- .foregroundColor(.secondary)
+ VStack(alignment: .center, spacing: Dimensions.Spacing.loose) {
+ HStack(alignment: .firstTextBaseline, spacing: Dimensions.Spacing.regular) {
+ Text("preferences.map.map_style.title")
+ .font(.Theme.Body.emphasized)
+ .frame(maxWidth: .infinity, alignment: .trailing)
+
+ VStack(alignment: .leading, spacing: Dimensions.Spacing.cozy) {
+ Toggle(isOn: $showBackground, label: { Text("preferences.map.map_style.show_background")
+ .font(.Theme.Body.regular)
+ })
+ }
+ .frame(maxWidth: .infinity, alignment: .leading)
+ }
+
+ Divider()
+
+ HStack(alignment: .firstTextBaseline, spacing: Dimensions.Spacing.regular) {
+ Text("preferences.map.editor.title")
+ .font(.Theme.Body.emphasized)
+ .frame(maxWidth: .infinity, alignment: .trailing)
+
+ VStack(alignment: .leading, spacing: Dimensions.Spacing.cozy) {
+ Toggle(String(localized: "preferences.map.editor.use_smart_editor"), isOn: $useSmartEditor)
+ }
+ .frame(maxWidth: .infinity, alignment: .leading)
+ }
Spacer()
}