diff --git a/frontend/src/lib/components/MainMenu.svelte b/frontend/src/lib/components/MainMenu.svelte index c2d8af8..d4b297a 100644 --- a/frontend/src/lib/components/MainMenu.svelte +++ b/frontend/src/lib/components/MainMenu.svelte @@ -5,10 +5,12 @@ import AddAccountDialog from "#lib/components/settings/AddAccountDialog.svelte"; import Button from "#lib/components/ui/Button.svelte"; import Icon from "#lib/components/ui/Icon.svelte"; + import { captureLine } from "#lib/format/capture.js"; import { accountName } from "#lib/format/peer.js"; import { t } from "#lib/i18n/locale.svelte.js"; import type { MessageKey } from "#lib/i18n/messages.js"; import { accounts } from "#lib/stores/accounts.svelte.js"; + import { capture } from "#lib/stores/capture.svelte.js"; import { theme } from "#lib/stores/theme.svelte.js"; import { type RightPanel, ui } from "#lib/stores/ui.svelte.js"; @@ -23,6 +25,7 @@ const entries: Entry[] = [ { icon: "eye", label: "settings.watches", panel: "watches" }, { icon: "unmute", label: "settings.alerts", panel: "alerts" }, + { icon: "note", label: "notes.title", panel: "notes" }, { icon: "data", label: "settings.storage", panel: "storage" }, { icon: "play-story", label: "settings.stories", panel: "stories-all" }, { icon: "cloud-download", label: "settings.jobs", panel: "jobs" }, @@ -31,6 +34,12 @@ let adding = $state(false); + const quiet = $derived( + capture.status !== null && !capture.status.live + ? captureLine(capture.status, accounts.selected?.is_bot ?? false) + : null + ); + function onkeydown(event: KeyboardEvent) { const match = DIGIT.exec(event.code); if (!(event.altKey && match)) { @@ -54,14 +63,18 @@ {/snippet} @@ -142,6 +155,21 @@ flex-shrink: 0; } + .capture-dot { + pointer-events: none; + + position: absolute; + right: 0.125rem; + bottom: 0.125rem; + + width: 0.625rem; + height: 0.625rem; + border-radius: 50%; + + background-color: var(--color-error); + box-shadow: 0 0 0 2px var(--color-background); + } + :global(.main-menu) { width: 17rem; max-height: calc(100dvh - 5rem); diff --git a/frontend/src/lib/components/RightColumn.svelte b/frontend/src/lib/components/RightColumn.svelte index e900bf4..8d91ef7 100644 --- a/frontend/src/lib/components/RightColumn.svelte +++ b/frontend/src/lib/components/RightColumn.svelte @@ -1,6 +1,7 @@ diff --git a/frontend/src/lib/components/annotations/NoteText.svelte b/frontend/src/lib/components/annotations/NoteText.svelte new file mode 100644 index 0000000..196235a --- /dev/null +++ b/frontend/src/lib/components/annotations/NoteText.svelte @@ -0,0 +1,84 @@ + + +
+ {#each parts as part, index (index)} + {#if "tag" in part && interactive} + + {:else if "tag" in part} + {part.label} + {:else} + {part.text} + {/if} + {/each} +
+ + diff --git a/frontend/src/lib/components/annotations/NotesPanel.svelte b/frontend/src/lib/components/annotations/NotesPanel.svelte new file mode 100644 index 0000000..e14abb8 --- /dev/null +++ b/frontend/src/lib/components/annotations/NotesPanel.svelte @@ -0,0 +1,402 @@ + + +{t("notes.failed")}
+ +