@alexsun-top/opencode-chat-room 0.7.1 → 0.7.3

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.
Files changed (36) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/README.md +4 -4
  3. package/README.zh-CN.md +4 -4
  4. package/package.json +1 -1
  5. package/server/assets/base.css +2 -0
  6. package/server/assets/chat/create-room-dialog.js +49 -0
  7. package/server/assets/chat/editor.js +28 -9
  8. package/server/assets/chat/events.js +31 -21
  9. package/server/assets/chat/image-zoom.js +49 -16
  10. package/server/assets/chat/index.js +2 -0
  11. package/server/assets/chat/locales/de.js +5 -1
  12. package/server/assets/chat/locales/es.js +5 -1
  13. package/server/assets/chat/locales/fr.js +5 -1
  14. package/server/assets/chat/locales/it.js +5 -1
  15. package/server/assets/chat/locales/ja.js +5 -1
  16. package/server/assets/chat/locales/ko.js +5 -1
  17. package/server/assets/chat/markdown.js +14 -1
  18. package/server/assets/chat/members.js +2 -0
  19. package/server/assets/chat/messages.js +1 -0
  20. package/server/assets/chat/questions.js +1 -0
  21. package/server/assets/chat/rooms.js +19 -12
  22. package/server/assets/chat/settings.js +40 -1
  23. package/server/assets/chat/shortcuts.js +113 -23
  24. package/server/assets/chat/state.js +12 -4
  25. package/server/assets/code-highlight.css +2 -5
  26. package/server/assets/conversation.css +22 -14
  27. package/server/assets/responsive.css +48 -4
  28. package/server/assets/room-create.css +85 -0
  29. package/server/assets/settings.css +93 -35
  30. package/server/chat-server.ts +3 -3
  31. package/server/chat.html +138 -72
  32. package/server/join-requests.ts +1 -0
  33. package/server/room-join.ts +7 -2
  34. package/server/sw.js +1 -0
  35. package/skills/chatroom/SKILL.md +1 -1
  36. package/src/runtime/v2-plugin.ts +2 -2
package/CHANGELOG.md CHANGED
@@ -1,5 +1,26 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.7.3 — 2026-11-21
4
+
5
+ - Deliver an approved join request to the original Agent session: the join event stays unread for the approved member, pending Codex joins start the delivery loop, and the OpenCode V2 schema exposes `join_status`. Ship Codex 0.1.3 with this fix.
6
+ - Align the create-room dialog with the other dialogs: 560px width, matching title, compact desktop buttons, and full-height touch targets on phones.
7
+ - Keep code-block tools out of the way on touch screens: they appear when the block is tapped and hide when tapping elsewhere.
8
+
9
+ ## 0.7.2 — 2026-11-20
10
+
11
+ - Keep the room rail inside short windows even while a join request is pending, by compacting the rail footer, header, and composer instead of letting content stretch the rail.
12
+ - Open room creation in a large modal with a backdrop instead of the small rail popover, with focus returning to the `+` button when closed.
13
+ - Copying or cutting a mention, including selecting only the mention itself, keeps it a mention when pasted back; plain `@name` text stays plain, and a member who left the room is not restored as a mention.
14
+ - Scan the inbox every 500ms instead of every 2s, so new messages reach waiting clients with much less delay.
15
+ - Move Alt+Arrow room-switch motion into the room list; the conversation content switches without a fading or sliding transition. Alt+1…9 switches to a joined room by its position in the rail.
16
+ - Add an opt-in room content transition in Settings, off by default, which slides the old content out and the new content in with Alt+Arrow.
17
+ - Redesign Settings into General, Appearance, and Connection categories, keeping language, theme cards, content transition, page step, and access token in focused sections; opening Settings for a missing token goes straight to Connection.
18
+ - Show large images fitted to the window and report zoom relative to the image's natural pixels; 100% means original pixels, reset returns to fit, and small images are never enlarged.
19
+ - Keep the shortcut entry visible and the placeholder centered in short windows, and stop newline-only drafts from stretching the rail footer.
20
+ - Keep PageUp/PageDown animated and configurable: Settings sets the distance as a percentage of the conversation height (default 90%), and held keys extend the same target so the speed stays steady.
21
+ - Let the code toolbar hide with the same 140ms fade after a pointer click on wrap or copy, instead of the clicked button keeping it open.
22
+ - Ship Codex and dsh 0.1.2: dsh identifies itself as an Agent on create and join, dsh poll requires a room, and an approved join checked with `join_status` starts Codex delivery.
23
+
3
24
  ## 0.7.1 — 2026-11-19
4
25
 
5
26
  - Replace the PageUp/PageDown and Alt+Home/End flash with smooth scrolling of the conversation itself; room switching keeps its separate transition.
package/README.md CHANGED
@@ -24,7 +24,7 @@ When upgrading an existing install, quit OpenCode first or use `opencode plugin
24
24
  On a machine reachable by the other devices, start the server. Replace `your-password` with a shared password:
25
25
 
26
26
  ```bash
27
- bunx @alexsun-top/opencode-chat-room@0.7.1 --host 0.0.0.0 --port 4399 --token 'your-password'
27
+ bunx @alexsun-top/opencode-chat-room@0.7.3 --host 0.0.0.0 --port 4399 --token 'your-password'
28
28
  ```
29
29
 
30
30
  On each machine running OpenCode, set the server address and the same password, then start OpenCode from that environment:
@@ -35,7 +35,7 @@ export CHAT_ROOM_SERVER_TOKEN="your-password"
35
35
  opencode
36
36
  ```
37
37
 
38
- Open `http://SERVER_IP:4399/chat` in a browser and enter the same password in Settings. The same dialog, available before joining and from the chat menu, also selects the language and theme. Create or join a room there, and ask each agent to join it too.
38
+ Open `http://SERVER_IP:4399/chat` in a browser and enter the same password in Settings. The same dialog, available before joining and from the chat menu, groups language, theme, scrolling, and the access token under General, Appearance, and Connection. Create or join a room there, and ask each agent to join it too.
39
39
 
40
40
  **Security:** Anyone with the shared password can access and manage rooms, including direct chats. Share it only with trusted people and protect network access to the server. Join approval controls the normal join flow; it is not per-user authentication, so it does not stop a password holder from misrepresenting itself.
41
41
 
@@ -49,7 +49,7 @@ docker run --rm -p 4399:4399 -v chat-room-data:/data \
49
49
  ghcr.io/agentsyaml/opencode-chat-room:latest
50
50
  ```
51
51
 
52
- Pin a release with `ghcr.io/agentsyaml/opencode-chat-room:v0.7.1`. Rooms, messages and receipts live in the `/data` volume; keep it mounted across upgrades. If you bind-mount a host directory instead of a named volume, make it writable by uid `10001`.
52
+ Pin a release with `ghcr.io/agentsyaml/opencode-chat-room:v0.7.3`. Rooms, messages and receipts live in the `/data` volume; keep it mounted across upgrades. If you bind-mount a host directory instead of a named volume, make it writable by uid `10001`.
53
53
 
54
54
  ## 3. Start chatting
55
55
 
@@ -58,7 +58,7 @@ Pin a release with `ghcr.io/agentsyaml/opencode-chat-room:v0.7.1`. Rooms, messag
58
58
  - Use Reply to respond to a message. Mark a message as a question when you need an answer.
59
59
  - Use the room's reminder button for one-time or recurring reminders. Times default to the server's time zone.
60
60
  - Reminder text supports `{{time}}`, `{{initiator}}`, and `{{room}}`.
61
- - A compact shortcut chip under the composer shows Alt+/ (Option+/ on Mac); click it or press the keys to open the sheet. Alt+Home/Alt+End smoothly scroll to the oldest/latest loaded message, and PageUp/PageDown scrolls the conversation while you type.
61
+ - A compact shortcut chip under the composer shows Alt+/ (Option+/ on Mac); click it or press the keys to open the sheet. Alt+1…9 switches to a joined room by its position in the rail, Alt+Home/Alt+End smoothly scroll to the oldest/latest loaded message, and PageUp/PageDown scrolls the conversation in one animated step while you type, and Settings sets that step as a percentage of the conversation height (default 90%).
62
62
  - Attach files, drag them in, or paste images. The default limit is 500 MiB per file.
63
63
  - Fenced code blocks are syntax-highlighted locally. Hover or focus a block for icon-only wrap and copy controls.
64
64
  - Agents can recall a message by ID; the original stays available to current members.
package/README.zh-CN.md CHANGED
@@ -24,7 +24,7 @@
24
24
  在一台可被其他设备访问的机器上启动服务器,把 `换成自己的密码` 换成共享密码:
25
25
 
26
26
  ```bash
27
- bunx @alexsun-top/opencode-chat-room@0.7.1 --host 0.0.0.0 --port 4399 --token '换成自己的密码'
27
+ bunx @alexsun-top/opencode-chat-room@0.7.3 --host 0.0.0.0 --port 4399 --token '换成自己的密码'
28
28
  ```
29
29
 
30
30
  在每台运行 OpenCode 的机器上设置服务器地址和相同密码,再从该环境启动 OpenCode:
@@ -35,7 +35,7 @@ export CHAT_ROOM_SERVER_TOKEN="换成自己的密码"
35
35
  opencode
36
36
  ```
37
37
 
38
- 在浏览器打开 `http://服务器IP:4399/chat`,在设置窗口中填入相同密码。同一个设置窗口在加入房间前和聊天菜单中都能打开,也可以选择语言和主题。然后创建或加入房间,每个 Agent 也需要加入同一个房间。
38
+ 在浏览器打开 `http://服务器IP:4399/chat`,在设置窗口中填入相同密码。同一个设置窗口在加入房间前和聊天菜单中都能打开,按通用、外观、连接三个类别组织语言、主题、滚动选项和访问令牌。然后创建或加入房间,每个 Agent 也需要加入同一个房间。
39
39
 
40
40
  **安全提示:**共享密码的持有人可以访问和管理房间,包括私聊;请只分享给可信任的人,并保护服务器网络访问。加入审核只约束正常加入流程,不是按用户认证,无法阻止密码持有人伪装身份。
41
41
 
@@ -49,7 +49,7 @@ docker run --rm -p 4399:4399 -v chat-room-data:/data \
49
49
  ghcr.io/agentsyaml/opencode-chat-room:latest
50
50
  ```
51
51
 
52
- 用 `ghcr.io/agentsyaml/opencode-chat-room:v0.7.1` 可以固定到具体版本。房间、消息和回执都保存在 `/data` 卷里,升级时保留该卷即可。如果改用宿主目录做挂载,需要让该目录对 uid `10001` 可写。
52
+ 用 `ghcr.io/agentsyaml/opencode-chat-room:v0.7.3` 可以固定到具体版本。房间、消息和回执都保存在 `/data` 卷里,升级时保留该卷即可。如果改用宿主目录做挂载,需要让该目录对 uid `10001` 可写。
53
53
 
54
54
  ## 3. 开始聊天
55
55
 
@@ -58,7 +58,7 @@ docker run --rm -p 4399:4399 -v chat-room-data:/data \
58
58
  - 回复消息时点击回复;需要对方回答的问题可标记为「问题」。
59
59
  - 点击房间里的提醒按钮,可创建一次性或周期提醒。默认使用服务器时区。
60
60
  - 提醒正文支持 `{{time}}`、`{{initiator}}`、`{{room}}` 模板变量。
61
- - 输入框下方保留唯一快捷键入口,以紧凑标签显示 Alt+/(Mac 为 Option+/);点击或按快捷键都能打开面板。Alt+Home/Alt+End 平滑滚动到最早/最新的已加载消息,输入时用 PageUp/PageDown 滚动会话。
61
+ - 输入框下方保留唯一快捷键入口,以紧凑标签显示 Alt+/(Mac 为 Option+/);点击或按快捷键都能打开面板。Alt+1…9 按房间在侧栏中的位置切换已加入房间,Alt+Home/Alt+End 平滑滚动到最早/最新的已加载消息,输入时用 PageUp/PageDown 按动画滚动一屏,步长可在设置中按会话高度百分比调整(默认 90%)。
62
62
  - 点击附件按钮、拖入文件或粘贴图片即可分享;默认单文件上限为 500 MiB。
63
63
  - 围栏代码块会在本地做语法高亮;鼠标悬停或键盘聚焦时显示纯图标的自动换行和复制按钮。
64
64
  - Agent 可按消息 ID 撤回;当前成员仍可查看原文。
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alexsun-top/opencode-chat-room",
3
- "version": "0.7.1",
3
+ "version": "0.7.3",
4
4
  "description": "A chat-room plugin and central server for OpenCode.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -326,6 +326,8 @@
326
326
  transition: background .12s, border-color .12s;
327
327
  }
328
328
  .room-row:hover { background: var(--surface-2); border-color: var(--line); }
329
+ .room-row.room-switch-enter { animation: room-switch-row .2s ease-out; }
330
+ @keyframes room-switch-row { from { transform: translateY(var(--room-switch-shift, 6px)); } }
329
331
  .r-name { font-weight: 600; font-size: 14px; }
330
332
  .r-meta { font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
331
333
  .r-go {
@@ -0,0 +1,49 @@
1
+ // The rail "+" opens a large modal instead of a small popover, so the create
2
+ // form has room for its name, join policy, and inline validation.
3
+ export function initCreateRoomDialog(app) {
4
+ const dialog = app.$("#createRoomDialog");
5
+ const input = app.$("#inRoomNameChat");
6
+ const error = app.$("#createRoomError");
7
+ const trigger = app.$("#btnNewRoom");
8
+ if (!dialog || !input || !error || !trigger) return;
9
+ let opener = null;
10
+ let restoreFocus = true;
11
+
12
+ const close = (restore = true) => {
13
+ if (!dialog.open) return;
14
+ restoreFocus = restore;
15
+ trigger.setAttribute("aria-expanded", "false");
16
+ dialog.close();
17
+ };
18
+
19
+ app.showCreateRoomError = (key, values = {}) => {
20
+ app.setText(error, key, values);
21
+ error.dataset.errorKey = key;
22
+ error.hidden = false;
23
+ };
24
+ app.hideCreateRoomError = () => { error.hidden = true; delete error.dataset.errorKey; };
25
+ app.openCreateRoomDialog = () => {
26
+ opener = document.activeElement instanceof HTMLElement && document.activeElement !== document.body
27
+ ? document.activeElement : trigger;
28
+ app.hideCreateRoomError();
29
+ if (!dialog.open) dialog.showModal();
30
+ trigger.setAttribute("aria-expanded", "true");
31
+ input.focus();
32
+ input.select();
33
+ };
34
+ app.closeCreateRoomDialog = (restore = true) => close(restore);
35
+
36
+ dialog.addEventListener("click", (event) => { if (event.target === dialog) close(); });
37
+ dialog.addEventListener("cancel", () => trigger.setAttribute("aria-expanded", "false"));
38
+ dialog.addEventListener("close", () => {
39
+ const target = opener;
40
+ opener = null;
41
+ trigger.setAttribute("aria-expanded", "false");
42
+ app.hideCreateRoomError();
43
+ if (restoreFocus && target?.isConnected) target.focus({ preventScroll: true });
44
+ restoreFocus = true;
45
+ });
46
+ app.$("#btnCloseCreateRoom")?.addEventListener("click", () => close());
47
+ app.$("#btnCancelCreateRoom")?.addEventListener("click", () => close());
48
+ input.addEventListener("input", app.hideCreateRoomError);
49
+ }
@@ -63,8 +63,8 @@ export function setEditorText(editor, value, draft = false) {
63
63
  export function editorSelectionOffsets(editor) {
64
64
  const selection = getSelection();
65
65
  if (!selection?.rangeCount || !editor.contains(selection.anchorNode)) return [editorText(editor).length, editorText(editor).length];
66
- const selected = selection.getRangeAt(0);
67
- const offset = (node, position) => {
66
+ const selected = selection.getRangeAt(0), collapsed = selected.collapsed;
67
+ const offset = (node, position, isStart) => {
68
68
  const element = node.nodeType === Node.ELEMENT_NODE ? node : node.parentElement;
69
69
  const chip = element?.closest(".editor-mention");
70
70
  const raw = lengthBefore(editor, node, position);
@@ -72,11 +72,13 @@ export function editorSelectionOffsets(editor) {
72
72
  const start = lengthBefore(editor, chip, 0), end = start + `<at>@${mentionName(chip)}</at>`.length;
73
73
  // A caret strictly inside a non-editable chip (e.g. left there by an
74
74
  // ESC-cancelled IME composition) is not a text position; snap to the end.
75
- if (raw > start && raw < end) return end;
75
+ // A selection edge inside a chip expands to the whole chip so copy and
76
+ // cut keep the mention token instead of falling back to plain text.
77
+ if (raw > start && raw < end) return collapsed || !isStart ? end : start;
76
78
  }
77
79
  return raw;
78
80
  };
79
- return [offset(selected.startContainer, selected.startOffset), offset(selected.endContainer, selected.endOffset)];
81
+ return [offset(selected.startContainer, selected.startOffset, true), offset(selected.endContainer, selected.endOffset, false)];
80
82
  }
81
83
 
82
84
  function lengthBefore(root, target, position) {
@@ -238,6 +240,10 @@ function sanitizeEditor(editor) {
238
240
  }
239
241
  }
240
242
 
243
+ function knownMentions(editor, text) {
244
+ // A copied mention only comes back if that name is still in the room.
245
+ return text.replace(/<at>@([^<]+)<\/at>/g, (token, name) => editor.isKnownMention && !editor.isKnownMention(name) ? `@${name}` : token);
246
+ }
241
247
  function escapeHTML(text) { return String(text).replace(/[&<>"']/g, (char) => ({ "&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;", "'": "&#39;" })[char]); }
242
248
  function textHTML(text) { return escapeHTML(text).replace(/\r\n|\r|\n/g, "<br>"); }
243
249
 
@@ -329,15 +335,25 @@ export function installEditor(editor) {
329
335
  // after it so a narrow or rounded chip cannot trap the caret before it.
330
336
  setCaret(editor, lengthBefore(editor, chip, 0) + `<at>@${mentionName(chip)}</at>`.length);
331
337
  });
332
- editor.addEventListener("copy", (event) => {
338
+ const copySelection = (event) => {
333
339
  const [start, end] = editorSelectionOffsets(editor);
334
- if (start === end) return;
340
+ if (start === end) return "";
335
341
  const text = editorText(editor).slice(start, end);
336
- if (!text) return;
342
+ if (!text) return "";
337
343
  // Copy mentions in their token form so a paste rebuilds the same chips.
338
344
  event.preventDefault();
339
345
  event.clipboardData?.setData("text/plain", text);
340
346
  if (/<at>@[^<]+<\/at>/.test(text)) event.clipboardData?.setData("text/html", `<div data-chatroom-mentions>${escapeHTML(text)}</div>`);
347
+ return text;
348
+ };
349
+ editor.addEventListener("copy", (event) => { copySelection(event); });
350
+ editor.addEventListener("cut", (event) => {
351
+ const [start, end] = editorSelectionOffsets(editor);
352
+ if (!copySelection(event)) return;
353
+ // The native cut would overwrite the token clipboard; delete the range here.
354
+ replaceEditorRange(editor, start, end, "", false);
355
+ sanitizeEditor(editor);
356
+ editor.dispatchEvent(new InputEvent("input", { bubbles: true, inputType: "deleteByCut" }));
341
357
  });
342
358
  editor.addEventListener("paste", (event) => {
343
359
  if (event.defaultPrevented || event.clipboardData?.files.length) return;
@@ -347,7 +363,8 @@ export function installEditor(editor) {
347
363
  // Rebuild chips only for copies this app marked; external text stays literal
348
364
  // and keeps the native insert path, which handles newlines correctly.
349
365
  const marked = (event.clipboardData?.getData("text/html") || "").includes("data-chatroom-mentions");
350
- replaceEditorRange(editor, start, end, text, marked && /<at>@[^<]+<\/at>/.test(text));
366
+ const value = marked ? knownMentions(editor, text) : text;
367
+ replaceEditorRange(editor, start, end, value, marked && /<at>@[^<]+<\/at>/.test(value));
351
368
  sanitizeEditor(editor);
352
369
  editor.dispatchEvent(new InputEvent("input", { bubbles: true, inputType: "insertFromPaste" }));
353
370
  });
@@ -360,7 +377,9 @@ export function installEditor(editor) {
360
377
  const range = document.caretRangeFromPoint?.(event.clientX, event.clientY), selection = getSelection();
361
378
  if (range && editor.contains(range.startContainer)) { selection.removeAllRanges(); selection.addRange(range); }
362
379
  const [start, end] = editorSelectionOffsets(editor);
363
- replaceEditorRange(editor, start, end, text, html.includes("data-chatroom-mentions") && /<at>@[^<]+<\/at>/.test(text));
380
+ const marked = html.includes("data-chatroom-mentions");
381
+ const value = marked ? knownMentions(editor, text) : text;
382
+ replaceEditorRange(editor, start, end, value, marked && /<at>@[^<]+<\/at>/.test(value));
364
383
  sanitizeEditor(editor);
365
384
  editor.dispatchEvent(new InputEvent("input", { bubbles: true, inputType: "insertFromDrop" }));
366
385
  });
@@ -27,7 +27,9 @@ export function initEvents(app) {
27
27
  if (composer) {
28
28
  const root = document.documentElement, editor = app.$("#msgInput");
29
29
  // A restored draft or staged files must not become the idle height people see on load.
30
- const idleComposer = () => !editor?.textContent?.trim()
30
+ // Newline-only drafts are real drafts too: `trim()` would hide them and let the
31
+ // footer stretch with the composer.
32
+ const idleComposer = () => editor?.dataset.empty === "true"
31
33
  && !["#joinNotice", "#sendError", "#replyPreview", "#mentionPicker", "#attachmentTray"].some((selector) => { const node = app.$(selector); return node && !node.hidden; })
32
34
  && !composer.querySelector(".failed-messages:not([hidden])");
33
35
  const syncComposerBlock = () => {
@@ -228,11 +230,7 @@ export function initEvents(app) {
228
230
  try { sessionStorage.setItem("chat.keyPromptDismissed", "1"); } catch { /* Storage may be blocked. */ }
229
231
  });
230
232
  $("#btnRefreshRooms").addEventListener("click", () => void app.refreshRoomList());
231
- $("#btnNewRoom").addEventListener("click", () => {
232
- const form = $("#railRoomForm");
233
- form.hidden = !form.hidden;
234
- if (!form.hidden) $("#inRoomNameChat").focus();
235
- });
233
+ $("#btnNewRoom").addEventListener("click", () => app.openCreateRoomDialog());
236
234
  $("#railRoomForm").addEventListener("submit", (event) => { event.preventDefault(); void app.createRoom(); });
237
235
  $("#inRoomNameChat").addEventListener("input", app.hideSendError);
238
236
 
@@ -277,7 +275,10 @@ export function initEvents(app) {
277
275
  && !event.ctrlKey && !event.metaKey && !event.shiftKey && !event.isComposing) {
278
276
  event.preventDefault();
279
277
  markScrollIntent();
280
- const delta = (event.key === "PageDown" ? 1 : -1) * Math.max(80, thread.clientHeight * 0.9);
278
+ const step = Number(app.LS.pageStep) || 90;
279
+ const delta = (event.key === "PageDown" ? 1 : -1) * Math.max(40, thread.clientHeight * step / 100);
280
+ // Repeated Page keys extend the same target, so holding them scrolls
281
+ // steadily instead of restarting the animation from zero each time.
281
282
  if (app.animateThreadScrollBy) app.animateThreadScrollBy(delta);
282
283
  else thread.scrollTop += delta;
283
284
  return;
@@ -347,17 +348,25 @@ export function initEvents(app) {
347
348
  const messageButton = event.target.closest("[data-copy-message]");
348
349
  if (messageButton) void copyTextToClipboard(messageButton._copyText, true).then((copied) => app.flash(messageButton, copied ? "copiedMessage" : "copyMessageFailed"));
349
350
  });
350
- $("#msgList").addEventListener("copy", (event) => {
351
- // A plain browser copy of rendered messages loses the mention tokens. Rebuild
352
- // them only for chips inside the copied range, so external @text stays literal.
353
- const selection = getSelection(), list = $("#msgList");
351
+ document.addEventListener("copy", (event) => {
352
+ // A plain browser copy of rendered mentions loses their tokens. Rebuild them
353
+ // for any mention chip in the selection, including a double-clicked chip.
354
+ if (event.defaultPrevented) return;
355
+ const selection = getSelection();
354
356
  if (!selection || selection.isCollapsed || !selection.rangeCount) return;
355
357
  const range = selection.getRangeAt(0);
356
- if (!list.contains(range.startContainer) || !list.contains(range.endContainer)) return;
357
- const fragment = range.cloneContents();
358
- const chips = fragment.querySelectorAll(".mention-chip");
358
+ const chips = [...document.querySelectorAll(".mention-chip")].filter((chip) => range.intersectsNode(chip));
359
359
  if (!chips.length) return;
360
- chips.forEach((chip) => chip.replaceWith(document.createTextNode(`<at>@${chip.textContent?.slice(1) ?? ""}</at>`)));
360
+ // Extend a partial chip selection to its whole chip so the token can be rebuilt.
361
+ const copyRange = range.cloneRange();
362
+ const startChip = chips.find((chip) => chip.contains(copyRange.startContainer));
363
+ const endChip = chips.find((chip) => chip.contains(copyRange.endContainer));
364
+ if (startChip) copyRange.setStartBefore(startChip);
365
+ if (endChip) copyRange.setEndAfter(endChip);
366
+ const fragment = copyRange.cloneContents();
367
+ const selectedChips = fragment.querySelectorAll(".mention-chip");
368
+ if (!selectedChips.length) return;
369
+ selectedChips.forEach((chip) => chip.replaceWith(document.createTextNode(`<at>@${chip.textContent?.slice(1) ?? ""}</at>`)));
361
370
  const text = fragment.textContent ?? "";
362
371
  const html = `<div data-chatroom-mentions>${text.replace(/[&<>"]/g, (char) => ({ "&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;" })[char])}</div>`;
363
372
  event.clipboardData?.setData("text/plain", text);
@@ -388,19 +397,17 @@ export function initEvents(app) {
388
397
  }
389
398
  if (app.mentionActive && !event.target.closest("#mentionPicker")) app.closeMention();
390
399
  if (!event.target.closest(".anchor, dialog")) app.closePanels();
391
- if (!event.target.closest("#railRoomForm, #btnNewRoom")) $("#railRoomForm").hidden = true;
392
400
  });
393
401
  document.addEventListener("keydown", (event) => {
394
- if (event.key === "Tab" && roomRail.classList.contains("drawer-open")) {
402
+ if (event.key === "Tab" && roomRail.classList.contains("drawer-open") && !document.querySelector("dialog[open]")) {
395
403
  const stops = [...roomRail.querySelectorAll("button:not(:disabled), input:not(:disabled)")].filter((node) => node.getClientRects().length);
396
404
  const first = stops[0], last = stops.at(-1);
397
405
  if (!roomRail.contains(document.activeElement)) { event.preventDefault(); first?.focus(); }
398
406
  else if (event.shiftKey && document.activeElement === first) { event.preventDefault(); last?.focus(); }
399
407
  else if (!event.shiftKey && document.activeElement === last) { event.preventDefault(); first?.focus(); }
400
408
  }
401
- if (event.key === "Escape" && roomRail.classList.contains("drawer-open")) { event.preventDefault(); closeRoomDrawer(); return; }
409
+ if (event.key === "Escape" && roomRail.classList.contains("drawer-open") && !document.querySelector("dialog[open]")) { event.preventDefault(); closeRoomDrawer(); return; }
402
410
  if (event.key === "Escape" && app.mentionActive) app.closeMention();
403
- if (event.key === "Escape" && !$("#railRoomForm").hidden) $("#railRoomForm").hidden = true;
404
411
  if (event.key === "Escape" && !$("#memberPanel").hidden) {
405
412
  app.closePanels();
406
413
  app.lastFocus?.focus();
@@ -412,8 +419,9 @@ export function initEvents(app) {
412
419
  if (event.defaultPrevented || joined.length < 2 || index < 0 || document.querySelector("dialog[open]")) return;
413
420
  event.preventDefault();
414
421
  const step = event.key === "ArrowDown" ? 1 : -1;
415
- app.activateRoom(joined[(index + step + joined.length) % joined.length].id);
416
- app.animateRoomSwitch?.(step);
422
+ const nextRoom = joined[(index + step + joined.length) % joined.length];
423
+ if (app.switchRoom) app.switchRoom(nextRoom.id, step);
424
+ else { app.activateRoom(nextRoom.id); app.animateRoomSwitch?.(step); }
417
425
  }
418
426
  });
419
427
 
@@ -435,6 +443,8 @@ function saveAccessToken(button, app) {
435
443
  if (LS.token) {
436
444
  app.hideJoinError();
437
445
  app.hideSendError();
446
+ const tokenHint = document.getElementById("tokenHint");
447
+ if (tokenHint) tokenHint.hidden = true;
438
448
  }
439
449
  // The key prompt is a one-time visit: a stored key gets out of the way again.
440
450
  if (LS.token) document.getElementById("tokenBox")?.close();
@@ -3,47 +3,72 @@
3
3
  export function initImageZoom(app) {
4
4
  const dialog = app.$("#imageDialog"), preview = app.$("#imageDialogImage");
5
5
  const zoomLevel = app.$("#zoomLevel"), zoomOut = app.$("#btnZoomOut"), zoomIn = app.$("#btnZoomIn"), zoomReset = app.$("#btnZoomReset");
6
- const MIN = 1, MAX = 4, STEP = 1.25;
7
- let trigger = null, scale = 1, panX = 0, panY = 0, drag = null;
6
+ const MAX = 4, STEP = 1.25;
7
+ let trigger = null, scale = 1, fitScale = 1, pendingFit = false, panX = 0, panY = 0, drag = null;
8
8
  const clamp = (value, min, max) => Math.min(max, Math.max(min, value));
9
9
  const imageOf = (node) => node?.closest?.("#msgList img, #attachmentList img");
10
- function limits() {
10
+ function fitLimit() {
11
11
  const style = getComputedStyle(dialog);
12
12
  const width = dialog.clientWidth - parseFloat(style.paddingLeft) - parseFloat(style.paddingRight);
13
13
  const height = dialog.clientHeight - parseFloat(style.paddingTop) - parseFloat(style.paddingBottom);
14
- return { x: Math.max(0, (preview.offsetWidth * scale - width) / 2), y: Math.max(0, (preview.offsetHeight * scale - height) / 2) };
14
+ if (!preview.naturalWidth || !preview.naturalHeight) return 1;
15
+ return Math.min(1, width / preview.naturalWidth, height / preview.naturalHeight);
16
+ }
17
+ function limits() {
18
+ const style = getComputedStyle(dialog);
19
+ const box = dialog.getBoundingClientRect();
20
+ const left = box.left + parseFloat(style.paddingLeft), right = box.right - parseFloat(style.paddingRight);
21
+ const top = box.top + parseFloat(style.paddingTop), bottom = box.bottom - parseFloat(style.paddingBottom);
22
+ // Flex centering keeps an oversized image centered, so its untransformed
23
+ // layout box may start outside the dialog; offsetLeft still gives that
24
+ // position, while the live rect reflects the current scale and pan.
25
+ const layoutLeft = box.left + parseFloat(style.borderLeftWidth) + preview.offsetLeft;
26
+ const layoutTop = box.top + parseFloat(style.borderTopWidth) + preview.offsetTop;
27
+ const scaledWidth = preview.offsetWidth * scale, scaledHeight = preview.offsetHeight * scale;
28
+ const baseLeft = layoutLeft + preview.offsetWidth / 2 - scaledWidth / 2;
29
+ const baseTop = layoutTop + preview.offsetHeight / 2 - scaledHeight / 2;
30
+ const fitsX = scaledWidth <= right - left, fitsY = scaledHeight <= bottom - top;
31
+ const minX = fitsX ? 0 : right - baseLeft - scaledWidth;
32
+ const maxX = fitsX ? 0 : left - baseLeft;
33
+ const minY = fitsY ? 0 : bottom - baseTop - scaledHeight;
34
+ const maxY = fitsY ? 0 : top - baseTop;
35
+ return { minX, maxX, minY, maxY, x: maxX - minX, y: maxY - minY };
15
36
  }
16
37
  function apply() {
17
38
  const limit = limits();
18
- panX = clamp(panX, -limit.x, limit.x); panY = clamp(panY, -limit.y, limit.y);
19
- preview.style.transform = scale > 1 ? `translate3d(${panX}px, ${panY}px, 0) scale(${scale})` : "";
20
- preview.classList.toggle("is-zoomed", scale > 1);
39
+ panX = clamp(panX, limit.minX, limit.maxX); panY = clamp(panY, limit.minY, limit.maxY);
40
+ preview.style.transform = `translate3d(${panX}px, ${panY}px, 0) scale(${scale})`;
41
+ preview.classList.toggle("is-zoomed", limit.x > 0 || limit.y > 0);
21
42
  if (zoomLevel) zoomLevel.textContent = `${Math.round(scale * 100)}%`;
22
- if (zoomOut) zoomOut.disabled = scale <= MIN + .001;
43
+ if (zoomOut) zoomOut.disabled = scale <= fitScale + .001;
23
44
  if (zoomIn) zoomIn.disabled = scale >= MAX - .001;
24
45
  }
25
46
  function zoomTo(next, x = innerWidth / 2, y = innerHeight / 2) {
26
- const target = clamp(next, MIN, MAX);
47
+ const target = clamp(next, fitScale, MAX);
27
48
  if (Math.abs(target - scale) < .001) return apply();
28
49
  // Keep the point under the pointer fixed while scaling.
29
50
  const dx = x - innerWidth / 2, dy = y - innerHeight / 2, ratio = target / scale;
30
51
  panX = dx - ratio * (dx - panX); panY = dy - ratio * (dy - panY);
31
52
  scale = target;
32
- if (scale <= 1) { scale = 1; panX = 0; panY = 0; }
53
+ if (scale <= fitScale + .001) { scale = fitScale; panX = 0; panY = 0; }
33
54
  preview.style.animation = "none";
34
55
  apply();
35
56
  }
36
57
  const zoomBy = (factor) => zoomTo(scale * factor);
37
- const resetZoom = () => { scale = 1; panX = 0; panY = 0; apply(); };
58
+ function resetZoom() {
59
+ fitScale = fitLimit(); scale = fitScale; pendingFit = false; panX = 0; panY = 0; apply();
60
+ }
38
61
  function open(image) {
39
62
  if (!image || !dialog) return;
40
63
  trigger = image;
64
+ dialog.showModal();
41
65
  // Reuse the URL the list already loaded, so the overlay costs no second download.
42
66
  preview.src = image.currentSrc || image.src;
43
67
  preview.alt = image.alt || "";
44
68
  preview.style.animation = "";
45
- resetZoom();
46
- dialog.showModal();
69
+ scale = 1; panX = 0; panY = 0; fitScale = fitLimit();
70
+ pendingFit = !(preview.complete && preview.naturalWidth);
71
+ if (pendingFit) apply(); else resetZoom();
47
72
  }
48
73
  const close = () => { if (dialog.open) dialog.close(); };
49
74
  // A click that focuses the image makes the browser scroll it into view; the
@@ -80,7 +105,7 @@ export function initImageZoom(app) {
80
105
  if (event.key === "+" || event.key === "=") { event.preventDefault(); zoomBy(STEP); }
81
106
  else if (event.key === "-" || event.key === "_") { event.preventDefault(); zoomBy(1 / STEP); }
82
107
  else if (event.key === "0") { event.preventDefault(); resetZoom(); }
83
- else if (scale > 1 && event.key.startsWith("Arrow")) {
108
+ else if ((limits().x > 0 || limits().y > 0) && event.key.startsWith("Arrow")) {
84
109
  event.preventDefault();
85
110
  const step = event.shiftKey ? 120 : 40;
86
111
  if (event.key === "ArrowLeft") panX += step;
@@ -93,12 +118,20 @@ export function initImageZoom(app) {
93
118
  zoomIn?.addEventListener("click", () => zoomBy(STEP));
94
119
  zoomOut?.addEventListener("click", () => zoomBy(1 / STEP));
95
120
  zoomReset?.addEventListener("click", resetZoom);
96
- window.addEventListener("resize", () => { if (dialog.open) apply(); });
121
+ window.addEventListener("resize", () => {
122
+ if (!dialog.open) return;
123
+ const wasFit = Math.abs(scale - fitScale) < .001;
124
+ fitScale = fitLimit();
125
+ if (wasFit) { scale = fitScale; panX = 0; panY = 0; }
126
+ else scale = Math.max(scale, fitScale);
127
+ apply();
128
+ });
129
+ preview.addEventListener("load", () => { if (dialog.open && pendingFit) resetZoom(); });
97
130
  // Pointer dragging pans the zoomed image; the tool buttons are the touch and
98
131
  // keyboard alternative for changing the scale, and arrow keys pan to the edges.
99
132
  preview.draggable = false;
100
133
  preview.addEventListener("pointerdown", (event) => {
101
- if (scale <= 1 || event.button !== 0) return;
134
+ if ((limits().x <= 0 && limits().y <= 0) || event.button !== 0) return;
102
135
  drag = { id: event.pointerId, x: event.clientX, y: event.clientY, panX, panY };
103
136
  preview.setPointerCapture(event.pointerId);
104
137
  preview.classList.add("is-dragging");
@@ -4,6 +4,7 @@ import { initMentions } from "./mentions.js";
4
4
  import { initMessages } from "./messages.js";
5
5
  import { initMembers } from "./members.js";
6
6
  import { initRooms } from "./rooms.js";
7
+ import { initCreateRoomDialog } from "./create-room-dialog.js";
7
8
  import { initJoinRequests } from "./join-requests.js";
8
9
  import { initEvents } from "./events.js";
9
10
  import { initQuestions } from "./questions.js";
@@ -30,6 +31,7 @@ initAttachments(app);
30
31
  initReceipts(app);
31
32
  initMembers(app);
32
33
  initRooms(app);
34
+ initCreateRoomDialog(app);
33
35
  initJoinRequests(app);
34
36
  initHistoryLoader(app);
35
37
  initQuestions(app);
@@ -57,6 +57,10 @@ export const de = {
57
57
  adminLoading: "Administration wird geladen…", refreshAdmin: "Aktualisieren", adminRoomBadge: "Admin", chooseAdminRoom: "Normalen Raum wählen", chooseTargetRoom: "Agentenraum wählen", chooseAgent: "Registrierten Agenten wählen", taskTargetRoom: "Zielraum", taskTargetAgent: "Zielagent", createAdminRoomFirst: "Erstellen Sie zuerst einen normalen Raum und wählen Sie ihn dann als Administrationsraum.", noAgents: "Keine registrierten Agenten", selectAdminAgent: "Wählen Sie einen Administrationsraum und einen registrierten Agenten.", adminDesignated: "Die Ernennung zum Administrator gilt sofort und bleibt bestehen, bis Sie sie widerrufen.", revokeConfirm: "Diese Ernennung zum Administrator widerrufen? Der normale Raum bleibt bestehen.", updateTask: "Aufgabe aktualisieren", task_pending: "Ausstehend", task_working: "In Arbeit", task_blocked: "Blockiert", task_completed: "Abgeschlossen", task_cancelled: "Abgebrochen", nextRun: ({ time, minutes }) => `Alle ${minutes} Min. · nächste Ausführung: ${time}`, paused: "Pausiert", pauseTimer: "Pausieren", resumeTimer: "Fortsetzen", deleteTimer: "Löschen", deleteTimerConfirm: ({ name }) => `Timer „${name}“ löschen?`,
58
58
  themeLabel: "Design", themeSystem: "System", themeLight: "Hell", themeDark: "Dunkel", themeForest: "Wald", themeSand: "Sand",
59
59
  settingsLocalHint: "Sprache und Design werden in diesem Browser gespeichert.",
60
+ settingsSections: "Einstellungsbereiche", settingsGeneral: "Allgemein", settingsAppearance: "Darstellung", settingsConnection: "Verbindung",
61
+ settingsLanguageHint: "Gilt sofort und wird in diesem Browser gespeichert.", settingsThemeHint: "Wird in diesem Browser gespeichert. System folgt Ihrem Gerät.", settingsTokenHint: "Nur in diesem Browser gespeichert. Nur nötig, wenn der Server danach fragt.",
62
+ contentTransition: "Inhaltsübergang", contentTransitionHint: "Blendet Nachrichten beim Raumwechsel mit Alt+Pfeiltasten richtungsabhängig ein. Standardmäßig aus.",
63
+ pageStep: "Blätterabstand", pageStepHint: "Wie weit PageUp und PageDown pro Tastendruck scrollen, als Prozent der Gesprächshöhe. Standard 90 %.",
60
64
  leave: "Verlassen", reconnecting: "Verbindung verloren. Neuer Versuch…", messageList: "Nachrichtenliste",
61
65
  noMessages: "Noch keine Nachrichten. Sagen Sie etwas.", latestMessages: "Zurück zu den neuesten Nachrichten",
62
66
  mentionMembers: "Mitglied zum Erwähnen wählen", messagePlaceholder: "Nachricht · Eingabetaste zum Senden",
@@ -75,7 +79,7 @@ export const de = {
75
79
  shortcutsOpen: "Alle Tastenkürzel",
76
80
  shortcutsWriting: "Schreiben", shortcutsSend: "Nachricht senden", shortcutsNewline: "Neue Zeile beginnen",
77
81
  shortcutsMention: "Mitglied zum Erwähnen wählen", shortcutsRooms: "Räume",
78
- shortcutsSwitchRoom: "Zum vorherigen oder nächsten Raum wechseln", shortcutsReading: "Lesen",
82
+ shortcutsSwitchRoom: "Zum vorherigen oder nächsten Raum wechseln", shortcutsNumberRoom: "Per Nummer zu einem beigetretenen Raum wechseln", shortcutsReading: "Lesen",
79
83
  shortcutsScroll: "Nachrichten beim Tippen scrollen", shortcutsJump: "Zum Anfang oder Ende der Unterhaltung springen", shortcutsMenus: "Menüs und Dialoge",
80
84
  shortcutsClose: "Geöffnetes Menü, Panel oder Dialog schließen",
81
85
  earlierMessages: "Frühere Nachrichten ausgelassen", messagesBetweenOmitted: "Nachrichten zwischen diesem Lesepunkt und den neuesten werden ausgelassen.", you: "Sie", saved: "Gespeichert",
@@ -56,6 +56,10 @@ export const es = {
56
56
  settings: "Ajustes", adminAccess: "Administración", adminToken: "Token de administración", openAdministration: "Abrir administración", administration: "Administración", designations: "Designaciones", adminRoom: "Sala de administración", targetRoom: "Sala de membresía del Agent", adminScopeNote: "Elige un Agent en la sala de administración. Los administradores pueden gestionar todas las salas.", targetAgent: "Agent registrado", designate: "Designar administrador", revokeDesignation: "Revocar designación", globalStatus: "Estado global", adminTasks: "Tareas", taskText: "Tarea", dispatchTask: "Enviar tarea", timers: "Temporizadores", planName: "Nombre del temporizador", createTimer: "Crear temporizador", tokenRequired: "El servidor requiere un token de acceso (401).",
57
57
  themeLabel: "Tema", themeSystem: "Sistema", themeLight: "Claro", themeDark: "Oscuro", themeForest: "Bosque", themeSand: "Arena",
58
58
  settingsLocalHint: "El idioma y el tema se guardan en este navegador.",
59
+ settingsSections: "Secciones de ajustes", settingsGeneral: "General", settingsAppearance: "Apariencia", settingsConnection: "Conexión",
60
+ settingsLanguageHint: "Se aplica al instante y se guarda en este navegador.", settingsThemeHint: "Se guarda en este navegador. Sistema sigue tu dispositivo.", settingsTokenHint: "Solo se guarda en este navegador. Solo se necesita cuando el servidor lo pide.",
61
+ contentTransition: "Transición del contenido", contentTransitionHint: "Desliza los mensajes según la dirección al cambiar de sala con Alt+flechas. Desactivado por defecto.",
62
+ pageStep: "Distancia de página", pageStepHint: "Cuánto avanzan PageUp y PageDown por pulsación, como porcentaje de la altura de la conversación. 90 % por defecto.",
59
63
  adminLoading: "Cargando administración…", refreshAdmin: "Actualizar", adminRoomBadge: "admin", chooseAdminRoom: "Elige una sala normal", chooseTargetRoom: "Elige una sala de Agent", chooseAgent: "Elige un Agent registrado", taskTargetRoom: "Sala de destino", taskTargetAgent: "Agent de destino", createAdminRoomFirst: "Crea primero una sala normal y luego selecciónala como sala de administración.", noAgents: "No hay Agent registrados", selectAdminAgent: "Elige una sala de administración y un Agent registrado.", adminDesignated: "La designación de administrador está activa de inmediato y se mantiene hasta que la revoques.", revokeConfirm: "¿Revocar esta designación de administrador? La sala normal se mantendrá.", updateTask: "Actualizar tarea", task_pending: "Pendiente", task_working: "En curso", task_blocked: "Bloqueada", task_completed: "Completada", task_cancelled: "Cancelada", nextRun: ({ time, minutes }) => `Cada ${minutes} min · próxima ${time}`, paused: "En pausa", pauseTimer: "Pausar", resumeTimer: "Reanudar", deleteTimer: "Eliminar", deleteTimerConfirm: ({ name }) => `¿Eliminar el temporizador «${name}»?`,
60
64
  leave: "Salir", reconnecting: "Conexión perdida. Reintentando…", messageList: "Lista de mensajes",
61
65
  noMessages: "Aún no hay mensajes. Di algo.", latestMessages: "Volver a los mensajes más recientes",
@@ -75,7 +79,7 @@ export const es = {
75
79
  shortcutsOpen: "Todos los atajos",
76
80
  shortcutsWriting: "Escritura", shortcutsSend: "Enviar el mensaje", shortcutsNewline: "Empezar una línea nueva",
77
81
  shortcutsMention: "Elegir un miembro para mencionar", shortcutsRooms: "Salas",
78
- shortcutsSwitchRoom: "Cambiar a la sala anterior o siguiente", shortcutsReading: "Lectura",
82
+ shortcutsSwitchRoom: "Cambiar a la sala anterior o siguiente", shortcutsNumberRoom: "Cambiar a una sala unida por número", shortcutsReading: "Lectura",
79
83
  shortcutsScroll: "Desplazar los mensajes mientras escribes", shortcutsJump: "Ir al principio o al final de la conversación", shortcutsMenus: "Menús y diálogos",
80
84
  shortcutsClose: "Cerrar el menú, panel o diálogo abierto",
81
85
  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",
@@ -57,6 +57,10 @@ export const fr = {
57
57
  adminLoading: "Chargement de l’administration…", refreshAdmin: "Actualiser", adminRoomBadge: "admin", chooseAdminRoom: "Choisir un salon normal", chooseTargetRoom: "Choisir un salon d’agent", chooseAgent: "Choisir un agent enregistré", taskTargetRoom: "Salon cible", taskTargetAgent: "Agent cible", createAdminRoomFirst: "Créez d’abord un salon normal, puis sélectionnez-le comme salon d’administration.", noAgents: "Aucun agent enregistré", selectAdminAgent: "Choisissez un salon d’administration et un agent enregistré.", adminDesignated: "La désignation d’administrateur prend effet immédiatement et reste active jusqu’à sa révocation.", revokeConfirm: "Révoquer cette désignation d’administrateur ? Le salon normal sera conservé.", updateTask: "Mettre à jour la tâche", task_pending: "En attente", task_working: "En cours", task_blocked: "Bloquée", task_completed: "Terminée", task_cancelled: "Annulée", nextRun: ({ time, minutes }) => `Toutes les ${minutes} min · prochain : ${time}`, paused: "En pause", pauseTimer: "Mettre en pause", resumeTimer: "Reprendre", deleteTimer: "Supprimer", deleteTimerConfirm: ({ name }) => `Supprimer le minuteur «\u00A0${name}\u00A0» ?`,
58
58
  themeLabel: "Thème", themeSystem: "Système", themeLight: "Clair", themeDark: "Sombre", themeForest: "Forêt", themeSand: "Sable",
59
59
  settingsLocalHint: "La langue et le thème sont enregistrés dans ce navigateur.",
60
+ settingsSections: "Sections des réglages", settingsGeneral: "Général", settingsAppearance: "Apparence", settingsConnection: "Connexion",
61
+ settingsLanguageHint: "S'applique immédiatement et est enregistré dans ce navigateur.", settingsThemeHint: "Enregistré dans ce navigateur. Système suit votre appareil.", settingsTokenHint: "Stocké uniquement dans ce navigateur. Nécessaire seulement si le serveur le demande.",
62
+ contentTransition: "Transition du contenu", contentTransitionHint: "Faites glisser les messages dans le sens du changement de salon avec Alt+flèches. Désactivé par défaut.",
63
+ pageStep: "Distance de défilement", pageStepHint: "Distance parcourue par PageUp et PageDown à chaque appui, en pourcentage de la hauteur de la conversation. 90 % par défaut.",
60
64
  leave: "Quitter", reconnecting: "Connexion perdue. Nouvelle tentative…", messageList: "Liste des messages",
61
65
  noMessages: "Aucun message pour l’instant. Dites quelque chose.", latestMessages: "Revenir aux derniers messages",
62
66
  mentionMembers: "Choisissez un membre à mentionner", messagePlaceholder: "Message · Entrée pour envoyer",
@@ -75,7 +79,7 @@ export const fr = {
75
79
  shortcutsOpen: "Tous les raccourcis",
76
80
  shortcutsWriting: "Rédaction", shortcutsSend: "Envoyer le message", shortcutsNewline: "Passer à la ligne",
77
81
  shortcutsMention: "Choisir un membre à mentionner", shortcutsRooms: "Salons",
78
- shortcutsSwitchRoom: "Passer au salon précédent ou suivant", shortcutsReading: "Lecture",
82
+ shortcutsSwitchRoom: "Passer au salon précédent ou suivant", shortcutsNumberRoom: "Passer à un salon rejoint par son numéro", shortcutsReading: "Lecture",
79
83
  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",
80
84
  shortcutsClose: "Fermer le menu, le panneau ou la boîte de dialogue ouverts",
81
85
  earlierMessages: "Messages précédents omis", messagesBetweenOmitted: "Les messages entre ce point de lecture et les derniers sont omis.", you: "Vous", saved: "Enregistré",
@@ -56,6 +56,10 @@ export const it = {
56
56
  settings: "Impostazioni", adminAccess: "Amministrazione", adminToken: "Token di amministrazione", openAdministration: "Apri amministrazione", administration: "Amministrazione", designations: "Designazioni", adminRoom: "Stanza di amministrazione", targetRoom: "Stanza di appartenenza dell’Agent", adminScopeNote: "Scegli un Agent nella stanza di amministrazione. Gli amministratori possono gestire tutte le stanze.", targetAgent: "Agent registrato", designate: "Designa amministratore", revokeDesignation: "Revoca designazione", globalStatus: "Stato globale", adminTasks: "Attività", taskText: "Attività", dispatchTask: "Invia attività", timers: "Timer", planName: "Nome del timer", createTimer: "Crea timer", tokenRequired: "Il server richiede un token di accesso (401).",
57
57
  themeLabel: "Tema", themeSystem: "Sistema", themeLight: "Chiaro", themeDark: "Scuro", themeForest: "Foresta", themeSand: "Sabbia",
58
58
  settingsLocalHint: "La lingua e il tema vengono salvati in questo browser.",
59
+ settingsSections: "Sezioni delle impostazioni", settingsGeneral: "Generali", settingsAppearance: "Aspetto", settingsConnection: "Connessione",
60
+ settingsLanguageHint: "Si applica subito e viene salvato in questo browser.", settingsThemeHint: "Salvato in questo browser. Sistema segue il dispositivo.", settingsTokenHint: "Salvato solo in questo browser. Serve solo quando il server lo richiede.",
61
+ contentTransition: "Transizione dei contenuti", contentTransitionHint: "Fai scorrere i messaggi nella direzione del cambio stanza con Alt+frecce. Disattivato per impostazione predefinita.",
62
+ pageStep: "Distanza di scorrimento", pageStepHint: "Quanto scorrono PageUp e PageDown a ogni pressione, in percentuale dell'altezza della conversazione. 90% per impostazione predefinita.",
59
63
  adminLoading: "Caricamento dell’amministrazione…", refreshAdmin: "Aggiorna", adminRoomBadge: "admin", chooseAdminRoom: "Scegli una stanza normale", chooseTargetRoom: "Scegli una stanza dell’Agent", chooseAgent: "Scegli un Agent registrato", taskTargetRoom: "Stanza di destinazione", taskTargetAgent: "Agent di destinazione", createAdminRoomFirst: "Crea prima una stanza normale, poi selezionala come stanza di amministrazione.", noAgents: "Nessun Agent registrato", selectAdminAgent: "Scegli una stanza di amministrazione e un Agent registrato.", adminDesignated: "La designazione di amministratore è attiva subito e resta finché non la revochi.", revokeConfirm: "Revocare questa designazione di amministratore? La stanza normale rimarrà.", updateTask: "Aggiorna attività", task_pending: "In sospeso", task_working: "In corso", task_blocked: "Bloccata", task_completed: "Completata", task_cancelled: "Annullata", nextRun: ({ time, minutes }) => `Ogni ${minutes} min · prossima ${time}`, paused: "In pausa", pauseTimer: "Sospendi", resumeTimer: "Riprendi", deleteTimer: "Elimina", deleteTimerConfirm: ({ name }) => `Eliminare il timer «${name}»?`,
60
64
  leave: "Esci", reconnecting: "Connessione persa. Nuovo tentativo…", messageList: "Elenco dei messaggi",
61
65
  noMessages: "Nessun messaggio. Scrivi qualcosa.", latestMessages: "Torna ai messaggi più recenti",
@@ -75,7 +79,7 @@ export const it = {
75
79
  shortcutsOpen: "Tutte le scorciatoie",
76
80
  shortcutsWriting: "Scrittura", shortcutsSend: "Invia il messaggio", shortcutsNewline: "Vai a capo",
77
81
  shortcutsMention: "Scegli un membro da menzionare", shortcutsRooms: "Stanze",
78
- shortcutsSwitchRoom: "Passa alla stanza precedente o successiva", shortcutsReading: "Lettura",
82
+ shortcutsSwitchRoom: "Passa alla stanza precedente o successiva", shortcutsNumberRoom: "Passa a una stanza partecipata per numero", shortcutsReading: "Lettura",
79
83
  shortcutsScroll: "Scorri i messaggi mentre scrivi", shortcutsJump: "Vai all’inizio o alla fine della conversazione", shortcutsMenus: "Menu e finestre di dialogo",
80
84
  shortcutsClose: "Chiudi il menu, il pannello o la finestra di dialogo aperti",
81
85
  earlierMessages: "Messaggi precedenti omessi", messagesBetweenOmitted: "I messaggi tra questo punto di lettura e i più recenti sono omessi.", you: "Tu", saved: "Salvato",