mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2025-08-12 06:26:36 +00:00
Audited .alerts
- Consistent verb usage - Removes dismiss buttons if they are the only action (automatically added)
This commit is contained in:
@@ -101,13 +101,9 @@ struct AddAccountListView: View {
|
||||
}
|
||||
}
|
||||
.alert(Text("Error", comment: "Alert title: Error"),
|
||||
isPresented: $viewModel.showAddAccountError.1, actions: {
|
||||
Button {
|
||||
//
|
||||
} label: {
|
||||
Text("Dismiss", comment: "Button title")
|
||||
}
|
||||
}, message: {
|
||||
isPresented: $viewModel.showAddAccountError.1,
|
||||
actions: { },
|
||||
message: {
|
||||
Text("\(viewModel.showAddAccountError.0?.localizedDescription ?? "Unknown Error")")
|
||||
})
|
||||
.dismissOnAccountAdd()
|
||||
|
||||
@@ -22,12 +22,10 @@ struct EnableExtensionPointView: View {
|
||||
Section { enableButton }
|
||||
}
|
||||
.alert(Text("Error", comment: "Alert title: Error"), isPresented: $extensionError.1, actions: {
|
||||
Button(action: {}, label: { Text("Dismiss", comment: "Button title") })
|
||||
}, message: {
|
||||
Text(extensionError.0?.localizedDescription ?? "Unknown Error")
|
||||
})
|
||||
.alert(Text("Error", comment: "Alert title: Error"), isPresented: $viewModel.showExtensionError.1, actions: {
|
||||
Button(action: {}, label: { Text("Dismiss", comment: "Button title") })
|
||||
}, message: {
|
||||
Text(viewModel.showExtensionError.0?.localizedDescription ?? "Unknown Error")
|
||||
})
|
||||
|
||||
@@ -39,7 +39,7 @@ struct ExtensionsManagementView: View {
|
||||
Button(role: .destructive) {
|
||||
ExtensionPointManager.shared.deactivateExtensionPoint(extensionToDeactivate!.value.extensionPointID)
|
||||
} label: {
|
||||
Text("Deactivate", comment: "Button: deactivate extension.")
|
||||
Text("Deactivate Extension", comment: "Button: deactivate extension.")
|
||||
}
|
||||
|
||||
Button(role: .cancel) {
|
||||
|
||||
@@ -107,7 +107,7 @@ struct ArticleThemeManagerView: View {
|
||||
} label: {
|
||||
let exists = themeManager.themeExists(filename: showImportConfirmationAlert.0?.path ?? "")
|
||||
if exists == true {
|
||||
Text("Overwrite", comment: "Button title")
|
||||
Text("Overwrite Theme", comment: "Button title")
|
||||
} else {
|
||||
Text("Import Theme", comment: "Button title")
|
||||
}
|
||||
@@ -139,13 +139,7 @@ struct ArticleThemeManagerView: View {
|
||||
})
|
||||
.alert(Text("Error", comment: "Alert title: Error"),
|
||||
isPresented: $showImportErrorAlert.1,
|
||||
actions: {
|
||||
Button(role: .cancel) {
|
||||
|
||||
} label: {
|
||||
Text("Dismiss", comment: "Button title")
|
||||
}
|
||||
}, message: {
|
||||
actions: { }, message: {
|
||||
Text("\(showImportErrorAlert.0?.localizedDescription ?? "")")
|
||||
})
|
||||
.onReceive(themeManager.objectWillChange) { _ in
|
||||
|
||||
Reference in New Issue
Block a user