From cbc4ea0d75c328af84fb63770d7d782a1834a5e0 Mon Sep 17 00:00:00 2001 From: James Date: Thu, 9 Aug 2018 17:25:10 +1000 Subject: [PATCH] Correct message on uninstall --- static/js/views.js | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/static/js/views.js b/static/js/views.js index 21e7c3d..7f095f7 100644 --- a/static/js/views.js +++ b/static/js/views.js @@ -238,7 +238,11 @@ const InstallPackages = { if (app.metadata.is_launcher) { app.exit(); } else if (!that.failed_with_error) { - router.replace("/complete"); + if (that.is_uninstall) { + router.replace({name: 'complete', params: {uninstall: true}}); + } else { + router.replace({name: 'complete', params: {uninstall: false}}); + } } } }, undefined, results); @@ -272,13 +276,23 @@ const ErrorView = { const CompleteView = { template: `
-

Thanks for installing {{ $root.$data.attrs.name }}!

+
+

Thanks for installing {{ $root.$data.attrs.name }}!

-

You can find your installed applications in your start menu.

+

You can find your installed applications in your start menu.

+
+
+

{{ $root.$data.attrs.name }} has been uninstalled.

+
Exit
`, + data: function() { + return { + was_install: !this.$route.params.uninstall + } + }, methods: { exit: function() { app.exit(); @@ -370,7 +384,7 @@ const router = new VueRouter({ component: ErrorView }, { - path: '/complete', + path: '/complete/:uninstall', name: 'complete', component: CompleteView },