A Files screen (the folder button beside Settings) lists GET /api/v2/files: folders and mounts open as the next listing, back goes up one directory before it leaves, and a refusal keeps the directory already shown with the server's sentence above it. A file opens in the existing viewer through GET /api/v2/files/content, under the viewer's rules: Markdown through Markwon, code and text as numbered lines, HTML as its source. A withheld file (not text, over 1 MB) says why in the server's words and offers the web UI's /files/view. The viewer is now one private Viewer with two doors: FileViewer(chatId, show) for a show card, TreeFileViewer(path) for the tree. A 415 from the show route is the server's "not a text file". Four strings, all already in the server's catalogues, so translated in all eight languages. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
15 files changed
+305
-16
No files matched your search
@@ -81,6 +81,11 @@ STRINGS: dict[str, str] = {
|
||||
"viewer_long_markdown": "A long file, so it is shown as plain text.",
|
||||
"viewer_unavailable": "This server cannot hand the file to the app yet. Open it in the browser instead.",
|
||||
"viewer_too_large": "This file is too large to show here; at most 1 MB can be shown.",
|
||||
"viewer_not_text": "This is not a text file, so it is not shown here.",
|
||||
# Files (the person's tree, read-only)
|
||||
"files": "Files",
|
||||
"files_all": "All files",
|
||||
"files_empty": "Nothing here yet. Not even a hobbit hole.",
|
||||
# Settings
|
||||
"settings": "Settings",
|
||||
"settings_instances": "Instances",
|
||||
|
||||
Reference in new issue
Block a user