source: Klonkt/src/views/pages/admin-updates.ejs@ 5a394e5

main
Last change on this file since 5a394e5 was bbf9d1a, checked in by roboburr <roboburr@…>, 3 months ago

feat(i18n phase 5): all admin sub-pages translated (NL/EN/DE)

settings, site-edit, seo, google, audio, stats, playlists, users, sites,
comments, circle, shows, newsletter, updates, epk, help. ~520 new keys
per language. Loop-shadowing of t() resolved by fetching before the loop. 709
view-keys cross-checked against the dictionary (0 missing).

Co-Authored-By: Claude <noreply@…>

  • Property mode set to 100644
File size: 3.5 KB
Line 
1<div class="container admin-page">
2 <h1><%= t('aupd.title') %></h1>
3 <p><a href="/admin" class="btn">&larr; <%= t('aupd.back_admin') %></a></p>
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">
9 <h2><%= t('aupd.version_heading') %></h2>
10
11 <div class="upd-row">
12 <span class="upd-label"><%= t('aupd.app_version') %></span>
13 <span class="upd-val"><%= appVersion || '—' %></span>
14 </div>
15 <div class="upd-row">
16 <span class="upd-label"><%= t('aupd.current') %></span>
17 <span class="upd-val">
18 <% if (currentSha) { %><code><%= currentSha %></code> <span class="upd-desc"><%= currentDesc %></span>
19 <% } else { %><em><%= t('aupd.current_unknown') %></em><% } %>
20 </span>
21 </div>
22 <div class="upd-row">
23 <span class="upd-label"><%= t('aupd.latest') %></span>
24 <span class="upd-val">
25 <% if (latestSha) { %><code><%= latestSha %></code> <span class="upd-desc"><%= latestDesc %></span>
26 <% } else { %><em><%= t('aupd.latest_failed') %></em><% } %>
27 </span>
28 </div>
29
30 <div class="upd-status">
31 <% if (!canCheck) { %>
32 <span class="upd-badge warn">&#9888; <%= t('aupd.no_source') %></span>
33 <% } else if (upToDate) { %>
34 <span class="upd-badge ok">&#10003; <%= t('aupd.uptodate') %></span>
35 <% } else { %>
36 <span class="upd-badge new">&#8635; <%= t('aupd.update_available') %><% if (behind) { %> (<%= behind === '1' ? t('aupd.behind_one', { n: behind }) : t('aupd.behind_many', { n: behind }) %>)<% } %></span>
37 <% } %>
38 </div>
39
40 <% if (canCheck) { %>
41 <form method="post" action="/admin/updates/run" class="set-form"
42 onsubmit="return confirm('<%= t('aupd.run_confirm') %>');">
43 <button type="submit" class="btn btn-primary">
44 <%= upToDate ? '↻ ' + t('aupd.redeploy') : '⬆ ' + t('aupd.update_now') %>
45 </button>
46 </form>
47 <% } %>
48
49 <p class="set-help" style="margin-top:1rem">
50 <%= t('aupd.help') %>
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>
Note: See TracBrowser for help on using the repository browser.