From 4ee57ab935718a269fe7ab65b26ff27837d49003 Mon Sep 17 00:00:00 2001
From: Jakob Stendahl <jakobste@uio.no>
Date: Mon, 8 Nov 2021 06:55:13 +0100
Subject: :lipstick: If update started, keep showing update window while
 rebooting

---
 src_frontend/routes/Updating.svelte | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

(limited to 'src_frontend/routes/Updating.svelte')

diff --git a/src_frontend/routes/Updating.svelte b/src_frontend/routes/Updating.svelte
index 2e68310..26cbaad 100644
--- a/src_frontend/routes/Updating.svelte
+++ b/src_frontend/routes/Updating.svelte
@@ -1,11 +1,19 @@
 <script>
-	import { openSocket, authorizedSocket } from "../stores/socketStore";
+	import { openSocket, authorizedSocket, connected, reconnecting } from "../stores/socketStore";
 
     let hasError = false;
     let updateLog = "";
     let step = "";
     let command = "";
 
+
+    openSocket.io.on("reconnect", () => {
+        openSocketReconnecting.set(false);
+    });
+    openSocket.on("connect", () => {
+        console.log("END UPDATE");
+        window.location.href = "/";
+    });
     openSocket.on("updater", (event) => {
         if (event == "end") {
             if (!hasError) {
-- 
cgit v1.2.3

