From d962cdaa317b384b2e82d0f9dc5b9d15a5733869 Mon Sep 17 00:00:00 2001
From: Jakob Stendahl <jakobste@uio.no>
Date: Wed, 6 Oct 2021 17:24:43 +0200
Subject: :children_crossing: Add update button to ui

---
 src_frontend/Components/Settings/Version.svelte | 6 ++++++
 1 file changed, 6 insertions(+)

(limited to 'src_frontend/Components/Settings/Version.svelte')

diff --git a/src_frontend/Components/Settings/Version.svelte b/src_frontend/Components/Settings/Version.svelte
index 29d04ae..35c8f96 100644
--- a/src_frontend/Components/Settings/Version.svelte
+++ b/src_frontend/Components/Settings/Version.svelte
@@ -20,6 +20,11 @@
             });
         });
     }
+
+    let updateVersionPromise;
+    function doUpdate() {
+        authorizedSocket.emit("system:update_version");
+    }
     
     onMount(async() => {
         authorizedSocket.emit("version:branch");
@@ -53,6 +58,7 @@
     <p><span class="label">Current branch</span> <PrettyVar bind:varText={branch}/></p>
     {#if newVer != version}
     <p><span class="update-available">Version <PrettyVar bind:varText={newVer} /> available.</span></p>
+    <FloatingButton on:click={doUpdate} bind:loadingPromise={updateVersionPromise} fullWidth=true>Update luxcena-neo</FloatingButton>
     {/if}
     <div class="button-row">
         <FloatingButton on:click={checkForUpdate} bind:loadingPromise={checkVersionPromise} fullWidth=true>Check for updates</FloatingButton>
-- 
cgit v1.2.3

