Indent + Restart label
This commit is contained in:
parent
b07467f1a7
commit
af2d85dcc1
|
@ -4,18 +4,15 @@ import SwiftUI
|
||||||
import SwiftData
|
import SwiftData
|
||||||
import WatchConnectivity
|
import WatchConnectivity
|
||||||
|
|
||||||
//TODO: "Privacy" with mutelist, blocklist
|
|
||||||
|
|
||||||
struct SettingsView: View {
|
struct SettingsView: View {
|
||||||
@Environment(UniversalNavigator.self) private var uniNav: UniversalNavigator
|
@Environment(UniversalNavigator.self) private var uniNav: UniversalNavigator
|
||||||
|
|
||||||
@Query private var loggedAccounts: [LoggedAccount]
|
@Query private var loggedAccounts: [LoggedAccount]
|
||||||
|
|
||||||
@StateObject var navigator: Navigator
|
@EnvironmentObject private var navigator: Navigator
|
||||||
@State private var switched: Bool = false
|
@State private var switched: Bool = false
|
||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
NavigationStack(path: $navigator.path) {
|
|
||||||
List {
|
List {
|
||||||
if loggedAccounts.count > 0 {
|
if loggedAccounts.count > 0 {
|
||||||
Section {
|
Section {
|
||||||
|
@ -63,6 +60,11 @@ struct SettingsView: View {
|
||||||
.listRowThreaded()
|
.listRowThreaded()
|
||||||
|
|
||||||
Section {
|
Section {
|
||||||
|
Text("settings.restart-app")
|
||||||
|
.font(.caption)
|
||||||
|
.foregroundStyle(Color.gray)
|
||||||
|
.listRowThreaded()
|
||||||
|
|
||||||
Button {
|
Button {
|
||||||
navigator.navigate(to: .about)
|
navigator.navigate(to: .about)
|
||||||
} label: {
|
} label: {
|
||||||
|
@ -140,12 +142,10 @@ struct SettingsView: View {
|
||||||
.withAppRouter(navigator)
|
.withAppRouter(navigator)
|
||||||
.withCovers(sheetDestination: $navigator.presentedCover)
|
.withCovers(sheetDestination: $navigator.presentedCover)
|
||||||
.listThreaded()
|
.listThreaded()
|
||||||
.environmentObject(navigator)
|
|
||||||
.navigationTitle("settings")
|
.navigationTitle("settings")
|
||||||
.navigationBarTitleDisplayMode(.inline)
|
.navigationBarTitleDisplayMode(.inline)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
extension SettingsView {
|
extension SettingsView {
|
||||||
struct SwitcherRow: View {
|
struct SwitcherRow: View {
|
||||||
|
|
Loading…
Reference in New Issue