b0439e39c4
Replace the JSON-based import/export with a proper backup system that copies the SQLite database file directly. Supports manual on-demand backups, periodic scheduled backups via node-cron, configurable retention, file download, and full database restore. - Add backupService with VACUUM INTO for safe DB copies - Add backupScheduler following healthcheckScheduler pattern - Add 6 admin API endpoints (create, list, download, restore, delete, schedule) - Add BackupPanel UI with backup table, confirmation dialogs, schedule config - Add backup fields to SystemSettings schema - Remove old ImportExportPanel, exportService, importService, and related code
30 lines
1.0 KiB
Svelte
30 lines
1.0 KiB
Svelte
<script lang="ts">
|
|
import { t } from 'svelte-i18n';
|
|
import type { PageData } from './$types.js';
|
|
import SettingsForm from '$lib/components/admin/SettingsForm.svelte';
|
|
import BackupPanel from '$lib/components/admin/BackupPanel.svelte';
|
|
import DiscoveryPanel from '$lib/components/admin/DiscoveryPanel.svelte';
|
|
|
|
let { data }: { data: PageData } = $props();
|
|
|
|
let dockerSocketPath = $state(data.discoveryConfig?.dockerSocketPath ?? '/var/run/docker.sock');
|
|
let traefikApiUrl = $state(data.discoveryConfig?.traefikApiUrl ?? '');
|
|
</script>
|
|
|
|
<svelte:head>
|
|
<title>{$t('admin.system_settings')} — {$t('admin.panel')}</title>
|
|
</svelte:head>
|
|
|
|
<div class="space-y-8">
|
|
<div class="mb-6">
|
|
<h1 class="text-2xl font-bold text-card-foreground">{$t('admin.system_settings')}</h1>
|
|
<p class="mt-1 text-sm text-muted-foreground">{$t('admin.settings_description')}</p>
|
|
</div>
|
|
|
|
<SettingsForm form={data.form} bind:dockerSocketPath bind:traefikApiUrl />
|
|
|
|
<DiscoveryPanel bind:dockerSocketPath bind:traefikApiUrl />
|
|
|
|
<BackupPanel />
|
|
</div>
|