mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2025-08-12 06:26:36 +00:00
Audited alerts and confirmation dialogs
This commit is contained in:
@@ -109,7 +109,7 @@ struct AccountInspectorView: View {
|
||||
Spacer()
|
||||
}
|
||||
}
|
||||
.confirmationDialog(Text("Remove Account", comment: "Remove account alert title"), isPresented: $showRemoveAccountAlert, titleVisibility: .visible) {
|
||||
.alert(Text("Are you sure you want to remove “\(account.nameForDisplay)”?", comment: "Alert title: confirm account removal"), isPresented: $showRemoveAccountAlert) {
|
||||
Button(role: .destructive) {
|
||||
AccountManager.shared.deleteAccount(account)
|
||||
dismiss()
|
||||
@@ -124,11 +124,7 @@ struct AccountInspectorView: View {
|
||||
}
|
||||
|
||||
} message: {
|
||||
if account.type == .feedly {
|
||||
Text("Are you sure you want to remove this account? NetNewsWire will no longer be able to access articles and feeds unless the account is added again.", comment: "Confirmation of the impacts of deleting the Feedly account.")
|
||||
} else {
|
||||
Text("Are you sure you want to remove this account? This cannot be undone.", comment: "Confirmation of the impacts of deleting the account.")
|
||||
}
|
||||
Text("This action cannot be undone.", comment: "Alert message: remove account confirmation")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@ struct ExtensionInspectorView: View {
|
||||
} label: {
|
||||
Text("Deactivate Extension", comment: "Button title")
|
||||
}
|
||||
.confirmationDialog(Text("Deactivate Extension", comment: "Deactivate Extension confirmation title") , isPresented: $showDeactivateConfirmation, titleVisibility: .visible) {
|
||||
.alert(Text("Are you sure you want to deactivate “\(extensionPoint?.title ?? "")?", comment: "Alert title: confirm deactivate extension") , isPresented: $showDeactivateConfirmation) {
|
||||
|
||||
Button(role: .destructive) {
|
||||
ExtensionPointManager.shared.deactivateExtensionPoint(extensionPoint!.extensionPointID)
|
||||
@@ -43,7 +43,7 @@ struct ExtensionInspectorView: View {
|
||||
Text("Cancel", comment: "Button title")
|
||||
}
|
||||
} message: {
|
||||
Text("Are you sure you want to deactivate the “\(extensionPoint?.title ?? "")” extension?)", comment: "Confirmation text regarding deactivation on an extension.")
|
||||
Text("This action cannot be undone.", comment: "Alert message: remove account confirmation")
|
||||
}
|
||||
Spacer()
|
||||
}
|
||||
|
||||
@@ -107,17 +107,7 @@ struct AccountsManagementView: View {
|
||||
Text("Cancel", comment: "Button title")
|
||||
}
|
||||
} message: {
|
||||
switch viewModel.accountToDelete {
|
||||
case .none:
|
||||
Text("")
|
||||
case .some(let account):
|
||||
switch account.type {
|
||||
case .feedly:
|
||||
Text("Are you sure you want to remove this account? NetNewsWire will no longer be able to access articles and feeds unless the account is added again.", comment: "Alert message: remove Feedly account confirmation")
|
||||
default:
|
||||
Text("Are you sure you want to remove this account? This cannot be undone.", comment: "Alert message: remove account confirmation")
|
||||
}
|
||||
}
|
||||
Text("This action cannot be undone.", comment: "Alert message: remove account confirmation")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ struct ExtensionsManagementView: View {
|
||||
.sheet(isPresented: $showAddExtensionView) {
|
||||
AddExtensionListView()
|
||||
}
|
||||
.alert(Text("Deactivate Extension", comment: "Alert title: confirm deactivate extension"),
|
||||
.alert(Text("Are you sure you want to deactivate “\(extensionToDeactivate?.value.title ?? "")?", comment: "Alert title: confirm deactivate extension"),
|
||||
isPresented: $showDeactivateAlert) {
|
||||
|
||||
Button(role: .destructive) {
|
||||
@@ -49,7 +49,7 @@ struct ExtensionsManagementView: View {
|
||||
}
|
||||
|
||||
} message: {
|
||||
Text("Are you sure you want to deactivate the “\(extensionToDeactivate?.value.title ?? "")” extension?", comment: "Alert message: confirm deactivation of extension.")
|
||||
Text("This action cannot be undone.", comment: "Alert message: confirmation that deactivation of extension cannot be undone.")
|
||||
}
|
||||
.onReceive(NotificationCenter.default.publisher(for: .ActiveExtensionPointsDidChange)) { _ in
|
||||
availableExtensionPointTypes = ExtensionPointManager.shared.availableExtensionPointTypes.sorted(by: { $0.title < $1.title })
|
||||
|
||||
@@ -83,7 +83,7 @@ struct ArticleThemeManagerView: View {
|
||||
Text("Cancel", comment: "Button title")
|
||||
}
|
||||
}, message: {
|
||||
Text("Are you sure you want to delete this theme? This action cannot be undone.", comment: "Alert message: confirm theme deletion")
|
||||
Text("This action cannot be undone.", comment: "Alert message: confirm theme deletion")
|
||||
})
|
||||
.alert(Text("Import Theme", comment: "Alert title: confirm theme import"),
|
||||
isPresented: $showImportConfirmationAlert.1,
|
||||
|
||||
Reference in New Issue
Block a user