@alexsun-top/opencode-chat-room 0.7.5 → 0.7.7
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 +27 -0
- package/README.md +5 -5
- package/README.zh-CN.md +5 -5
- package/cli.ts +20 -0
- package/dist/cli.js +753 -164
- package/package.json +2 -1
- package/plugin.ts +15 -3
- package/server/assets/base.css +0 -2
- package/server/assets/chat/doc-preview.js +122 -0
- package/server/assets/chat/editor.js +10 -7
- package/server/assets/chat/events.js +7 -1
- package/server/assets/chat/files.js +14 -6
- package/server/assets/chat/index.js +4 -0
- package/server/assets/chat/locales/de.js +21 -3
- package/server/assets/chat/locales/es.js +21 -3
- package/server/assets/chat/locales/fr.js +21 -3
- package/server/assets/chat/locales/it.js +21 -3
- package/server/assets/chat/locales/ja.js +21 -3
- package/server/assets/chat/locales/ko.js +21 -3
- package/server/assets/chat/markdown.js +39 -5
- package/server/assets/chat/messages.js +1 -0
- package/server/assets/chat/palette.js +18 -9
- package/server/assets/chat/questions.js +1 -0
- package/server/assets/chat/rooms.js +6 -1
- package/server/assets/chat/shortcuts.js +14 -3
- package/server/assets/chat/state.js +42 -6
- package/server/assets/chat/system-messages.js +9 -1
- package/server/assets/chat/task-form.js +197 -0
- package/server/assets/chat/task-row.js +169 -0
- package/server/assets/chat/tasks.js +494 -0
- package/server/assets/doc-preview.css +158 -0
- package/server/assets/edit-room.css +8 -0
- package/server/assets/responsive.css +26 -1
- package/server/assets/settings.css +9 -2
- package/server/assets/tasks.css +422 -0
- package/server/chat.html +129 -33
- package/server/member-routes.ts +3 -0
- package/server/sw.js +13 -2
- package/server/task-routes.ts +53 -0
- package/skills/chatroom/SKILL.md +3 -1
- package/src/README.md +3 -3
- package/src/agent/task-tool.ts +155 -0
- package/src/center/center-client.ts +44 -0
- package/src/rooms/tasks.ts +246 -0
- package/src/runtime/v2-plugin.ts +11 -2
- package/src/state/sqlite-state.ts +67 -0
- package/src/tui/app.mjs +21 -4
- 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 +293 -0
- package/src/tui/mentions.mjs +218 -0
- package/src/tui/message-app.mjs +178 -0
- package/src/tui/message-view.mjs +128 -0
- package/src/tui/palette-app.mjs +91 -8
- 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 +144 -94
- package/src/tui/ui-mentions.mjs +44 -0
- package/src/tui/ui-overlay-view.mjs +255 -0
- package/src/tui/ui-suggest-view.mjs +63 -0
- package/src/tui/ui-suggest.mjs +197 -0
- package/src/tui/ui-theme.mjs +2 -1
- package/src/tui/ui-view.mjs +4 -190
- package/src/tui/ui.mjs +111 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alexsun-top/opencode-chat-room",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.7",
|
|
4
4
|
"description": "A chat-room server, web client, terminal client, and OpenCode/Codex/dsh plugins.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -40,6 +40,7 @@
|
|
|
40
40
|
"server/join-requests.ts",
|
|
41
41
|
"server/room-join.ts",
|
|
42
42
|
"server/member-routes.ts",
|
|
43
|
+
"server/task-routes.ts",
|
|
43
44
|
"server/announcement-routes.ts",
|
|
44
45
|
"server/resource-routes.ts",
|
|
45
46
|
"server/admin-routes.ts",
|
package/plugin.ts
CHANGED
|
@@ -30,6 +30,7 @@ import { explicitlyAddresses } from "./src/center/mentions.ts";
|
|
|
30
30
|
import { createV2Setup, type V2Runtime } from "./src/runtime/v2-plugin.ts";
|
|
31
31
|
import { createV1Server } from "./src/runtime/v1-plugin.ts";
|
|
32
32
|
import { runAnnouncementTool } from "./src/agent/announcement-tool.ts";
|
|
33
|
+
import { runTaskTool } from "./src/agent/task-tool.ts";
|
|
33
34
|
import { uploadAgentResource } from "./src/rooms/resource-upload.ts";
|
|
34
35
|
import { readAgentResource, resourceReadFailure } from "./src/rooms/resource-read.ts";
|
|
35
36
|
import { adminTool, adminToolDescription, adminToolSchema } from "./src/agent/admin-client.ts";
|
|
@@ -247,7 +248,7 @@ export async function pollKnownSessions(
|
|
|
247
248
|
await flushReceiptCandidates({ destination: receiptDestination(""), receiverOwnerID: transport.receiverOwnerID }).catch(() => {});
|
|
248
249
|
}
|
|
249
250
|
|
|
250
|
-
const READ_ONLY_ACTIONS = new Set(["list", "members", "poll", "join_status", "announcement_list", "announcement_read"]);
|
|
251
|
+
const READ_ONLY_ACTIONS = new Set(["list", "members", "poll", "join_status", "announcement_list", "announcement_read", "task_list"]);
|
|
251
252
|
|
|
252
253
|
function actionableError(error: unknown): string {
|
|
253
254
|
const message = error instanceof Error ? error.message : String(error);
|
|
@@ -270,7 +271,7 @@ function actionableError(error: unknown): string {
|
|
|
270
271
|
}
|
|
271
272
|
|
|
272
273
|
export const roomArgs = z.object({
|
|
273
|
-
action: z.enum(["create", "join", "join_status", "leave", "list", "send", "poll", "recall", "members", "upload_resource", "read_resource", "delete_resource", "announcement_list", "announcement_read", "announcement_write", "announcement_delete", "reminder_list", "reminder_create", "reminder_update", "reminder_delete"]),
|
|
274
|
+
action: z.enum(["create", "join", "join_status", "leave", "list", "send", "poll", "recall", "members", "upload_resource", "read_resource", "delete_resource", "announcement_list", "announcement_read", "announcement_write", "announcement_delete", "reminder_list", "reminder_create", "reminder_update", "reminder_delete", "task_list", "task_create", "task_update", "task_delete"]),
|
|
274
275
|
name: z.string().max(64).optional().describe("For join: your own participant display name, NOT the room name (required). For create: the new room name."),
|
|
275
276
|
roomId: z.string().optional().describe("Room UUID, not the room name. Required for resource actions and every room-scoped action."),
|
|
276
277
|
messageId: z.string().optional().describe("For recall: the full message ID returned by send or poll; required for recall."),
|
|
@@ -280,6 +281,15 @@ export const roomArgs = z.object({
|
|
|
280
281
|
isQuestion: z.boolean().optional().describe("For send: mark the message as a question awaiting an answer."),
|
|
281
282
|
announcementName: z.string().optional().describe("Exact announcement name from announcement_list; distinct from participant or room name."),
|
|
282
283
|
content: z.string().optional().describe("Announcement content, at most 5000 Unicode characters; required for announcement_write."),
|
|
284
|
+
taskId: z.string().optional().describe("Task UUID from task_list; required for task_update and task_delete."),
|
|
285
|
+
title: z.string().optional().describe("Task title, 1 to 200 characters; required for task_create."),
|
|
286
|
+
description: z.string().optional().describe("Task description, at most 5000 characters."),
|
|
287
|
+
assignee: z.string().optional().describe("Participant display name responsible for the task; empty leaves it unassigned."),
|
|
288
|
+
status: z.enum(["todo", "doing", "done"]).optional().describe("Task status; the assignee may change only this field."),
|
|
289
|
+
dueDate: z.string().optional().describe("Task due date as YYYY-MM-DD; empty clears it."),
|
|
290
|
+
participants: z.array(z.string()).optional().describe("Task participants as room participant display names; empty clears them."),
|
|
291
|
+
conclusion: z.string().optional().describe("Task conclusion, at most 5000 characters; empty clears it."),
|
|
292
|
+
steps: z.array(z.union([z.string(), z.object({ text: z.string(), done: z.boolean().optional() })])).optional().describe("Task checklist, at most 30 steps; each is text of 1 to 300 characters or {text, done}; empty clears them."),
|
|
283
293
|
reminderId: z.string().optional().describe("Reminder UUID from reminder_list; required for reminder_update and reminder_delete."),
|
|
284
294
|
schedule: z.discriminatedUnion("type", [z.object({ type: z.literal("once"), at: z.string(), timezone: z.string().refine((value) => { try { new Intl.DateTimeFormat("en", { timeZone: value }); return true; } catch { return false; } }, "timezone must be an IANA timezone").optional() }), z.object({ type: z.literal("cron"), expression: z.string().regex(/^\S+\s+\S+\s+\S+\s+\S+\s+\S+$/), timezone: z.string().refine((value) => { try { new Intl.DateTimeFormat("en", { timeZone: value }); return true; } catch { return false; } }, "timezone must be an IANA timezone").optional() })]).optional(),
|
|
285
295
|
paused: z.boolean().optional(),
|
|
@@ -343,6 +353,8 @@ const roomExecute = async (
|
|
|
343
353
|
}
|
|
344
354
|
const announcementResult = await runAnnouncementTool(args, context.sessionID);
|
|
345
355
|
if (announcementResult !== undefined) return announcementResult;
|
|
356
|
+
const taskResult = await runTaskTool(args, context.sessionID);
|
|
357
|
+
if (taskResult !== undefined) return taskResult;
|
|
346
358
|
// ponytail: act as the identity this session registered with on join
|
|
347
359
|
let selfName = identity();
|
|
348
360
|
let joinPrevName: string | undefined;
|
|
@@ -525,7 +537,7 @@ const roomExecute = async (
|
|
|
525
537
|
}
|
|
526
538
|
};
|
|
527
539
|
const room = tool({
|
|
528
|
-
description: "Chat room operations: create, join, leave and list rooms; send, poll and recall messages; list members and
|
|
540
|
+
description: "Chat room operations: create, join, leave and list rooms; send, poll and recall messages; list members, announcements and tasks; create, update and delete room tasks; manage reminders. Sent and polled messages carry full message IDs; recall takes roomId plus messageId and withdraws the message for everyone (agents their own, room admins any). Reminder schedules use the server timezone unless an IANA timezone is provided; once schedules require an ISO datetime. Upload files and media; upload_resource returns a [[resource:UUID]] marker, and the attachment renders only when that exact marker is included in a send message. Resource actions need both roomId (the room UUID) and resourceId (the UUID in the marker); the marker alone does not identify the room. read_resource saves files to a private temporary path and leaves them there until removed or system cleanup. delete_resource removes an uploaded file; servers allow human room administrators any resource and agents only their own uploads. Room joinPolicy \"approval\" makes join a pending request: you are not a member while pending, never claim otherwise, and use join_status to check whether a human administrator approved it.",
|
|
529
541
|
args: roomArgs.shape,
|
|
530
542
|
execute: roomExecute,
|
|
531
543
|
});
|
package/server/assets/base.css
CHANGED
|
@@ -347,8 +347,6 @@
|
|
|
347
347
|
transition: background .12s, border-color .12s;
|
|
348
348
|
}
|
|
349
349
|
.room-row:hover { background: var(--surface-2); border-color: var(--line); }
|
|
350
|
-
.room-row.room-switch-enter { animation: room-switch-row .15s cubic-bezier(.1, .9, .2, 1); }
|
|
351
|
-
@keyframes room-switch-row { from { opacity: .55; transform: translateY(var(--room-switch-shift, 3px)); } }
|
|
352
350
|
.r-name { font-weight: 600; font-size: 14px; }
|
|
353
351
|
.r-meta { font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
|
|
354
352
|
.r-go {
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
// Markdown resources open in a reading pane on wide screens, or in a modal overlay
|
|
2
|
+
// when the window is too narrow or too short to give the chat a usable column.
|
|
3
|
+
import { formatBytes, renderMarkdown } from "./markdown.js";
|
|
4
|
+
|
|
5
|
+
const PANE_QUERY = "(min-width: 1100px) and (min-height: 560px)";
|
|
6
|
+
|
|
7
|
+
export function initDocPreview(app) {
|
|
8
|
+
const dialog = app.$("#docPreview");
|
|
9
|
+
if (!dialog) return;
|
|
10
|
+
const title = app.$("#docPreviewTitle"), size = app.$("#docPreviewSize");
|
|
11
|
+
const status = app.$("#docPreviewStatus"), body = app.$("#docPreviewBody");
|
|
12
|
+
const empty = app.$("#docPreviewEmpty"), download = app.$("#btnDocPreviewDownload");
|
|
13
|
+
const chatView = app.$("#chatView"), pane = matchMedia(PANE_QUERY);
|
|
14
|
+
let current = null, blob = null, token = 0, opener = null, pendingReopen = false, restoreOnClose = true;
|
|
15
|
+
|
|
16
|
+
const show = () => {
|
|
17
|
+
if (pane.matches) {
|
|
18
|
+
dialog.classList.add("is-pane");
|
|
19
|
+
chatView.classList.add("has-doc");
|
|
20
|
+
if (!dialog.open) dialog.show();
|
|
21
|
+
} else {
|
|
22
|
+
dialog.classList.remove("is-pane");
|
|
23
|
+
chatView.classList.remove("has-doc");
|
|
24
|
+
if (!dialog.open) dialog.showModal();
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
// Crossing the breakpoint keeps the document: the pane becomes an overlay, or back.
|
|
29
|
+
const syncMode = () => {
|
|
30
|
+
if (!dialog.open || pane.matches === dialog.classList.contains("is-pane")) return;
|
|
31
|
+
pendingReopen = true;
|
|
32
|
+
dialog.close();
|
|
33
|
+
show();
|
|
34
|
+
title.focus({ preventScroll: true });
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
const open = async (roomId, resource, source) => {
|
|
38
|
+
opener = source instanceof HTMLElement ? source : null;
|
|
39
|
+
restoreOnClose = true;
|
|
40
|
+
current = { roomId, resource };
|
|
41
|
+
const request = ++token;
|
|
42
|
+
blob = null;
|
|
43
|
+
title.textContent = resource.name;
|
|
44
|
+
size.textContent = formatBytes(resource.size);
|
|
45
|
+
status.textContent = app.t("resourceLoading");
|
|
46
|
+
body.textContent = "";
|
|
47
|
+
empty.hidden = true;
|
|
48
|
+
download.disabled = true;
|
|
49
|
+
if (app.preserveReadingLayout) await app.preserveReadingLayout(show);
|
|
50
|
+
else show();
|
|
51
|
+
if (request !== token) return;
|
|
52
|
+
title.focus({ preventScroll: true });
|
|
53
|
+
try {
|
|
54
|
+
const data = await app.apiBlob(`/rooms/${encodeURIComponent(roomId)}/resources/${encodeURIComponent(resource.id)}/content`);
|
|
55
|
+
if (request !== token) return;
|
|
56
|
+
const text = await data.text();
|
|
57
|
+
if (request !== token) return;
|
|
58
|
+
blob = data;
|
|
59
|
+
renderMarkdown(body, text, app);
|
|
60
|
+
empty.hidden = body.children.length > 0;
|
|
61
|
+
status.textContent = "";
|
|
62
|
+
download.disabled = false;
|
|
63
|
+
} catch {
|
|
64
|
+
if (request === token) status.textContent = app.t("docPreviewFailed");
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
const close = (restoreFocus = true) => {
|
|
69
|
+
restoreOnClose = restoreFocus;
|
|
70
|
+
if (!restoreFocus) opener = null;
|
|
71
|
+
// Remove the column class now; the queued close event must not leave Tasks
|
|
72
|
+
// hidden behind a column the task pane is about to take back.
|
|
73
|
+
chatView.classList.remove("has-doc");
|
|
74
|
+
if (dialog.open) dialog.close();
|
|
75
|
+
else restoreOnClose = true;
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
const downloadDocument = () => {
|
|
79
|
+
if (!blob || !current) return;
|
|
80
|
+
const url = URL.createObjectURL(blob), link = document.createElement("a");
|
|
81
|
+
link.href = url;
|
|
82
|
+
link.download = String(current.resource.name).replace(/[\\/\u0000-\u001f\u007f]/g, "_") || "download";
|
|
83
|
+
document.body.append(link); link.click(); link.remove();
|
|
84
|
+
setTimeout(() => URL.revokeObjectURL(url), 1000);
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
app.openDocPreview = (roomId, resource, source) => { void open(roomId, resource, source); };
|
|
88
|
+
app.closeDocPreview = () => close();
|
|
89
|
+
|
|
90
|
+
app.$("#btnCloseDocPreview")?.addEventListener("click", () => close());
|
|
91
|
+
download.addEventListener("click", downloadDocument);
|
|
92
|
+
dialog.addEventListener("click", (event) => {
|
|
93
|
+
if (event.target === dialog && !dialog.classList.contains("is-pane")) close();
|
|
94
|
+
});
|
|
95
|
+
dialog.addEventListener("cancel", (event) => { event.preventDefault(); close(); });
|
|
96
|
+
document.addEventListener("keydown", (event) => {
|
|
97
|
+
if (event.key !== "Escape" || !dialog.open || !dialog.classList.contains("is-pane")) return;
|
|
98
|
+
event.preventDefault();
|
|
99
|
+
close();
|
|
100
|
+
});
|
|
101
|
+
dialog.addEventListener("close", () => {
|
|
102
|
+
// A breakpoint switch closes and reopens the same dialog; its queued close event
|
|
103
|
+
// must not wipe the document that is already back on screen.
|
|
104
|
+
if (pendingReopen) { pendingReopen = false; restoreOnClose = true; return; }
|
|
105
|
+
const shouldRestore = restoreOnClose;
|
|
106
|
+
restoreOnClose = true;
|
|
107
|
+
token++;
|
|
108
|
+
current = null; blob = null;
|
|
109
|
+
chatView.classList.remove("has-doc");
|
|
110
|
+
dialog.classList.remove("is-pane");
|
|
111
|
+
title.textContent = ""; size.textContent = ""; status.textContent = "";
|
|
112
|
+
body.textContent = ""; empty.hidden = true; download.disabled = true;
|
|
113
|
+
const target = opener; opener = null;
|
|
114
|
+
if (!shouldRestore) return;
|
|
115
|
+
if (target?.isConnected && target.getClientRects().length) target.focus({ preventScroll: true });
|
|
116
|
+
else app.focusChatComposer?.({ force: true });
|
|
117
|
+
});
|
|
118
|
+
const onChange = () => syncMode();
|
|
119
|
+
if (pane.addEventListener) pane.addEventListener("change", onChange);
|
|
120
|
+
else pane.addListener(onChange);
|
|
121
|
+
document.addEventListener("chat-room-activated", () => close(false));
|
|
122
|
+
}
|
|
@@ -4,7 +4,10 @@ const trustedChipNames = new Map();
|
|
|
4
4
|
const autoSeparator = "\uE000\uE001";
|
|
5
5
|
function mentionName(node) {
|
|
6
6
|
const name = trustedChipNames.get(node.dataset?.chatChip);
|
|
7
|
-
return name !== undefined && node.dataset.mention === name
|
|
7
|
+
return name !== undefined && node.dataset.mention === name ? name : null;
|
|
8
|
+
}
|
|
9
|
+
function chipLabel(editor, name) {
|
|
10
|
+
return editor.mentionLabel ? editor.mentionLabel(name) : name;
|
|
8
11
|
}
|
|
9
12
|
|
|
10
13
|
export function editorText(editor, draft = false) {
|
|
@@ -53,7 +56,7 @@ export function setEditorText(editor, value, draft = false) {
|
|
|
53
56
|
if (draft && match[0] === autoSeparator) { editor.append(createAutoSeparator()); offset = pattern.lastIndex; continue; }
|
|
54
57
|
if (draft && match[0] === "\uE000\uE000") { appendText(editor, "\uE000"); offset = pattern.lastIndex; continue; }
|
|
55
58
|
if (draft && match[0].startsWith("\uE000")) { appendText(editor, match[0].slice(1)); offset = pattern.lastIndex; continue; }
|
|
56
|
-
editor.append(createMention(draft ? match[2] : match[1])); offset = pattern.lastIndex;
|
|
59
|
+
editor.append(createMention(editor, draft ? match[2] : match[1])); offset = pattern.lastIndex;
|
|
57
60
|
}
|
|
58
61
|
appendText(editor, String(value).slice(offset));
|
|
59
62
|
editor.dataset.empty = value ? "false" : "true";
|
|
@@ -194,9 +197,9 @@ export function replaceEditorRange(editor, start, end, value, parseMentions = tr
|
|
|
194
197
|
let html = "", cursor = 0, match;
|
|
195
198
|
while (token && (match = token.exec(content))) {
|
|
196
199
|
html += textHTML(content.slice(cursor, match.index));
|
|
197
|
-
const name = escapeHTML(match[1]);
|
|
200
|
+
const name = escapeHTML(match[1]), label = escapeHTML(chipLabel(editor, match[1]));
|
|
198
201
|
const chipID = createRandomId(); trustedChipNames.set(chipID, match[1]);
|
|
199
|
-
html += `<span class="editor-mention" data-mention="${name}" data-chat-chip="${chipID}" data-insert-marker="${marker}" contenteditable="false" role="img" aria-label="Mention ${
|
|
202
|
+
html += `<span class="editor-mention" data-mention="${name}" data-chat-chip="${chipID}" data-insert-marker="${marker}" contenteditable="false" role="img" aria-label="Mention ${label}">@${label}</span>`;
|
|
200
203
|
cursor = token.lastIndex;
|
|
201
204
|
}
|
|
202
205
|
html += textHTML(content.slice(cursor));
|
|
@@ -247,12 +250,12 @@ function knownMentions(editor, text) {
|
|
|
247
250
|
function escapeHTML(text) { return String(text).replace(/[&<>"']/g, (char) => ({ "&": "&", "<": "<", ">": ">", '"': """, "'": "'" })[char]); }
|
|
248
251
|
function textHTML(text) { return escapeHTML(text).replace(/\r\n|\r|\n/g, "<br>"); }
|
|
249
252
|
|
|
250
|
-
function createMention(name) {
|
|
251
|
-
const chip = document.createElement("span");
|
|
253
|
+
function createMention(editor, name) {
|
|
254
|
+
const chip = document.createElement("span"), label = chipLabel(editor, name);
|
|
252
255
|
chip.className = "editor-mention"; chip.dataset.mention = name;
|
|
253
256
|
chip.dataset.chatChip = createRandomId(); trustedChipNames.set(chip.dataset.chatChip, name);
|
|
254
257
|
chip.contentEditable = "false"; chip.setAttribute("role", "img");
|
|
255
|
-
chip.setAttribute("aria-label", `Mention ${
|
|
258
|
+
chip.setAttribute("aria-label", `Mention ${label}`); chip.textContent = `@${label}`;
|
|
256
259
|
return chip;
|
|
257
260
|
}
|
|
258
261
|
function createAutoSeparator() {
|
|
@@ -12,7 +12,13 @@ export function initEvents(app) {
|
|
|
12
12
|
if ($("#chatView").hidden || editor.contentEditable !== "true" || !editor.getClientRects().length) return false;
|
|
13
13
|
if (roomRail.classList.contains("drawer-open")) return false;
|
|
14
14
|
if (!force && (document.activeElement !== document.body || window.getSelection()?.toString())) return false;
|
|
15
|
+
const selection = window.getSelection();
|
|
16
|
+
const selectionInside = Boolean(selection?.anchorNode && editor.contains(selection.anchorNode));
|
|
15
17
|
editor.focus({ preventScroll: true });
|
|
18
|
+
// A closed modal can leave the DOM selection inside its removed input even
|
|
19
|
+
// after the composer looks focused. Re-seat the caret so the next keystroke
|
|
20
|
+
// lands in the editor instead of disappearing.
|
|
21
|
+
if (force && !selectionInside) editor.setCaret?.(editor.value.length);
|
|
16
22
|
return true;
|
|
17
23
|
};
|
|
18
24
|
app.focusComposer = () => {
|
|
@@ -377,7 +383,7 @@ export function initEvents(app) {
|
|
|
377
383
|
const fragment = copyRange.cloneContents();
|
|
378
384
|
const selectedChips = fragment.querySelectorAll(".mention-chip");
|
|
379
385
|
if (!selectedChips.length) return;
|
|
380
|
-
selectedChips.forEach((chip) => chip.replaceWith(document.createTextNode(`<at>@${chip.textContent?.slice(1) ?? ""}</at>`)));
|
|
386
|
+
selectedChips.forEach((chip) => chip.replaceWith(document.createTextNode(`<at>@${chip.dataset.mention ?? chip.textContent?.slice(1) ?? ""}</at>`)));
|
|
381
387
|
const text = fragment.textContent ?? "";
|
|
382
388
|
const html = `<div data-chatroom-mentions>${text.replace(/[&<>"]/g, (char) => ({ "&": "&", "<": "<", ">": ">", '"': """ })[char])}</div>`;
|
|
383
389
|
event.clipboardData?.setData("text/plain", text);
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import { LS } from "./state.js";
|
|
3
3
|
import { isRoomAdmin } from "./admin-badge.js";
|
|
4
4
|
import { icon } from "./icons.js";
|
|
5
|
+
import { isMarkdownResource } from "./markdown.js";
|
|
5
6
|
|
|
6
7
|
const PAGE_SIZE = 500;
|
|
7
8
|
const UNKNOWN_UPLOADER = "__unknown_uploader__";
|
|
@@ -178,10 +179,11 @@ export function initFiles(app) {
|
|
|
178
179
|
const actions = document.createElement("div");
|
|
179
180
|
actions.className = "file-actions";
|
|
180
181
|
const previewID = `file-preview-${resource.id}`;
|
|
181
|
-
if (mediaKind(resource.mimeType)) {
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
182
|
+
if (mediaKind(resource.mimeType) || isMarkdownResource(resource)) {
|
|
183
|
+
const inline = mediaKind(resource.mimeType);
|
|
184
|
+
actions.append(actionButton("preview", app.t("filesPreviewLabel", { name: resource.name }), ICONS.preview, inline
|
|
185
|
+
? { "aria-expanded": "false", "aria-controls": previewID }
|
|
186
|
+
: {}));
|
|
185
187
|
}
|
|
186
188
|
actions.append(actionButton("download", app.t("filesDownloadLabel", { name: resource.name }), ICONS.download));
|
|
187
189
|
if (canDelete(resource)) actions.append(actionButton("delete", app.t("filesDeleteLabel", { name: resource.name }), ICONS.trash));
|
|
@@ -338,7 +340,8 @@ export function initFiles(app) {
|
|
|
338
340
|
hideError();
|
|
339
341
|
const target = opener;
|
|
340
342
|
opener = null;
|
|
341
|
-
|
|
343
|
+
// A document preview opens right after the file list closes; keep focus there.
|
|
344
|
+
if (target?.isConnected && !document.querySelector("dialog[open]")) target.focus({ preventScroll: true });
|
|
342
345
|
});
|
|
343
346
|
list.addEventListener("click", (event) => {
|
|
344
347
|
const button = event.target.closest?.("[data-file-action]");
|
|
@@ -347,7 +350,12 @@ export function initFiles(app) {
|
|
|
347
350
|
const resource = items.find((item) => item.id === row?.dataset.resourceId);
|
|
348
351
|
if (!resource) return;
|
|
349
352
|
const action = button.dataset.fileAction;
|
|
350
|
-
if (action === "preview"
|
|
353
|
+
if (action === "preview" && isMarkdownResource(resource)) {
|
|
354
|
+
// The document pane lives in the chat view; the modal file list would hide it.
|
|
355
|
+
close();
|
|
356
|
+
app.openDocPreview(resource.roomID, resource, null);
|
|
357
|
+
}
|
|
358
|
+
else if (action === "preview") void togglePreview(resource, row, button);
|
|
351
359
|
else if (action === "download") void download(resource);
|
|
352
360
|
else if (action === "delete") void removeResource(resource);
|
|
353
361
|
});
|
|
@@ -23,6 +23,8 @@ 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 { initTasks } from "./tasks.js";
|
|
27
|
+
import { initDocPreview } from "./doc-preview.js";
|
|
26
28
|
import { initViewport } from "./viewport.js";
|
|
27
29
|
import { initSettings } from "./settings.js";
|
|
28
30
|
|
|
@@ -52,3 +54,5 @@ initViewport();
|
|
|
52
54
|
initInstallPrompt(app);
|
|
53
55
|
initPalette(app);
|
|
54
56
|
initFiles(app);
|
|
57
|
+
initTasks(app);
|
|
58
|
+
initDocPreview(app);
|
|
@@ -43,7 +43,7 @@ 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
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",
|
|
48
48
|
announcementDelete: "Ankündigung löschen",
|
|
49
49
|
announcementNew: "Neue Ankündigung", announcementEmpty: "Noch keine Ankündigungen.", announcementLoading: "Ankündigungen werden geladen…",
|
|
@@ -84,7 +84,7 @@ export const de = {
|
|
|
84
84
|
shortcutsScroll: "Nachrichten beim Tippen scrollen", shortcutsJump: "Zum Anfang oder Ende der Unterhaltung springen", shortcutsMenus: "Menüs und Dialoge",
|
|
85
85
|
shortcutsClose: "Geöffnetes Menü, Panel oder Dialog schließen",
|
|
86
86
|
paletteTitle: "Suche und Befehle", paletteSearchLabel: "Nachrichten suchen",
|
|
87
|
-
palettePlaceholder: "Nachrichten suchen oder
|
|
87
|
+
palettePlaceholder: "Nachrichten suchen oder / für Befehle", paletteScopeRoom: "Dieser Raum", paletteScopeAll: "Alle Räume",
|
|
88
88
|
paletteScopeHint: "Tab wechselt zwischen diesem Raum und allen beigetretenen Räumen", paletteSearchMode: "Suche", paletteCommandMode: "Befehle",
|
|
89
89
|
paletteSearching: "Suche läuft…", paletteNoResults: "Keine Nachrichten gefunden.", paletteNoCommands: "Keine passenden Befehle.",
|
|
90
90
|
paletteResults: ({ count }) => `${count} Ergebnis${count === 1 ? "" : "se"}`, paletteCommandsHint: "Häufige Befehle",
|
|
@@ -94,10 +94,28 @@ export const de = {
|
|
|
94
94
|
filesUnknownUploader: "Unbekannter Absender", filesSummary: ({ count, size }) => `${count} Datei${count === 1 ? "" : "en"} · ${size}`,
|
|
95
95
|
filesLoading: "Dateien werden geladen…", filesLoadFailed: "Dateien konnten nicht geladen werden. Bitte erneut versuchen.", filesEmpty: "In diesem Raum gibt es noch keine Dateien.",
|
|
96
96
|
filesEmptyFiltered: "Keine Dateien von diesem Absender.", filesLoadMore: "Mehr laden",
|
|
97
|
-
filesHint: "Bilder, Audio und
|
|
97
|
+
filesHint: "Bilder, Audio, Video und Markdown lassen sich ansehen. Jede Datei lässt sich herunterladen.",
|
|
98
98
|
filesPreviewFailed: "Vorschau konnte nicht geladen werden.", filesDownloadFailed: "Diese Datei konnte nicht heruntergeladen werden.",
|
|
99
99
|
filesPreviewLabel: ({ name }) => `${name} ansehen`, filesDownloadLabel: ({ name }) => `${name} herunterladen`,
|
|
100
100
|
filesDeleteLabel: ({ name }) => `${name} löschen`, filesRefresh: "Dateien aktualisieren",
|
|
101
|
+
tasksTitle: "Aufgaben", tasksEyebrow: "Raumaufgaben", tasksRefresh: "Aufgaben aktualisieren", tasksMenuLabel: "Aufgabenaktionen",
|
|
102
|
+
tasksClearCompleted: "Erledigte Aufgaben löschen", tasksClearConfirm: ({ count }) => `${count} erledigte Aufgabe${count === 1 ? "" : "n"} löschen? Dies kann nicht rückgängig gemacht werden.`,
|
|
103
|
+
tasksClearFailed: "Erledigte Aufgaben konnten nicht gelöscht werden. Erneut versuchen.",
|
|
104
|
+
tasksLoading: "Aufgaben werden geladen…", tasksLoadFailed: "Aufgaben konnten nicht geladen werden. Erneut versuchen.", tasksEmpty: "Noch keine Aufgaben. Fügen Sie die erste hinzu.",
|
|
105
|
+
tasksEmptyFiltered: "Keine Aufgaben mit diesem Status.", tasksCreate: "Aufgabe hinzufügen", tasksTitleLabel: "Titel",
|
|
106
|
+
tasksTitlePlaceholder: "Was ist zu tun?", tasksDescriptionLabel: "Beschreibung", tasksDescriptionPlaceholder: "Details, Links oder Abnahmekriterien ergänzen",
|
|
107
|
+
tasksAssigneeLabel: "Zuständig", tasksUnassigned: "Nicht zugewiesen", tasksFilterLabel: "Anzeigen", tasksFilterAll: "Alle Status",
|
|
108
|
+
tasksDueDateLabel: "Fälligkeitsdatum", tasksDueOn: ({ date }) => `Fällig ${date}`, tasksOverdue: "Überfällig",
|
|
109
|
+
tasksParticipantsLabel: "Teilnehmende", tasksParticipantsMeta: ({ names }) => `Teilnehmende: ${names}`,
|
|
110
|
+
tasksConclusionLabel: "Ergebnis", tasksConclusionPlaceholder: "Wie ist es ausgegangen?",
|
|
111
|
+
tasksStepsLabel: "Schritte", tasksAddStep: "Schritt hinzufügen", tasksRemoveStep: "Schritt entfernen", tasksStepPlaceholder: "Schritt beschreiben",
|
|
112
|
+
tasksStepDoneLabel: "Schritt erledigt", tasksStepsHint: "Bis zu 30 Schritte. Erledigte Schritte abhaken.",
|
|
113
|
+
tasksStepsProgress: ({ done, total }) => `${done} von ${total} Schritten erledigt`,
|
|
114
|
+
tasksStatusTodo: "Offen", tasksStatusDoing: "In Arbeit", tasksStatusDone: "Erledigt",
|
|
115
|
+
tasksSummary: ({ count }) => `${count} Aufgabe${count === 1 ? "" : "n"}`, tasksCreator: ({ name }) => `Erstellt von ${name}`, tasksUpdated: ({ time }) => `Aktualisiert ${time}`,
|
|
116
|
+
tasksEditLabel: ({ title }) => `${title} bearbeiten`, tasksDeleteLabel: ({ title }) => `${title} löschen`, tasksStatusFor: ({ title }) => `Status für ${title}`,
|
|
117
|
+
tasksInvalid: "Geben Sie einen Titel mit 1–200 Zeichen ein.", tasksCreateFailed: "Aufgabe konnte nicht hinzugefügt werden. Erneut versuchen.", tasksUpdateFailed: "Aufgabe konnte nicht aktualisiert werden. Erneut versuchen.",
|
|
118
|
+
tasksDeleteFailed: "Aufgabe konnte nicht gelöscht werden. Erneut versuchen.", tasksDeleteConfirm: ({ title }) => `„${title}“ löschen? Dies kann nicht rückgängig gemacht werden.`,
|
|
101
119
|
earlierMessages: "Frühere Nachrichten ausgelassen", messagesBetweenOmitted: "Nachrichten zwischen diesem Lesepunkt und den neuesten werden ausgelassen.", you: "Sie", saved: "Gespeichert",
|
|
102
120
|
savedMemory: "Nur für diesen Tab gespeichert", copyFailed: ({ id }) => `Kopieren fehlgeschlagen. Manuell kopieren: ${id}`,
|
|
103
121
|
copyMessage: "Kopieren", copiedMessage: "Kopiert", copyMessageFailed: "Kopieren fehlgeschlagen. Wählen Sie die Nachricht aus und kopieren Sie sie manuell.", wrapCode: "Code umbrechen",
|
|
@@ -43,7 +43,7 @@ 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
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",
|
|
48
48
|
announcementDelete: "Eliminar anuncio",
|
|
49
49
|
announcementNew: "Nuevo anuncio", announcementEmpty: "Aún no hay anuncios.", announcementLoading: "Cargando anuncios…",
|
|
@@ -84,7 +84,7 @@ export const es = {
|
|
|
84
84
|
shortcutsScroll: "Desplazar los mensajes mientras escribes", shortcutsJump: "Ir al principio o al final de la conversación", shortcutsMenus: "Menús y diálogos",
|
|
85
85
|
shortcutsClose: "Cerrar el menú, panel o diálogo abierto",
|
|
86
86
|
paletteTitle: "Búsqueda y comandos", paletteSearchLabel: "Buscar mensajes",
|
|
87
|
-
palettePlaceholder: "Busca mensajes o escribe
|
|
87
|
+
palettePlaceholder: "Busca mensajes o escribe / para comandos", paletteScopeRoom: "Esta sala", paletteScopeAll: "Todas las salas",
|
|
88
88
|
paletteScopeHint: "Tab alterna entre esta sala y todas las salas unidas", paletteSearchMode: "Búsqueda", paletteCommandMode: "Comandos",
|
|
89
89
|
paletteSearching: "Buscando…", paletteNoResults: "No se encontraron mensajes.", paletteNoCommands: "No hay comandos coincidentes.",
|
|
90
90
|
paletteResults: ({ count }) => `${count} resultado${count === 1 ? "" : "s"}`, paletteCommandsHint: "Comandos habituales",
|
|
@@ -94,10 +94,28 @@ export const es = {
|
|
|
94
94
|
filesUnknownUploader: "Autor desconocido", filesSummary: ({ count, size }) => `${count} archivo${count === 1 ? "" : "s"} · ${size}`,
|
|
95
95
|
filesLoading: "Cargando archivos…", filesLoadFailed: "No se pudieron cargar los archivos. Inténtalo de nuevo.", filesEmpty: "Esta sala aún no tiene archivos.",
|
|
96
96
|
filesEmptyFiltered: "No hay archivos de este autor.", filesLoadMore: "Cargar más",
|
|
97
|
-
filesHint: "Puedes previsualizar imágenes, audio y
|
|
97
|
+
filesHint: "Puedes previsualizar imágenes, audio, vídeo y Markdown. Todos los archivos se pueden descargar.",
|
|
98
98
|
filesPreviewFailed: "No se pudo cargar la vista previa.", filesDownloadFailed: "No se pudo descargar este archivo.",
|
|
99
99
|
filesPreviewLabel: ({ name }) => `Vista previa de ${name}`, filesDownloadLabel: ({ name }) => `Descargar ${name}`,
|
|
100
100
|
filesDeleteLabel: ({ name }) => `Eliminar ${name}`, filesRefresh: "Actualizar archivos",
|
|
101
|
+
tasksTitle: "Tareas", tasksEyebrow: "Tareas de la sala", tasksRefresh: "Actualizar tareas", tasksMenuLabel: "Acciones de tareas",
|
|
102
|
+
tasksClearCompleted: "Borrar tareas completadas", tasksClearConfirm: ({ count }) => `¿Borrar ${count} tarea${count === 1 ? "" : "s"} completada${count === 1 ? "" : "s"}? No se puede deshacer.`,
|
|
103
|
+
tasksClearFailed: "No se pudieron borrar las tareas completadas. Inténtalo de nuevo.",
|
|
104
|
+
tasksLoading: "Cargando tareas…", tasksLoadFailed: "No se pudieron cargar las tareas. Inténtalo de nuevo.", tasksEmpty: "Aún no hay tareas. Añade la primera.",
|
|
105
|
+
tasksEmptyFiltered: "No hay tareas con este estado.", tasksCreate: "Añadir tarea", tasksTitleLabel: "Título",
|
|
106
|
+
tasksTitlePlaceholder: "¿Qué hay que hacer?", tasksDescriptionLabel: "Descripción", tasksDescriptionPlaceholder: "Añade detalles, enlaces o criterios",
|
|
107
|
+
tasksAssigneeLabel: "Responsable", tasksUnassigned: "Sin asignar", tasksFilterLabel: "Mostrar", tasksFilterAll: "Todos los estados",
|
|
108
|
+
tasksDueDateLabel: "Fecha límite", tasksDueOn: ({ date }) => `Vence ${date}`, tasksOverdue: "Vencida",
|
|
109
|
+
tasksParticipantsLabel: "Participantes", tasksParticipantsMeta: ({ names }) => `Participantes: ${names}`,
|
|
110
|
+
tasksConclusionLabel: "Conclusión", tasksConclusionPlaceholder: "¿Cuál fue el resultado?",
|
|
111
|
+
tasksStepsLabel: "Pasos", tasksAddStep: "Añadir paso", tasksRemoveStep: "Eliminar paso", tasksStepPlaceholder: "Describe un paso",
|
|
112
|
+
tasksStepDoneLabel: "Paso completado", tasksStepsHint: "Hasta 30 pasos. Marca los que estén completados.",
|
|
113
|
+
tasksStepsProgress: ({ done, total }) => `${done} de ${total} pasos completados`,
|
|
114
|
+
tasksStatusTodo: "Pendiente", tasksStatusDoing: "En curso", tasksStatusDone: "Hecha",
|
|
115
|
+
tasksSummary: ({ count }) => `${count} tarea${count === 1 ? "" : "s"}`, tasksCreator: ({ name }) => `Creada por ${name}`, tasksUpdated: ({ time }) => `Actualizada ${time}`,
|
|
116
|
+
tasksEditLabel: ({ title }) => `Editar ${title}`, tasksDeleteLabel: ({ title }) => `Eliminar ${title}`, tasksStatusFor: ({ title }) => `Estado de ${title}`,
|
|
117
|
+
tasksInvalid: "Introduce un título de 1 a 200 caracteres.", tasksCreateFailed: "No se pudo añadir la tarea. Inténtalo de nuevo.", tasksUpdateFailed: "No se pudo actualizar la tarea. Inténtalo de nuevo.",
|
|
118
|
+
tasksDeleteFailed: "No se pudo eliminar la tarea. Inténtalo de nuevo.", tasksDeleteConfirm: ({ title }) => `¿Eliminar «${title}»? No se puede deshacer.`,
|
|
101
119
|
earlierMessages: "Se han omitido mensajes anteriores", messagesBetweenOmitted: "Se han omitido los mensajes entre este punto de lectura y los más recientes.", you: "Tú", saved: "Guardado",
|
|
102
120
|
savedMemory: "Guardado solo para esta pestaña", copyFailed: ({ id }) => `No se pudo copiar. Copia manualmente: ${id}`,
|
|
103
121
|
copyMessage: "Copiar", copiedMessage: "Copiado", copyMessageFailed: "No se pudo copiar. Selecciona y copia el mensaje manualmente.", wrapCode: "Ajustar código",
|
|
@@ -43,7 +43,7 @@ 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
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",
|
|
48
48
|
announcementDelete: "Supprimer l’annonce",
|
|
49
49
|
announcementNew: "Nouvelle annonce", announcementEmpty: "Aucune annonce pour l’instant.", announcementLoading: "Chargement des annonces…",
|
|
@@ -84,7 +84,7 @@ export const fr = {
|
|
|
84
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",
|
|
85
85
|
shortcutsClose: "Fermer le menu, le panneau ou la boîte de dialogue ouverts",
|
|
86
86
|
paletteTitle: "Recherche et commandes", paletteSearchLabel: "Rechercher des messages",
|
|
87
|
-
palettePlaceholder: "Rechercher des messages, ou
|
|
87
|
+
palettePlaceholder: "Rechercher des messages, ou / pour les commandes", paletteScopeRoom: "Ce salon", paletteScopeAll: "Tous les salons",
|
|
88
88
|
paletteScopeHint: "Tab bascule entre ce salon et tous les salons rejoints", paletteSearchMode: "Recherche", paletteCommandMode: "Commandes",
|
|
89
89
|
paletteSearching: "Recherche…", paletteNoResults: "Aucun message trouvé.", paletteNoCommands: "Aucune commande correspondante.",
|
|
90
90
|
paletteResults: ({ count }) => `${count} résultat${count === 1 ? "" : "s"}`, paletteCommandsHint: "Commandes courantes",
|
|
@@ -94,10 +94,28 @@ export const fr = {
|
|
|
94
94
|
filesUnknownUploader: "Envoyeur inconnu", filesSummary: ({ count, size }) => `${count} fichier${count === 1 ? "" : "s"} · ${size}`,
|
|
95
95
|
filesLoading: "Chargement des fichiers…", filesLoadFailed: "Impossible de charger les fichiers. Réessayez.", filesEmpty: "Ce salon n’a pas encore de fichiers.",
|
|
96
96
|
filesEmptyFiltered: "Aucun fichier de cet envoyeur.", filesLoadMore: "Charger plus",
|
|
97
|
-
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.",
|
|
98
98
|
filesPreviewFailed: "Impossible de charger cet aperçu.", filesDownloadFailed: "Impossible de télécharger ce fichier.",
|
|
99
99
|
filesPreviewLabel: ({ name }) => `Aperçu de ${name}`, filesDownloadLabel: ({ name }) => `Télécharger ${name}`,
|
|
100
100
|
filesDeleteLabel: ({ name }) => `Supprimer ${name}`, filesRefresh: "Actualiser les fichiers",
|
|
101
|
+
tasksTitle: "Tâches", tasksEyebrow: "Tâches du salon", tasksRefresh: "Actualiser les tâches", tasksMenuLabel: "Actions des tâches",
|
|
102
|
+
tasksClearCompleted: "Effacer les tâches terminées", tasksClearConfirm: ({ count }) => `Effacer ${count} tâche${count === 1 ? "" : "s"} terminée${count === 1 ? "" : "s"} ? Cette action est irréversible.`,
|
|
103
|
+
tasksClearFailed: "Impossible d’effacer les tâches terminées. Réessayez.",
|
|
104
|
+
tasksLoading: "Chargement des tâches…", tasksLoadFailed: "Impossible de charger les tâches. Réessayez.", tasksEmpty: "Aucune tâche pour l’instant. Ajoutez la première.",
|
|
105
|
+
tasksEmptyFiltered: "Aucune tâche avec ce statut.", tasksCreate: "Ajouter une tâche", tasksTitleLabel: "Titre",
|
|
106
|
+
tasksTitlePlaceholder: "Que faut-il faire ?", tasksDescriptionLabel: "Description", tasksDescriptionPlaceholder: "Ajoutez des détails, des liens ou des critères",
|
|
107
|
+
tasksAssigneeLabel: "Responsable", tasksUnassigned: "Non attribuée", tasksFilterLabel: "Afficher", tasksFilterAll: "Tous les statuts",
|
|
108
|
+
tasksDueDateLabel: "Date limite", tasksDueOn: ({ date }) => `Échéance ${date}`, tasksOverdue: "En retard",
|
|
109
|
+
tasksParticipantsLabel: "Participants", tasksParticipantsMeta: ({ names }) => `Participants : ${names}`,
|
|
110
|
+
tasksConclusionLabel: "Conclusion", tasksConclusionPlaceholder: "Quel a été le résultat ?",
|
|
111
|
+
tasksStepsLabel: "Étapes", tasksAddStep: "Ajouter une étape", tasksRemoveStep: "Supprimer l’étape", tasksStepPlaceholder: "Décrivez une étape",
|
|
112
|
+
tasksStepDoneLabel: "Étape terminée", tasksStepsHint: "Jusqu’à 30 étapes. Cochez celles qui sont terminées.",
|
|
113
|
+
tasksStepsProgress: ({ done, total }) => `${done} étape${done === 1 ? "" : "s"} sur ${total} terminée${done === 1 ? "" : "s"}`,
|
|
114
|
+
tasksStatusTodo: "À faire", tasksStatusDoing: "En cours", tasksStatusDone: "Terminée",
|
|
115
|
+
tasksSummary: ({ count }) => `${count} tâche${count === 1 ? "" : "s"}`, tasksCreator: ({ name }) => `Créée par ${name}`, tasksUpdated: ({ time }) => `Mise à jour ${time}`,
|
|
116
|
+
tasksEditLabel: ({ title }) => `Modifier ${title}`, tasksDeleteLabel: ({ title }) => `Supprimer ${title}`, tasksStatusFor: ({ title }) => `Statut de ${title}`,
|
|
117
|
+
tasksInvalid: "Saisissez un titre de 1 à 200 caractères.", tasksCreateFailed: "Impossible d’ajouter la tâche. Réessayez.", tasksUpdateFailed: "Impossible de modifier la tâche. Réessayez.",
|
|
118
|
+
tasksDeleteFailed: "Impossible de supprimer la tâche. Réessayez.", tasksDeleteConfirm: ({ title }) => `Supprimer « ${title} » ? Cette action est irréversible.`,
|
|
101
119
|
earlierMessages: "Messages précédents omis", messagesBetweenOmitted: "Les messages entre ce point de lecture et les derniers sont omis.", you: "Vous", saved: "Enregistré",
|
|
102
120
|
savedMemory: "Enregistré pour cet onglet uniquement", copyFailed: ({ id }) => `Copie impossible. Copiez manuellement : ${id}`,
|
|
103
121
|
copyMessage: "Copier", copiedMessage: "Copié", copyMessageFailed: "Copie impossible. Sélectionnez et copiez le message manuellement.", wrapCode: "Retour à la ligne",
|
|
@@ -43,7 +43,7 @@ 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
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",
|
|
48
48
|
announcementDelete: "Elimina annuncio",
|
|
49
49
|
announcementNew: "Nuovo annuncio", announcementEmpty: "Nessun annuncio.", announcementLoading: "Caricamento degli annunci…",
|
|
@@ -84,7 +84,7 @@ export const it = {
|
|
|
84
84
|
shortcutsScroll: "Scorri i messaggi mentre scrivi", shortcutsJump: "Vai all’inizio o alla fine della conversazione", shortcutsMenus: "Menu e finestre di dialogo",
|
|
85
85
|
shortcutsClose: "Chiudi il menu, il pannello o la finestra di dialogo aperti",
|
|
86
86
|
paletteTitle: "Ricerca e comandi", paletteSearchLabel: "Cerca messaggi",
|
|
87
|
-
palettePlaceholder: "Cerca messaggi o digita
|
|
87
|
+
palettePlaceholder: "Cerca messaggi o digita / per i comandi", paletteScopeRoom: "Questa stanza", paletteScopeAll: "Tutte le stanze",
|
|
88
88
|
paletteScopeHint: "Tab alterna tra questa stanza e tutte le stanze a cui hai aderito", paletteSearchMode: "Ricerca", paletteCommandMode: "Comandi",
|
|
89
89
|
paletteSearching: "Ricerca in corso…", paletteNoResults: "Nessun messaggio trovato.", paletteNoCommands: "Nessun comando corrispondente.",
|
|
90
90
|
paletteResults: ({ count }) => `${count} risultat${count === 1 ? "o" : "i"}`, paletteCommandsHint: "Comandi frequenti",
|
|
@@ -94,10 +94,28 @@ export const it = {
|
|
|
94
94
|
filesUnknownUploader: "Autore sconosciuto", filesSummary: ({ count, size }) => `${count} file · ${size}`,
|
|
95
95
|
filesLoading: "Caricamento dei file…", filesLoadFailed: "Impossibile caricare i file. Riprova.", filesEmpty: "Questa stanza non ha ancora file.",
|
|
96
96
|
filesEmptyFiltered: "Nessun file di questo autore.", filesLoadMore: "Carica altri",
|
|
97
|
-
filesHint: "Puoi visualizzare immagini, audio e
|
|
97
|
+
filesHint: "Puoi visualizzare immagini, audio, video e Markdown. Tutti i file si possono scaricare.",
|
|
98
98
|
filesPreviewFailed: "Impossibile caricare l’anteprima.", filesDownloadFailed: "Impossibile scaricare questo file.",
|
|
99
99
|
filesPreviewLabel: ({ name }) => `Anteprima di ${name}`, filesDownloadLabel: ({ name }) => `Scarica ${name}`,
|
|
100
100
|
filesDeleteLabel: ({ name }) => `Elimina ${name}`, filesRefresh: "Aggiorna i file",
|
|
101
|
+
tasksTitle: "Attività", tasksEyebrow: "Attività della stanza", tasksRefresh: "Aggiorna attività", tasksMenuLabel: "Azioni attività",
|
|
102
|
+
tasksClearCompleted: "Elimina attività completate", tasksClearConfirm: ({ count }) => `Eliminare ${count} attività completate? L’operazione non è reversibile.`,
|
|
103
|
+
tasksClearFailed: "Impossibile eliminare le attività completate. Riprova.",
|
|
104
|
+
tasksLoading: "Caricamento attività…", tasksLoadFailed: "Impossibile caricare le attività. Riprova.", tasksEmpty: "Nessuna attività. Aggiungi la prima.",
|
|
105
|
+
tasksEmptyFiltered: "Nessuna attività con questo stato.", tasksCreate: "Aggiungi attività", tasksTitleLabel: "Titolo",
|
|
106
|
+
tasksTitlePlaceholder: "Cosa c’è da fare?", tasksDescriptionLabel: "Descrizione", tasksDescriptionPlaceholder: "Aggiungi dettagli, link o criteri di completamento",
|
|
107
|
+
tasksAssigneeLabel: "Assegnatario", tasksUnassigned: "Non assegnata", tasksFilterLabel: "Mostra", tasksFilterAll: "Tutti gli stati",
|
|
108
|
+
tasksDueDateLabel: "Scadenza", tasksDueOn: ({ date }) => `Scade ${date}`, tasksOverdue: "In ritardo",
|
|
109
|
+
tasksParticipantsLabel: "Partecipanti", tasksParticipantsMeta: ({ names }) => `Partecipanti: ${names}`,
|
|
110
|
+
tasksConclusionLabel: "Conclusione", tasksConclusionPlaceholder: "Qual è stato il risultato?",
|
|
111
|
+
tasksStepsLabel: "Passaggi", tasksAddStep: "Aggiungi passaggio", tasksRemoveStep: "Rimuovi passaggio", tasksStepPlaceholder: "Descrivi un passaggio",
|
|
112
|
+
tasksStepDoneLabel: "Passaggio completato", tasksStepsHint: "Fino a 30 passaggi. Spunta quelli completati.",
|
|
113
|
+
tasksStepsProgress: ({ done, total }) => `${done} di ${total} passaggi completati`,
|
|
114
|
+
tasksStatusTodo: "Da fare", tasksStatusDoing: "In corso", tasksStatusDone: "Completata",
|
|
115
|
+
tasksSummary: ({ count }) => `${count} attività`, tasksCreator: ({ name }) => `Creata da ${name}`, tasksUpdated: ({ time }) => `Aggiornata ${time}`,
|
|
116
|
+
tasksEditLabel: ({ title }) => `Modifica ${title}`, tasksDeleteLabel: ({ title }) => `Elimina ${title}`, tasksStatusFor: ({ title }) => `Stato di ${title}`,
|
|
117
|
+
tasksInvalid: "Inserisci un titolo da 1 a 200 caratteri.", tasksCreateFailed: "Impossibile aggiungere l’attività. Riprova.", tasksUpdateFailed: "Impossibile aggiornare l’attività. Riprova.",
|
|
118
|
+
tasksDeleteFailed: "Impossibile eliminare l’attività. Riprova.", tasksDeleteConfirm: ({ title }) => `Eliminare «${title}»? L’operazione non può essere annullata.`,
|
|
101
119
|
earlierMessages: "Messaggi precedenti omessi", messagesBetweenOmitted: "I messaggi tra questo punto di lettura e i più recenti sono omessi.", you: "Tu", saved: "Salvato",
|
|
102
120
|
savedMemory: "Salvato solo per questa scheda", copyFailed: ({ id }) => `Copia non riuscita. Copia manualmente: ${id}`,
|
|
103
121
|
copyMessage: "Copia", copiedMessage: "Copiato", copyMessageFailed: "Impossibile copiare. Seleziona e copia il messaggio manualmente.", wrapCode: "Adatta il codice",
|