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 {
|
||||
Text("iCloud Status")
|
||||
Spacer()
|
||||
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!))
|
||||
}
|
||||
cloudKitStatusLabel
|
||||
.foregroundStyle(.secondary)
|
||||
}
|
||||
}
|
||||
.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 {
|
||||
Section {
|
||||
Toggle("Report Errors Automatically", isOn: $preferences.reportErrorsAutomatically)
|
||||
|
|
Loading…
Reference in New Issue