From f17c346919a32e481be2d5ee322f76dae8c03e96 Mon Sep 17 00:00:00 2001
From: GeckoEidechse <40122905+GeckoEidechse@users.noreply.github.com>
Date: Sun, 6 Aug 2023 21:56:05 +0200
Subject: feat: Move button for killing NS to RepairView (#487)

* feat: Move button for killing NS to RepairView
* i18n: Add German translation
---
 src-vue/src/views/RepairView.vue | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

(limited to 'src-vue/src/views/RepairView.vue')

diff --git a/src-vue/src/views/RepairView.vue b/src-vue/src/views/RepairView.vue
index 65c533d2..ce7e154d 100644
--- a/src-vue/src/views/RepairView.vue
+++ b/src-vue/src/views/RepairView.vue
@@ -17,6 +17,10 @@
                 {{ $t('settings.repair.window.force_reinstall_ns') }}
             </el-button>
 
+            <el-button type="primary" @click="killNorthstar">
+                {{ $t('settings.repair.window.kill_northstar_process') }}
+            </el-button>
+
             <el-button type="primary" @click="disableModsettingsMod">
                 {{ $t('settings.repair.window.disable_modsettings') }}
             </el-button>
@@ -121,6 +125,16 @@ export default defineComponent({
                     showErrorNotification(error);
                 });
         },
+        async killNorthstar() {
+            await invoke("kill_northstar")
+                .then((message) => {
+                    // Just a visual indicator that it worked
+                    showNotification('Success');
+                })
+                .catch((error) => {
+                    showErrorNotification(error);
+                });
+        },
     },
     watch: {
         // Lang value is propagated to repair view after it's mounted, so we need to watch
-- 
cgit v1.2.3

