mirror of
https://github.com/immich-app/immich.git
synced 2025-12-03 23:29:46 +09:00
feat: user's features preferences (#12099)
* feat: metadata in UserPreference * feat: web metadata settings * feat: web metadata settings * fix: typo * patch openapi * fix: missing translation key * new organization of preference strucutre * feature settings on web * localization * added and used feature settings * add default value to response dto * patch openapi * format en.json file * implement helper method * use tags preference logic * Fix logic bug and add tests * fix preference can be null in detail panel
This commit is contained in:
@@ -9,6 +9,7 @@
|
||||
export let subtitle = '';
|
||||
export let key: string;
|
||||
export let isOpen = $accordionState.has(key);
|
||||
export let autoScrollTo = false;
|
||||
|
||||
let accordionElement: HTMLDivElement;
|
||||
|
||||
@@ -18,12 +19,14 @@
|
||||
if (isOpen) {
|
||||
$accordionState = $accordionState.add(key);
|
||||
|
||||
setTimeout(() => {
|
||||
accordionElement.scrollIntoView({
|
||||
behavior: 'smooth',
|
||||
block: 'start',
|
||||
});
|
||||
}, 200);
|
||||
if (autoScrollTo) {
|
||||
setTimeout(() => {
|
||||
accordionElement.scrollIntoView({
|
||||
behavior: 'smooth',
|
||||
block: 'start',
|
||||
});
|
||||
}, 200);
|
||||
}
|
||||
} else {
|
||||
$accordionState.delete(key);
|
||||
$accordionState = $accordionState;
|
||||
@@ -72,7 +75,7 @@
|
||||
</button>
|
||||
|
||||
{#if isOpen}
|
||||
<ul transition:slide={{ duration: 250 }} class="mb-2 ml-4">
|
||||
<ul transition:slide={{ duration: 150 }} class="mb-2 ml-4">
|
||||
<slot />
|
||||
</ul>
|
||||
{/if}
|
||||
|
||||
Reference in New Issue
Block a user