feat(frontend): add configurable app settings (file load limit, tag rule apply_to_existing)
- Add appSettings store (localStorage-backed) with two settings: fileLoadLimit (default 100) and tagRuleApplyToExisting (default false) - Settings page: new Behaviour section with numeric input for files per page (10–500) and an on/off toggle for retroactive tag rule application - files/+page.svelte: derive LIMIT from appSettings.fileLoadLimit so changes take effect immediately without reload - TagRuleEditor: pass apply_to_existing from appSettings when activating a rule via PATCH (only sent on activation, not deactivation) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
import BulkTagEditor from '$lib/components/file/BulkTagEditor.svelte';
|
||||
import { parseDslFilter } from '$lib/utils/dsl';
|
||||
import type { File, FileCursorPage, Pool, PoolOffsetPage } from '$lib/api/types';
|
||||
import { appSettings } from '$lib/stores/appSettings';
|
||||
|
||||
let uploader = $state<{ open: () => void } | undefined>();
|
||||
let confirmDeleteFiles = $state(false);
|
||||
@@ -65,7 +66,7 @@
|
||||
files = [file, ...files];
|
||||
}
|
||||
|
||||
const LIMIT = 50;
|
||||
let LIMIT = $derived($appSettings.fileLoadLimit);
|
||||
|
||||
const FILE_SORT_OPTIONS = [
|
||||
{ value: 'created', label: 'Created' },
|
||||
|
||||
Reference in New Issue
Block a user