feat(frontend,backend): storage panel with weight rows and trash, heavy media streams by url in the viewer

This commit is contained in:
hh committed 2026-10-14 03:09:37 +02:00
1 parent f2c245707a
commit 55634984fd
19 files changed
+1822 -24

No files matched your search

+41 -10
View File
@@ -2,6 +2,8 @@
import AlertsPanel from "#lib/components/alerts/AlertsPanel.svelte";
import AnnotationsPanel from "#lib/components/annotations/AnnotationsPanel.svelte";
import BotsPanel from "#lib/components/bots/BotsPanel.svelte";
import StoragePanel from "#lib/components/disk/StoragePanel.svelte";
import TrashPanel from "#lib/components/disk/TrashPanel.svelte";
import JobsPanel from "#lib/components/jobs/JobsPanel.svelte";
import PolicyEditor from "#lib/components/policy/PolicyEditor.svelte";
import AnalyticsPanel from "#lib/components/presence/AnalyticsPanel.svelte";
@@ -16,6 +18,7 @@
import Button from "#lib/components/ui/Button.svelte";
import Icon from "#lib/components/ui/Icon.svelte";
import WatchesPanel from "#lib/components/watches/WatchesPanel.svelte";
import { accounts } from "#lib/stores/accounts.svelte.js";
import { type RightPanel, ui } from "#lib/stores/ui.svelte.js";
const titles: Record<RightPanel, string> = {
@@ -23,7 +26,7 @@
annotations: "Заметки",
bots: "Боты",
callbacks: "Callback-данные",
jobs: "Данные и хранилище",
jobs: "Бэкфилл и задачи",
links: "Ссылки",
policy: "Политика захвата",
presence: "Аналитика",
@@ -31,23 +34,43 @@
reactions: "Реакции",
search: "Поиск",
shares: "Файлы по ссылке",
storage: "Хранилище",
"storage-trash": "Корзина",
stories: "Сторис",
"stories-all": "Все сторис",
versions: "Версии",
watches: "Отслеживания",
};
const parents: Partial<Record<RightPanel, RightPanel>> = {
"storage-trash": "storage",
};
const parent = $derived(ui.rightPanel ? parents[ui.rightPanel] : undefined);
</script>
<header class="right-header">
<Button
aria-label="Закрыть"
onclick={() => ui.closePanel()}
round
smaller
variant="translucent"
>
<Icon name="close" />
</Button>
{#if parent}
<Button
aria-label="Назад"
onclick={() => ui.openPanel(parent)}
round
smaller
variant="translucent"
>
<Icon name="arrow-left" />
</Button>
{:else}
<Button
aria-label="Закрыть"
onclick={() => ui.closePanel()}
round
smaller
variant="translucent"
>
<Icon name="close" />
</Button>
{/if}
<h2>{ui.rightPanel ? titles[ui.rightPanel] : ""}</h2>
</header>
@@ -82,6 +105,14 @@
<SharesPanel />
{:else if ui.rightPanel === "bots"}
<BotsPanel />
{:else if ui.rightPanel === "storage"}
{#key accounts.selectedId}
<StoragePanel />
{/key}
{:else if ui.rightPanel === "storage-trash"}
{#key accounts.selectedId}
<TrashPanel />
{/key}
{/if}
</div>