Update pages in place instead of reloading them
A page that is working fetches itself again and swaps only its content; the log on the Packages page follows new text. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AeFqV9dZrK6nipHkPfyM4F
This commit is contained in:
@@ -3,7 +3,6 @@
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
{{if .Refresh}}<meta http-equiv="refresh" content="{{.Refresh}}">{{end}}
|
||||
<title>{{.Title}} · router</title>
|
||||
<link rel="stylesheet" href="/static/style.css">
|
||||
</head>
|
||||
@@ -41,8 +40,9 @@
|
||||
<h1>{{.Title}}</h1>
|
||||
{{if .Flash}}<p class="flash">{{.Flash}}</p>{{end}}
|
||||
{{if .Error}}<p class="error">{{.Error}}</p>{{end}}
|
||||
{{template "content" .}}
|
||||
<div id="live"{{if .Live}} data-live="{{.Live}}"{{end}}>{{template "content" .}}</div>
|
||||
</main>
|
||||
<script src="/static/menu.js"></script>
|
||||
<script src="/static/live.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
{{if $d.Updating}}
|
||||
<section class="busy"><h2>Updating…</h2><p>The router is installing a new version of nixos-router.</p></section>
|
||||
{{else if $d.Run.Running}}
|
||||
<section class="busy"><h2>Working…</h2><p>This page refreshes on its own. The web UI restarts when an upgrade is switched on.</p></section>
|
||||
<section class="busy"><h2>Working…</h2><p>This page updates on its own. The web UI restarts when an upgrade is switched on.</p></section>
|
||||
{{else if $d.Pending}}
|
||||
<section class="pending"><h2>Waiting for confirmation</h2>
|
||||
<p>A new system is active and not confirmed yet. Confirm it on the <a href="/">Overview</a>, or the router goes back to the
|
||||
|
||||
Reference in New Issue
Block a user