2026-06-17 17:06:30 -06:00
|
|
|
<script lang="ts">
|
2026-07-19 17:30:22 +00:00
|
|
|
import { SvelteMap, SvelteSet } from 'svelte/reactivity';
|
|
|
|
|
import { primeContextPage } from '$lib/utils/listContext';
|
2026-06-17 22:30:56 -06:00
|
|
|
import Button from '$lib/components/Button.svelte';
|
|
|
|
|
import { useOwnerCache } from '$lib/composables/useOwnerCache.svelte';
|
|
|
|
|
import { errorToast } from '$lib/utils/errors';
|
2026-06-17 22:07:18 -06:00
|
|
|
import { goto } from '$app/navigation';
|
2026-06-21 19:03:07 +02:00
|
|
|
import { resolve } from '$app/paths';
|
2026-06-17 17:06:30 -06:00
|
|
|
import { onMount } from 'svelte';
|
|
|
|
|
import {
|
2026-06-17 22:07:18 -06:00
|
|
|
dateBucket,
|
2026-06-17 17:06:30 -06:00
|
|
|
fetchFavoritesPage,
|
|
|
|
|
removeFavorite,
|
2026-06-17 22:07:18 -06:00
|
|
|
resolveOwnerName,
|
|
|
|
|
sizeBucket,
|
|
|
|
|
typeLabel,
|
2026-06-17 17:06:30 -06:00
|
|
|
type FavoritesResourceItem
|
|
|
|
|
} from '$lib/api/endpoints/favorites';
|
2026-06-17 22:07:18 -06:00
|
|
|
import { fileDownloadUrl } from '$lib/api/endpoints/files';
|
|
|
|
|
import { renameFile, deleteFile } from '$lib/api/endpoints/files';
|
|
|
|
|
import { renameFolder, deleteFolder } from '$lib/api/endpoints/folders';
|
2026-07-07 23:08:10 +02:00
|
|
|
import type { FileItem, FolderItem } from '$lib/api/types';
|
2026-06-19 22:56:00 +00:00
|
|
|
import { lazyComponent } from '$lib/composables/lazyComponent.svelte';
|
2026-06-17 22:07:18 -06:00
|
|
|
import ResourceList, {
|
2026-07-07 23:08:10 +02:00
|
|
|
isFile,
|
2026-06-17 22:07:18 -06:00
|
|
|
type ContextAction,
|
|
|
|
|
type GroupByDef,
|
2026-07-07 23:08:10 +02:00
|
|
|
type ItemContext
|
2026-06-17 22:07:18 -06:00
|
|
|
} from '$lib/components/ResourceList.svelte';
|
|
|
|
|
import { confirmDialog, promptDialog } from '$lib/stores/dialogs.svelte';
|
2026-06-17 17:06:30 -06:00
|
|
|
import { t } from '$lib/i18n/index.svelte';
|
|
|
|
|
|
2026-06-17 22:07:18 -06:00
|
|
|
let raw = $state<FavoritesResourceItem[]>([]);
|
2026-06-17 17:06:30 -06:00
|
|
|
let cursor = $state<string | undefined>(undefined);
|
|
|
|
|
let loading = $state(false);
|
|
|
|
|
let error = $state<string | null>(null);
|
2026-06-17 22:07:18 -06:00
|
|
|
let groupBy = $state('');
|
|
|
|
|
let reversed = $state(false);
|
2026-06-17 22:30:56 -06:00
|
|
|
const owners = useOwnerCache(resolveOwnerName);
|
2026-06-17 17:06:30 -06:00
|
|
|
|
2026-07-07 23:08:10 +02:00
|
|
|
// Favorites view DELIBERATELY doesn't set `showDotfileToggle` on
|
|
|
|
|
// the ResourceList below — favoriting is an explicit "I want to
|
|
|
|
|
// keep an eye on this" action by the user, and hiding a starred
|
|
|
|
|
// dotfile here would contradict that intent. The
|
|
|
|
|
// `preferences.hideDotfiles` toggle is for reducing incidental
|
|
|
|
|
// clutter in algorithmic listings (files / recent / photos), not
|
|
|
|
|
// for overriding user-intentional pins. Trash follows the same
|
|
|
|
|
// principle for a safety-net reason; the general rule: explicit-
|
|
|
|
|
// action surfaces don't filter, algorithmic surfaces do.
|
|
|
|
|
//
|
|
|
|
|
// ResourceList consumes raw `FileItem | FolderItem`; the favorites
|
|
|
|
|
// envelope contributes `favorited_at` via `date` in contextMap. All
|
|
|
|
|
// items on this page are favorites — pass every id in `favoriteIds`
|
|
|
|
|
// so the star widget lights up universally.
|
|
|
|
|
const items = $derived(raw.map((it) => it.resource as FileItem | FolderItem));
|
2026-07-19 17:30:22 +00:00
|
|
|
// Persistent reactive map, primed per page in `load()` (benches/ROUND16.md §F2)
|
|
|
|
|
// instead of rebuilding a fresh Map that re-hashes the whole accumulated list
|
|
|
|
|
// on every infinite-scroll page. Mirrors the sibling `favoriteIds` SvelteSet.
|
|
|
|
|
const contextMap = new SvelteMap<string, ItemContext>();
|
2026-07-19 10:22:12 +00:00
|
|
|
// Persistent reactive set, updated in place per page (add the fresh page's
|
|
|
|
|
// ids; clear on reset) instead of rebuilding a brand-new SvelteSet over the
|
|
|
|
|
// whole accumulated list on every infinite-scroll page — that was O(N²)
|
|
|
|
|
// across a drain and, being a new instance each page, invalidated every
|
|
|
|
|
// mounted star reader. Every item on this page is a favorite, and removed
|
|
|
|
|
// items are no longer rendered, so the set only needs to be a superset of
|
|
|
|
|
// the displayed ids (benches/ROUND14.md §F2, mirrors recent's shipped shape).
|
|
|
|
|
const favoriteIds = new SvelteSet<string>();
|
2026-06-17 22:07:18 -06:00
|
|
|
|
|
|
|
|
const groupBys: GroupByDef[] = [
|
2026-06-20 02:27:24 +02:00
|
|
|
{ key: '', label: t('files.name', 'Name'), orderBy: 'name', icon: 'arrow-up-a-z' },
|
2026-06-17 22:07:18 -06:00
|
|
|
{
|
|
|
|
|
key: 'owner',
|
|
|
|
|
label: t('groupby.owner', 'Owner'),
|
|
|
|
|
orderBy: 'owner',
|
2026-07-07 23:08:10 +02:00
|
|
|
bucketOf: (item) => item.created_by ?? null,
|
2026-06-17 22:30:56 -06:00
|
|
|
labelOf: (id) => owners.label(id)
|
2026-06-17 22:07:18 -06:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
key: 'type',
|
|
|
|
|
label: t('groupby.type', 'Type'),
|
|
|
|
|
orderBy: 'type',
|
2026-07-07 23:08:10 +02:00
|
|
|
bucketOf: (item) => item.category ?? 'other',
|
2026-06-17 22:07:18 -06:00
|
|
|
labelOf: (k) => typeLabel(k)
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
key: 'size',
|
|
|
|
|
label: t('groupby.size', 'Size'),
|
|
|
|
|
orderBy: 'size',
|
2026-07-07 23:08:10 +02:00
|
|
|
bucketOf: (item) => sizeBucket(isFile(item) ? item.size : null)
|
2026-06-17 22:07:18 -06:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
key: 'favoriteDate',
|
|
|
|
|
label: t('groupby.favoriteDate', 'Favorite date'),
|
|
|
|
|
orderBy: 'favorited_at',
|
2026-07-07 23:08:10 +02:00
|
|
|
bucketOf: (_item, ctx) => dateBucket(ctx?.date)
|
2026-06-17 22:07:18 -06:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
key: 'modifiedAt',
|
|
|
|
|
label: t('groupby.modifiedAt', 'Modified date'),
|
|
|
|
|
orderBy: 'modified_at',
|
2026-07-07 23:08:10 +02:00
|
|
|
bucketOf: (item) => dateBucket(item.modified_at)
|
2026-06-17 22:07:18 -06:00
|
|
|
}
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
async function load(reset = false, orderBy = 'name', rev = reversed) {
|
2026-06-17 17:06:30 -06:00
|
|
|
loading = true;
|
|
|
|
|
error = null;
|
|
|
|
|
try {
|
2026-06-17 22:07:18 -06:00
|
|
|
const page = await fetchFavoritesPage({
|
|
|
|
|
cursor: reset ? undefined : cursor,
|
|
|
|
|
orderBy,
|
|
|
|
|
reverse: rev,
|
|
|
|
|
resourceTypes: ['file', 'folder']
|
|
|
|
|
});
|
|
|
|
|
raw = reset ? page.items : [...raw, ...page.items];
|
2026-07-19 10:22:12 +00:00
|
|
|
// Keep the persistent favoriteIds set in sync incrementally: clear on
|
|
|
|
|
// reset, then add only this page's ids (benches/ROUND14.md §F2).
|
|
|
|
|
if (reset) favoriteIds.clear();
|
|
|
|
|
for (const it of page.items) favoriteIds.add(it.resource.id);
|
2026-07-19 17:30:22 +00:00
|
|
|
primeContextPage(contextMap, reset, page.items, (it) => [
|
|
|
|
|
it.resource.id,
|
|
|
|
|
{ date: it.favorited_at }
|
|
|
|
|
]);
|
2026-06-17 17:06:30 -06:00
|
|
|
cursor = page.next_cursor;
|
2026-07-03 00:48:14 +02:00
|
|
|
void owners.resolve(page.items.map((i) => i.resource.created_by));
|
2026-06-17 17:06:30 -06:00
|
|
|
} catch (e) {
|
2026-06-17 22:07:18 -06:00
|
|
|
console.error('favorites: load error', e);
|
|
|
|
|
error = t('errors_loadFailed', 'Failed to load items');
|
2026-06-17 17:06:30 -06:00
|
|
|
} finally {
|
|
|
|
|
loading = false;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2026-06-17 22:07:18 -06:00
|
|
|
function orderByForGroup(): string {
|
|
|
|
|
return groupBys.find((g) => g.key === groupBy)?.orderBy ?? 'name';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
let viewerOpen = $state(false);
|
|
|
|
|
let viewerFile = $state<FileItem | null>(null);
|
|
|
|
|
|
2026-06-19 22:56:00 +00:00
|
|
|
// The file preview is loaded the first time a file is opened, keeping its
|
|
|
|
|
// module out of this route's initial chunk.
|
|
|
|
|
const fileViewer = lazyComponent(() => import('$lib/components/FileViewer.svelte'));
|
2026-06-21 19:17:10 +02:00
|
|
|
const moveDialog = lazyComponent(() => import('$lib/components/MoveDialog.svelte'));
|
|
|
|
|
const shareDialog = lazyComponent(() => import('$lib/components/ShareDialog.svelte'));
|
2026-06-19 22:56:00 +00:00
|
|
|
$effect(() => {
|
|
|
|
|
if (viewerOpen) void fileViewer.load();
|
2026-06-21 19:17:10 +02:00
|
|
|
if (moveOpen) void moveDialog.load();
|
|
|
|
|
if (shareOpen) void shareDialog.load();
|
2026-06-19 22:56:00 +00:00
|
|
|
});
|
|
|
|
|
|
2026-07-07 23:08:10 +02:00
|
|
|
function open(item: FileItem | FolderItem) {
|
|
|
|
|
if (!isFile(item)) {
|
|
|
|
|
goto(resolve(`/files/${item.id}`));
|
2026-06-17 22:07:18 -06:00
|
|
|
return;
|
|
|
|
|
}
|
2026-07-07 23:08:10 +02:00
|
|
|
viewerFile = item;
|
|
|
|
|
viewerOpen = true;
|
2026-06-17 22:07:18 -06:00
|
|
|
}
|
|
|
|
|
|
2026-07-07 23:08:10 +02:00
|
|
|
async function unfavorite(item: FileItem | FolderItem) {
|
|
|
|
|
const kind = isFile(item) ? 'file' : 'folder';
|
2026-06-17 17:06:30 -06:00
|
|
|
try {
|
2026-07-07 23:08:10 +02:00
|
|
|
await removeFavorite(kind, item.id);
|
|
|
|
|
raw = raw.filter((i) => i.resource.id !== item.id);
|
2026-07-19 10:22:12 +00:00
|
|
|
favoriteIds.delete(item.id);
|
2026-06-17 22:07:18 -06:00
|
|
|
} catch (e) {
|
2026-06-17 22:30:56 -06:00
|
|
|
errorToast(e);
|
2026-06-17 22:07:18 -06:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ── Context-menu actions ──────────────────────────────────────────────────
|
|
|
|
|
let moveOpen = $state(false);
|
|
|
|
|
let moveTarget = $state<{ id: string; name: string; kind: 'file' | 'folder' } | null>(null);
|
|
|
|
|
let moveItems = $state<{ id: string; name: string; kind: 'file' | 'folder' }[] | null>(null);
|
|
|
|
|
let shareOpen = $state(false);
|
|
|
|
|
let shareTarget = $state<{ id: string; name: string; kind: 'file' | 'folder' } | null>(null);
|
|
|
|
|
|
2026-07-07 23:08:10 +02:00
|
|
|
function kindOf(item: FileItem | FolderItem): 'file' | 'folder' {
|
|
|
|
|
return isFile(item) ? 'file' : 'folder';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
async function rename(item: FileItem | FolderItem) {
|
2026-06-17 22:07:18 -06:00
|
|
|
const name = await promptDialog({
|
|
|
|
|
title: t('common.rename', 'Rename'),
|
2026-07-07 23:08:10 +02:00
|
|
|
defaultValue: item.name,
|
2026-06-17 22:07:18 -06:00
|
|
|
confirmText: t('common.rename', 'Rename')
|
|
|
|
|
});
|
2026-07-07 23:08:10 +02:00
|
|
|
if (!name || name === item.name) return;
|
2026-06-17 22:07:18 -06:00
|
|
|
try {
|
2026-07-07 23:08:10 +02:00
|
|
|
if (isFile(item)) await renameFile(item.id, name);
|
|
|
|
|
else await renameFolder(item.id, name);
|
2026-06-17 22:07:18 -06:00
|
|
|
await load(true, orderByForGroup());
|
|
|
|
|
} catch (e) {
|
2026-06-17 22:30:56 -06:00
|
|
|
errorToast(e);
|
2026-06-17 22:07:18 -06:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2026-07-07 23:08:10 +02:00
|
|
|
async function remove(item: FileItem | FolderItem) {
|
2026-06-17 22:07:18 -06:00
|
|
|
const ok = await confirmDialog({
|
|
|
|
|
title: t('common.delete', 'Delete'),
|
2026-07-07 23:08:10 +02:00
|
|
|
message: t('files.confirm_delete', { name: item.name }, 'Delete "{{name}}"?'),
|
2026-06-17 22:07:18 -06:00
|
|
|
confirmText: t('common.delete', 'Delete'),
|
|
|
|
|
danger: true
|
|
|
|
|
});
|
|
|
|
|
if (!ok) return;
|
|
|
|
|
try {
|
2026-07-07 23:08:10 +02:00
|
|
|
if (isFile(item)) await deleteFile(item.id);
|
|
|
|
|
else await deleteFolder(item.id);
|
|
|
|
|
raw = raw.filter((i) => i.resource.id !== item.id);
|
2026-06-17 22:07:18 -06:00
|
|
|
} catch (e) {
|
2026-06-17 22:30:56 -06:00
|
|
|
errorToast(e);
|
2026-06-17 22:07:18 -06:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2026-07-07 23:08:10 +02:00
|
|
|
function downloadItem(item: FileItem | FolderItem) {
|
|
|
|
|
if (!isFile(item)) return;
|
2026-06-17 22:07:18 -06:00
|
|
|
const a = document.createElement('a');
|
2026-07-07 23:08:10 +02:00
|
|
|
a.href = fileDownloadUrl(item.id);
|
|
|
|
|
a.download = item.name;
|
2026-06-17 22:07:18 -06:00
|
|
|
document.body.appendChild(a);
|
|
|
|
|
a.click();
|
|
|
|
|
a.remove();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const contextActions: ContextAction[] = [
|
|
|
|
|
{
|
|
|
|
|
key: 'download',
|
|
|
|
|
label: t('common.download', 'Download'),
|
|
|
|
|
icon: 'download',
|
2026-07-07 23:08:10 +02:00
|
|
|
run: downloadItem
|
2026-06-17 22:07:18 -06:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
key: 'share',
|
|
|
|
|
label: t('files.share', 'Share'),
|
|
|
|
|
icon: 'share-alt',
|
2026-07-07 23:08:10 +02:00
|
|
|
run: (item) => {
|
|
|
|
|
shareTarget = { id: item.id, name: item.name, kind: kindOf(item) };
|
2026-06-17 22:07:18 -06:00
|
|
|
shareOpen = true;
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
key: 'move',
|
|
|
|
|
label: t('files.move', 'Move'),
|
|
|
|
|
icon: 'arrows-alt',
|
2026-07-07 23:08:10 +02:00
|
|
|
run: (item) => {
|
2026-06-17 22:07:18 -06:00
|
|
|
moveItems = null;
|
2026-07-07 23:08:10 +02:00
|
|
|
moveTarget = { id: item.id, name: item.name, kind: kindOf(item) };
|
2026-06-17 22:07:18 -06:00
|
|
|
moveOpen = true;
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
{ key: 'rename', label: t('common.rename', 'Rename'), icon: 'pen', run: rename },
|
|
|
|
|
{ key: 'delete', label: t('common.delete', 'Delete'), icon: 'trash', danger: true, run: remove }
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
// ── Selection + batch ─────────────────────────────────────────────────────
|
2026-07-18 23:15:10 +00:00
|
|
|
// Selected items arrive via the batchToolbar snippet param —
|
|
|
|
|
// ResourceList already derives them (O(selection), not O(N)); a
|
|
|
|
|
// host-side `items.filter(...)` shadow would re-run a second full scan
|
|
|
|
|
// per selection toggle, and its id mirror is unnecessary (the component
|
|
|
|
|
// prunes its own selection when items reload) — benches/ROUND11.md §S1.
|
|
|
|
|
type Selectable = FileItem | FolderItem;
|
2026-06-17 22:07:18 -06:00
|
|
|
|
2026-07-18 23:15:10 +00:00
|
|
|
function batchTargets(sel: Selectable[]) {
|
|
|
|
|
return sel.map((i) => ({ id: i.id, name: i.name, kind: kindOf(i) }));
|
2026-06-17 22:07:18 -06:00
|
|
|
}
|
|
|
|
|
|
2026-07-18 23:15:10 +00:00
|
|
|
function batchDownload(sel: Selectable[]) {
|
|
|
|
|
for (const i of sel) downloadItem(i);
|
2026-06-17 22:07:18 -06:00
|
|
|
}
|
|
|
|
|
|
2026-07-18 23:15:10 +00:00
|
|
|
async function batchDelete(sel: Selectable[]) {
|
2026-06-17 22:07:18 -06:00
|
|
|
const ok = await confirmDialog({
|
|
|
|
|
title: t('common.delete', 'Delete'),
|
2026-07-18 22:02:00 +00:00
|
|
|
message: t('files.confirm_delete_n', { count: sel.length }, 'Delete {{count}} item(s)?'),
|
2026-06-17 22:07:18 -06:00
|
|
|
confirmText: t('common.delete', 'Delete'),
|
|
|
|
|
danger: true
|
|
|
|
|
});
|
|
|
|
|
if (!ok) return;
|
|
|
|
|
try {
|
2026-07-18 23:15:10 +00:00
|
|
|
await Promise.all(sel.map((i) => (isFile(i) ? deleteFile(i.id) : deleteFolder(i.id))));
|
|
|
|
|
const removed = new Set(sel.map((i) => i.id));
|
2026-06-17 22:07:18 -06:00
|
|
|
raw = raw.filter((i) => !removed.has(i.resource.id));
|
2026-06-17 17:06:30 -06:00
|
|
|
} catch (e) {
|
2026-06-17 22:30:56 -06:00
|
|
|
errorToast(e);
|
2026-06-17 17:06:30 -06:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
onMount(() => load(true));
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<svelte:head><title>{t('nav.favorites', 'Favorites')} · OxiCloud</title></svelte:head>
|
|
|
|
|
|
2026-06-17 22:07:18 -06:00
|
|
|
<ResourceList
|
|
|
|
|
title={t('nav.favorites', 'Favorites')}
|
2026-07-07 23:08:10 +02:00
|
|
|
{items}
|
|
|
|
|
{contextMap}
|
|
|
|
|
{favoriteIds}
|
|
|
|
|
resolveOwnerName={(id) => owners.name(id)}
|
2026-06-17 17:06:30 -06:00
|
|
|
{loading}
|
|
|
|
|
{error}
|
2026-06-17 22:07:18 -06:00
|
|
|
emptyIcon="star"
|
|
|
|
|
emptyText={t('favorites.empty_state', 'No favorites yet')}
|
|
|
|
|
emptyHint={t('favorites.empty_hint', 'Star files and folders to find them here quickly')}
|
2026-06-17 17:06:30 -06:00
|
|
|
hasMore={!!cursor}
|
2026-06-17 22:07:18 -06:00
|
|
|
onloadmore={() => load(false, orderByForGroup())}
|
|
|
|
|
onopen={open}
|
|
|
|
|
onfavorite={unfavorite}
|
|
|
|
|
showOwner
|
|
|
|
|
selectable
|
|
|
|
|
{contextActions}
|
|
|
|
|
{groupBys}
|
|
|
|
|
bind:groupBy
|
|
|
|
|
bind:reversed
|
|
|
|
|
onreload={(orderBy, rev) => {
|
|
|
|
|
cursor = undefined;
|
|
|
|
|
load(true, orderBy, rev);
|
|
|
|
|
}}
|
2026-06-17 17:06:30 -06:00
|
|
|
>
|
2026-07-18 22:02:00 +00:00
|
|
|
{#snippet batchToolbar(sel)}
|
|
|
|
|
<Button
|
|
|
|
|
icon="download"
|
|
|
|
|
data-testid="favorites-batch-download-btn"
|
|
|
|
|
onclick={() => batchDownload(sel)}>{t('common.download', 'Download')}</Button
|
2026-06-21 20:03:32 -06:00
|
|
|
>
|
2026-06-17 22:30:56 -06:00
|
|
|
<Button
|
|
|
|
|
icon="arrows-alt"
|
2026-06-21 20:03:32 -06:00
|
|
|
data-testid="favorites-batch-move-btn"
|
2026-06-17 22:07:18 -06:00
|
|
|
onclick={() => {
|
|
|
|
|
moveTarget = null;
|
2026-07-18 22:02:00 +00:00
|
|
|
moveItems = batchTargets(sel);
|
2026-06-17 22:07:18 -06:00
|
|
|
moveOpen = true;
|
2026-06-17 22:30:56 -06:00
|
|
|
}}>{t('files.move', 'Move')}</Button
|
|
|
|
|
>
|
2026-06-21 20:03:32 -06:00
|
|
|
<Button
|
|
|
|
|
variant="danger"
|
|
|
|
|
icon="trash"
|
|
|
|
|
data-testid="favorites-batch-delete-btn"
|
2026-07-18 22:02:00 +00:00
|
|
|
onclick={() => batchDelete(sel)}>{t('common.delete', 'Delete')}</Button
|
2026-06-17 17:06:30 -06:00
|
|
|
>
|
2026-06-17 22:07:18 -06:00
|
|
|
{/snippet}
|
|
|
|
|
</ResourceList>
|
2026-06-17 17:06:30 -06:00
|
|
|
|
2026-06-19 22:56:00 +00:00
|
|
|
{#if fileViewer.component}
|
|
|
|
|
{@const FileViewer = fileViewer.component}
|
|
|
|
|
<FileViewer bind:open={viewerOpen} file={viewerFile} />
|
|
|
|
|
{/if}
|
2026-06-21 19:17:10 +02:00
|
|
|
{#if moveDialog.component}
|
|
|
|
|
{@const MoveDialog = moveDialog.component}
|
|
|
|
|
<MoveDialog
|
|
|
|
|
bind:open={moveOpen}
|
|
|
|
|
item={moveTarget}
|
|
|
|
|
items={moveItems}
|
2026-07-18 22:02:00 +00:00
|
|
|
onmoved={() => load(true, orderByForGroup())}
|
2026-06-21 19:17:10 +02:00
|
|
|
/>
|
|
|
|
|
{/if}
|
|
|
|
|
{#if shareDialog.component}
|
|
|
|
|
{@const ShareDialog = shareDialog.component}
|
|
|
|
|
<ShareDialog bind:open={shareOpen} item={shareTarget} />
|
|
|
|
|
{/if}
|