@alexsun-top/opencode-chat-room 0.7.4 → 0.7.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +23 -0
- package/README.md +6 -6
- package/README.zh-CN.md +6 -6
- package/cli.ts +20 -0
- package/dist/cli.js +18 -0
- package/package.json +1 -1
- package/server/assets/FLUENT-ICONS-LICENSE +25 -0
- package/server/assets/NOTICE.txt +2 -1
- package/server/assets/attachments.css +1 -1
- package/server/assets/base.css +29 -7
- package/server/assets/chat/doc-preview.js +113 -0
- package/server/assets/chat/events.js +6 -0
- package/server/assets/chat/files.js +25 -16
- package/server/assets/chat/history-loader.js +36 -26
- package/server/assets/chat/icons.js +15 -0
- package/server/assets/chat/index.js +3 -1
- package/server/assets/chat/locales/de.js +6 -5
- package/server/assets/chat/locales/es.js +6 -5
- package/server/assets/chat/locales/fr.js +6 -5
- package/server/assets/chat/locales/it.js +6 -5
- package/server/assets/chat/locales/ja.js +6 -5
- package/server/assets/chat/locales/ko.js +6 -5
- package/server/assets/chat/markdown.js +17 -37
- package/server/assets/chat/messages.js +4 -9
- package/server/assets/chat/palette.js +50 -34
- package/server/assets/chat/pwa.js +67 -9
- package/server/assets/chat/recall.js +3 -2
- package/server/assets/chat/replies.js +2 -1
- package/server/assets/chat/rooms.js +12 -4
- package/server/assets/chat/shortcuts.js +1 -1
- package/server/assets/chat/state.js +12 -10
- package/server/assets/chat/system-messages.js +7 -1
- package/server/assets/code-highlight.css +0 -5
- package/server/assets/conversation.css +5 -4
- package/server/assets/doc-preview.css +158 -0
- package/server/assets/edit-room.css +8 -0
- package/server/assets/files.css +0 -15
- package/server/assets/fluent-icons.svg +42 -0
- package/server/assets/icons.css +9 -0
- package/server/assets/palette.css +1 -15
- package/server/assets/recall.css +2 -2
- package/server/assets/responsive.css +4 -4
- package/server/assets/room-create.css +1 -1
- package/server/assets/settings.css +13 -6
- package/server/chat.html +93 -57
- package/server/sw.js +10 -1
- package/src/tui/app.mjs +16 -1
- package/src/tui/http.mjs +109 -10
- package/src/tui/info-app.mjs +435 -0
- package/src/tui/info-content.mjs +198 -0
- package/src/tui/join-app.mjs +71 -0
- package/src/tui/main.mjs +23 -4
- package/src/tui/markdown.mjs +269 -0
- package/src/tui/message-app.mjs +177 -0
- package/src/tui/message-view.mjs +128 -0
- package/src/tui/palette-app.mjs +85 -9
- package/src/tui/palette.mjs +17 -2
- package/src/tui/reminder-app.mjs +189 -0
- package/src/tui/room-settings-app.mjs +249 -0
- package/src/tui/ui-content.mjs +136 -93
- package/src/tui/ui-overlay-view.mjs +255 -0
- package/src/tui/ui-view.mjs +2 -190
- package/src/tui/ui.mjs +103 -1
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
const SPRITE = "/assets/fluent-icons.svg";
|
|
2
|
+
|
|
3
|
+
// Fluent icons are one local sprite; the class carries size and currentColor fill.
|
|
4
|
+
export function iconNode(name, className = "") {
|
|
5
|
+
const svg = document.createElementNS("http://www.w3.org/2000/svg", "svg");
|
|
6
|
+
svg.setAttribute("class", `fluent-icon${className ? ` ${className}` : ""}`);
|
|
7
|
+
svg.setAttribute("aria-hidden", "true");
|
|
8
|
+
svg.setAttribute("viewBox", "0 0 24 24");
|
|
9
|
+
const use = document.createElementNS("http://www.w3.org/2000/svg", "use");
|
|
10
|
+
use.setAttribute("href", `${SPRITE}#fluent-${name}-24`);
|
|
11
|
+
svg.append(use);
|
|
12
|
+
return svg;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export const icon = (name, className = "") => iconNode(name, className).outerHTML;
|
|
@@ -23,6 +23,7 @@ import { initInstallPrompt } from "./install-prompt.js";
|
|
|
23
23
|
import { initShortcuts } from "./shortcuts.js";
|
|
24
24
|
import { initPalette } from "./palette.js";
|
|
25
25
|
import { initFiles } from "./files.js";
|
|
26
|
+
import { initDocPreview } from "./doc-preview.js";
|
|
26
27
|
import { initViewport } from "./viewport.js";
|
|
27
28
|
import { initSettings } from "./settings.js";
|
|
28
29
|
|
|
@@ -47,8 +48,9 @@ initAnnouncements(app);
|
|
|
47
48
|
initReminders(app);
|
|
48
49
|
initAdmin(app);
|
|
49
50
|
initImageZoom(app);
|
|
50
|
-
initPwa();
|
|
51
|
+
initPwa(app);
|
|
51
52
|
initViewport();
|
|
52
53
|
initInstallPrompt(app);
|
|
53
54
|
initPalette(app);
|
|
54
55
|
initFiles(app);
|
|
56
|
+
initDocPreview(app);
|
|
@@ -43,7 +43,8 @@ export const de = {
|
|
|
43
43
|
reminderEdit: "Bearbeiten", reminderEditHeading: "Erinnerung bearbeiten", reminderSave: "Änderungen speichern",
|
|
44
44
|
reminderCreated: "Erinnerung erstellt.", reminderUpdated: "Erinnerung aktualisiert.", reminderDeleted: "Erinnerung gelöscht.",
|
|
45
45
|
reminderInvalid: "Prüfen Sie Datum, CRON-Ausdruck mit 5 Feldern, IANA-Zeitzone und Erinnerungstext.", reminderLoadFailed: "Erinnerungen konnten nicht geladen werden. Ihr Entwurf ist noch da.",
|
|
46
|
-
diagramLoading: "Diagramm wird gerendert…", diagramRenderFailed: "Diagramm nicht verfügbar; Quelle wird angezeigt.", resourceLoading: "Datei wird geladen…", resourceFailed: "Diese Datei konnte nicht geladen werden.", resourceDownload: "Herunterladen", resourceMoreActions: "Weitere Aktionen für {name}", resourcePreview: "Vorschau", resourceHide: "Vorschau ausblenden", zoomImage: "Bild öffnen", imagePreviewTitle: "Bildvorschau", imageZoomControls: "Bildzoom", zoomIn: "Vergrößern", zoomOut: "Verkleinern", zoomReset: "Zoom zurücksetzen", installTitle: "OC Chat installieren", installBody: "Zum Startbildschirm hinzufügen, um im Vollbild zu chatten.", installAction: "Installieren", installHow: "So installieren", installNotNow: "Später", installIosGuide: "Tippen Sie auf Teilen und dann auf Zum Home-Bildschirm.",
|
|
46
|
+
diagramLoading: "Diagramm wird gerendert…", diagramRenderFailed: "Diagramm nicht verfügbar; Quelle wird angezeigt.", resourceLoading: "Datei wird geladen…", resourceFailed: "Diese Datei konnte nicht geladen werden.", resourceDownload: "Herunterladen", resourceMoreActions: "Weitere Aktionen für {name}", resourcePreview: "Vorschau", resourceHide: "Vorschau ausblenden", docPreviewEyebrow: "Markdown-Vorschau", docPreviewFailed: "Dieses Dokument konnte nicht geladen werden.", docPreviewEmpty: "Dieses Dokument ist leer.", zoomImage: "Bild öffnen", imagePreviewTitle: "Bildvorschau", imageZoomControls: "Bildzoom", zoomIn: "Vergrößern", zoomOut: "Verkleinern", zoomReset: "Zoom zurücksetzen", installTitle: "OC Chat installieren", installBody: "Zum Startbildschirm hinzufügen, um im Vollbild zu chatten.", installAction: "Installieren", installHow: "So installieren", installNotNow: "Später", installIosGuide: "Tippen Sie auf Teilen und dann auf Zum Home-Bildschirm.",
|
|
47
|
+
pwaUpdateTitle: "Update verfügbar", pwaUpdateBody: "Eine neue Version ist bereit. Jetzt neu laden oder beim nächsten Öffnen der App aktualisieren.", pwaUpdateNow: "Jetzt aktualisieren", pwaUpdateLater: "Später",
|
|
47
48
|
announcementDelete: "Ankündigung löschen",
|
|
48
49
|
announcementNew: "Neue Ankündigung", announcementEmpty: "Noch keine Ankündigungen.", announcementLoading: "Ankündigungen werden geladen…",
|
|
49
50
|
announcementLoadFailed: "Ankündigungen konnten nicht geladen werden. Ihr Entwurf ist noch da.", announcementSaved: "Ankündigung gespeichert.", announcementDeleted: "Ankündigung gelöscht.",
|
|
@@ -78,22 +79,22 @@ export const de = {
|
|
|
78
79
|
shortcutsTitle: "Tastenkürzel", shortcutsLead: "ChatRoom-Tastenkürzel. Drücken Sie {modifier} + /, um diese Liste zu öffnen.",
|
|
79
80
|
shortcutsOpen: "Alle Tastenkürzel",
|
|
80
81
|
shortcutsWriting: "Schreiben", shortcutsSend: "Nachricht senden", shortcutsNewline: "Neue Zeile beginnen",
|
|
81
|
-
shortcutsMention: "Mitglied zum Erwähnen wählen", shortcutsRooms: "Räume",
|
|
82
|
+
shortcutsMention: "Mitglied zum Erwähnen wählen", shortcutsRooms: "Räume", shortcutsSearch: "Suche und Befehle", shortcutsOpenPalette: "Suche und Befehle öffnen",
|
|
82
83
|
shortcutsSwitchRoom: "Zum vorherigen oder nächsten Raum wechseln", shortcutsNumberRoom: "Per Nummer zu einem beigetretenen Raum wechseln", shortcutsReading: "Lesen",
|
|
83
84
|
shortcutsScroll: "Nachrichten beim Tippen scrollen", shortcutsJump: "Zum Anfang oder Ende der Unterhaltung springen", shortcutsMenus: "Menüs und Dialoge",
|
|
84
85
|
shortcutsClose: "Geöffnetes Menü, Panel oder Dialog schließen",
|
|
85
86
|
paletteTitle: "Suche und Befehle", paletteSearchLabel: "Nachrichten suchen",
|
|
86
|
-
palettePlaceholder: "Nachrichten suchen oder
|
|
87
|
+
palettePlaceholder: "Nachrichten suchen oder / für Befehle", paletteScopeRoom: "Dieser Raum", paletteScopeAll: "Alle Räume",
|
|
87
88
|
paletteScopeHint: "Tab wechselt zwischen diesem Raum und allen beigetretenen Räumen", paletteSearchMode: "Suche", paletteCommandMode: "Befehle",
|
|
88
89
|
paletteSearching: "Suche läuft…", paletteNoResults: "Keine Nachrichten gefunden.", paletteNoCommands: "Keine passenden Befehle.",
|
|
89
90
|
paletteResults: ({ count }) => `${count} Ergebnis${count === 1 ? "" : "se"}`, paletteCommandsHint: "Häufige Befehle",
|
|
90
|
-
paletteHint: "↑↓ auswählen · Enter öffnen · Tab Bereich · Esc schließen", paletteSearchFailed: "Suche fehlgeschlagen. Bitte erneut versuchen.",
|
|
91
|
+
paletteHint: "↑↓ oder Alt+1–9 auswählen · Enter öffnen · Tab Bereich · Esc schließen", paletteSearchFailed: "Suche fehlgeschlagen. Bitte erneut versuchen.",
|
|
91
92
|
paletteLeaveRoom: "Raum verlassen", paletteJumpLatest: "Zum Neuesten springen",
|
|
92
93
|
filesTitle: "Dateien", filesEyebrow: "Raumdateien", filesFilter: "Hochgeladen von", filesEveryone: "Alle",
|
|
93
94
|
filesUnknownUploader: "Unbekannter Absender", filesSummary: ({ count, size }) => `${count} Datei${count === 1 ? "" : "en"} · ${size}`,
|
|
94
95
|
filesLoading: "Dateien werden geladen…", filesLoadFailed: "Dateien konnten nicht geladen werden. Bitte erneut versuchen.", filesEmpty: "In diesem Raum gibt es noch keine Dateien.",
|
|
95
96
|
filesEmptyFiltered: "Keine Dateien von diesem Absender.", filesLoadMore: "Mehr laden",
|
|
96
|
-
filesHint: "Bilder, Audio und
|
|
97
|
+
filesHint: "Bilder, Audio, Video und Markdown lassen sich ansehen. Jede Datei lässt sich herunterladen.",
|
|
97
98
|
filesPreviewFailed: "Vorschau konnte nicht geladen werden.", filesDownloadFailed: "Diese Datei konnte nicht heruntergeladen werden.",
|
|
98
99
|
filesPreviewLabel: ({ name }) => `${name} ansehen`, filesDownloadLabel: ({ name }) => `${name} herunterladen`,
|
|
99
100
|
filesDeleteLabel: ({ name }) => `${name} löschen`, filesRefresh: "Dateien aktualisieren",
|
|
@@ -43,7 +43,8 @@ export const es = {
|
|
|
43
43
|
reminderEdit: "Editar", reminderEditHeading: "Editar recordatorio", reminderSave: "Guardar cambios",
|
|
44
44
|
reminderCreated: "Recordatorio creado.", reminderUpdated: "Recordatorio actualizado.", reminderDeleted: "Recordatorio eliminado.",
|
|
45
45
|
reminderInvalid: "Revisa la fecha, la expresión CRON de 5 campos, la zona horaria IANA y el texto del recordatorio.", reminderLoadFailed: "No se pudieron cargar los recordatorios. Tu borrador sigue aquí.",
|
|
46
|
-
diagramLoading: "Generando el diagrama…", diagramRenderFailed: "El diagrama no está disponible; se muestra su código fuente.", resourceLoading: "Cargando archivo…", resourceFailed: "No se pudo cargar este archivo.", resourceDownload: "Descargar", resourceMoreActions: "Más acciones para {name}", resourcePreview: "Vista previa", resourceHide: "Ocultar vista previa", zoomImage: "Abrir imagen", imagePreviewTitle: "Vista previa de la imagen", imageZoomControls: "Zoom de la imagen", zoomIn: "Acercar", zoomOut: "Alejar", zoomReset: "Restablecer zoom", installTitle: "Instalar OC Chat", installBody: "Añádelo a tu pantalla de inicio para chatear a pantalla completa.", installAction: "Instalar", installHow: "Cómo instalar", installNotNow: "Ahora no", installIosGuide: "Toca Compartir y luego Añadir a pantalla de inicio.",
|
|
46
|
+
diagramLoading: "Generando el diagrama…", diagramRenderFailed: "El diagrama no está disponible; se muestra su código fuente.", resourceLoading: "Cargando archivo…", resourceFailed: "No se pudo cargar este archivo.", resourceDownload: "Descargar", resourceMoreActions: "Más acciones para {name}", resourcePreview: "Vista previa", resourceHide: "Ocultar vista previa", docPreviewEyebrow: "Vista previa de Markdown", docPreviewFailed: "No se pudo cargar este documento.", docPreviewEmpty: "Este documento está vacío.", zoomImage: "Abrir imagen", imagePreviewTitle: "Vista previa de la imagen", imageZoomControls: "Zoom de la imagen", zoomIn: "Acercar", zoomOut: "Alejar", zoomReset: "Restablecer zoom", installTitle: "Instalar OC Chat", installBody: "Añádelo a tu pantalla de inicio para chatear a pantalla completa.", installAction: "Instalar", installHow: "Cómo instalar", installNotNow: "Ahora no", installIosGuide: "Toca Compartir y luego Añadir a pantalla de inicio.",
|
|
47
|
+
pwaUpdateTitle: "Actualización disponible", pwaUpdateBody: "Hay una nueva versión lista. Recarga ahora o actualiza la próxima vez que abras la aplicación.", pwaUpdateNow: "Actualizar ahora", pwaUpdateLater: "Más tarde",
|
|
47
48
|
announcementDelete: "Eliminar anuncio",
|
|
48
49
|
announcementNew: "Nuevo anuncio", announcementEmpty: "Aún no hay anuncios.", announcementLoading: "Cargando anuncios…",
|
|
49
50
|
announcementLoadFailed: "No se pudieron cargar los anuncios. Tu borrador sigue aquí.", announcementSaved: "Anuncio guardado.", announcementDeleted: "Anuncio eliminado.",
|
|
@@ -78,22 +79,22 @@ export const es = {
|
|
|
78
79
|
shortcutsTitle: "Atajos de teclado", shortcutsLead: "Atajos de ChatRoom. Pulsa {modifier} + / para abrir esta lista.",
|
|
79
80
|
shortcutsOpen: "Todos los atajos",
|
|
80
81
|
shortcutsWriting: "Escritura", shortcutsSend: "Enviar el mensaje", shortcutsNewline: "Empezar una línea nueva",
|
|
81
|
-
shortcutsMention: "Elegir un miembro para mencionar", shortcutsRooms: "Salas",
|
|
82
|
+
shortcutsMention: "Elegir un miembro para mencionar", shortcutsRooms: "Salas", shortcutsSearch: "Búsqueda y comandos", shortcutsOpenPalette: "Abrir búsqueda y comandos",
|
|
82
83
|
shortcutsSwitchRoom: "Cambiar a la sala anterior o siguiente", shortcutsNumberRoom: "Cambiar a una sala unida por número", shortcutsReading: "Lectura",
|
|
83
84
|
shortcutsScroll: "Desplazar los mensajes mientras escribes", shortcutsJump: "Ir al principio o al final de la conversación", shortcutsMenus: "Menús y diálogos",
|
|
84
85
|
shortcutsClose: "Cerrar el menú, panel o diálogo abierto",
|
|
85
86
|
paletteTitle: "Búsqueda y comandos", paletteSearchLabel: "Buscar mensajes",
|
|
86
|
-
palettePlaceholder: "Busca mensajes o escribe
|
|
87
|
+
palettePlaceholder: "Busca mensajes o escribe / para comandos", paletteScopeRoom: "Esta sala", paletteScopeAll: "Todas las salas",
|
|
87
88
|
paletteScopeHint: "Tab alterna entre esta sala y todas las salas unidas", paletteSearchMode: "Búsqueda", paletteCommandMode: "Comandos",
|
|
88
89
|
paletteSearching: "Buscando…", paletteNoResults: "No se encontraron mensajes.", paletteNoCommands: "No hay comandos coincidentes.",
|
|
89
90
|
paletteResults: ({ count }) => `${count} resultado${count === 1 ? "" : "s"}`, paletteCommandsHint: "Comandos habituales",
|
|
90
|
-
paletteHint: "↑↓ seleccionar · Enter abrir · Tab alcance · Esc cerrar", paletteSearchFailed: "La búsqueda falló. Inténtalo de nuevo.",
|
|
91
|
+
paletteHint: "↑↓ o Alt+1–9 seleccionar · Enter abrir · Tab alcance · Esc cerrar", paletteSearchFailed: "La búsqueda falló. Inténtalo de nuevo.",
|
|
91
92
|
paletteLeaveRoom: "Salir de la sala", paletteJumpLatest: "Ir a lo más reciente",
|
|
92
93
|
filesTitle: "Archivos", filesEyebrow: "Archivos de la sala", filesFilter: "Subido por", filesEveryone: "Todos",
|
|
93
94
|
filesUnknownUploader: "Autor desconocido", filesSummary: ({ count, size }) => `${count} archivo${count === 1 ? "" : "s"} · ${size}`,
|
|
94
95
|
filesLoading: "Cargando archivos…", filesLoadFailed: "No se pudieron cargar los archivos. Inténtalo de nuevo.", filesEmpty: "Esta sala aún no tiene archivos.",
|
|
95
96
|
filesEmptyFiltered: "No hay archivos de este autor.", filesLoadMore: "Cargar más",
|
|
96
|
-
filesHint: "Puedes previsualizar imágenes, audio y
|
|
97
|
+
filesHint: "Puedes previsualizar imágenes, audio, vídeo y Markdown. Todos los archivos se pueden descargar.",
|
|
97
98
|
filesPreviewFailed: "No se pudo cargar la vista previa.", filesDownloadFailed: "No se pudo descargar este archivo.",
|
|
98
99
|
filesPreviewLabel: ({ name }) => `Vista previa de ${name}`, filesDownloadLabel: ({ name }) => `Descargar ${name}`,
|
|
99
100
|
filesDeleteLabel: ({ name }) => `Eliminar ${name}`, filesRefresh: "Actualizar archivos",
|
|
@@ -43,7 +43,8 @@ export const fr = {
|
|
|
43
43
|
reminderEdit: "Modifier", reminderEditHeading: "Modifier le rappel", reminderSave: "Enregistrer les modifications",
|
|
44
44
|
reminderCreated: "Rappel créé.", reminderUpdated: "Rappel mis à jour.", reminderDeleted: "Rappel supprimé.",
|
|
45
45
|
reminderInvalid: "Vérifiez la date, l’expression CRON à 5 champs, le fuseau IANA et le texte du rappel.", reminderLoadFailed: "Impossible de charger les rappels. Votre brouillon est toujours là.",
|
|
46
|
-
diagramLoading: "Rendu du diagramme…", diagramRenderFailed: "Diagramme indisponible, affichage de sa source.", resourceLoading: "Chargement du fichier…", resourceFailed: "Impossible de charger ce fichier.", resourceDownload: "Télécharger", resourceMoreActions: "Plus d’actions pour {name}", resourcePreview: "Aperçu", resourceHide: "Masquer l’aperçu", zoomImage: "Ouvrir l’image", imagePreviewTitle: "Aperçu de l’image", imageZoomControls: "Zoom de l’image", zoomIn: "Zoom avant", zoomOut: "Zoom arrière", zoomReset: "Réinitialiser le zoom", installTitle: "Installer OC Chat", installBody: "Ajoutez-le à votre écran d’accueil pour discuter en plein écran.", installAction: "Installer", installHow: "Comment installer", installNotNow: "Plus tard", installIosGuide: "Touchez Partager, puis Ajouter à l’écran d’accueil.",
|
|
46
|
+
diagramLoading: "Rendu du diagramme…", diagramRenderFailed: "Diagramme indisponible, affichage de sa source.", resourceLoading: "Chargement du fichier…", resourceFailed: "Impossible de charger ce fichier.", resourceDownload: "Télécharger", resourceMoreActions: "Plus d’actions pour {name}", resourcePreview: "Aperçu", resourceHide: "Masquer l’aperçu", docPreviewEyebrow: "Aperçu Markdown", docPreviewFailed: "Impossible de charger ce document.", docPreviewEmpty: "Ce document est vide.", zoomImage: "Ouvrir l’image", imagePreviewTitle: "Aperçu de l’image", imageZoomControls: "Zoom de l’image", zoomIn: "Zoom avant", zoomOut: "Zoom arrière", zoomReset: "Réinitialiser le zoom", installTitle: "Installer OC Chat", installBody: "Ajoutez-le à votre écran d’accueil pour discuter en plein écran.", installAction: "Installer", installHow: "Comment installer", installNotNow: "Plus tard", installIosGuide: "Touchez Partager, puis Ajouter à l’écran d’accueil.",
|
|
47
|
+
pwaUpdateTitle: "Mise à jour disponible", pwaUpdateBody: "Une nouvelle version est prête. Rechargez maintenant ou mettez à jour à la prochaine ouverture de l’application.", pwaUpdateNow: "Mettre à jour", pwaUpdateLater: "Plus tard",
|
|
47
48
|
announcementDelete: "Supprimer l’annonce",
|
|
48
49
|
announcementNew: "Nouvelle annonce", announcementEmpty: "Aucune annonce pour l’instant.", announcementLoading: "Chargement des annonces…",
|
|
49
50
|
announcementLoadFailed: "Impossible de charger les annonces. Votre brouillon est toujours là.", announcementSaved: "Annonce enregistrée.", announcementDeleted: "Annonce supprimée.",
|
|
@@ -78,22 +79,22 @@ export const fr = {
|
|
|
78
79
|
shortcutsTitle: "Raccourcis clavier", shortcutsLead: "Raccourcis de ChatRoom. Appuyez sur {modifier} + / pour ouvrir cette liste.",
|
|
79
80
|
shortcutsOpen: "Tous les raccourcis",
|
|
80
81
|
shortcutsWriting: "Rédaction", shortcutsSend: "Envoyer le message", shortcutsNewline: "Passer à la ligne",
|
|
81
|
-
shortcutsMention: "Choisir un membre à mentionner", shortcutsRooms: "Salons",
|
|
82
|
+
shortcutsMention: "Choisir un membre à mentionner", shortcutsRooms: "Salons", shortcutsSearch: "Recherche et commandes", shortcutsOpenPalette: "Ouvrir la recherche et les commandes",
|
|
82
83
|
shortcutsSwitchRoom: "Passer au salon précédent ou suivant", shortcutsNumberRoom: "Passer à un salon rejoint par son numéro", shortcutsReading: "Lecture",
|
|
83
84
|
shortcutsScroll: "Faire défiler les messages pendant la saisie", shortcutsJump: "Aller au début ou à la fin de la conversation", shortcutsMenus: "Menus et boîtes de dialogue",
|
|
84
85
|
shortcutsClose: "Fermer le menu, le panneau ou la boîte de dialogue ouverts",
|
|
85
86
|
paletteTitle: "Recherche et commandes", paletteSearchLabel: "Rechercher des messages",
|
|
86
|
-
palettePlaceholder: "Rechercher des messages, ou
|
|
87
|
+
palettePlaceholder: "Rechercher des messages, ou / pour les commandes", paletteScopeRoom: "Ce salon", paletteScopeAll: "Tous les salons",
|
|
87
88
|
paletteScopeHint: "Tab bascule entre ce salon et tous les salons rejoints", paletteSearchMode: "Recherche", paletteCommandMode: "Commandes",
|
|
88
89
|
paletteSearching: "Recherche…", paletteNoResults: "Aucun message trouvé.", paletteNoCommands: "Aucune commande correspondante.",
|
|
89
90
|
paletteResults: ({ count }) => `${count} résultat${count === 1 ? "" : "s"}`, paletteCommandsHint: "Commandes courantes",
|
|
90
|
-
paletteHint: "↑↓ sélectionner · Entrée ouvrir · Tab portée · Échap fermer", paletteSearchFailed: "La recherche a échoué. Réessayez.",
|
|
91
|
+
paletteHint: "↑↓ ou Alt+1–9 sélectionner · Entrée ouvrir · Tab portée · Échap fermer", paletteSearchFailed: "La recherche a échoué. Réessayez.",
|
|
91
92
|
paletteLeaveRoom: "Quitter le salon", paletteJumpLatest: "Aller au plus récent",
|
|
92
93
|
filesTitle: "Fichiers", filesEyebrow: "Fichiers du salon", filesFilter: "Envoyé par", filesEveryone: "Tout le monde",
|
|
93
94
|
filesUnknownUploader: "Envoyeur inconnu", filesSummary: ({ count, size }) => `${count} fichier${count === 1 ? "" : "s"} · ${size}`,
|
|
94
95
|
filesLoading: "Chargement des fichiers…", filesLoadFailed: "Impossible de charger les fichiers. Réessayez.", filesEmpty: "Ce salon n’a pas encore de fichiers.",
|
|
95
96
|
filesEmptyFiltered: "Aucun fichier de cet envoyeur.", filesLoadMore: "Charger plus",
|
|
96
|
-
filesHint: "Prévisualisez les images, l’audio
|
|
97
|
+
filesHint: "Prévisualisez les images, l’audio, la vidéo et Markdown. Tous les fichiers peuvent être téléchargés.",
|
|
97
98
|
filesPreviewFailed: "Impossible de charger cet aperçu.", filesDownloadFailed: "Impossible de télécharger ce fichier.",
|
|
98
99
|
filesPreviewLabel: ({ name }) => `Aperçu de ${name}`, filesDownloadLabel: ({ name }) => `Télécharger ${name}`,
|
|
99
100
|
filesDeleteLabel: ({ name }) => `Supprimer ${name}`, filesRefresh: "Actualiser les fichiers",
|
|
@@ -43,7 +43,8 @@ export const it = {
|
|
|
43
43
|
reminderEdit: "Modifica", reminderEditHeading: "Modifica promemoria", reminderSave: "Salva modifiche",
|
|
44
44
|
reminderCreated: "Promemoria creato.", reminderUpdated: "Promemoria aggiornato.", reminderDeleted: "Promemoria eliminato.",
|
|
45
45
|
reminderInvalid: "Controlla la data, l’espressione CRON a 5 campi, il fuso orario IANA e il testo del promemoria.", reminderLoadFailed: "Impossibile caricare i promemoria. La tua bozza è ancora qui.",
|
|
46
|
-
diagramLoading: "Rendering del diagramma…", diagramRenderFailed: "Diagramma non disponibile; viene mostrato il codice sorgente.", resourceLoading: "Caricamento del file…", resourceFailed: "Impossibile caricare questo file.", resourceDownload: "Scarica", resourceMoreActions: "Altre azioni per {name}", resourcePreview: "Anteprima", resourceHide: "Nascondi anteprima", zoomImage: "Apri immagine", imagePreviewTitle: "Anteprima immagine", imageZoomControls: "Zoom immagine", zoomIn: "Ingrandisci", zoomOut: "Riduci", zoomReset: "Reimposta zoom", installTitle: "Installa OC Chat", installBody: "Aggiungilo alla schermata Home per una chat a schermo intero.", installAction: "Installa", installHow: "Come installare", installNotNow: "Non ora", installIosGuide: "Tocca Condividi, poi Aggiungi alla schermata Home.",
|
|
46
|
+
diagramLoading: "Rendering del diagramma…", diagramRenderFailed: "Diagramma non disponibile; viene mostrato il codice sorgente.", resourceLoading: "Caricamento del file…", resourceFailed: "Impossibile caricare questo file.", resourceDownload: "Scarica", resourceMoreActions: "Altre azioni per {name}", resourcePreview: "Anteprima", resourceHide: "Nascondi anteprima", docPreviewEyebrow: "Anteprima Markdown", docPreviewFailed: "Impossibile caricare questo documento.", docPreviewEmpty: "Questo documento è vuoto.", zoomImage: "Apri immagine", imagePreviewTitle: "Anteprima immagine", imageZoomControls: "Zoom immagine", zoomIn: "Ingrandisci", zoomOut: "Riduci", zoomReset: "Reimposta zoom", installTitle: "Installa OC Chat", installBody: "Aggiungilo alla schermata Home per una chat a schermo intero.", installAction: "Installa", installHow: "Come installare", installNotNow: "Non ora", installIosGuide: "Tocca Condividi, poi Aggiungi alla schermata Home.",
|
|
47
|
+
pwaUpdateTitle: "Aggiornamento disponibile", pwaUpdateBody: "È pronta una nuova versione. Ricarica ora o aggiorna la prossima volta che apri l’app.", pwaUpdateNow: "Aggiorna ora", pwaUpdateLater: "Più tardi",
|
|
47
48
|
announcementDelete: "Elimina annuncio",
|
|
48
49
|
announcementNew: "Nuovo annuncio", announcementEmpty: "Nessun annuncio.", announcementLoading: "Caricamento degli annunci…",
|
|
49
50
|
announcementLoadFailed: "Impossibile caricare gli annunci. La tua bozza è ancora qui.", announcementSaved: "Annuncio salvato.", announcementDeleted: "Annuncio eliminato.",
|
|
@@ -78,22 +79,22 @@ export const it = {
|
|
|
78
79
|
shortcutsTitle: "Scorciatoie da tastiera", shortcutsLead: "Scorciatoie di ChatRoom. Premi {modifier} + / per aprire questo elenco.",
|
|
79
80
|
shortcutsOpen: "Tutte le scorciatoie",
|
|
80
81
|
shortcutsWriting: "Scrittura", shortcutsSend: "Invia il messaggio", shortcutsNewline: "Vai a capo",
|
|
81
|
-
shortcutsMention: "Scegli un membro da menzionare", shortcutsRooms: "Stanze",
|
|
82
|
+
shortcutsMention: "Scegli un membro da menzionare", shortcutsRooms: "Stanze", shortcutsSearch: "Ricerca e comandi", shortcutsOpenPalette: "Apri ricerca e comandi",
|
|
82
83
|
shortcutsSwitchRoom: "Passa alla stanza precedente o successiva", shortcutsNumberRoom: "Passa a una stanza partecipata per numero", shortcutsReading: "Lettura",
|
|
83
84
|
shortcutsScroll: "Scorri i messaggi mentre scrivi", shortcutsJump: "Vai all’inizio o alla fine della conversazione", shortcutsMenus: "Menu e finestre di dialogo",
|
|
84
85
|
shortcutsClose: "Chiudi il menu, il pannello o la finestra di dialogo aperti",
|
|
85
86
|
paletteTitle: "Ricerca e comandi", paletteSearchLabel: "Cerca messaggi",
|
|
86
|
-
palettePlaceholder: "Cerca messaggi o digita
|
|
87
|
+
palettePlaceholder: "Cerca messaggi o digita / per i comandi", paletteScopeRoom: "Questa stanza", paletteScopeAll: "Tutte le stanze",
|
|
87
88
|
paletteScopeHint: "Tab alterna tra questa stanza e tutte le stanze a cui hai aderito", paletteSearchMode: "Ricerca", paletteCommandMode: "Comandi",
|
|
88
89
|
paletteSearching: "Ricerca in corso…", paletteNoResults: "Nessun messaggio trovato.", paletteNoCommands: "Nessun comando corrispondente.",
|
|
89
90
|
paletteResults: ({ count }) => `${count} risultat${count === 1 ? "o" : "i"}`, paletteCommandsHint: "Comandi frequenti",
|
|
90
|
-
paletteHint: "↑↓ seleziona · Enter apri · Tab ambito · Esc chiudi", paletteSearchFailed: "Ricerca non riuscita. Riprova.",
|
|
91
|
+
paletteHint: "↑↓ o Alt+1–9 seleziona · Enter apri · Tab ambito · Esc chiudi", paletteSearchFailed: "Ricerca non riuscita. Riprova.",
|
|
91
92
|
paletteLeaveRoom: "Esci dalla stanza", paletteJumpLatest: "Vai ai più recenti",
|
|
92
93
|
filesTitle: "File", filesEyebrow: "File della stanza", filesFilter: "Caricato da", filesEveryone: "Tutti",
|
|
93
94
|
filesUnknownUploader: "Autore sconosciuto", filesSummary: ({ count, size }) => `${count} file · ${size}`,
|
|
94
95
|
filesLoading: "Caricamento dei file…", filesLoadFailed: "Impossibile caricare i file. Riprova.", filesEmpty: "Questa stanza non ha ancora file.",
|
|
95
96
|
filesEmptyFiltered: "Nessun file di questo autore.", filesLoadMore: "Carica altri",
|
|
96
|
-
filesHint: "Puoi visualizzare immagini, audio e
|
|
97
|
+
filesHint: "Puoi visualizzare immagini, audio, video e Markdown. Tutti i file si possono scaricare.",
|
|
97
98
|
filesPreviewFailed: "Impossibile caricare l’anteprima.", filesDownloadFailed: "Impossibile scaricare questo file.",
|
|
98
99
|
filesPreviewLabel: ({ name }) => `Anteprima di ${name}`, filesDownloadLabel: ({ name }) => `Scarica ${name}`,
|
|
99
100
|
filesDeleteLabel: ({ name }) => `Elimina ${name}`, filesRefresh: "Aggiorna i file",
|
|
@@ -44,7 +44,8 @@ export const ja = {
|
|
|
44
44
|
reminderEdit: "編集", reminderEditHeading: "リマインダーを編集", reminderSave: "変更を保存",
|
|
45
45
|
reminderCreated: "リマインダーを作成しました。", reminderUpdated: "リマインダーを更新しました。", reminderDeleted: "リマインダーを削除しました。",
|
|
46
46
|
reminderInvalid: "日時、5 フィールドの CRON 式、IANA タイムゾーン、リマインダーのテキストを確認してください。", reminderLoadFailed: "リマインダーを読み込めませんでした。下書きは残っています。",
|
|
47
|
-
diagramLoading: "図を描画中…", diagramRenderFailed: "図を表示できません。ソースを表示しています。", resourceLoading: "ファイルを読み込み中…", resourceFailed: "このファイルを読み込めませんでした。", resourceDownload: "ダウンロード", resourceMoreActions: "{name} のその他の操作", resourcePreview: "プレビュー", resourceHide: "プレビューを隠す", zoomImage: "画像を開く", imagePreviewTitle: "画像プレビュー", imageZoomControls: "画像のズーム", zoomIn: "拡大", zoomOut: "縮小", zoomReset: "ズームをリセット", installTitle: "OC Chat をインストール", installBody: "ホーム画面に追加すると、全画面でチャットできます。", installAction: "インストール", installHow: "インストール方法", installNotNow: "後で", installIosGuide: "共有をタップし、「ホーム画面に追加」を選択します。",
|
|
47
|
+
diagramLoading: "図を描画中…", diagramRenderFailed: "図を表示できません。ソースを表示しています。", resourceLoading: "ファイルを読み込み中…", resourceFailed: "このファイルを読み込めませんでした。", resourceDownload: "ダウンロード", resourceMoreActions: "{name} のその他の操作", resourcePreview: "プレビュー", resourceHide: "プレビューを隠す", docPreviewEyebrow: "Markdown プレビュー", docPreviewFailed: "このドキュメントを読み込めませんでした。", docPreviewEmpty: "このドキュメントは空です。", zoomImage: "画像を開く", imagePreviewTitle: "画像プレビュー", imageZoomControls: "画像のズーム", zoomIn: "拡大", zoomOut: "縮小", zoomReset: "ズームをリセット", installTitle: "OC Chat をインストール", installBody: "ホーム画面に追加すると、全画面でチャットできます。", installAction: "インストール", installHow: "インストール方法", installNotNow: "後で", installIosGuide: "共有をタップし、「ホーム画面に追加」を選択します。",
|
|
48
|
+
pwaUpdateTitle: "アップデートがあります", pwaUpdateBody: "新しいバージョンの準備ができました。今すぐ再読み込みするか、次回起動時に更新できます。", pwaUpdateNow: "今すぐ更新", pwaUpdateLater: "後で",
|
|
48
49
|
announcementDelete: "お知らせを削除",
|
|
49
50
|
announcementNew: "新しいお知らせ", announcementEmpty: "お知らせはまだありません。", announcementLoading: "お知らせを読み込み中…",
|
|
50
51
|
announcementLoadFailed: "お知らせを読み込めませんでした。下書きは残っています。", announcementSaved: "お知らせを保存しました。", announcementDeleted: "お知らせを削除しました。",
|
|
@@ -78,22 +79,22 @@ export const ja = {
|
|
|
78
79
|
shortcutsTitle: "キーボードショートカット", shortcutsLead: "ChatRoom のショートカット。{modifier} + / でこの一覧を開きます。",
|
|
79
80
|
shortcutsOpen: "すべてのショートカット",
|
|
80
81
|
shortcutsWriting: "入力", shortcutsSend: "メッセージを送信", shortcutsNewline: "改行",
|
|
81
|
-
shortcutsMention: "メンションするメンバーを選択", shortcutsRooms: "ルーム",
|
|
82
|
+
shortcutsMention: "メンションするメンバーを選択", shortcutsRooms: "ルーム", shortcutsSearch: "検索とコマンド", shortcutsOpenPalette: "検索とコマンドを開く",
|
|
82
83
|
shortcutsSwitchRoom: "前後のルームに切り替え", shortcutsNumberRoom: "番号で参加中のルームに切り替え", shortcutsReading: "閲覧",
|
|
83
84
|
shortcutsScroll: "入力中にメッセージをスクロール", shortcutsJump: "会話の先頭または末尾に移動", shortcutsMenus: "メニューとダイアログ",
|
|
84
85
|
shortcutsClose: "開いているメニュー、パネル、ダイアログを閉じる",
|
|
85
86
|
paletteTitle: "検索とコマンド", paletteSearchLabel: "メッセージを検索",
|
|
86
|
-
palettePlaceholder: "
|
|
87
|
+
palettePlaceholder: "メッセージを検索、/ でコマンド", paletteScopeRoom: "このルーム", paletteScopeAll: "すべてのルーム",
|
|
87
88
|
paletteScopeHint: "Tab でこのルームと参加中のすべてのルームを切り替えます", paletteSearchMode: "検索", paletteCommandMode: "コマンド",
|
|
88
89
|
paletteSearching: "検索中…", paletteNoResults: "メッセージは見つかりませんでした。", paletteNoCommands: "一致するコマンドはありません。",
|
|
89
90
|
paletteResults: ({ count }) => `${count} 件の結果`, paletteCommandsHint: "よく使うコマンド",
|
|
90
|
-
paletteHint: "↑↓
|
|
91
|
+
paletteHint: "↑↓ または Alt+1–9 で選択 · Enter で開く · Tab で範囲切替 · Esc で閉じる", paletteSearchFailed: "検索に失敗しました。もう一度お試しください。",
|
|
91
92
|
paletteLeaveRoom: "ルームを退出", paletteJumpLatest: "最新へ移動",
|
|
92
93
|
filesTitle: "ファイル", filesEyebrow: "ルームのファイル", filesFilter: "アップロード者", filesEveryone: "全員",
|
|
93
94
|
filesUnknownUploader: "不明なアップロード者", filesSummary: ({ count, size }) => `${count} 個のファイル · ${size}`,
|
|
94
95
|
filesLoading: "ファイルを読み込み中…", filesLoadFailed: "ファイルを読み込めませんでした。もう一度お試しください。", filesEmpty: "このルームにはまだファイルがありません。",
|
|
95
96
|
filesEmptyFiltered: "このアップロード者のファイルはありません。", filesLoadMore: "さらに読み込む",
|
|
96
|
-
filesHint: "
|
|
97
|
+
filesHint: "画像・音声・動画・Markdown をプレビューできます。すべてのファイルをダウンロードできます。",
|
|
97
98
|
filesPreviewFailed: "プレビューを読み込めませんでした。", filesDownloadFailed: "このファイルをダウンロードできませんでした。",
|
|
98
99
|
filesPreviewLabel: ({ name }) => `${name} をプレビュー`, filesDownloadLabel: ({ name }) => `${name} をダウンロード`,
|
|
99
100
|
filesDeleteLabel: ({ name }) => `${name} を削除`, filesRefresh: "ファイルを更新",
|
|
@@ -44,7 +44,8 @@ export const ko = {
|
|
|
44
44
|
reminderEdit: "편집", reminderEditHeading: "리마인더 편집", reminderSave: "변경 사항 저장",
|
|
45
45
|
reminderCreated: "리마인더를 만들었습니다.", reminderUpdated: "리마인더를 수정했습니다.", reminderDeleted: "리마인더를 삭제했습니다.",
|
|
46
46
|
reminderInvalid: "날짜, 5필드 CRON 식, IANA 시간대, 리마인더 텍스트를 확인하세요.", reminderLoadFailed: "리마인더를 불러오지 못했습니다. 작성 중인 내용은 그대로 있습니다.",
|
|
47
|
-
diagramLoading: "다이어그램 그리는 중…", diagramRenderFailed: "다이어그램을 표시할 수 없습니다. 원본을 표시합니다.", resourceLoading: "파일 불러오는 중…", resourceFailed: "이 파일을 불러오지 못했습니다.", resourceDownload: "다운로드", resourceMoreActions: "{name}의 추가 작업", resourcePreview: "미리 보기", resourceHide: "미리 보기 숨기기", zoomImage: "이미지 열기", imagePreviewTitle: "이미지 미리 보기", imageZoomControls: "이미지 확대/축소", zoomIn: "확대", zoomOut: "축소", zoomReset: "확대/축소 초기화", installTitle: "OC Chat 설치", installBody: "홈 화면에 추가하면 전체 화면으로 채팅할 수 있습니다.", installAction: "설치", installHow: "설치 방법", installNotNow: "나중에", installIosGuide: "공유를 탭한 다음 홈 화면에 추가를 선택하세요.",
|
|
47
|
+
diagramLoading: "다이어그램 그리는 중…", diagramRenderFailed: "다이어그램을 표시할 수 없습니다. 원본을 표시합니다.", resourceLoading: "파일 불러오는 중…", resourceFailed: "이 파일을 불러오지 못했습니다.", resourceDownload: "다운로드", resourceMoreActions: "{name}의 추가 작업", resourcePreview: "미리 보기", resourceHide: "미리 보기 숨기기", docPreviewEyebrow: "Markdown 미리 보기", docPreviewFailed: "이 문서를 불러오지 못했습니다.", docPreviewEmpty: "이 문서는 비어 있습니다.", zoomImage: "이미지 열기", imagePreviewTitle: "이미지 미리 보기", imageZoomControls: "이미지 확대/축소", zoomIn: "확대", zoomOut: "축소", zoomReset: "확대/축소 초기화", installTitle: "OC Chat 설치", installBody: "홈 화면에 추가하면 전체 화면으로 채팅할 수 있습니다.", installAction: "설치", installHow: "설치 방법", installNotNow: "나중에", installIosGuide: "공유를 탭한 다음 홈 화면에 추가를 선택하세요.",
|
|
48
|
+
pwaUpdateTitle: "업데이트 가능", pwaUpdateBody: "새 버전이 준비되었습니다. 지금 새로고침하거나 다음에 앱을 열 때 업데이트할 수 있습니다.", pwaUpdateNow: "지금 업데이트", pwaUpdateLater: "나중에",
|
|
48
49
|
announcementDelete: "공지 삭제",
|
|
49
50
|
announcementNew: "새 공지", announcementEmpty: "아직 공지가 없습니다.", announcementLoading: "공지 불러오는 중…",
|
|
50
51
|
announcementLoadFailed: "공지를 불러오지 못했습니다. 작성 중인 내용은 그대로 있습니다.", announcementSaved: "공지를 저장했습니다.", announcementDeleted: "공지를 삭제했습니다.",
|
|
@@ -78,22 +79,22 @@ export const ko = {
|
|
|
78
79
|
shortcutsTitle: "키보드 단축키", shortcutsLead: "ChatRoom 단축키입니다. {modifier} + / 를 눌러 이 목록을 여세요.",
|
|
79
80
|
shortcutsOpen: "모든 단축키",
|
|
80
81
|
shortcutsWriting: "작성", shortcutsSend: "메시지 보내기", shortcutsNewline: "줄 바꾸기",
|
|
81
|
-
shortcutsMention: "멘션할 멤버 선택", shortcutsRooms: "방",
|
|
82
|
+
shortcutsMention: "멘션할 멤버 선택", shortcutsRooms: "방", shortcutsSearch: "검색 및 명령", shortcutsOpenPalette: "검색 및 명령 열기",
|
|
82
83
|
shortcutsSwitchRoom: "이전 또는 다음 방으로 전환", shortcutsNumberRoom: "번호로 참여 중인 방으로 전환", shortcutsReading: "읽기",
|
|
83
84
|
shortcutsScroll: "입력 중에 메시지 스크롤", shortcutsJump: "대화의 시작이나 끝으로 이동", shortcutsMenus: "메뉴 및 대화 상자",
|
|
84
85
|
shortcutsClose: "열린 메뉴, 패널 또는 대화 상자 닫기",
|
|
85
86
|
paletteTitle: "검색 및 명령", paletteSearchLabel: "메시지 검색",
|
|
86
|
-
palettePlaceholder: "메시지를 검색하거나
|
|
87
|
+
palettePlaceholder: "메시지를 검색하거나 / 로 명령 사용", paletteScopeRoom: "이 방", paletteScopeAll: "모든 방",
|
|
87
88
|
paletteScopeHint: "Tab 키로 이 방과 참여 중인 모든 방을 전환합니다", paletteSearchMode: "검색", paletteCommandMode: "명령",
|
|
88
89
|
paletteSearching: "검색 중…", paletteNoResults: "메시지를 찾지 못했습니다.", paletteNoCommands: "일치하는 명령이 없습니다.",
|
|
89
90
|
paletteResults: ({ count }) => `결과 ${count}개`, paletteCommandsHint: "자주 쓰는 명령",
|
|
90
|
-
paletteHint: "↑↓ 선택 · Enter 열기 · Tab 범위 전환 · Esc 닫기", paletteSearchFailed: "검색에 실패했습니다. 다시 시도해 주세요.",
|
|
91
|
+
paletteHint: "↑↓ 또는 Alt+1–9 선택 · Enter 열기 · Tab 범위 전환 · Esc 닫기", paletteSearchFailed: "검색에 실패했습니다. 다시 시도해 주세요.",
|
|
91
92
|
paletteLeaveRoom: "방 나가기", paletteJumpLatest: "최신으로 이동",
|
|
92
93
|
filesTitle: "파일", filesEyebrow: "방 파일", filesFilter: "업로더", filesEveryone: "모두",
|
|
93
94
|
filesUnknownUploader: "알 수 없는 업로더", filesSummary: ({ count, size }) => `${count}개 파일 · ${size}`,
|
|
94
95
|
filesLoading: "파일을 불러오는 중…", filesLoadFailed: "파일을 불러오지 못했습니다. 다시 시도해 주세요.", filesEmpty: "이 방에는 아직 파일이 없습니다.",
|
|
95
96
|
filesEmptyFiltered: "이 업로더의 파일이 없습니다.", filesLoadMore: "더 불러오기",
|
|
96
|
-
filesHint: "이미지, 오디오,
|
|
97
|
+
filesHint: "이미지, 오디오, 동영상, Markdown을 미리 볼 수 있습니다. 모든 파일을 다운로드할 수 있습니다.",
|
|
97
98
|
filesPreviewFailed: "미리보기를 불러오지 못했습니다.", filesDownloadFailed: "이 파일을 다운로드하지 못했습니다.",
|
|
98
99
|
filesPreviewLabel: ({ name }) => `${name} 미리보기`, filesDownloadLabel: ({ name }) => `${name} 다운로드`,
|
|
99
100
|
filesDeleteLabel: ({ name }) => `${name} 삭제`, filesRefresh: "파일 새로고침",
|
|
@@ -1,13 +1,18 @@
|
|
|
1
1
|
import { createRandomId, LS } from "./state.js";
|
|
2
2
|
import { isRoomAdmin } from "./admin-badge.js";
|
|
3
|
+
import { iconNode } from "./icons.js";
|
|
3
4
|
|
|
4
5
|
const mentionPattern = /<at>@([^<]+)<\/at>/g;
|
|
5
6
|
const resourcePattern = /\[\[resource:([\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12})\]\]/gi;
|
|
6
7
|
let mermaidReady = false;
|
|
7
8
|
const previewUrls = new Map();
|
|
8
|
-
const svgNamespace = "http://www.w3.org/2000/svg";
|
|
9
9
|
let previewObserver;
|
|
10
10
|
|
|
11
|
+
export function isMarkdownResource(resource) {
|
|
12
|
+
const mime = String(resource?.mimeType || "").split(";")[0].trim().toLowerCase();
|
|
13
|
+
return mime === "text/markdown" || mime === "text/x-markdown" || /\.(?:md|markdown)$/i.test(String(resource?.name || ""));
|
|
14
|
+
}
|
|
15
|
+
|
|
11
16
|
export function renderMarkdown(root, text, app) {
|
|
12
17
|
const mentions = [], diagrams = new Map();
|
|
13
18
|
const nonce = createRandomId();
|
|
@@ -113,36 +118,9 @@ function codeToolButton(className, key, app, ...icons) {
|
|
|
113
118
|
return button;
|
|
114
119
|
}
|
|
115
120
|
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
svg.setAttribute("aria-hidden", "true");
|
|
120
|
-
svg.classList.add("code-tool-icon", className);
|
|
121
|
-
for (const [tag, attributes] of shapes) {
|
|
122
|
-
const node = document.createElementNS(svgNamespace, tag);
|
|
123
|
-
for (const [name, value] of Object.entries(attributes)) node.setAttribute(name, value);
|
|
124
|
-
svg.append(node);
|
|
125
|
-
}
|
|
126
|
-
return svg;
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
function wrapIcon() {
|
|
130
|
-
return codeIcon("code-wrap-icon", [
|
|
131
|
-
["path", { d: "M4 5h16M4 11h13a3.5 3.5 0 0 1 0 7h-4M4 18h5" }],
|
|
132
|
-
["path", { d: "m8 16-3 3 3 3" }],
|
|
133
|
-
]);
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
function copyIcon() {
|
|
137
|
-
return codeIcon("code-copy-icon", [
|
|
138
|
-
["rect", { x: "4", y: "3", width: "13", height: "15", rx: "2" }],
|
|
139
|
-
["rect", { x: "8", y: "7", width: "12", height: "14", rx: "2" }],
|
|
140
|
-
]);
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
function checkIcon() {
|
|
144
|
-
return codeIcon("code-check-icon", [["path", { d: "m5 12 4.5 4.5L19 7" }]]);
|
|
145
|
-
}
|
|
121
|
+
const wrapIcon = () => iconNode("text_wrap", "code-tool-icon code-wrap-icon");
|
|
122
|
+
const copyIcon = () => iconNode("copy", "code-tool-icon code-copy-icon");
|
|
123
|
+
const checkIcon = () => iconNode("checkmark", "code-tool-icon code-check-icon");
|
|
146
124
|
|
|
147
125
|
async function copyCode(button, code, app) {
|
|
148
126
|
const copied = await copyTextToClipboard(code.textContent);
|
|
@@ -248,11 +226,14 @@ async function loadResourceCard(card, roomId, app) {
|
|
|
248
226
|
remove = resourceMenuItem("resourceDelete", () => deleteResource(card, roomId, id, resource, app, status, remove), app);
|
|
249
227
|
actions.append(resourceSplit(app, resource, download, remove));
|
|
250
228
|
} else actions.append(download);
|
|
251
|
-
|
|
252
|
-
|
|
229
|
+
const markdown = isMarkdownResource(resource);
|
|
230
|
+
if (previewKind(type) || markdown) {
|
|
231
|
+
const preview = resourceButton("resourcePreview", resource.name, () => markdown
|
|
232
|
+
? app.openDocPreview(roomId, resource, preview)
|
|
233
|
+
: previewResource(card, roomId, id, resource, type, preview, app, status), app);
|
|
253
234
|
actions.append(preview);
|
|
254
235
|
// Media you sent yourself is shown inline; other people's media stays collapsed.
|
|
255
|
-
if (card.closest(".msg.own")) void previewResource(card, roomId, id, resource, type, preview, app, status);
|
|
236
|
+
if (!markdown && card.closest(".msg.own")) void previewResource(card, roomId, id, resource, type, preview, app, status);
|
|
256
237
|
}
|
|
257
238
|
} catch (error) { if (card.isConnected) setResourceError(card, app, error?.status === 404 ? "resourceDeleted" : "resourceFailed"); }
|
|
258
239
|
}
|
|
@@ -280,8 +261,7 @@ function resourceSplit(app, resource, download, item) {
|
|
|
280
261
|
toggle.setAttribute("data-i18n-aria-label", "resourceMoreActions");
|
|
281
262
|
toggle._i18nValues = { name: resource.name };
|
|
282
263
|
toggle.setAttribute("aria-label", app.t("resourceMoreActions", { name: resource.name }));
|
|
283
|
-
|
|
284
|
-
icon.setAttribute("aria-hidden", "true"); icon.setAttribute("viewBox", "0 0 24 24"); path.setAttribute("d", "M6 9l6 6 6-6"); icon.append(path); toggle.append(icon);
|
|
264
|
+
toggle.append(iconNode("chevron_down"));
|
|
285
265
|
menu.className = "resource-split-menu"; menu.hidden = true; menu.setAttribute("role", "menu"); menu.append(item);
|
|
286
266
|
group.append(download, toggle, menu);
|
|
287
267
|
function close(focusToggle = false) {
|
|
@@ -412,7 +392,7 @@ function previewKind(type) {
|
|
|
412
392
|
if (["video/mp4", "video/webm", "video/ogg"].includes(type)) return "video";
|
|
413
393
|
return "";
|
|
414
394
|
}
|
|
415
|
-
function formatBytes(value) {
|
|
395
|
+
export function formatBytes(value) {
|
|
416
396
|
const bytes = Math.max(0, Number(value) || 0);
|
|
417
397
|
if (bytes < 1024) return `${bytes} B`;
|
|
418
398
|
return bytes < 1048576 ? `${(bytes / 1024).toFixed(1)} KB` : `${(bytes / 1048576).toFixed(1)} MB`;
|
|
@@ -5,6 +5,7 @@ import { formatSystemMessage, setRoomPreview } from "./system-messages.js";
|
|
|
5
5
|
import { installEditor } from "./editor.js";
|
|
6
6
|
import { adminAgentBadge, isAdminAgent } from "./admin-badge.js";
|
|
7
7
|
import { initMessagePolling } from "./message-polling.js";
|
|
8
|
+
import { iconNode } from "./icons.js";
|
|
8
9
|
|
|
9
10
|
export function initMessages(app) {
|
|
10
11
|
const $ = app.$;
|
|
@@ -241,13 +242,7 @@ export function initMessages(app) {
|
|
|
241
242
|
copy.dataset.i18nAriaLabel = "copyMessage";
|
|
242
243
|
copy.dataset.i18nTitle = "copyMessage";
|
|
243
244
|
copy.title = app.t("copyMessage");
|
|
244
|
-
const icon =
|
|
245
|
-
icon.classList.add("message-copy-icon"); icon.setAttribute("viewBox", "0 0 24 24"); icon.setAttribute("aria-hidden", "true");
|
|
246
|
-
const back = document.createElementNS("http://www.w3.org/2000/svg", "rect");
|
|
247
|
-
back.setAttribute("x", "4"); back.setAttribute("y", "3"); back.setAttribute("width", "13"); back.setAttribute("height", "15"); back.setAttribute("rx", "2");
|
|
248
|
-
const front = document.createElementNS("http://www.w3.org/2000/svg", "rect");
|
|
249
|
-
front.setAttribute("x", "8"); front.setAttribute("y", "7"); front.setAttribute("width", "12"); front.setAttribute("height", "14"); front.setAttribute("rx", "2");
|
|
250
|
-
icon.append(back, front);
|
|
245
|
+
const icon = iconNode("copy", "message-copy-icon");
|
|
251
246
|
const feedback = document.createElement("span");
|
|
252
247
|
feedback.className = "message-copy-feedback"; feedback.dataset.flashOutput = ""; feedback.dataset.i18n = "copyMessage";
|
|
253
248
|
feedback.hidden = true; feedback.setAttribute("role", "status"); feedback.setAttribute("aria-live", "polite"); feedback.textContent = app.t("copyMessage");
|
|
@@ -260,7 +255,7 @@ export function initMessages(app) {
|
|
|
260
255
|
return row;
|
|
261
256
|
};
|
|
262
257
|
|
|
263
|
-
app.renderMessages = (live = false) => {
|
|
258
|
+
app.renderMessages = (live = false, tailLimit = 0) => {
|
|
264
259
|
const thread = $("#thread"), list = $("#msgList"), messages = app.state.room.messages;
|
|
265
260
|
// A palette jump renders a window around the target instead of the newest
|
|
266
261
|
// tail. While that window is up, live appends stay off screen so the target
|
|
@@ -286,7 +281,7 @@ export function initMessages(app) {
|
|
|
286
281
|
let startIndex = 0;
|
|
287
282
|
const lastId = [...list.querySelectorAll("[data-msg-id]")].at(-1)?.dataset.msgId;
|
|
288
283
|
if (lastId) for (let index = messages.length - 1; index >= 0; index--) if (messages[index].id === lastId) { startIndex = index + 1; break; }
|
|
289
|
-
const renderStart = focus ? Math.max(0, focus.index - 120) : startIndex;
|
|
284
|
+
const renderStart = focus ? Math.max(0, focus.index - 120) : Math.max(startIndex, tailLimit ? messages.length - tailLimit : 0);
|
|
290
285
|
const renderEnd = focus ? Math.min(messages.length, focus.index + 120) : messages.length;
|
|
291
286
|
for (let index = renderStart; index < renderEnd; index++) {
|
|
292
287
|
const message = messages[index];
|