refactor(web): use callbacks for admin setting events (#10997)

This commit is contained in:
Michel Heusschen
2024-07-10 15:57:18 +02:00
committed by GitHub
parent 545b206076
commit 1dd1d36120
20 changed files with 125 additions and 153 deletions

View File

@@ -1,7 +1,15 @@
import type { ResetOptions } from '$lib/utils/dipatch';
import type { SystemConfigDto } from '@immich/sdk';
export type SettingsEventType = {
reset: ResetOptions & { configKeys: Array<keyof SystemConfigDto> };
save: Partial<SystemConfigDto>;
export type SettingsResetOptions = ResetOptions & { configKeys: Array<keyof SystemConfigDto> };
export type SettingsResetEvent = (options: SettingsResetOptions) => void;
export type SettingsSaveEvent = (config: Partial<SystemConfigDto>) => void;
export type SettingsComponentProps = {
disabled?: boolean;
defaultConfig: SystemConfigDto;
config: SystemConfigDto;
savedConfig: SystemConfigDto;
onReset: SettingsResetEvent;
onSave: SettingsSaveEvent;
};