Merge claude/1

This commit is contained in:
librelad 2026-05-30 19:18:43 +01:00
commit 78c463d3ac
20 changed files with 21 additions and 20 deletions

View File

@ -13,29 +13,30 @@ LP.features.register({
id: 'backup',
routes: ['/backup', '/backup*'],
// Controllers the feature needs; lazy-loaded on first mount (idempotent).
// Controllers, organised by sub-system (tabs). core/ first: schema + base
// class + the shared data/cron, then each tab's prototype-augment clusters.
scripts: [
'/components/backup/js/backup-schema.js',
'/components/backup/js/backup-page.js', // base: class + constructor + init/switchTab/render
// prototype-augment clusters (load after the base, order among them is free):
'/components/backup/js/backup-fetch-client.js',
'/components/backup/js/backup-dashboard.js',
'/components/backup/js/backup-snapshots.js',
'/components/backup/js/backup-locations.js',
'/components/backup/js/backup-location-fields.js',
'/components/backup/js/backup-ssh-key.js',
'/components/backup/js/backup-retention-presets.js',
'/components/backup/js/backup-configuration.js',
'/components/backup/js/backup-engine-details.js',
'/components/backup/js/backup-location-modal.js',
'/components/backup/js/backup-snapshot-actions.js',
'/components/backup/js/backup-migrate.js',
'/components/backup/js/backup-cron-schedule.js',
'/components/backup/core/js/backup-schema.js',
'/components/backup/core/js/backup-page.js', // base: class + constructor + init/switchTab/render
'/components/backup/core/js/backup-fetch-client.js',
'/components/backup/core/js/backup-cron-schedule.js',
'/components/backup/dashboard/js/backup-dashboard.js',
'/components/backup/snapshots/js/backup-snapshots.js',
'/components/backup/snapshots/js/backup-snapshot-actions.js',
'/components/backup/locations/js/backup-locations.js',
'/components/backup/locations/js/backup-location-fields.js',
'/components/backup/locations/js/backup-location-modal.js',
'/components/backup/locations/js/backup-ssh-key.js',
'/components/backup/migrate/js/backup-migrate.js',
'/components/backup/configuration/js/backup-configuration.js',
'/components/backup/configuration/js/backup-retention-presets.js',
'/components/backup/configuration/js/backup-engine-details.js',
'/core/lib/backup-app-card.js',
],
async mount(ctx) {
await ctx.loadScripts(this.scripts);
const html = await ctx.loadFragment('/components/backup/html/backup-content.html');
const html = await ctx.loadFragment('/components/backup/core/html/backup-content.html');
ctx.setContent(html, 'Backups');
if (typeof BackupPage === 'undefined') {
throw new Error('BackupPage controller failed to load');

View File

@ -370,10 +370,10 @@ class LibrePortalSPAClean {
// backup-page.js + backup-app-card.js are loaded on first navigation.
// loadScript is idempotent — subsequent /backup navigations are no-ops.
await Promise.all([
this.loadScript('/components/backup/js/backup-page.js'),
this.loadScript('/components/backup/core/js/backup-page.js'),
this.loadScript('/core/lib/backup-app-card.js')
]);
const html = await this.fetchContent('/components/backup/html/backup-content.html');
const html = await this.fetchContent('/components/backup/core/html/backup-content.html');
this.loadContent(html, 'Backups');
if (typeof BackupPage !== 'undefined') {
window.backupPage = new BackupPage();

View File

@ -18,7 +18,7 @@
<link rel="stylesheet" href="/core/css/style.css">
<link rel="stylesheet" href="/components/admin/config/css/ip-whitelist.css">
<link rel="stylesheet" href="/components/apps/port-manager/css/port-manager.css">
<link rel="stylesheet" href="/components/backup/css/backup.css">
<link rel="stylesheet" href="/components/backup/core/css/backup.css">
<link rel="stylesheet" href="/components/admin/ssh/css/ssh.css">
<link rel="stylesheet" href="/components/admin/core/css/admin.css">
<link rel="stylesheet" href="/components/apps/services/css/services.css">