feat(preferences): configurable photo info attributes stored in user profile
- backend: users.preferences jsonb (migration 000004), Me returns preferences, PATCH /auth/me/preferences with validation (visible list + labels) - frontend: gear in info section opens PhotoInfoSettingsDialog; base attribute set shown by default, remaining under ellipsis; per-attribute visibility and custom labels persisted to the profile; reset clears settings from the profile - frontend: dialog has select-all/deselect-all icon buttons (no 'show all'); EXIF constants extracted to lib/exif.ts - fix: render modal overlays via portal to document.body so they center in the viewport despite transformed panel/rail ancestors - openspec: sync lightroom-workspace-ui artifacts (spec/design/proposal/tasks 9.8)
This commit is contained in:
@@ -7,10 +7,11 @@
|
||||
id: string;
|
||||
title: string;
|
||||
open?: boolean;
|
||||
actions?: Snippet;
|
||||
children: Snippet;
|
||||
}
|
||||
|
||||
let { id, title, open = true, children }: Props = $props();
|
||||
let { id, title, open = true, actions, children }: Props = $props();
|
||||
|
||||
// svelte-ignore state_referenced_locally
|
||||
let isOpen = $state(open);
|
||||
@@ -28,18 +29,23 @@
|
||||
</script>
|
||||
|
||||
<section class="border-border border-b">
|
||||
<button
|
||||
type="button"
|
||||
class="text-text-muted hover:text-text flex w-full items-center justify-between gap-2 px-4 py-2.5 text-left"
|
||||
aria-expanded={isOpen}
|
||||
onclick={toggle}
|
||||
>
|
||||
<span class="text-xs font-semibold tracking-wide uppercase">{title}</span>
|
||||
<Icon
|
||||
name="expand_more"
|
||||
class="size-4 shrink-0 transition-transform {isOpen ? 'rotate-180' : ''}"
|
||||
/>
|
||||
</button>
|
||||
<div class="flex items-center">
|
||||
<button
|
||||
type="button"
|
||||
class="text-text-muted hover:text-text flex flex-1 items-center justify-between gap-2 px-4 py-2.5 text-left"
|
||||
aria-expanded={isOpen}
|
||||
onclick={toggle}
|
||||
>
|
||||
<span class="text-xs font-semibold tracking-wide uppercase">{title}</span>
|
||||
<Icon
|
||||
name="expand_more"
|
||||
class="size-4 shrink-0 transition-transform {isOpen ? 'rotate-180' : ''}"
|
||||
/>
|
||||
</button>
|
||||
{#if actions}
|
||||
<div class="flex items-center pr-3">{@render actions()}</div>
|
||||
{/if}
|
||||
</div>
|
||||
{#if isOpen}
|
||||
<div class="px-4 pb-4">{@render children()}</div>
|
||||
{/if}
|
||||
|
||||
Reference in New Issue
Block a user