add developer mode view and setting

Signed-off-by: Bryan Montz <bryanmontz@me.com>
This commit is contained in:
Bryan Montz
2023-07-07 07:07:00 -05:00
committed by William Casarin
parent 6dfda93ff9
commit ebcfe3c25f
5 changed files with 39 additions and 0 deletions

View File

@@ -59,6 +59,10 @@ struct ConfigView: View {
NavigationLink(value: Route.TranslationSettings(settings: settings)) {
IconLabel(NSLocalizedString("Translation", comment: "Section header for text and appearance settings"), img_name: "globe", color: .green)
}
NavigationLink(value: Route.DeveloperSettings(settings: settings)) {
IconLabel(NSLocalizedString("Developer", comment: "Section header for developer settings"), img_name: "magic-stick2.fill", color: .black)
}
}
Section(NSLocalizedString("Sign Out", comment: "Section title for signing out")) {

View File

@@ -0,0 +1,23 @@
//
// DeveloperSettingsView.swift
// damus
//
// Created by Bryan Montz on 7/6/23.
//
import Foundation
import SwiftUI
struct DeveloperSettingsView: View {
@ObservedObject var settings: UserSettingsStore
var body: some View {
Form {
Section {
Toggle(NSLocalizedString("Developer Mode", comment: "Setting to enable developer mode"), isOn: $settings.developer_mode)
.toggleStyle(.switch)
}
}
.navigationTitle(NSLocalizedString("Developer", comment: "Navigation title for developer settings"))
}
}