feat: web UI chat render, panels, presence + analytics

This commit is contained in:
hh committed 2026-05-31 19:41:37 +02:00
1 parent 75425d1bee
commit ed469ba8dd
83 files changed
+6034 -136

No files matched your search

@@ -0,0 +1,71 @@
<script lang="ts">
import JobsPanel from "$lib/components/jobs/JobsPanel.svelte";
import PolicyEditor from "$lib/components/policy/PolicyEditor.svelte";
import AnalyticsPanel from "$lib/components/presence/AnalyticsPanel.svelte";
import ChatSearchPanel from "$lib/components/search/ChatSearchPanel.svelte";
import Button from "$lib/components/ui/Button.svelte";
import Icon from "$lib/components/ui/Icon.svelte";
import { type RightPanel, ui } from "$lib/stores/ui.svelte";
const titles: Record<RightPanel, string> = {
profile: "Профиль",
search: "Поиск",
versions: "Версии",
reactions: "Реакции",
links: "Ссылки",
annotations: "Заметки",
jobs: "Данные и хранилище",
presence: "Аналитика",
stories: "Сторис",
policy: "Политика захвата",
};
</script>
<header class="right-header">
<Button
variant="translucent"
round
smaller
onclick={() => ui.closePanel()}
aria-label="Закрыть"
>
<Icon name="close" />
</Button>
<h2>{ui.rightPanel ? titles[ui.rightPanel] : ""}</h2>
</header>
<div class="right-body custom-scroll">
{#if ui.rightPanel === "policy"}
<PolicyEditor />
{:else if ui.rightPanel === "jobs"}
<JobsPanel />
{:else if ui.rightPanel === "presence"}
<AnalyticsPanel />
{:else if ui.rightPanel === "search"}
<ChatSearchPanel />
{/if}
</div>
<style lang="scss">
.right-header {
display: flex;
flex-shrink: 0;
align-items: center;
gap: 0.75rem;
height: var(--header-height);
padding: 0 0.625rem;
border-bottom: 1px solid var(--color-borders);
h2 {
margin: 0;
font-size: 1.25rem;
font-weight: var(--font-weight-medium);
}
}
.right-body {
overflow-y: auto;
flex: 1;
}
</style>