forked from shadowfacts/Tusker
Tweak iCloud status appearance in advanced prefs
This commit is contained in:
parent
c32181818a
commit
ee7bf5138c
|
@ -83,22 +83,8 @@ struct AdvancedPrefsView : View {
|
||||||
HStack {
|
HStack {
|
||||||
Text("iCloud Status")
|
Text("iCloud Status")
|
||||||
Spacer()
|
Spacer()
|
||||||
switch cloudKitStatus {
|
cloudKitStatusLabel
|
||||||
case nil:
|
.foregroundStyle(.secondary)
|
||||||
EmptyView()
|
|
||||||
case .available:
|
|
||||||
Text("Available")
|
|
||||||
case .couldNotDetermine:
|
|
||||||
Text("Could not determine")
|
|
||||||
case .noAccount:
|
|
||||||
Text("No account")
|
|
||||||
case .restricted:
|
|
||||||
Text("Restricted")
|
|
||||||
case .temporarilyUnavailable:
|
|
||||||
Text("Temporarily Unavailable")
|
|
||||||
@unknown default:
|
|
||||||
Text(String(describing: cloudKitStatus!))
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.appGroupedListRowBackground()
|
.appGroupedListRowBackground()
|
||||||
|
@ -112,6 +98,26 @@ struct AdvancedPrefsView : View {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ViewBuilder
|
||||||
|
private var cloudKitStatusLabel: some View {
|
||||||
|
switch cloudKitStatus {
|
||||||
|
case nil:
|
||||||
|
EmptyView()
|
||||||
|
case .available:
|
||||||
|
Text("Available")
|
||||||
|
case .couldNotDetermine:
|
||||||
|
Text("Could not determine")
|
||||||
|
case .noAccount:
|
||||||
|
Text("No account")
|
||||||
|
case .restricted:
|
||||||
|
Text("Restricted")
|
||||||
|
case .temporarilyUnavailable:
|
||||||
|
Text("Temporarily Unavailable")
|
||||||
|
@unknown default:
|
||||||
|
Text(String(describing: cloudKitStatus!))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
var errorReportingSection: some View {
|
var errorReportingSection: some View {
|
||||||
Section {
|
Section {
|
||||||
Toggle("Report Errors Automatically", isOn: $preferences.reportErrorsAutomatically)
|
Toggle("Report Errors Automatically", isOn: $preferences.reportErrorsAutomatically)
|
||||||
|
|
Loading…
Reference in New Issue