Files: the person's tree, read-only, opened in the file viewer
CI / check (push) Canceled after 0s

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:
HomerandClaude Opus 5.5 committed 2026-11-03 14:48:10 +00:00
1 parent 0c5aa4d45f
commit 9abff4f170
15 files changed
+305 -16

No files matched your search

+4
View File
@@ -16,6 +16,10 @@ For LLeMbas server 2.0, and only for it.
numbered lines; a long Markdown file is shown as text. **HTML is never rendered in the app**:
it is shown as its source, and "Open in the browser" opens the web viewer, which draws it in
its sealed frame. Copy takes the whole file.
- **Files**: the person's own files, read-only, from the folder button beside Settings. Browse
the tree as the web UI's explorer shows it (folders first, back goes up one), and open a file
in the same viewer as a shown one, under the same rules. A file the server does not hand over
as text -- an image, a binary, anything over 1 MB -- says why, and offers the web UI's viewer.
- **A server older than 2.0 is refused** with a sentence, at sign-in and for an instance signed
in to before: the device-link protocol must be 3 or newer, and the app API 2.
@@ -28,6 +28,7 @@ import eu.llembas.android.auth.Prefs
import eu.llembas.android.push.Notifications
import eu.llembas.android.ui.chat.ChatScreen
import eu.llembas.android.ui.chats.ChatsScreen
import eu.llembas.android.ui.files.FilesScreen
import eu.llembas.android.ui.settings.SettingsScreen
import eu.llembas.android.ui.signin.SignInScreen
import eu.llembas.android.ui.theme.LembasTheme
@@ -89,6 +90,7 @@ class MainActivity : ComponentActivity() {
onOpen = { nav.navigate("chat/$it") },
onNew = { nav.navigate("new") },
onSettings = { nav.navigate("settings") },
onFiles = { nav.navigate("files") },
)
}
composable("new") {
@@ -103,6 +105,7 @@ class MainActivity : ComponentActivity() {
composable("chat/{id}") { entry ->
ChatScreen(chatId = entry.arguments?.getString("id"), onBack = { nav.popBackStack() })
}
composable("files") { FilesScreen(onBack = { nav.popBackStack() }) }
composable("settings") {
SettingsScreen(onBack = { nav.popBackStack() }, onAddInstance = { nav.navigate("add") })
}
@@ -18,6 +18,7 @@ import androidx.compose.foundation.shape.CircleShape
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.automirrored.filled.Chat
import androidx.compose.material.icons.filled.Add
import androidx.compose.material.icons.filled.Folder
import androidx.compose.material.icons.filled.Settings
import androidx.compose.material.icons.filled.Terminal
import androidx.compose.material3.ExperimentalMaterial3Api
@@ -132,7 +133,7 @@ class ChatsViewModel(app: Application) : AndroidViewModel(app) {
@OptIn(ExperimentalMaterial3Api::class)
@Composable
fun ChatsScreen(onOpen: (String) -> Unit, onNew: () -> Unit, onSettings: () -> Unit, model: ChatsViewModel = viewModel()) {
fun ChatsScreen(onOpen: (String) -> Unit, onNew: () -> Unit, onSettings: () -> Unit, onFiles: () -> Unit, model: ChatsViewModel = viewModel()) {
val state by model.state.collectAsStateWithLifecycle()
var tab by rememberSaveable { mutableIntStateOf(0) }
val kind = if (tab == 0) "chat" else "agent"
@@ -143,6 +144,9 @@ fun ChatsScreen(onOpen: (String) -> Unit, onNew: () -> Unit, onSettings: () -> U
TopAppBar(
title = { Text(stringResource(R.string.app_name)) },
actions = {
IconButton(onClick = onFiles) {
Icon(Icons.Filled.Folder, contentDescription = stringResource(R.string.files))
}
IconButton(onClick = onSettings) {
Icon(Icons.Filled.Settings, contentDescription = stringResource(R.string.settings))
}
@@ -0,0 +1,195 @@
@file:OptIn(androidx.compose.material3.ExperimentalMaterial3Api::class)
package eu.llembas.android.ui.files
import android.app.Application
import android.text.format.Formatter
import androidx.activity.compose.BackHandler
import androidx.compose.foundation.clickable
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.lazy.LazyColumn
import androidx.compose.foundation.lazy.items
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.automirrored.filled.ArrowBack
import androidx.compose.material.icons.filled.Description
import androidx.compose.material.icons.filled.Folder
import androidx.compose.material.icons.filled.FolderShared
import androidx.compose.material3.HorizontalDivider
import androidx.compose.material3.Icon
import androidx.compose.material3.IconButton
import androidx.compose.material3.ListItem
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Scaffold
import androidx.compose.material3.Text
import androidx.compose.material3.TopAppBar
import androidx.compose.material3.pulltorefresh.PullToRefreshBox
import androidx.compose.runtime.Composable
import androidx.compose.runtime.LaunchedEffect
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.saveable.rememberSaveable
import androidx.compose.runtime.setValue
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.text.font.FontFamily
import androidx.compose.ui.text.style.TextOverflow
import androidx.compose.ui.unit.dp
import androidx.lifecycle.AndroidViewModel
import androidx.lifecycle.compose.collectAsStateWithLifecycle
import androidx.lifecycle.viewModelScope
import androidx.lifecycle.viewmodel.compose.viewModel
import eu.llembas.android.R
import eu.llembas.android.api.FileEntry
import eu.llembas.android.lembas
import eu.llembas.android.ui.theme.LocalPalette
import eu.llembas.android.ui.viewer.TreeFileViewer
import kotlinx.coroutines.Job
import kotlinx.coroutines.flow.MutableStateFlow
import kotlinx.coroutines.flow.asStateFlow
import kotlinx.coroutines.flow.update
import kotlinx.coroutines.launch
/** One directory of the person's tree, and whether it is on its way. */
data class FilesState(
val path: String = "/",
val parent: String? = null,
val entries: List<FileEntry> = emptyList(),
val loading: Boolean = false,
val error: String? = null,
)
/**
* The person's files, read-only: `GET /api/v2/files` as the explorer's listing. The tree is read
* as the person, with no chat -- their own access, the same the web UI's explorer draws by.
*/
class FilesViewModel(app: Application) : AndroidViewModel(app) {
private val _state = MutableStateFlow(FilesState(loading = true))
val state = _state.asStateFlow()
private var loading: Job? = null
/**
* Opens a directory. A refusal (a path no longer readable, the server unreachable) keeps the
* directory already shown and says why above it, so the way back is never lost.
*/
fun open(path: String) {
loading?.cancel()
loading = viewModelScope.launch {
_state.update { it.copy(loading = true, error = null) }
try {
val api = getApplication<Application>().lembas.instances.client()
if (api == null) {
_state.update { it.copy(loading = false) }
return@launch
}
val listing = api.files(path)
_state.value = FilesState(path = listing.path, parent = listing.parent, entries = listing.entries)
} catch (e: Exception) {
if (e is kotlinx.coroutines.CancellationException) throw e
_state.update { it.copy(loading = false, error = e.message ?: e.javaClass.simpleName) }
}
}
}
fun reload() = open(_state.value.path)
fun up(): Boolean {
val parent = _state.value.parent ?: return false
open(parent)
return true
}
}
@Composable
fun FilesScreen(onBack: () -> Unit, model: FilesViewModel = viewModel()) {
val state by model.state.collectAsStateWithLifecycle()
val palette = LocalPalette.current
var viewing by rememberSaveable { mutableStateOf<String?>(null) }
LaunchedEffect(Unit) { if (state.entries.isEmpty() && state.error == null) model.open(state.path) }
// Back goes up one directory first, as a file manager's does; at the top it leaves.
BackHandler(enabled = state.parent != null) { model.up() }
Scaffold(
topBar = {
TopAppBar(
navigationIcon = {
IconButton(onClick = { if (!model.up()) onBack() }) {
Icon(Icons.AutoMirrored.Filled.ArrowBack, contentDescription = stringResource(R.string.back))
}
},
title = {
Column {
Text(stringResource(R.string.files), maxLines = 1, overflow = TextOverflow.Ellipsis)
Text(
if (state.parent == null) stringResource(R.string.files_all) else state.path,
style = MaterialTheme.typography.labelSmall,
fontFamily = if (state.parent == null) null else FontFamily.Monospace,
color = palette.inkFaint,
maxLines = 1,
overflow = TextOverflow.StartEllipsis,
)
}
},
)
},
) { padding ->
Column(Modifier.padding(padding).fillMaxSize()) {
state.error?.let {
Text(it, color = MaterialTheme.colorScheme.error, modifier = Modifier.padding(16.dp))
}
PullToRefreshBox(isRefreshing = state.loading, onRefresh = { model.reload() }, modifier = Modifier.fillMaxSize()) {
if (state.entries.isEmpty() && !state.loading && state.error == null) {
Box(Modifier.fillMaxSize(), contentAlignment = Alignment.Center) {
Text(
stringResource(R.string.files_empty),
color = MaterialTheme.colorScheme.onSurfaceVariant,
modifier = Modifier.padding(32.dp),
)
}
}
LazyColumn(Modifier.fillMaxSize()) {
items(state.entries, key = { it.path }) { entry ->
EntryRow(entry) { if (entry.isFolder) model.open(entry.path) else viewing = entry.path }
HorizontalDivider()
}
}
}
}
}
viewing?.let { path -> TreeFileViewer(path, onClose = { viewing = null }) }
}
@Composable
private fun EntryRow(entry: FileEntry, onOpen: () -> Unit) {
val context = LocalContext.current
ListItem(
modifier = Modifier.fillMaxWidth().clickable(onClick = onOpen),
leadingContent = {
Icon(
when (entry.kind) {
"mount" -> Icons.Filled.FolderShared
"dir" -> Icons.Filled.Folder
else -> Icons.Filled.Description
},
contentDescription = null,
tint = MaterialTheme.colorScheme.onSurfaceVariant,
)
},
headlineContent = { Text(entry.name.ifBlank { entry.path }, maxLines = 1, overflow = TextOverflow.Ellipsis) },
supportingContent = if (entry.isFolder) {
null
} else {
{
val line = listOfNotNull(Formatter.formatShortFileSize(context, entry.size), entry.mime.ifBlank { null }).joinToString(" · ")
Text(line, maxLines = 1, overflow = TextOverflow.Ellipsis)
}
},
)
}
@@ -55,6 +55,7 @@ import androidx.compose.ui.unit.sp
import androidx.compose.ui.window.Dialog
import androidx.compose.ui.window.DialogProperties
import eu.llembas.android.R
import eu.llembas.android.api.ApiClient
import eu.llembas.android.api.ApiException
import eu.llembas.android.api.ShowCard
import eu.llembas.android.lembas
@@ -72,12 +73,16 @@ private const val MARKDOWN_MAX_CHARS = 200_000
private sealed interface Loaded {
data object Loading : Loaded
data class Text(val text: String) : Loaded
/** [kind]: what the server said the file is, when it is only known once it came. */
data class Text(val text: String, val kind: String? = null) : Loaded
/** [unavailable]: this server has no door for the app to read a shown file through. */
/** [unavailable]: this server has no door for the app to read the file through. */
data class Failed(val message: String, val unavailable: Boolean = false) : Loaded
}
/** What the viewer's title and body need to know before the text comes. */
private data class Viewed(val name: String, val path: String, val line: Int, val kind: String)
/**
* What a `show` card opens: the file, full screen, read-only, as the chat sees it now.
*
@@ -90,26 +95,64 @@ private sealed interface Loaded {
*/
@Composable
fun FileViewer(chatId: String, show: ShowCard, onClose: () -> Unit) {
Viewer(
file = Viewed(show.name, show.path, show.line, show.viewKind),
key = chatId to show,
webUrl = { it.webViewer(chatId, show) },
load = { api, _ -> Loaded.Text(api.shownText(chatId, show)) },
onClose = onClose,
)
}
/**
* A file of the person's tree (the Files screen), in the same viewer and under the same rules:
* the person's own files are no more trusted than a model's, since a model may have written
* them. A file the server withholds (not text, over 1 MB) says why, and offers the web UI.
*/
@Composable
fun TreeFileViewer(path: String, onClose: () -> Unit) {
Viewer(
file = Viewed(path.substringAfterLast('/').ifBlank { path }, path, 0, "text"),
key = path,
webUrl = { it.webFile(path) },
load = { api, context ->
val file = api.fileContent(path)
val withheld = file.withheld
when {
withheld == null -> Loaded.Text(file.text, file.viewKind)
withheld.message.isNotBlank() -> Loaded.Failed(withheld.message)
withheld.reason == "too_large" -> Loaded.Failed(context.getString(R.string.viewer_too_large))
else -> Loaded.Failed(context.getString(R.string.viewer_not_text))
}
},
onClose = onClose,
)
}
@Composable
private fun Viewer(file: Viewed, key: Any, webUrl: (ApiClient) -> String?, load: suspend (ApiClient, Context) -> Loaded, onClose: () -> Unit) {
val context = LocalContext.current
val palette = LocalPalette.current
var loaded by remember(chatId, show) { mutableStateOf<Loaded>(Loaded.Loading) }
var web by remember(chatId, show) { mutableStateOf<String?>(null) }
var loaded by remember(key) { mutableStateOf<Loaded>(Loaded.Loading) }
var web by remember(key) { mutableStateOf<String?>(null) }
LaunchedEffect(chatId, show) {
LaunchedEffect(key) {
val api = context.lembas.instances.client()
if (api == null) {
loaded = Loaded.Failed(context.getString(R.string.assist_signed_out))
return@LaunchedEffect
}
web = api.webViewer(chatId, show)
web = webUrl(api)
loaded = try {
Loaded.Text(api.shownText(chatId, show))
load(api, context)
} catch (e: ApiException) {
when {
e.status == 413 -> Loaded.Failed(context.getString(R.string.viewer_too_large))
e.status == 415 -> Loaded.Failed(e.message?.ifBlank { null } ?: context.getString(R.string.viewer_not_text))
// No such route at all (FastAPI's own "Not Found", or the wrong method): a
// server without the app's door to shown files. Its own 404 has a sentence.
// server without the app's door to the file. Its own 404 has a sentence.
e.status == 405 || (e.status == 404 && e.message == "Not Found") ->
Loaded.Failed(context.getString(R.string.viewer_unavailable), unavailable = true)
@@ -131,9 +174,9 @@ fun FileViewer(chatId: String, show: ShowCard, onClose: () -> Unit) {
},
title = {
Column {
Text(show.name.ifBlank { show.path }, maxLines = 1, overflow = TextOverflow.Ellipsis)
Text(file.name.ifBlank { file.path }, maxLines = 1, overflow = TextOverflow.Ellipsis)
Text(
show.path + if (show.line > 0) ":${show.line}" else "",
file.path + if (file.line > 0) ":${file.line}" else "",
style = MaterialTheme.typography.labelSmall,
fontFamily = FontFamily.Monospace,
color = palette.inkFaint,
@@ -144,7 +187,7 @@ fun FileViewer(chatId: String, show: ShowCard, onClose: () -> Unit) {
},
actions = {
(loaded as? Loaded.Text)?.let { done ->
IconButton(onClick = { copy(context, show.name, done.text) }) {
IconButton(onClick = { copy(context, file.name, done.text) }) {
Icon(Icons.Filled.ContentCopy, contentDescription = stringResource(R.string.viewer_copy))
}
}
@@ -173,7 +216,7 @@ fun FileViewer(chatId: String, show: ShowCard, onClose: () -> Unit) {
}
}
is Loaded.Text -> Body(show, now.text)
is Loaded.Text -> Body(now.kind ?: file.kind, file.line, now.text)
}
}
}
@@ -181,9 +224,8 @@ fun FileViewer(chatId: String, show: ShowCard, onClose: () -> Unit) {
}
@Composable
private fun Body(show: ShowCard, text: String) {
private fun Body(kind: String, line: Int, text: String) {
val palette = LocalPalette.current
val kind = show.viewKind
if (kind == "markdown" && text.length <= MARKDOWN_MAX_CHARS) {
Column(Modifier.fillMaxSize().verticalScroll(rememberScrollState()).padding(16.dp)) {
MarkdownText(text, modifier = Modifier.fillMaxWidth())
@@ -204,7 +246,7 @@ private fun Body(show: ShowCard, text: String) {
modifier = Modifier.fillMaxWidth().background(palette.bgSunken).padding(horizontal = 16.dp, vertical = 10.dp),
)
}
Lines(text, show.line)
Lines(text, line)
}
}
+4
View File
@@ -66,6 +66,10 @@
<string name="viewer_long_markdown">Dlouhý soubor, proto je zobrazen jako prostý text.</string>
<string name="viewer_unavailable">Tento server zatím aplikaci soubor předat neumí. Otevřete ho v prohlížeči.</string>
<string name="viewer_too_large">Tento soubor je příliš velký na zobrazení; zobrazit lze nejvýše 1 MB.</string>
<string name="viewer_not_text">Toto není textový soubor, proto se zde nezobrazuje.</string>
<string name="files">Soubory</string>
<string name="files_all">Všechny soubory</string>
<string name="files_empty">Zatím tu nic není. Ani hobití nora.</string>
<string name="settings">Nastavení</string>
<string name="settings_instances">Instance</string>
<string name="sign_out">Odhlásit se</string>
+4
View File
@@ -66,6 +66,10 @@
<string name="viewer_long_markdown">Eine lange Datei, daher wird sie als reiner Text angezeigt.</string>
<string name="viewer_unavailable">Dieser Server kann die Datei der App noch nicht übergeben. Öffnen Sie sie stattdessen im Browser.</string>
<string name="viewer_too_large">Diese Datei ist zu groß zum Anzeigen; höchstens 1 MB kann angezeigt werden.</string>
<string name="viewer_not_text">Das ist keine Textdatei, deshalb wird sie hier nicht angezeigt.</string>
<string name="files">Dateien</string>
<string name="files_all">Alle Dateien</string>
<string name="files_empty">Hier ist noch nichts. Nicht einmal eine Hobbithöhle.</string>
<string name="settings">Einstellungen</string>
<string name="settings_instances">Instanzen</string>
<string name="sign_out">Abmelden</string>
+4
View File
@@ -66,6 +66,10 @@
<string name="viewer_long_markdown">Un archivo largo, por eso se muestra como texto sin formato.</string>
<string name="viewer_unavailable">Este servidor todavía no puede entregar el archivo a la aplicación. Ábralo en el navegador.</string>
<string name="viewer_too_large">Este archivo es demasiado grande para mostrarlo; se puede mostrar como máximo 1 MB.</string>
<string name="viewer_not_text">No es un archivo de texto, así que no se muestra aquí.</string>
<string name="files">Archivos</string>
<string name="files_all">Todos los archivos</string>
<string name="files_empty">Aquí aún no hay nada. Ni siquiera un agujero hobbit.</string>
<string name="settings">Ajustes</string>
<string name="settings_instances">Instancias</string>
<string name="sign_out">Cerrar sesión</string>
+4
View File
@@ -66,6 +66,10 @@
<string name="viewer_long_markdown">Un fichier long, il est donc affiché en texte brut.</string>
<string name="viewer_unavailable">Ce serveur ne peut pas encore transmettre le fichier à l\'application. Ouvrez-le plutôt dans le navigateur.</string>
<string name="viewer_too_large">Ce fichier est trop volumineux pour être affiché ; 1 Mo au plus peut être affiché.</string>
<string name="viewer_not_text">Ce n\'est pas un fichier texte, il n\'est donc pas affiché ici.</string>
<string name="files">Fichiers</string>
<string name="files_all">Tous les fichiers</string>
<string name="files_empty">Rien ici pour l\'instant. Pas même un trou de hobbit.</string>
<string name="settings">Paramètres</string>
<string name="settings_instances">Instances</string>
<string name="sign_out">Se déconnecter</string>
+4
View File
@@ -66,6 +66,10 @@
<string name="viewer_long_markdown">Hosszú fájl, ezért egyszerű szövegként jelenik meg.</string>
<string name="viewer_unavailable">Ez a szerver még nem tudja átadni a fájlt az alkalmazásnak. Nyissa meg inkább a böngészőben.</string>
<string name="viewer_too_large">Ez a fájl túl nagy a megjelenítéshez; legfeljebb 1 MB jeleníthető meg.</string>
<string name="viewer_not_text">Ez nem szövegfájl, ezért itt nem jelenik meg.</string>
<string name="files">Fájlok</string>
<string name="files_all">Minden fájl</string>
<string name="files_empty">Itt még nincs semmi. Még egy hobbitlyuk sem.</string>
<string name="settings">Beállítások</string>
<string name="settings_instances">Példányok</string>
<string name="sign_out">Kijelentkezés</string>
+4
View File
@@ -66,6 +66,10 @@
<string name="viewer_long_markdown">Un file lungo, quindi è mostrato come testo semplice.</string>
<string name="viewer_unavailable">Questo server non può ancora passare il file all\'app. Aprilo invece nel browser.</string>
<string name="viewer_too_large">Questo file è troppo grande da mostrare; si può mostrare al massimo 1 MB.</string>
<string name="viewer_not_text">Non è un file di testo, quindi non viene mostrato qui.</string>
<string name="files">File</string>
<string name="files_all">Tutti i file</string>
<string name="files_empty">Ancora niente qui. Nemmeno una caverna hobbit.</string>
<string name="settings">Impostazioni</string>
<string name="settings_instances">Istanze</string>
<string name="sign_out">Esci</string>
+4
View File
@@ -66,6 +66,10 @@
<string name="viewer_long_markdown">Długi plik, dlatego jest pokazany jako zwykły tekst.</string>
<string name="viewer_unavailable">Ten serwer nie potrafi jeszcze przekazać pliku aplikacji. Otwórz go w przeglądarce.</string>
<string name="viewer_too_large">Ten plik jest za duży, by go pokazać; można pokazać najwyżej 1 MB.</string>
<string name="viewer_not_text">To nie jest plik tekstowy, więc nie jest tu pokazywany.</string>
<string name="files">Pliki</string>
<string name="files_all">Wszystkie pliki</string>
<string name="files_empty">Jeszcze nic tu nie ma. Nawet hobbiciej norki.</string>
<string name="settings">Ustawienia</string>
<string name="settings_instances">Instancje</string>
<string name="sign_out">Wyloguj się</string>
+4
View File
@@ -66,6 +66,10 @@
<string name="viewer_long_markdown">Dlhý súbor, preto je zobrazený ako obyčajný text.</string>
<string name="viewer_unavailable">Tento server zatiaľ nevie aplikácii súbor odovzdať. Otvorte ho v prehliadači.</string>
<string name="viewer_too_large">Tento súbor je príliš veľký na zobrazenie; zobraziť možno najviac 1 MB.</string>
<string name="viewer_not_text">Toto nie je textový súbor, preto sa tu nezobrazuje.</string>
<string name="files">Súbory</string>
<string name="files_all">Všetky súbory</string>
<string name="files_empty">Zatiaľ tu nič nie je. Ani hobitia nora.</string>
<string name="settings">Nastavenia</string>
<string name="settings_instances">Inštancie</string>
<string name="sign_out">Odhlásiť sa</string>
+4
View File
@@ -67,6 +67,10 @@
<string name="viewer_long_markdown">A long file, so it is shown as plain text.</string>
<string name="viewer_unavailable">This server cannot hand the file to the app yet. Open it in the browser instead.</string>
<string name="viewer_too_large">This file is too large to show here; at most 1 MB can be shown.</string>
<string name="viewer_not_text">This is not a text file, so it is not shown here.</string>
<string name="files">Files</string>
<string name="files_all">All files</string>
<string name="files_empty">Nothing here yet. Not even a hobbit hole.</string>
<string name="settings">Settings</string>
<string name="settings_instances">Instances</string>
<string name="sign_out">Sign out</string>
+5
View File
@@ -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",