Changeset fe6aac9 in Klonkt
- Timestamp:
- 06/23/2026 04:27:27 PM (3 months ago)
- Branches:
- main
- Children:
- 475eeda
- Parents:
- d5e78f7
- Location:
- src
- Files:
-
- 3 edited
-
routes/admin-updates.js (modified) (2 diffs)
-
services/i18n.js (modified) (3 diffs)
-
views/pages/admin-updates.ejs (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/routes/admin-updates.js
rd5e78f7 rfe6aac9 37 37 } 38 38 39 // Laatste 5 commits op main = de "laatste wijzigingen" die je bij bijwerken krijgt. 40 function recentChanges() { 41 const out = git(['log', '-5', '--format=%s%x1f%cd', '--date=short', 'main']); 42 if (!out) return []; 43 return out.split('\n').map((l) => { 44 const i = l.indexOf('\x1f'); 45 return i >= 0 ? { msg: l.slice(0, i), date: l.slice(i + 1) } : { msg: l, date: '' }; 46 }); 47 } 48 39 49 router.get('/', requireGod, (req, res) => { 40 50 const cur = currentSha(); … … 51 61 canCheck: !!latest, 52 62 behind: (cur && latest && cur !== latest) ? git(['rev-list', '--count', cur + '..main']) : null, 63 changes: recentChanges(), 53 64 success: req.query.success || null, 54 65 error: req.query.error || null, -
src/services/i18n.js
rd5e78f7 rfe6aac9 605 605 'anews.recipients': 'ontvanger(s)', 606 606 'aupd.title': 'Updates', 607 'aupd.changes_heading': 'Laatste wijzigingen', 607 608 'aupd.back_admin': 'Beheer', 608 609 'aupd.version_heading': 'Versie van deze Klonkt', … … 1592 1593 'anews.recipients': 'recipient(s)', 1593 1594 'aupd.title': 'Updates', 1595 'aupd.changes_heading': 'Recent changes', 1594 1596 'aupd.back_admin': 'Admin', 1595 1597 'aupd.version_heading': 'Version of this Klonkt', … … 2578 2580 'anews.recipients': 'Empfänger', 2579 2581 'aupd.title': 'Updates', 2582 'aupd.changes_heading': 'Letzte Änderungen', 2580 2583 'aupd.back_admin': 'Verwaltung', 2581 2584 'aupd.version_heading': 'Version dieses Klonkt', -
src/views/pages/admin-updates.ejs
rd5e78f7 rfe6aac9 51 51 </p> 52 52 </section> 53 54 <% if (changes && changes.length) { %> 55 <section class="set-card" style="margin-top:1rem"> 56 <h2><%= t('aupd.changes_heading') %></h2> 57 <ul class="upd-changes"> 58 <% changes.forEach(function (c) { %> 59 <li><span class="upd-ch-date"><%= c.date %></span> <span class="upd-ch-msg"><%= c.msg %></span></li> 60 <% }) %> 61 </ul> 62 </section> 63 <% } %> 53 64 </div> 54 65 … … 72 83 .alert-success { background: #d1fae5; color: #065f46; border: 1px solid #a7f3d0; } 73 84 .alert-error { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; } 85 .upd-changes { list-style: none; padding: 0; margin: 0; } 86 .upd-changes li { display: flex; gap: .7rem; padding: .45rem 0; border-bottom: 1px solid var(--rule); font-size: .9rem; align-items: baseline; } 87 .upd-changes li:last-child { border-bottom: 0; } 88 .upd-ch-date { color: var(--ink-muted); flex-shrink: 0; font-size: .8rem; font-variant-numeric: tabular-nums; } 89 .upd-ch-msg { word-break: break-word; } 74 90 </style>
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)