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