feat(gui): group menu under a shared 'Backups' category with a per-plugin icon
Move the admin and site menu entries into a shared 'Backups' sidebar category (created idempotently by each sibling plugin) with a distinct icon per engine, instead of a top-level link. Each plugin tags its category+link lines with an apiscp-borg marker so its uninstaller removes only its own, leaving the shared category for any other backup plugin still installed.
This commit is contained in:
parent
b9e8694c61
commit
5c2da48c64
3 changed files with 20 additions and 30 deletions
|
|
@ -58,8 +58,8 @@ if [ -f "$DEST" ]; then
|
|||
else
|
||||
cat >> "$DEST" <<'PHP'
|
||||
|
||||
// apiscp-borg
|
||||
$templateClass->create_link('Borg Backups', '/apps/borg', true, null, null);
|
||||
$templateClass->create_category('Backups', true, '<svg role="img" fill="currentColor" class="ui-menu-icon" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M17 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V7l-4-4zm-5 16a3 3 0 1 1 0-6 3 3 0 0 1 0 6zm3-10H5V5h10v4z"/></svg>', 'backups'); // apiscp-borg
|
||||
$templateClass->create_link('Borg', '/apps/borg', true, '<svg role="img" fill="currentColor" class="ui-menu-inline-icon" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12 1L3 5v6c0 5.55 3.84 10.74 9 12 5.16-1.26 9-6.45 9-12V5l-9-4zm0 10.99h7c-.53 4.12-3.28 7.79-7 8.94V12H5V6.3l7-3.11v8.8z"/></svg>', 'backups'); // apiscp-borg
|
||||
PHP
|
||||
fi
|
||||
fi
|
||||
|
|
@ -79,8 +79,8 @@ if [ -f "$SITE_DEST" ]; then
|
|||
echo " appending create_link() to existing $SITE_DEST"
|
||||
cat >> "$SITE_DEST" <<'PHP'
|
||||
|
||||
// apiscp-borg (site-owner)
|
||||
$templateClass->create_link('My Borg Backups', '/apps/myborgbackups', true, null, 'account');
|
||||
$templateClass->create_category('Backups', true, '<svg role="img" fill="currentColor" class="ui-menu-icon" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M17 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V7l-4-4zm-5 16a3 3 0 1 1 0-6 3 3 0 0 1 0 6zm3-10H5V5h10v4z"/></svg>', 'backups'); // apiscp-borg
|
||||
$templateClass->create_link('Borg', '/apps/myborgbackups', true, '<svg role="img" fill="currentColor" class="ui-menu-inline-icon" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12 1L3 5v6c0 5.55 3.84 10.74 9 12 5.16-1.26 9-6.45 9-12V5l-9-4zm0 10.99h7c-.53 4.12-3.28 7.79-7 8.94V12H5V6.3l7-3.11v8.8z"/></svg>', 'backups'); // apiscp-borg
|
||||
PHP
|
||||
fi
|
||||
else
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue