Few improvements
This commit is contained in:
parent
3156877eff
commit
19d0fa3290
|
@ -69,10 +69,17 @@ extension View {
|
|||
.toolbarBackground(Color.appBackground, for: .navigationBar)
|
||||
.listStyle(.inset)
|
||||
}
|
||||
|
||||
func listRowThreaded() -> some View {
|
||||
self
|
||||
.listRowSeparator(.hidden)
|
||||
.listRowBackground(Color.appBackground)
|
||||
.tint(Color.blue)
|
||||
}
|
||||
func accountRowLabel(_ foreground: Color) -> some View {
|
||||
self
|
||||
.multilineTextAlignment(.leading)
|
||||
.font(.headline.bold().width(.condensed))
|
||||
.foregroundStyle(foreground)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -188,13 +188,11 @@ struct DiscoveryView: View {
|
|||
VStack(spacing: 7.5) {
|
||||
AccountRow(acct: "Threaded@mastodon.online") {
|
||||
Text("accounts.official")
|
||||
.font(.headline.bold().width(.condensed))
|
||||
.foregroundStyle(.green)
|
||||
.accountRowLabel(.green)
|
||||
}
|
||||
AccountRow(acct: "lumaa@mastodon.online") {
|
||||
Text("accounts.developer")
|
||||
.font(.headline.bold().width(.condensed))
|
||||
.foregroundStyle(.blue)
|
||||
.accountRowLabel(.blue)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -19,11 +19,12 @@ struct AboutView: View {
|
|||
Toggle("setting.experimental.activate", isOn: $userPreferences.showExperimental)
|
||||
.listRowThreaded()
|
||||
.tint(Color(uiColor: UIColor.label))
|
||||
.disabled(!AppDelegate.hasPlus())
|
||||
.onAppear {
|
||||
do {
|
||||
let oldPreferences = try UserPreferences.loadAsCurrent() ?? UserPreferences.defaultPreferences
|
||||
|
||||
userPreferences.showExperimental = oldPreferences.showExperimental
|
||||
userPreferences.showExperimental = oldPreferences.showExperimental && AppDelegate.hasPlus()
|
||||
} catch {
|
||||
print(error)
|
||||
}
|
||||
|
|
|
@ -80,7 +80,13 @@ struct SettingsView: View {
|
|||
Button {
|
||||
navigator.presentedCover = .shop
|
||||
} label: {
|
||||
Label(String("Threaded+"), systemImage: "plus")
|
||||
Label {
|
||||
Text(String("Threaded+"))
|
||||
} icon: {
|
||||
Image("HeroPlus")
|
||||
.resizable()
|
||||
.scaledToFit()
|
||||
}
|
||||
}
|
||||
.listRowThreaded()
|
||||
|
||||
|
@ -131,10 +137,10 @@ struct SettingsView: View {
|
|||
.listRowThreaded()
|
||||
}
|
||||
}
|
||||
.environmentObject(navigator)
|
||||
.withAppRouter(navigator)
|
||||
.withCovers(sheetDestination: $navigator.presentedCover)
|
||||
.listThreaded()
|
||||
.environmentObject(navigator)
|
||||
.navigationTitle("settings")
|
||||
.navigationBarTitleDisplayMode(.inline)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue