Files is a file manager, and the viewer draws a file by what it is
CI / check (push) Canceled after 0s

Files listed and showed text. It now does what the web's explorer does,
through the server's /api/v2/files routes: upload (the system picker,
several at once, each streamed from where it is with its progress, one
request a file so a 413 for one does not take the others), new folder, new
text file (never over one that is there), rename, move and copy through a
folder picker that is walked rather than typed into, delete to the trash,
a long press to choose and a bar that moves, copies, downloads, shares or
deletes all that is chosen through /files/batch -- which answers path by
path, and what it refused is said in its own sentences. The trash: list,
restore, remove for good, empty. A file's versions: list, restore.

Leaving the instance: a download goes into a document the person chose
(ACTION_CREATE_DOCUMENT), streamed, several things or a folder as the
server's zip. Open with and Share hand another app a copy in the private
cache through the FileProvider the camera already uses (one more
cache-path, read-only, per grant); the copies go when Files is left, when
the app starts and at sign-out. No permission is added.

The viewer goes by file_kind. Text kinds as before, now editable up to the
server's 1 MB: a save says the sha it opened, a 409 shows the server's
sentence with Reload and Save anyway, and leaving with unsaved text asks.
The text being edited lives in a ViewModel: a megabyte does not fit a saved
instance state. A picture is copied to the cache, decoded with its edge and
pixel count capped whatever the file claims, and zooms and pans. A PDF is
drawn page by page by the platform's PdfRenderer from a cache copy. Sound
and video are played by the platform's MediaPlayer through a
MediaDataSource that asks the app's own HTTP client for each piece with a
Range request: the token stays in the Authorization header and the player
is never given an address, so no player library is added. CSV and TSV are a
grid with a row and column cap; a notebook is its cells' text, outputs as
plain text only. Archives, 3D models and binaries are their details with
Download, Open with and Share. An SVG is its source: the app has no WebView
and draws nothing a file could script. Nothing is rendered as HTML.

The share sheet has a third place to send to: Save to Files, into a folder
chosen with the same picker; shared text is kept as a note.

Strings: 61 new keys, 49 worded as the server's explorer words them and
translated from its catalogues at the pinned commit, 12 the app's own in
all eight languages.

An instance without these routes still lists and shows text; what it
cannot do says so.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
HomerandClaude Fable 5.2 committed 2026-11-18 21:24:39 +00:00
1 parent 6e24f6f370
commit 5d1e36868c
32 files changed
+4618 -138

No files matched your search

+69 -1
View File
@@ -370,10 +370,71 @@ STRINGS: dict[str, str] = {
"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 (the person's tree, as a file manager). Worded as the server's explorer words them.
"files": "Files",
"files_all": "All files",
"files_empty": "Nothing here yet. Not even a hobbit hole.",
"files_upload": "Upload",
"files_new_file": "New file",
"files_new_file_ask": "What should the file be called? With its extension, such as notes.md.",
"files_new_folder_ask": "What should the folder be called?",
"files_bad_name": "A name cannot be empty or hold a slash.",
"files_taken": "There is already something called %1$s here.",
"rename": "Rename",
"files_new_name": "New name",
"files_move": "Move",
"files_copy_to": "Copy to…",
"files_move_here": "Move here",
"files_copy_here": "Copy here",
"files_move_which": "Move to which folder?",
"files_copy_which": "Copy to which folder?",
"files_choose_folder": "Choose a folder",
"files_save_here": "Save here",
"files_no_folders": "No directories here.",
"files_to_trash": "Move to the trash",
"files_trash_one": "Move “%1$s” to the trash? It can be restored from there.",
"files_trash_many": "Move the %1$s selected to the trash? They can be restored from there.",
"files_trashed": "Moved to the trash.",
"files_selected": "%1$s selected",
"files_select_all": "Select all",
"download": "Download",
"files_download_zip": "Download as a zip",
"files_downloading": "Downloading…",
"files_downloaded": "Downloaded.",
"files_uploading": "Uploading %1$s of %2$s…",
"files_uploaded": "Uploaded.",
"files_open_with": "Open with…",
"files_no_app": "No app on this phone opens this kind of file.",
"trash": "Trash",
"trash_is_empty": "The trash is empty.",
"trash_empty": "Empty the trash",
"trash_empty_confirm": "Remove everything in the trash for good? This cannot be undone.",
"trash_remove": "Remove for good",
"trash_remove_confirm": "Remove “%1$s” for good? This cannot be undone.",
"restore": "Restore",
"versions": "Versions",
"version_restore": "Restore this version",
"version_restore_confirm": "Make this version the current one? The current one stays in the list.",
"version_current": "Current",
"files_type": "Type",
"files_size": "Size",
"files_no_viewer": "There is no viewer for this kind of file.",
"files_not_shown": "This file could not be shown here. It can still be downloaded.",
"files_svg_source": "This is the picture's source. Open it with another app to see the picture.",
"archive_note": "What is inside this kind of archive cannot be listed here.",
"table_cut": "Only the first rows and columns are laid out. The text has all of it.",
"notebook_empty": "This notebook has no cells.",
"notebook_more": "%1$s more cells are not shown.",
"notebook_cell_cut": "This cell is longer than is shown here.",
"viewer_page": "Page %1$s of %2$s",
"play": "Play",
"pause": "Pause",
"files_conflict": "This file changed since you opened it. Reload it, or save anyway.",
"files_save_anyway": "Save anyway",
"reload": "Reload",
"discard": "Discard",
"files_unsaved": "Discard your changes to this file?",
"share_to_files": "Save to Files",
# Settings
"settings": "Settings",
"settings_instances": "Instances",
@@ -678,4 +739,11 @@ SERVER_ENGLISH: dict[str, str] = {
"agent_stop": "Stop %(name)s",
"agent_stop_member_confirm": "Stop %(name)s and the members under it? They leave the team.",
"folder_delete_confirm": "Delete the folder “%(name)s”? Chats inside it are kept.",
"files_taken": "There is already something called %(name)s here.",
"files_trash_one": "Move “%(name)s” to the trash? It can be restored from there.",
"files_trash_many": "Move the %(n)s selected to the trash? They can be restored from there.",
"files_selected": "%(n)s selected",
"trash_remove_confirm": "Remove “%(name)s” for good? This cannot be undone.",
"notebook_more": "%(n)s more cells are not shown.",
"viewer_page": "Page %(page)s of %(pages)s",
}