From c4eef4db17d3759e99e9b44074403c70b3b84261 Mon Sep 17 00:00:00 2001 From: Aaron Greenspan Date: Thu, 14 Jan 2021 17:45:50 -0700 Subject: [PATCH] ui: default uninstall warning message --- ui/src/app/components/install-wizard/prebaked-wizards.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/ui/src/app/components/install-wizard/prebaked-wizards.ts b/ui/src/app/components/install-wizard/prebaked-wizards.ts index f9047359e..68abfcc9a 100644 --- a/ui/src/app/components/install-wizard/prebaked-wizards.ts +++ b/ui/src/app/components/install-wizard/prebaked-wizards.ts @@ -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, test: (t: T) => Boolean, desc: string) { } } -const exists = t => !!t \ No newline at end of file +const exists = t => !!t +const defaultUninstallationWarning = serviceName => `Uninstalling ${ serviceName } will result in the deletion of its data.` \ No newline at end of file