mirror of
https://github.com/thegeneralist01/archivr
synced 2026-10-09 21:03:17 +02:00
feat(frontend): preview text-capture entries (.md / .txt)
Text captures land as `.md` (Markdown) or `.txt` (plain) blobs, but PreviewPanel only dispatched on video/audio/image/pdf/html extensions, so opening a text entry hit the 'No preview available' fallback with the raw artifact path exposed. - New `TextPreview` component fetches the primary artifact as text, renders it in a monospace `<pre>` with word-wrap, and shows the entry title on top and the MIME as a small trailing tag. Handles loading/error states. - `PreviewPanel` gains a `TEXT_EXTS` set + a branch that dispatches to `TextPreview` for `md` / `markdown` / `txt`. - CSS is padded and centered to ~780px so a text note reads like a document rather than an edge-to-edge terminal dump. v1 intentionally does NOT parse Markdown: keeping frontend deps at react+react-dom only. Bump to a real Markdown renderer if we start capturing Markdown-authored notes.
This commit is contained in:
parent
067d766819
commit
e8bb03e08f
6 changed files with 114 additions and 5 deletions
1
crates/archivr-server/static/assets/index-BV7QPxEc.css
Normal file
1
crates/archivr-server/static/assets/index-BV7QPxEc.css
Normal file
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue