Merge claude/1

This commit is contained in:
librelad 2026-05-31 02:53:57 +01:00
commit bc1969dd20
2 changed files with 18 additions and 4 deletions

View File

@ -24,6 +24,12 @@ Object.assign(TasksManager.prototype, {
{ match: /^libreportal update (apply|now)\b/, title: 'LibrePortal - Update' }, { match: /^libreportal update (apply|now)\b/, title: 'LibrePortal - Update' },
{ match: /^libreportal update check\b/, title: 'LibrePortal - Check for Updates' }, { match: /^libreportal update check\b/, title: 'LibrePortal - Check for Updates' },
// -- App updater (per-app updates + CVE scan; snapshots before applying)
{ match: /^libreportal updater check\b/, title: 'Apps - Check for Updates' },
{ match: /^libreportal updater apply-all\b/, title: 'Apps - Update All' },
{ match: /^libreportal updater apply (\S+)/, title: (m) => `${displayName(m[1])} - Update` },
{ match: /^libreportal updater rollback (\S+)/, title: (m) => `${displayName(m[1])} - Roll Back` },
// -- Peers ------------------------------------------------------------- // -- Peers -------------------------------------------------------------
{ match: /^libreportal peer add\b/, title: 'LibrePortal - Add Peer' }, { match: /^libreportal peer add\b/, title: 'LibrePortal - Add Peer' },
{ match: /^libreportal peer remove\b/, title: 'LibrePortal - Remove Peer' }, { match: /^libreportal peer remove\b/, title: 'LibrePortal - Remove Peer' },
@ -130,6 +136,8 @@ Object.assign(TasksManager.prototype, {
'config_update': 'Update Config', 'update_config': 'Update Config', 'config_update': 'Update Config', 'update_config': 'Update Config',
'system_update': 'Update System', 'system_reclaim': 'Reclaim Space', 'system_update': 'Update System', 'system_reclaim': 'Reclaim Space',
'system_image_rm': 'Remove Images', 'verify': 'Verify System', 'system_image_rm': 'Remove Images', 'verify': 'Verify System',
'updater_check': 'Check for Updates', 'updater_apply': 'Update',
'updater_apply_all': 'Update All', 'updater_rollback': 'Roll Back',
'setup-config': 'Apply Configuration', 'setup-config': 'Apply Configuration',
'setup-finalize': 'Finalize Setup' 'setup-finalize': 'Finalize Setup'
}; };

View File

@ -256,10 +256,12 @@ Object.assign(TasksManager.prototype, {
}, },
renderTaskIcons(task) { renderTaskIcons(task) {
const typeIcon = `<span class="task-type-icon">${this.getTaskTypeIcon(task).icon}</span>`; const typeIcon = `<span class="task-type-icon">${this.getTaskTypeIcon(task).icon}</span>`;
// `app: 'system'` is a category sentinel (config_update, system_update, …), // `app: 'system'` and `app: 'updater'` are category sentinels (config_update,
// not a real app slug, so it has no /core/icons/apps/system.svg — fall through // system_update, updater_check/apply_all, …), not real app slugs, so they have
// to the LibrePortal-system branch so those tasks still get a logo. // no /core/icons/apps/<x>.svg — fall through to the LibrePortal-system branch
const isSystemSentinel = task.app === 'system'; // so those tasks still get a logo. (updater_apply/rollback carry a real app
// slug and keep their own app icon.)
const isSystemSentinel = task.app === 'system' || task.app === 'updater';
if (task.app && !isSystemSentinel) { if (task.app && !isSystemSentinel) {
const appIconPath = this.getAppIconPath(task); const appIconPath = this.getAppIconPath(task);
return `${typeIcon}<img src="${appIconPath}" alt="${task.app}" class="task-app-icon" onerror="this.style.display='none'">`; return `${typeIcon}<img src="${appIconPath}" alt="${task.app}" class="task-app-icon" onerror="this.style.display='none'">`;
@ -307,6 +309,10 @@ Object.assign(TasksManager.prototype, {
'verify': { icon: '🛡️', class: 'verify' }, 'verify': { icon: '🛡️', class: 'verify' },
'setup-config': { icon: '🛠️', class: 'setup' }, 'setup-config': { icon: '🛠️', class: 'setup' },
'setup-finalize': { icon: '🎉', class: 'setup' }, 'setup-finalize': { icon: '🎉', class: 'setup' },
'updater_check': { icon: '🔍', class: 'verify' },
'updater_apply': { icon: '⬆️', class: 'update' },
'updater_apply_all': { icon: '⬆️', class: 'update' },
'updater_rollback': { icon: '↩️', class: 'restore' },
'custom': { icon: '⚙️', class: 'custom' } 'custom': { icon: '⚙️', class: 'custom' }
}; };