| [ff08153] | 1 | <div class="container admin-page">
|
|---|
| [bbf9d1a] | 2 | <h1><%= t('aupd.title') %></h1>
|
|---|
| 3 | <p><a href="/admin" class="btn">← <%= t('aupd.back_admin') %></a></p>
|
|---|
| [ff08153] | 4 |
|
|---|
| 5 | <% if (success) { %><div class="alert alert-success"><%= success %></div><% } %>
|
|---|
| 6 | <% if (error) { %><div class="alert alert-error"><%= error %></div><% } %>
|
|---|
| 7 |
|
|---|
| 8 | <section class="set-card">
|
|---|
| [bbf9d1a] | 9 | <h2><%= t('aupd.version_heading') %></h2>
|
|---|
| [ff08153] | 10 |
|
|---|
| 11 | <div class="upd-row">
|
|---|
| [bbf9d1a] | 12 | <span class="upd-label"><%= t('aupd.app_version') %></span>
|
|---|
| [ff08153] | 13 | <span class="upd-val"><%= appVersion || '—' %></span>
|
|---|
| 14 | </div>
|
|---|
| 15 | <div class="upd-row">
|
|---|
| [bbf9d1a] | 16 | <span class="upd-label"><%= t('aupd.current') %></span>
|
|---|
| [ff08153] | 17 | <span class="upd-val">
|
|---|
| 18 | <% if (currentSha) { %><code><%= currentSha %></code> <span class="upd-desc"><%= currentDesc %></span>
|
|---|
| [bbf9d1a] | 19 | <% } else { %><em><%= t('aupd.current_unknown') %></em><% } %>
|
|---|
| [ff08153] | 20 | </span>
|
|---|
| 21 | </div>
|
|---|
| 22 | <div class="upd-row">
|
|---|
| [bbf9d1a] | 23 | <span class="upd-label"><%= t('aupd.latest') %></span>
|
|---|
| [ff08153] | 24 | <span class="upd-val">
|
|---|
| 25 | <% if (latestSha) { %><code><%= latestSha %></code> <span class="upd-desc"><%= latestDesc %></span>
|
|---|
| [bbf9d1a] | 26 | <% } else { %><em><%= t('aupd.latest_failed') %></em><% } %>
|
|---|
| [ff08153] | 27 | </span>
|
|---|
| 28 | </div>
|
|---|
| 29 |
|
|---|
| 30 | <div class="upd-status">
|
|---|
| 31 | <% if (!canCheck) { %>
|
|---|
| [bbf9d1a] | 32 | <span class="upd-badge warn">⚠ <%= t('aupd.no_source') %></span>
|
|---|
| [ff08153] | 33 | <% } else if (upToDate) { %>
|
|---|
| [bbf9d1a] | 34 | <span class="upd-badge ok">✓ <%= t('aupd.uptodate') %></span>
|
|---|
| [ff08153] | 35 | <% } else { %>
|
|---|
| [bbf9d1a] | 36 | <span class="upd-badge new">↻ <%= t('aupd.update_available') %><% if (behind) { %> (<%= behind === '1' ? t('aupd.behind_one', { n: behind }) : t('aupd.behind_many', { n: behind }) %>)<% } %></span>
|
|---|
| [ff08153] | 37 | <% } %>
|
|---|
| 38 | </div>
|
|---|
| 39 |
|
|---|
| 40 | <% if (canCheck) { %>
|
|---|
| 41 | <form method="post" action="/admin/updates/run" class="set-form"
|
|---|
| [bbf9d1a] | 42 | onsubmit="return confirm('<%= t('aupd.run_confirm') %>');">
|
|---|
| [ff08153] | 43 | <button type="submit" class="btn btn-primary">
|
|---|
| [bbf9d1a] | 44 | <%= upToDate ? '↻ ' + t('aupd.redeploy') : '⬆ ' + t('aupd.update_now') %>
|
|---|
| [ff08153] | 45 | </button>
|
|---|
| 46 | </form>
|
|---|
| 47 | <% } %>
|
|---|
| 48 |
|
|---|
| 49 | <p class="set-help" style="margin-top:1rem">
|
|---|
| [bbf9d1a] | 50 | <%= t('aupd.help') %>
|
|---|
| [ff08153] | 51 | </p>
|
|---|
| 52 | </section>
|
|---|
| 53 | </div>
|
|---|
| 54 |
|
|---|
| 55 | <style>
|
|---|
| 56 | .admin-page { max-width: 700px; margin: 3rem auto; padding: 0 1rem; }
|
|---|
| 57 | .admin-page h1 { font-family: var(--font-display, serif); font-size: 2rem; margin: 0 0 .25rem; }
|
|---|
| 58 | .set-card { background: var(--paper-2); border: 1px solid var(--rule); border-radius: 12px; padding: 1.25rem; }
|
|---|
| 59 | .set-card h2 { font-family: var(--font-display, serif); font-size: 1.25rem; margin: 0 0 1rem; }
|
|---|
| 60 | .set-help { color: var(--ink-muted); font-size: .9rem; }
|
|---|
| 61 | .upd-row { display: flex; gap: 1rem; padding: .55rem 0; border-bottom: 1px solid var(--rule); align-items: baseline; }
|
|---|
| 62 | .upd-label { width: 90px; flex-shrink: 0; font-size: .8rem; font-weight: 600; color: var(--ink-muted); }
|
|---|
| 63 | .upd-val { font-size: .9rem; }
|
|---|
| 64 | .upd-val code { background: var(--paper); padding: .1rem .4rem; border-radius: 4px; font-size: .85em; }
|
|---|
| 65 | .upd-desc { color: var(--ink-muted); }
|
|---|
| 66 | .upd-status { margin: 1.1rem 0; }
|
|---|
| 67 | .upd-badge { font-size: .8rem; font-weight: 700; padding: .25rem .7rem; border-radius: 20px; }
|
|---|
| 68 | .upd-badge.ok { background: #d1fae5; color: #065f46; }
|
|---|
| 69 | .upd-badge.new { background: #fef3c7; color: #92400e; }
|
|---|
| 70 | .upd-badge.warn { background: #fee2e2; color: #991b1b; }
|
|---|
| 71 | .alert { padding: .75rem 1rem; border-radius: 6px; margin-bottom: 1rem; }
|
|---|
| 72 | .alert-success { background: #d1fae5; color: #065f46; border: 1px solid #a7f3d0; }
|
|---|
| 73 | .alert-error { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }
|
|---|
| 74 | </style>
|
|---|