diff --git a/Outpost/Features/Account/SettingsView.swift b/Outpost/Features/Account/SettingsView.swift index b5ca05f..5d0e539 100644 --- a/Outpost/Features/Account/SettingsView.swift +++ b/Outpost/Features/Account/SettingsView.swift @@ -764,6 +764,10 @@ struct SettingsView: View { Divider().frame(maxWidth: 480) + if !isEffectivelyOnline { + offlineSettingsHint + } + HStack { Text("Personal keys") .font(.headline) @@ -774,6 +778,8 @@ struct SettingsView: View { .frame(maxWidth: 480) apiKeysList + .disabled(!isEffectivelyOnline) + .opacity(isEffectivelyOnline ? 1 : 0.4) } .task { await refreshApiKeys() } .sheet(isPresented: $isShowingCreateApiKey) { @@ -908,7 +914,7 @@ struct SettingsView: View { } else { Button("Create") { Task { await createApiKey() } } .buttonStyle(.borderedProminent) - .disabled(newApiKeyName.trimmingCharacters(in: .whitespacesAndNewlines).isEmpty) + .disabled(newApiKeyName.trimmingCharacters(in: .whitespacesAndNewlines).isEmpty || !isEffectivelyOnline) } } }