Changeset fe6aac9 in Klonkt for src/routes


Ignore:
Timestamp:
06/23/2026 04:27:27 PM (3 months ago)
Author:
Robin Genis <roboburr@…>
Branches:
main
Children:
475eeda
Parents:
d5e78f7
Message:

feat: Updates page shows the last 5 changes (git log)

Admin -> Updates now shows a 'Recent changes' card with the 5 newest commits
on main (message + date), so you can see what you're getting before updating.
i18n NL/EN/DE (aupd.changes_heading).

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/routes/admin-updates.js

    rd5e78f7 rfe6aac9  
    3737}
    3838
     39// Laatste 5 commits op main = de "laatste wijzigingen" die je bij bijwerken krijgt.
     40function 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
    3949router.get('/', requireGod, (req, res) => {
    4050  const cur = currentSha();
     
    5161    canCheck: !!latest,
    5262    behind: (cur && latest && cur !== latest) ? git(['rev-list', '--count', cur + '..main']) : null,
     63    changes: recentChanges(),
    5364    success: req.query.success || null,
    5465    error: req.query.error || null,
Note: See TracChangeset for help on using the changeset viewer.