You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit efa2136
Browse filesBrowse the repository at this point in the historyBrowse files
Rich text/Markdown viewer + in-app editor for text files
Viewing a text-like file now renders properly instead of a flat <pre>:
- Markdown (.md/.markdown/.mdx) is rendered with GFM (tables, task lists, etc.)
and syntax-highlighted code fences, with a Preview/Source toggle. Styled via a
new .md-prose stylesheet + highlight.js github-dark theme.
- Code/text files are syntax-highlighted (highlight.js, language inferred from
extension, auto-detect fallback), capped at 200 KB for responsiveness.
- An Edit button opens an in-app editor (monospace textarea) with Save:
server files re-uploaded under the same name (kept as a new version);
ZK vault files re-encrypted client-side and replaced in place via a new
PUT /zk/files/:id endpoint (same id, quota adjusted by the size delta).
New component TextDocument; ViewerSource gains onSave; api.upload takes a method
for PUT; fileType gains isMarkdown/codeLanguage/isEditableText. FR/EN keys added
(332 per language, parallel). Deps: react-markdown, remark-gfm, rehype-highlight,
highlight.js. Test: ZK in-place replace keeps the id and tracks the quota delta.
44 tests pass; web build green.
0 commit comments