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:
@@ -1,5 +1,6 @@
|
||||
import { goto } from '$app/navigation';
|
||||
import { auth, type Tokens, type User } from './stores/auth.svelte';
|
||||
import type { Preferences } from './types';
|
||||
|
||||
export class ApiError extends Error {
|
||||
status: number;
|
||||
@@ -97,5 +98,10 @@ export const authApi = {
|
||||
}),
|
||||
logout: (refresh_token: string) =>
|
||||
api('/auth/logout', { method: 'POST', body: { refresh_token } }),
|
||||
me: () => api<{ user: User }>('/auth/me')
|
||||
me: () => api<{ user: User; preferences?: Preferences }>('/auth/me'),
|
||||
savePreferences: (preferences: Preferences) =>
|
||||
api<{ preferences: Preferences }>('/auth/me/preferences', {
|
||||
method: 'PATCH',
|
||||
body: preferences
|
||||
})
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user