mirror of
https://github.com/thegeneralist01/archivr
synced 2026-10-09 12:55:00 +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
|
|
@ -6,8 +6,8 @@
|
|||
<title>Archivr</title>
|
||||
<link rel="icon" type="image/svg+xml" href="/favicon.svg">
|
||||
<link rel="icon" type="image/x-icon" href="/favicon.ico">
|
||||
<script type="module" crossorigin src="/assets/index-CQcpPA_I.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="/assets/index-BLxoi9rt.css">
|
||||
<script type="module" crossorigin src="/assets/index-C4rpqY7g.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="/assets/index-BV7QPxEc.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="root"></div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue