refactor(webui): relocate backup into features/backup/, app-card to shared/
- features/backup/: backup-schema.js, backup-page.js, backup.css (eager). - shared/js/backup-app-card.js: cross-feature (used by backup AND the app-detail Backups tab), so it goes to shared/, not buried in backup. - Updated paths: feature scripts array, spa.js handleBackup fallback, system-loader apps-manager component (app-card), index.html backup.css href. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Signed-off-by: librelad <librelad@digitalangels.vip>
This commit is contained in:
parent
402c1af861
commit
ee44a4eb80
@ -14,9 +14,9 @@ LP.features.register({
|
|||||||
routes: ['/backup', '/backup*'],
|
routes: ['/backup', '/backup*'],
|
||||||
// Controllers the feature needs; lazy-loaded on first mount (idempotent).
|
// Controllers the feature needs; lazy-loaded on first mount (idempotent).
|
||||||
scripts: [
|
scripts: [
|
||||||
'/js/components/backup/backup-schema.js',
|
'/features/backup/backup-schema.js',
|
||||||
'/js/components/backup/backup-page.js',
|
'/features/backup/backup-page.js',
|
||||||
'/js/components/backup/backup-app-card.js',
|
'/shared/js/backup-app-card.js',
|
||||||
],
|
],
|
||||||
|
|
||||||
async mount(ctx) {
|
async mount(ctx) {
|
||||||
|
|||||||
@ -18,7 +18,7 @@
|
|||||||
<link rel="stylesheet" href="/css/style.css">
|
<link rel="stylesheet" href="/css/style.css">
|
||||||
<link rel="stylesheet" href="/css/ip-whitelist.css">
|
<link rel="stylesheet" href="/css/ip-whitelist.css">
|
||||||
<link rel="stylesheet" href="/features/apps/port-manager.css">
|
<link rel="stylesheet" href="/features/apps/port-manager.css">
|
||||||
<link rel="stylesheet" href="/css/backup.css">
|
<link rel="stylesheet" href="/features/backup/backup.css">
|
||||||
<link rel="stylesheet" href="/css/ssh.css">
|
<link rel="stylesheet" href="/css/ssh.css">
|
||||||
<link rel="stylesheet" href="/css/admin.css">
|
<link rel="stylesheet" href="/css/admin.css">
|
||||||
<link rel="stylesheet" href="/features/apps/services.css">
|
<link rel="stylesheet" href="/features/apps/services.css">
|
||||||
|
|||||||
@ -358,8 +358,8 @@ class LibrePortalSPAClean {
|
|||||||
// backup-page.js + backup-app-card.js are loaded on first navigation.
|
// backup-page.js + backup-app-card.js are loaded on first navigation.
|
||||||
// loadScript is idempotent — subsequent /backup navigations are no-ops.
|
// loadScript is idempotent — subsequent /backup navigations are no-ops.
|
||||||
await Promise.all([
|
await Promise.all([
|
||||||
this.loadScript('/js/components/backup/backup-page.js'),
|
this.loadScript('/features/backup/backup-page.js'),
|
||||||
this.loadScript('/js/components/backup/backup-app-card.js')
|
this.loadScript('/shared/js/backup-app-card.js')
|
||||||
]);
|
]);
|
||||||
const html = await this.fetchContent('/html/backup-content.html');
|
const html = await this.fetchContent('/html/backup-content.html');
|
||||||
this.loadContent(html, 'Backups');
|
this.loadContent(html, 'Backups');
|
||||||
|
|||||||
@ -206,7 +206,7 @@ class SystemLoader {
|
|||||||
scripts: [
|
scripts: [
|
||||||
'/features/apps/port-manager.js',
|
'/features/apps/port-manager.js',
|
||||||
'/shared/task/task-manager.js', // Add TaskManager for backup functionality
|
'/shared/task/task-manager.js', // Add TaskManager for backup functionality
|
||||||
'/js/components/backup/backup-app-card.js',
|
'/shared/js/backup-app-card.js',
|
||||||
'/features/apps/services-manager.js',
|
'/features/apps/services-manager.js',
|
||||||
'/features/apps/tools-manager.js',
|
'/features/apps/tools-manager.js',
|
||||||
'/features/apps/routing-manager.js',
|
'/features/apps/routing-manager.js',
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user