ui: default uninstall warning message

This commit is contained in:
Aaron Greenspan
2021-01-14 17:45:50 -07:00
committed by Aiden McClelland
parent 73d40c71ad
commit c4eef4db17

View File

@@ -114,9 +114,9 @@ export class WizardBaker {
const toolbar: TopbarParams = { action, title, version }
const slideDefinitions: SlideDefinition[] = [
uninstallWarning ? { selector: 'developer-notes', cancelButton: { afterLoading: { text: 'Cancel' } }, nextButton: 'Next', params: {
action, developerNotes: uninstallWarning,
}} : undefined,
{ selector: 'developer-notes', cancelButton: { afterLoading: { text: 'Cancel' } }, nextButton: 'Continue', params: {
action, developerNotes: uninstallWarning || defaultUninstallationWarning(title) },
},
{ selector: 'dependents', cancelButton: { whileLoading: { }, afterLoading: { text: 'Cancel' } }, nextButton: 'Uninstall', params: {
action, verb: 'uninstalling', title, fetchBreakages: () => this.apiService.uninstallApp(id, true).then( ({ breakages }) => breakages ),
}},
@@ -171,4 +171,5 @@ function validate<T> (t: T, test: (t: T) => Boolean, desc: string) {
}
}
const exists = t => !!t
const exists = t => !!t
const defaultUninstallationWarning = serviceName => `Uninstalling ${ serviceName } will result in the deletion of its data.`