feat(phase3): PWA, auto-discovery, bookmarklet, multi-tab sync
- PWA: manifest, service worker (cache-first static, network-first API), offline page, install prompt banner - Auto-discovery: Docker socket + Traefik API scanning, approval UI - Quick-add bookmarklet: popup-based add page, favicon auto-detect - Multi-tab sync: BroadcastChannel for theme + data changes - i18n translations for all new strings (EN/RU)
This commit is contained in:
@@ -34,7 +34,14 @@ export const load: PageServerLoad = async (event) => {
|
||||
zod(updateSystemSettingsSchema)
|
||||
);
|
||||
|
||||
return { settings, form };
|
||||
return {
|
||||
settings,
|
||||
form,
|
||||
discoveryConfig: {
|
||||
dockerSocketPath: process.env.DOCKER_SOCKET_PATH || '/var/run/docker.sock',
|
||||
traefikApiUrl: process.env.TRAEFIK_API_URL || ''
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
export const actions: Actions = {
|
||||
|
||||
@@ -3,8 +3,12 @@
|
||||
import type { PageData } from './$types.js';
|
||||
import SettingsForm from '$lib/components/admin/SettingsForm.svelte';
|
||||
import ImportExportPanel from '$lib/components/admin/ImportExportPanel.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>
|
||||
@@ -17,7 +21,9 @@
|
||||
<p class="mt-1 text-sm text-muted-foreground">{$t('admin.settings_description')}</p>
|
||||
</div>
|
||||
|
||||
<SettingsForm form={data.form} />
|
||||
<SettingsForm form={data.form} bind:dockerSocketPath bind:traefikApiUrl />
|
||||
|
||||
<DiscoveryPanel bind:dockerSocketPath bind:traefikApiUrl />
|
||||
|
||||
<ImportExportPanel />
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user