fix(webui): friendly title + icon for the verify task
The `libreportal verify` task showed its raw command and no icon. Add its
formatCommandForUser pattern ("LibrePortal - Verify System"), a 🛡️ type icon,
a formatActionTitle entry, and include it in isLibrePortalSystemTask so it shows
the LibrePortal logo like other system tasks.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Signed-off-by: librelad <librelad@digitalangels.vip>
This commit is contained in:
parent
0ae8c819a6
commit
382e91f2a7
@ -75,7 +75,7 @@ class TasksManager {
|
||||
'delete': 'Delete Backup', 'delete_all': 'Delete All Backups',
|
||||
'config_update': 'Update Config', 'update_config': 'Update Config',
|
||||
'system_update': 'Update System', 'system_reclaim': 'Reclaim Space',
|
||||
'system_image_rm': 'Remove Images',
|
||||
'system_image_rm': 'Remove Images', 'verify': 'Verify System',
|
||||
'setup-config': 'Apply Configuration',
|
||||
'setup-finalize': 'Finalize Setup'
|
||||
};
|
||||
@ -992,6 +992,7 @@ class TasksManager {
|
||||
// -- System maintenance ------------------------------------------------
|
||||
{ match: /^libreportal system reclaim\b/, title: 'LibrePortal - Reclaim Space' },
|
||||
{ match: /^libreportal system image rm\b/, title: 'LibrePortal - Remove Images' },
|
||||
{ match: /^libreportal verify\b/, title: 'LibrePortal - Verify System' },
|
||||
|
||||
// -- Backup: per-app (these capture the app slug) ----------------------
|
||||
{ match: /^libreportal backup app create (\w+)/, title: (m) => `${displayName(m[1])} - Create Backup` },
|
||||
@ -1087,6 +1088,7 @@ class TasksManager {
|
||||
'delete': { icon: '🗑️', class: 'delete' },
|
||||
'delete_all': { icon: '🗑️', class: 'delete' },
|
||||
'system_image_rm': { icon: '🗑️', class: 'delete' },
|
||||
'verify': { icon: '🛡️', class: 'verify' },
|
||||
'setup-config': { icon: '🛠️', class: 'setup' },
|
||||
'setup-finalize': { icon: '🎉', class: 'setup' },
|
||||
'custom': { icon: '⚙️', class: 'custom' }
|
||||
@ -1099,7 +1101,7 @@ class TasksManager {
|
||||
the row can show the LibrePortal logo instead of a blank icon slot. */
|
||||
isLibrePortalSystemTask(task) {
|
||||
if (!task || !task.command || task.app) return false;
|
||||
return /^libreportal (setup|backup\s+all|backup\s+system|backup\s+verify|backup\s+location|backup\s+repo|restore\s+migrate\s+system|restore\s+migrate\s+discover|restore\s+first-run|webui|config|update)\b/.test(task.command);
|
||||
return /^libreportal (setup|backup\s+all|backup\s+system|backup\s+verify|backup\s+location|backup\s+repo|restore\s+migrate\s+system|restore\s+migrate\s+discover|restore\s+first-run|webui|config|update|verify|system\s+(reclaim|image))\b/.test(task.command);
|
||||
}
|
||||
|
||||
/* Render the leading icon(s) on a task row:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user