Show progress for uploads and updates, and reload when they are done
An uploaded bundle gets a progress bar over the page; a running update an overlay that follows its steps. A page that finished working, or that was sent to the login page by a restart, is loaded whole. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AeFqV9dZrK6nipHkPfyM4F
This commit is contained in:
@@ -44,5 +44,6 @@
|
||||
</main>
|
||||
<script src="/static/menu.js"></script>
|
||||
<script src="/static/live.js"></script>
|
||||
<script src="/static/upload.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -10,8 +10,15 @@
|
||||
</section>
|
||||
|
||||
{{if $d.Status.Running}}
|
||||
<section class="busy"><h2>Updating…</h2><p>Verifying, importing and building the new version. This page refreshes on its own;
|
||||
the web UI restarts when the new version is switched on.</p></section>
|
||||
<div class="upload-overlay" role="dialog" aria-modal="true">
|
||||
<div class="upload-card">
|
||||
<h2>Updating…</h2>
|
||||
<progress max="100" value="{{$d.Progress}}"></progress>
|
||||
<p>{{$d.Step}}</p>
|
||||
<p class="muted">This takes a few minutes. The page reloads when it is done; the web UI restarts when the new
|
||||
version is switched on, and you log in again.</p>
|
||||
</div>
|
||||
</div>
|
||||
{{else if $d.Pending}}
|
||||
<section class="pending"><h2>Waiting for confirmation</h2>
|
||||
<p>A new configuration is active and not confirmed yet. Confirm it on the <a href="/">Overview</a>, or the router
|
||||
@@ -23,7 +30,7 @@
|
||||
<p>A <code>.bundle</code> file made with <code>nix run .#release</code>. It is installed only if it is signed with
|
||||
this router's update key. The settings are kept (and migrated if the new version needs it); the new version
|
||||
must be confirmed afterwards, or the router goes back.</p>
|
||||
<form method="post" action="/update/upload?csrf={{.CSRF}}" enctype="multipart/form-data">
|
||||
<form method="post" action="/update/upload?csrf={{.CSRF}}" enctype="multipart/form-data" data-upload>
|
||||
<p><label><input type="checkbox" name="force"> also install a version that is not newer</label></p>
|
||||
<p><input type="file" name="bundle" required> <button>Upload and install</button></p>
|
||||
</form>
|
||||
|
||||
Reference in New Issue
Block a user