diff GeoQuiz/SettingsModalView.swift @ 30:eb23effeede7

add DatasetView
author Dennis C. M. <dennis@denniscm.com>
date Thu, 10 Nov 2022 11:51:52 +0100
parents 3f4b366d476d
children 9d6dd0e59c22
line wrap: on
line diff
--- a/GeoQuiz/SettingsModalView.swift	Thu Nov 10 10:27:28 2022 +0100
+++ b/GeoQuiz/SettingsModalView.swift	Thu Nov 10 11:51:52 2022 +0100
@@ -38,6 +38,11 @@
                 }
                 
                 Section {
+                    Toggle("Haptics", isOn: $userController.data.haptics)
+                    Toggle("Sound effects", isOn: $userController.data.sound)
+                }
+                
+                Section {
                     Picker("Flag shape", selection: $userController.data.guessTheFlagShape) {
                         ForEach(GuessTheFlagShape.allCases, id: \.self) { shape in
                             Text(shape.localizedName)
@@ -49,35 +54,37 @@
                 }
                 
                 Section {
-                    Toggle("Haptics", isOn: $userController.data.haptics)
-                    Toggle("Sound effects", isOn: $userController.data.sound)
-                } header: {
-                    Text("Effects")
-                }
-                
-                Section {
-                    SettingsRow(
-                        color: .mayaBlue,
-                        symbol: "person.fill",
-                        text: "About",
-                        url: URL(string: "https://dennistech.io")!
-                    )
+                    Link(destination: URL(string: "https://dennistech.io")!) {
+                        SettingsRow(
+                            color: .mayaBlue,
+                            symbol: "person.fill",
+                            text: "About"
+                        )
+                    }
+                    
+                    NavigationLink(destination: DatasetView()) {
+                        SettingsRow(
+                            color: .atomicTangerine,
+                            symbol: "square.stack.3d.up.fill",
+                            text: "Dataset"
+                        )
+                    }
                     
-                    SettingsRow(
-                        color: .atomicTangerine,
-                        symbol: "ant.fill",
-                        text: "Report bugs",
-                        url: URL(string: "mailto:dmartin@dennistech.io")!
-                    )
+                    Link(destination: URL(string: "mailto:dmartin@dennistech.io")!) {
+                        SettingsRow(
+                            color: .chinaPink,
+                            symbol: "ant.fill",
+                            text: "Report bugs"
+                        )
+                    }
                     
-                    SettingsRow(
-                        color: .blueBell,
-                        symbol: "message.fill",
-                        text: "Twitter",
-                        url: URL(string: "https://twitter.com/dennistech_")!
-                    )
-                } header: {
-                    Text("Get in touch")
+                    Link(destination: URL(string: "https://twitter.com/dennistech_")!) {
+                        SettingsRow(
+                            color: .blueBell,
+                            symbol: "message.fill",
+                            text: "Twitter"
+                        )
+                    }
                 } footer: {
                     HStack {
                         Spacer()