diff --git a/web/src/routes/admin/system-settings/+page.svelte b/web/src/routes/admin/system-settings/+page.svelte
index cabe88183e..0e56c9f221 100644
--- a/web/src/routes/admin/system-settings/+page.svelte
+++ b/web/src/routes/admin/system-settings/+page.svelte
@@ -17,26 +17,116 @@
import { downloadManager } from '$lib/stores/download';
import { featureFlags } from '$lib/stores/server-config.store';
import { downloadBlob } from '$lib/utils/asset-utils';
- import { copyToClipboard } from '@api';
+ import { SystemConfigDto, copyToClipboard } from '@api';
import Icon from '$lib/components/elements/icon.svelte';
import type { PageData } from './$types';
import NewVersionCheckSettings from '$lib/components/admin-page/settings/new-version-check-settings/new-version-check-settings.svelte';
import LibrarySettings from '$lib/components/admin-page/settings/library-settings/library-settings.svelte';
import LoggingSettings from '$lib/components/admin-page/settings/logging-settings/logging-settings.svelte';
import { mdiAlert, mdiContentCopy, mdiDownload } from '@mdi/js';
+ import _ from 'lodash';
+ import AdminSettings from '$lib/components/admin-page/settings/admin-settings.svelte';
export let data: PageData;
- const configs = data.configs;
+ let config = data.configs;
+ let openSettings = ($page.url.searchParams.get('open')?.split(',') || []) as Array
;
const downloadConfig = () => {
- const blob = new Blob([JSON.stringify(configs, null, 2)], { type: 'application/json' });
+ const blob = new Blob([JSON.stringify(config, null, 2)], { type: 'application/json' });
const downloadKey = 'immich-config.json';
downloadManager.add(downloadKey, blob.size);
downloadManager.update(downloadKey, blob.size);
downloadBlob(blob, downloadKey);
setTimeout(() => downloadManager.clear(downloadKey), 5_000);
};
+
+ const settings = [
+ {
+ item: JobSettings,
+ title: 'Job Settings',
+ subtitle: 'Manage job concurrency',
+ isOpen: openSettings.includes('job'),
+ },
+ {
+ item: LibrarySettings,
+ title: 'Library',
+ subtitle: 'Manage library settings',
+ isOpen: openSettings.includes('library'),
+ },
+ {
+ item: LoggingSettings,
+ title: 'Logging',
+ subtitle: 'Manage log settings',
+ isOpen: openSettings.includes('logging'),
+ },
+ {
+ item: MachineLearningSettings,
+ title: 'Machine Learning Settings',
+ subtitle: 'Manage machine learning features and settings',
+ isOpen: openSettings.includes('machineLearning'),
+ },
+ {
+ item: MapSettings,
+ title: 'Map & GPS Settings',
+ subtitle: 'Manage map related features and setting',
+ isOpen: openSettings.some((key) => ['map', 'reverseGeocoding'].includes(key)),
+ },
+ {
+ item: OAuthSettings,
+ title: 'OAuth Authentication',
+ subtitle: 'Manage the login with OAuth settings',
+ isOpen: openSettings.includes('oauth'),
+ },
+ {
+ item: PasswordLoginSettings,
+ title: 'Password Authentication',
+ subtitle: 'Manage the login with password settings',
+ isOpen: openSettings.includes('passwordLogin'),
+ },
+ {
+ item: ServerSettings,
+ title: 'Server Settings',
+ subtitle: 'Manage server settings',
+ isOpen: openSettings.includes('server'),
+ },
+ {
+ item: StorageTemplateSettings,
+ title: 'Storage Template',
+ subtitle: 'Manage the folder structure and file name of the upload asset',
+ isOpen: openSettings.includes('storageTemplate'),
+ },
+ {
+ item: ThemeSettings,
+ title: 'Theme Settings',
+ subtitle: 'Manage customization of the Immich web interface',
+ isOpen: openSettings.includes('theme'),
+ },
+ {
+ item: ThumbnailSettings,
+ title: 'Thumbnail Settings',
+ subtitle: 'Manage the resolution of thumbnail sizes',
+ isOpen: openSettings.includes('thumbnail'),
+ },
+ {
+ item: TrashSettings,
+ title: 'Trash Settings',
+ subtitle: 'Manage trash settings',
+ isOpen: openSettings.includes('trash'),
+ },
+ {
+ item: NewVersionCheckSettings,
+ title: 'Version Check',
+ subtitle: 'Enable/disable the new version notification',
+ isOpen: openSettings.includes('newVersionCheck'),
+ },
+ {
+ item: FFmpegSettings,
+ title: 'Video Transcoding Settings',
+ subtitle: 'Manage the resolution and encoding information of the video files',
+ isOpen: openSettings.includes('ffmpeg'),
+ },
+ ];
{#if $featureFlags.configFile}
@@ -48,7 +138,7 @@
-
copyToClipboard(JSON.stringify(configs, null, 2))}>
+ copyToClipboard(JSON.stringify(config, null, 2))}>
Copy to Clipboard
@@ -62,74 +152,23 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+ {#each settings as { item, title, subtitle, isOpen }}
+
+ handleSave(detail)}
+ on:reset={({ detail }) => handleReset(detail)}
+ disabled={$featureFlags.configFile}
+ {defaultConfig}
+ {config}
+ {savedConfig}
+ />
+
+ {/each}
+
-
+