summaryrefslogtreecommitdiff
path: root/Sora/Views/Settings
diff options
context:
space:
mode:
Diffstat (limited to 'Sora/Views/Settings')
-rw-r--r--Sora/Views/Settings/Section/SettingsDebugView.swift20
-rw-r--r--Sora/Views/Settings/SettingsView.swift6
2 files changed, 26 insertions, 0 deletions
diff --git a/Sora/Views/Settings/Section/SettingsDebugView.swift b/Sora/Views/Settings/Section/SettingsDebugView.swift
new file mode 100644
index 0000000..af55745
--- /dev/null
+++ b/Sora/Views/Settings/Section/SettingsDebugView.swift
@@ -0,0 +1,20 @@
+import SwiftUI
+
+struct SettingsDebugView: View {
+ @EnvironmentObject private var settingsManager: SettingsManager
+ var body: some View {
+ Button(action: { settingsManager.addDummyBookmarks() }) {
+ Text("Add Dummy Bookmarks")
+ }
+ #if os(macOS)
+ .frame(maxWidth: .infinity, alignment: .trailing)
+ #endif
+
+ Button(action: { settingsManager.addDummySearchHistory() }) {
+ Text("Add Dummy Search History")
+ }
+ #if os(macOS)
+ .frame(maxWidth: .infinity, alignment: .trailing)
+ #endif
+ }
+}
diff --git a/Sora/Views/Settings/SettingsView.swift b/Sora/Views/Settings/SettingsView.swift
index a9c8141..4f00cbd 100644
--- a/Sora/Views/Settings/SettingsView.swift
+++ b/Sora/Views/Settings/SettingsView.swift
@@ -31,6 +31,12 @@ struct SettingsView: View {
#endif
}
+ #if DEBUG
+ Section(header: Text("Debug")) {
+ SettingsDebugView()
+ }
+ #endif
+
Section(header: Text("Credits")) {
SettingsCreditsView()
}