@alexsun-top/opencode-chat-room 0.6.0 → 0.6.2
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 +13 -0
- package/README.md +2 -0
- package/README.zh-CN.md +2 -0
- package/package.json +1 -1
- package/server/assets/chat/events.js +27 -78
- package/server/assets/chat/messages.js +16 -1
- package/server/assets/chat/questions.js +9 -1
- package/server/assets/chat/rooms.js +5 -6
- package/server/assets/responsive.css +4 -4
- package/server/chat.html +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.6.2 — 2026-11-15
|
|
4
|
+
|
|
5
|
+
- Opening a room always lands on the live bottom, including when the previous visit ended mid-history. The saved-position and first-unread landing are gone; they reopened rooms above messages the reader had already seen.
|
|
6
|
+
- Treat a thread within 80px of the bottom as the bottom when saving the position, following new messages, and restoring layout after an image expands, matching the read and jump-to-latest thresholds.
|
|
7
|
+
- On phones, put the room name and the action buttons on separate header rows so a long title is no longer squeezed to a few characters.
|
|
8
|
+
- Give the Reminders button its bell icon on phones instead of an empty circle, and open every header panel below the header with 12px side margins so no panel runs off screen.
|
|
9
|
+
|
|
10
|
+
## 0.6.1 — 2026-11-14
|
|
11
|
+
|
|
12
|
+
- Keep the thread pinned to the bottom when images finish loading after a room opens, without yanking a reader who scrolled up into history.
|
|
13
|
+
- Keep the caret in the composer after clicking Send, switching rooms, clicking a message, jumping to the latest, or answering the last question in the Questions panel.
|
|
14
|
+
- Close the Questions panel once its last open question is answered; opening it with nothing pending still shows the empty state.
|
|
15
|
+
|
|
3
16
|
## 0.6.0 — 2026-11-13
|
|
4
17
|
|
|
5
18
|
- Open rooms from a local IndexedDB snapshot first and merge the server delta afterwards, so revisiting a room renders instantly instead of re-downloading its history.
|
package/README.md
CHANGED
|
@@ -17,6 +17,8 @@ Install [Bun](https://bun.sh), then add the plugin to `~/.config/opencode/openco
|
|
|
17
17
|
|
|
18
18
|
Restart OpenCode. Ask an agent to create a room named `dev`, or enter `/room create dev`.
|
|
19
19
|
|
|
20
|
+
When upgrading an existing install, quit OpenCode first or use `opencode plugin add @alexsun-top/opencode-chat-room@<version>`. Editing the version in `opencode.json` while the host is running can leave an empty package directory under `~/.cache/opencode/npm/`, which makes the plugin fail to load. Delete that directory and run `opencode plugin add` again to recover.
|
|
21
|
+
|
|
20
22
|
## 2. Connect multiple devices
|
|
21
23
|
|
|
22
24
|
On a machine reachable by the other devices, start the server. Replace `your-password` with a shared password:
|
package/README.zh-CN.md
CHANGED
|
@@ -17,6 +17,8 @@
|
|
|
17
17
|
|
|
18
18
|
重启 OpenCode。现在你可以让 Agent「创建一个叫 dev 的聊天室」,或输入 `/room create dev`。
|
|
19
19
|
|
|
20
|
+
升级已有安装时,先退出 OpenCode,或使用 `opencode plugin add @alexsun-top/opencode-chat-room@<版本>`。在宿主运行中直接改 `opencode.json` 里的版本号,可能在 `~/.cache/opencode/npm/` 下留下空目录,导致插件加载失败。遇到时删掉该空目录,再执行一次 `opencode plugin add`。
|
|
21
|
+
|
|
20
22
|
## 2. 多台设备一起使用
|
|
21
23
|
|
|
22
24
|
在一台可被其他设备访问的机器上启动服务器,把 `换成自己的密码` 换成共享密码:
|
package/package.json
CHANGED
|
@@ -1,9 +1,24 @@
|
|
|
1
1
|
import { LS } from "./state.js";
|
|
2
2
|
import { copyTextToClipboard } from "./markdown.js";
|
|
3
|
-
import { isUnreadMessage } from "./messages.js";
|
|
4
3
|
|
|
5
4
|
export function initEvents(app) {
|
|
6
5
|
const $ = app.$;
|
|
6
|
+
// Thread clicks land on non-focusable nodes, so the browser drops focus to BODY
|
|
7
|
+
// and the next keystroke is lost. Returning it to the composer matches chat UX.
|
|
8
|
+
app.focusComposer = () => {
|
|
9
|
+
if (matchMedia("(max-width: 760px)").matches || document.querySelector("dialog[open]")) return;
|
|
10
|
+
if ($("#chatView").hidden || $("#msgInput").contentEditable !== "true") return;
|
|
11
|
+
if (document.activeElement !== document.body || window.getSelection()?.toString()) return;
|
|
12
|
+
$("#msgInput").focus({ preventScroll: true });
|
|
13
|
+
};
|
|
14
|
+
document.addEventListener("click", () => requestAnimationFrame(() => app.focusComposer?.()));
|
|
15
|
+
// Mobile panels sit below the header, whose height depends on the title and locale.
|
|
16
|
+
const chatHead = document.querySelector("#chatView > .chat-head");
|
|
17
|
+
if (chatHead) {
|
|
18
|
+
const syncHeadBottom = () => document.documentElement.style.setProperty("--chat-head-bottom", `${Math.round(chatHead.getBoundingClientRect().bottom + 8)}px`);
|
|
19
|
+
new ResizeObserver(syncHeadBottom).observe(chatHead);
|
|
20
|
+
syncHeadBottom();
|
|
21
|
+
}
|
|
7
22
|
app.showRestoreFailure = (message) => {
|
|
8
23
|
document.documentElement.classList.add("session-restore");
|
|
9
24
|
$("#joinView").hidden = $("#chatView").hidden = true;
|
|
@@ -19,7 +34,7 @@ export function initEvents(app) {
|
|
|
19
34
|
const thread = $("#thread"), edge = thread.getBoundingClientRect(), top = edge.top + thread.clientTop;
|
|
20
35
|
const anchor = [...$("#msgList").querySelectorAll("[data-msg-id]")].find((row) => row.getBoundingClientRect().bottom > top);
|
|
21
36
|
readingPosition = { roomId: app.state.room?.id, messageId: anchor?.dataset.msgId, offset: anchor ? anchor.getBoundingClientRect().top - top : 0,
|
|
22
|
-
atBottom: thread.scrollHeight - thread.scrollTop - thread.clientHeight <=
|
|
37
|
+
atBottom: thread.scrollHeight - thread.scrollTop - thread.clientHeight <= 80 };
|
|
23
38
|
const guard = app.state.readAnchorGuard;
|
|
24
39
|
let missing = guard?.roomId === readingPosition.roomId && guard.missing;
|
|
25
40
|
// A failed restore keeps its anchor while the landing stays put; scrolling to a
|
|
@@ -56,29 +71,13 @@ export function initEvents(app) {
|
|
|
56
71
|
layoutQueue = task.catch(() => {});
|
|
57
72
|
return task;
|
|
58
73
|
};
|
|
59
|
-
app.restoreReadingPosition = (
|
|
60
|
-
const thread = $("#thread")
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
captureReadingPosition(); return true;
|
|
67
|
-
};
|
|
68
|
-
if (typeof saved === "number") { thread.scrollTop = saved; captureReadingPosition(); return { messageId: readingPosition?.messageId, atBottom: atBottom() }; }
|
|
69
|
-
const readTs = entry?.readTs || app.state.lastReadTs.get(roomId) || 0;
|
|
70
|
-
// Own messages never form an unread boundary; landing on them hides the newest activity.
|
|
71
|
-
const boundary = readTs && entry?.room.messages.find((message) => message.createdAt > readTs && isUnreadMessage(message, app, entry.room, entry.name));
|
|
72
|
-
// Leaving at the bottom and returning to new messages lands on the first unread;
|
|
73
|
-
// a deliberate scroll position is restored exactly.
|
|
74
|
-
if ((entry?.unreadIds.size || entry?.unreadOverflow) && saved?.atBottom !== false && boundary && align(boundary.id, 0)) return { messageId: boundary.id, atBottom: atBottom() };
|
|
75
|
-
// Left at the bottom with nothing unread: land on the live bottom, not the
|
|
76
|
-
// old anchor — late-loading cards can grow content below the saved row.
|
|
77
|
-
if (saved?.atBottom === true && !entry?.unreadIds.size && !entry?.unreadOverflow) { thread.scrollTop = thread.scrollHeight; captureReadingPosition(); return { messageId: readingPosition?.messageId, atBottom: atBottom() }; }
|
|
78
|
-
if (saved?.messageId && align(saved.messageId, Number(saved.offset) || 0)) return { messageId: saved.messageId, atBottom: atBottom() };
|
|
79
|
-
if (boundary && align(boundary.id, 0)) return { messageId: boundary.id, atBottom: atBottom() };
|
|
80
|
-
if (!saved && !boundary) return false;
|
|
81
|
-
return saved?.messageId || readTs ? { messageId: saved?.messageId || null, missing: true } : false;
|
|
74
|
+
app.restoreReadingPosition = () => {
|
|
75
|
+
const thread = $("#thread");
|
|
76
|
+
// Entering a room always shows the newest messages. Restoring an old anchor
|
|
77
|
+
// leaves the reader above messages that already arrived or grew afterwards.
|
|
78
|
+
thread.scrollTop = thread.scrollHeight;
|
|
79
|
+
captureReadingPosition();
|
|
80
|
+
return { messageId: readingPosition?.messageId, atBottom: true };
|
|
82
81
|
};
|
|
83
82
|
function closeRoomDrawer(restore = true) {
|
|
84
83
|
roomRail.classList.remove("drawer-open"); roomRail.inert = true; roomRail.setAttribute("aria-hidden", "true");
|
|
@@ -127,38 +126,10 @@ export function initEvents(app) {
|
|
|
127
126
|
backdrop.addEventListener("click", () => closeRoomDrawer());
|
|
128
127
|
$("#roomListChat").addEventListener("click", (event) => { if (roomRail.classList.contains("drawer-open") && event.target.closest("[data-room-id]")) closeRoomDrawer(); });
|
|
129
128
|
const activateRoom = app.activateRoom;
|
|
130
|
-
const pendingAnchorLoads = new Map();
|
|
131
|
-
function cancelAnchorLoads() {
|
|
132
|
-
for (const { controller } of pendingAnchorLoads.values()) controller.abort();
|
|
133
|
-
pendingAnchorLoads.clear();
|
|
134
|
-
}
|
|
135
|
-
const showJoin = app.showJoin;
|
|
136
|
-
app.showJoin = (...args) => { cancelAnchorLoads(); return showJoin(...args); };
|
|
137
|
-
const removeJoinedRoom = app.removeJoinedRoom;
|
|
138
|
-
app.removeJoinedRoom = (roomId, options) => {
|
|
139
|
-
if (app.state.room?.id === roomId) cancelAnchorLoads();
|
|
140
|
-
return removeJoinedRoom(roomId, options);
|
|
141
|
-
};
|
|
142
|
-
function activateNow(id, preserveRoomListGeneration = false) {
|
|
143
|
-
activateRoom(id, preserveRoomListGeneration); captureReadingPosition();
|
|
144
|
-
if (roomRail.classList.contains("drawer-open")) closeRoomDrawer();
|
|
145
|
-
}
|
|
146
129
|
app.activateRoom = (id, preserveRoomListGeneration = false) => {
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
if (!entry) return activateNow(id, preserveRoomListGeneration);
|
|
151
|
-
const readTs = entry.readTs || app.state.lastReadTs.get(id) || 0;
|
|
152
|
-
const needAnchor = saved?.messageId && !entry.room.messages.some((message) => message.id === saved.messageId);
|
|
153
|
-
const latest = entry.room.messages.at(-1);
|
|
154
|
-
const needBoundary = !saved?.messageId && readTs && (!latest || latest.createdAt > readTs && !entry.room.messages.some((message) => message.createdAt <= readTs));
|
|
155
|
-
if (!needAnchor && !needBoundary) return activateNow(id, preserveRoomListGeneration);
|
|
156
|
-
const controller = new AbortController();
|
|
157
|
-
const task = loadAnchorHistory(id, entry, saved?.messageId, app, needBoundary ? readTs : 0, controller.signal).catch(() => {}).finally(() => {
|
|
158
|
-
if (pendingAnchorLoads.get(id)?.controller === controller) pendingAnchorLoads.delete(id);
|
|
159
|
-
if (intent === app.state.navigationGeneration) activateNow(id, preserveRoomListGeneration);
|
|
160
|
-
});
|
|
161
|
-
pendingAnchorLoads.set(id, { controller, task });
|
|
130
|
+
activateRoom(id, preserveRoomListGeneration);
|
|
131
|
+
captureReadingPosition();
|
|
132
|
+
if (roomRail.classList.contains("drawer-open")) closeRoomDrawer();
|
|
162
133
|
};
|
|
163
134
|
document.querySelectorAll(".locale-select").forEach((select) => {
|
|
164
135
|
select.addEventListener("change", () => {
|
|
@@ -328,28 +299,6 @@ export function initEvents(app) {
|
|
|
328
299
|
if (!$("#joinView").hidden) $("#inRoomId").focus();
|
|
329
300
|
}
|
|
330
301
|
|
|
331
|
-
async function loadAnchorHistory(roomId, entry, messageId, app, readTs = 0, signal) {
|
|
332
|
-
let beforeSeq, reachedStart = false;
|
|
333
|
-
const messages = [];
|
|
334
|
-
while (!signal?.aborted) {
|
|
335
|
-
const query = new URLSearchParams({ limit: "100" });
|
|
336
|
-
if (beforeSeq) query.set("beforeSeq", String(beforeSeq));
|
|
337
|
-
const result = await app.api(`/rooms/${encodeURIComponent(roomId)}/history?${query}`, { signal });
|
|
338
|
-
if (signal?.aborted) return;
|
|
339
|
-
messages.push(...(result.messages || []));
|
|
340
|
-
const found = messageId ? messages.some((message) => message.id === messageId)
|
|
341
|
-
: messages.some((message) => message.createdAt > readTs) && messages.some((message) => message.createdAt <= readTs);
|
|
342
|
-
if (found || !result.hasMore || !result.nextBeforeSeq || result.nextBeforeSeq === beforeSeq) { reachedStart = !result.hasMore; break; }
|
|
343
|
-
beforeSeq = result.nextBeforeSeq;
|
|
344
|
-
}
|
|
345
|
-
if (messageId ? !messages.some((message) => message.id === messageId) : !messages.some((message) => message.createdAt > readTs)) return;
|
|
346
|
-
const merged = new Map([...entry.room.messages, ...messages].map((message) => [message.id, { ...message, roomId }]));
|
|
347
|
-
entry.room.messages = [...merged.values()].sort((left, right) => left.createdAt - right.createdAt);
|
|
348
|
-
// Keep the upward-pagination cursor aligned with what the anchor load fetched.
|
|
349
|
-
if (typeof entry.room.messages[0]?.seq === "number") entry.historyBeforeSeq = entry.room.messages[0].seq;
|
|
350
|
-
if (reachedStart) entry.historyComplete = true;
|
|
351
|
-
}
|
|
352
|
-
|
|
353
302
|
function saveAccessToken(button, app) {
|
|
354
303
|
const input = document.getElementById(button.dataset.tokenSave);
|
|
355
304
|
input.value = app.setToken(input.value);
|
|
@@ -244,7 +244,7 @@ export function initMessages(app) {
|
|
|
244
244
|
|
|
245
245
|
app.renderMessages = (live = false) => {
|
|
246
246
|
const thread = $("#thread"), list = $("#msgList"), messages = app.state.room.messages;
|
|
247
|
-
const nearBottom = thread.scrollHeight - thread.scrollTop - thread.clientHeight <=
|
|
247
|
+
const nearBottom = thread.scrollHeight - thread.scrollTop - thread.clientHeight <= 80;
|
|
248
248
|
let skipped = 0;
|
|
249
249
|
let anchorId = null, anchorOffset = 0, oldTop = thread.scrollTop;
|
|
250
250
|
const viewport = thread.getBoundingClientRect();
|
|
@@ -307,6 +307,18 @@ export function initMessages(app) {
|
|
|
307
307
|
if (anchor) thread.scrollTop += anchor.getBoundingClientRect().top - thread.getBoundingClientRect().top - anchorOffset;
|
|
308
308
|
else thread.scrollTop = oldTop;
|
|
309
309
|
}
|
|
310
|
+
// A late-loading image below the viewport grows the thread after the scroll
|
|
311
|
+
// settled. Re-pin only when the growth is exactly the gap the reader had, so
|
|
312
|
+
// someone reading history is never yanked to the bottom.
|
|
313
|
+
for (const img of list.querySelectorAll(".msg-text img:not([data-load-guard])")) {
|
|
314
|
+
if (img.complete && img.naturalWidth) continue;
|
|
315
|
+
img.dataset.loadGuard = "1";
|
|
316
|
+
img.addEventListener("load", () => {
|
|
317
|
+
if (!img.isConnected) return;
|
|
318
|
+
const thread = $("#thread");
|
|
319
|
+
if (thread.scrollHeight - thread.scrollTop - thread.clientHeight - img.getBoundingClientRect().height <= 80) thread.scrollTop = thread.scrollHeight;
|
|
320
|
+
}, { once: true });
|
|
321
|
+
}
|
|
310
322
|
app.queueReceiptRefresh?.();
|
|
311
323
|
app.queueReceiptObservation?.();
|
|
312
324
|
return { skipped };
|
|
@@ -337,6 +349,9 @@ export function initMessages(app) {
|
|
|
337
349
|
if (!room || app.state.sendingRooms?.has(room.id)) return;
|
|
338
350
|
const message = app.prepareMessage?.(room.id, input.value) || { text: input.value.trim(), ids: [], ready: Boolean(input.value.trim()) };
|
|
339
351
|
if (!message.ready) return;
|
|
352
|
+
// Clicking Send focuses the button; it is disabled when the draft clears, so
|
|
353
|
+
// keep the caret in the composer or the next keystrokes go nowhere.
|
|
354
|
+
input.focus({ preventScroll: true });
|
|
340
355
|
const text = message.text;
|
|
341
356
|
const thread = $("#thread"), followedBottom = thread.scrollHeight - thread.scrollTop - thread.clientHeight < 80;
|
|
342
357
|
const revision = app.state.draftRevision.get(room.id) || 0;
|
|
@@ -39,6 +39,7 @@ export function initQuestions(app) {
|
|
|
39
39
|
if (active) {
|
|
40
40
|
const signature = `${roomId}\0${app.locale}\0${selected.get(roomId) || ""}\0${items.map((question) => `${question.id}\0${question.text}`).join("\u0001")}`;
|
|
41
41
|
if (list.dataset.signature === signature) { renderReply(roomId); return; }
|
|
42
|
+
const hadItems = Boolean(list.querySelector(".question-item"));
|
|
42
43
|
list.dataset.signature = signature;
|
|
43
44
|
$("#questionBadge").textContent = items.length > 99 ? "99+" : String(items.length);
|
|
44
45
|
$("#questionBadge").hidden = !items.length;
|
|
@@ -58,6 +59,12 @@ export function initQuestions(app) {
|
|
|
58
59
|
}
|
|
59
60
|
status.hidden = items.length > 0 || status.dataset.error === "true";
|
|
60
61
|
if (!items.length && status.dataset.error !== "true") app.setText(status, "questionsEmpty");
|
|
62
|
+
// The panel exists to work through open questions; close it once the last one is answered,
|
|
63
|
+
// and keep the caret in the composer where the answer button used to be.
|
|
64
|
+
if (!items.length && hadItems && !panel.hidden && app.state.room?.id === roomId) {
|
|
65
|
+
app.closePanels();
|
|
66
|
+
if (!matchMedia("(max-width: 760px)").matches && !document.querySelector("dialog[open]")) $("#msgInput").focus({ preventScroll: true });
|
|
67
|
+
}
|
|
61
68
|
renderReply(roomId);
|
|
62
69
|
}
|
|
63
70
|
}
|
|
@@ -150,7 +157,8 @@ export function initQuestions(app) {
|
|
|
150
157
|
if (id !== request || app.state.room?.id !== roomId || !Array.isArray(result.questions)) return;
|
|
151
158
|
pending.set(roomId, result.questions);
|
|
152
159
|
status.dataset.error = "false";
|
|
153
|
-
|
|
160
|
+
// render() skips identical lists, so the empty state must survive that early return.
|
|
161
|
+
status.hidden = result.questions.length > 0;
|
|
154
162
|
render(roomId);
|
|
155
163
|
} catch (error) {
|
|
156
164
|
if (id !== request || app.state.room?.id !== roomId) return;
|
|
@@ -115,7 +115,6 @@ export function initRooms(app) {
|
|
|
115
115
|
app.stopPolling();
|
|
116
116
|
app.state.room = entry.room;
|
|
117
117
|
app.state.myName = entry.name;
|
|
118
|
-
const savedPosition = app.state.positions.get(roomId);
|
|
119
118
|
app.state.unread = entry.unreadIds.size + (entry.unreadOverflow ? 100 : 0);
|
|
120
119
|
app.rendered = 0;
|
|
121
120
|
app.firstMessageId = null;
|
|
@@ -125,12 +124,10 @@ export function initRooms(app) {
|
|
|
125
124
|
app.renderHead();
|
|
126
125
|
$("#msgList").textContent = "";
|
|
127
126
|
app.renderMessages(false);
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
app.state.readAnchorGuard = restoredPosition && !restoredPosition.atBottom ? { roomId, ...restoredPosition } : null;
|
|
127
|
+
app.restoreReadingPosition?.(roomId);
|
|
128
|
+
app.state.readAnchorGuard = null;
|
|
131
129
|
app.startPolling();
|
|
132
130
|
app.renderMembers();
|
|
133
|
-
if (!restoredPosition) $("#thread").scrollTop = typeof savedPosition === "number" ? savedPosition : entry.position || $("#thread").scrollHeight;
|
|
134
131
|
$("#msgInput").contentEditable = "true";
|
|
135
132
|
$("#msgInput").setAttribute("aria-disabled", "false"); $("#msgInput").tabIndex = 0;
|
|
136
133
|
$("#msgInput").draftValue = app.state.drafts.get(roomId) || ""; app.renderReplyPreview?.();
|
|
@@ -141,10 +138,12 @@ export function initRooms(app) {
|
|
|
141
138
|
app.hideSendError();
|
|
142
139
|
app.updateBadge();
|
|
143
140
|
app.updateJump();
|
|
144
|
-
|
|
141
|
+
app.markActiveRoomRead();
|
|
145
142
|
app.renderRoomOptions($("#roomList"), app.state.availableRooms || []);
|
|
146
143
|
app.renderRoomOptions($("#roomListChat"), app.state.availableRooms || []);
|
|
147
144
|
void app.refreshRoomList();
|
|
145
|
+
// Switching rooms replaces the clicked row; keep the composer ready to type.
|
|
146
|
+
app.focusComposer?.();
|
|
148
147
|
document.dispatchEvent(new CustomEvent("chat-room-activated", { detail: roomId }));
|
|
149
148
|
};
|
|
150
149
|
|
|
@@ -145,20 +145,20 @@
|
|
|
145
145
|
#roomListChat .room-row { height: auto; padding: 10px 12px; }
|
|
146
146
|
#roomListChat .r-meta { font-size: 12px; }
|
|
147
147
|
#roomListChat .r-preview { display: block; }
|
|
148
|
-
#chatView > .chat-head { grid-column: 1; grid-row: 1; flex-wrap:
|
|
148
|
+
#chatView > .chat-head { grid-column: 1; grid-row: 1; flex-wrap: wrap; align-items: center; padding: 9px 12px; gap: 6px; }
|
|
149
149
|
#chatView > .conn-bar { grid-column: 1; grid-row: 2; }
|
|
150
150
|
#chatView > .msg-scroll { grid-column: 1; grid-row: 3; }
|
|
151
151
|
#chatView > .composer { grid-column: 1; grid-row: 4; }
|
|
152
|
-
.chat-head-actions { flex:
|
|
152
|
+
.chat-head-actions { flex: 1 1 100%; flex-wrap: nowrap; justify-content: flex-end; gap: 6px; }
|
|
153
153
|
.chat-head-actions > .locale-control { display: none; }
|
|
154
|
-
.chat-head-main { flex: 1
|
|
154
|
+
.chat-head-main { flex: 1 1 100%; min-width: 0; }
|
|
155
155
|
.room-title-row { gap: 6px; }
|
|
156
156
|
.chat-head-main h1 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 18px; }
|
|
157
157
|
.chat-head .chip { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; font-size: 0; }
|
|
158
158
|
#chatView > .chat-head .action-icon { display: block; }
|
|
159
159
|
.rooms-drawer-trigger { display: grid; flex: none; }
|
|
160
160
|
#btnQuestions .question-badge { position: absolute; top: -5px; right: -5px; margin: 0; font-size: 10px; }
|
|
161
|
-
#questionPanel, #announcementPanel { position: fixed; top:
|
|
161
|
+
#questionPanel, #announcementPanel, #reminderPanel, #memberPanel, #roomOptions { position: fixed; top: var(--chat-head-bottom, 116px); left: 12px; right: 12px; width: auto; max-height: calc(100dvh - 132px); overflow: auto; }
|
|
162
162
|
.room-options-panel { right: 0; left: auto; }
|
|
163
163
|
.thread { padding: 14px 12px 6px; }
|
|
164
164
|
.msg-text { max-width: 92%; font-size: 15px; }
|
package/server/chat.html
CHANGED
|
@@ -139,7 +139,7 @@
|
|
|
139
139
|
</section>
|
|
140
140
|
</div>
|
|
141
141
|
<div class="anchor">
|
|
142
|
-
<button class="chip" type="button" id="btnReminders" aria-haspopup="true" aria-expanded="false" aria-controls="reminderPanel"><span class="action-label" data-i18n="reminders">Reminders</span></button>
|
|
142
|
+
<button class="chip" type="button" id="btnReminders" aria-haspopup="true" aria-expanded="false" aria-controls="reminderPanel"><svg class="action-icon" aria-hidden="true" viewBox="0 0 24 24"><path d="M18 8a6 6 0 1 0-12 0c0 7-3 7-3 9h18c0-2-3-2-3-9"/><path d="M10 21a2 2 0 0 0 4 0"/></svg><span class="action-label" data-i18n="reminders">Reminders</span></button>
|
|
143
143
|
<section class="panel reminder-panel" id="reminderPanel" aria-labelledby="reminderHeading" hidden>
|
|
144
144
|
<div class="announcement-head"><h3 id="reminderHeading" tabindex="-1" data-i18n="reminders">Reminders</h3><button type="button" id="btnRefreshReminders" class="question-refresh" data-i18n="refreshQuestions">Refresh</button></div>
|
|
145
145
|
<p id="reminderStatus" class="hint" role="status" aria-live="polite"></p><ul id="reminderList" class="reminder-list"></ul>
|