- backend: deleting an album moves its photos to the trash without losing files (photos.album_id nullable, FK ON DELETE SET NULL, migration 000006; dropped S3 prefix delete); restore accepts an album target (album_required when the album is gone); user-scoped tags (000007) with GET /tags, POST/DELETE /photos/:id/tags, tags included in photo responses; GET /trash/count - frontend: right-click context menus for photos (grid + viewer) and albums (rail + overview); single shared PhotoPanel reused in viewer and gallery selection (not a copy); viewer download/delete moved to the panel 'Действия'; transparent compact viewer top bar; trash entry as last rail item with per-album photo counts and trash count; album rename/delete dialogs - openspec: sync lightroom-workspace-ui artifacts (specs photos/ui-workspace, design #24-30, tasks 9.17-9.24)
28 lines
723 B
Svelte
28 lines
723 B
Svelte
<script lang="ts">
|
|
import { onMount } from 'svelte';
|
|
import '../app.css';
|
|
import IconSprite from '$lib/components/IconSprite.svelte';
|
|
import ContextMenu from '$lib/components/ContextMenu.svelte';
|
|
import { auth } from '$lib/stores/auth.svelte';
|
|
import { theme } from '$lib/stores/theme.svelte';
|
|
import { density } from '$lib/stores/density.svelte';
|
|
import { authApi } from '$lib/api';
|
|
|
|
let { children } = $props();
|
|
|
|
onMount(() => {
|
|
theme.init();
|
|
density.init();
|
|
if (auth.isAuthenticated && !auth.user) {
|
|
authApi
|
|
.me()
|
|
.then((data) => auth.setUser({ ...data.user, preferences: data.preferences ?? {} }))
|
|
.catch(() => {});
|
|
}
|
|
});
|
|
</script>
|
|
|
|
<IconSprite />
|
|
{@render children()}
|
|
<ContextMenu />
|