@alexsun-top/opencode-chat-room 0.6.7 → 0.6.9
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 +24 -0
- package/README.md +6 -3
- package/README.zh-CN.md +7 -3
- package/docs/administrator-rooms.md +7 -2
- package/package.json +4 -1
- package/plugin.ts +38 -8
- package/server/assets/base.css +222 -28
- package/server/assets/chat/admin-badge.js +28 -6
- package/server/assets/chat/admin.js +7 -1
- package/server/assets/chat/announcements.js +1 -1
- package/server/assets/chat/attachment-store.js +106 -0
- package/server/assets/chat/attachments.js +201 -21
- package/server/assets/chat/confirm-dialog.js +28 -0
- package/server/assets/chat/events.js +37 -9
- package/server/assets/chat/image-zoom.js +86 -2
- package/server/assets/chat/index.js +10 -0
- package/server/assets/chat/install-prompt.js +82 -0
- package/server/assets/chat/join-requests.js +355 -0
- package/server/assets/chat/markdown.js +55 -7
- package/server/assets/chat/members.js +5 -3
- package/server/assets/chat/message-polling.js +24 -3
- package/server/assets/chat/messages.js +6 -4
- package/server/assets/chat/questions.js +10 -6
- package/server/assets/chat/recall.js +267 -0
- package/server/assets/chat/reminders.js +53 -9
- package/server/assets/chat/replies.js +1 -1
- package/server/assets/chat/room-list.js +14 -5
- package/server/assets/chat/room-watcher.js +5 -1
- package/server/assets/chat/rooms.js +17 -5
- package/server/assets/chat/shortcuts.js +40 -0
- package/server/assets/chat/state.js +69 -16
- package/server/assets/chat/system-messages.js +4 -0
- package/server/assets/conversation.css +2 -2
- package/server/assets/recall.css +29 -0
- package/server/assets/responsive.css +41 -13
- package/server/chat-server.ts +55 -66
- package/server/chat.html +139 -16
- package/server/inbox.ts +1 -1
- package/server/join-requests.ts +106 -0
- package/server/message-recall-routes.ts +37 -0
- package/server/newrooms.ts +9 -0
- package/server/room-join.ts +59 -0
- package/server/room-owner.ts +3 -20
- package/server/room-payload.ts +2 -0
- package/server/sw.js +1 -0
- package/server/wake.ts +45 -16
- package/skills/chatroom/SKILL.md +32 -0
- package/src/README.md +5 -3
- package/src/agent/admin-client.ts +28 -4
- package/src/center/center-client.ts +81 -4
- package/src/center/center-inbox.ts +35 -10
- package/src/center/center-wake.ts +25 -12
- package/src/center/message-ids.ts +7 -0
- package/src/center/notification-budget.ts +16 -0
- package/src/center/queue.ts +14 -4
- package/src/rooms/room-service.ts +10 -1
- package/src/runtime/plugin-notifications.ts +37 -11
- package/src/runtime/v2-plugin.ts +1 -1
- package/src/state/roles.ts +34 -0
- package/src/state/sqlite-state.ts +197 -27
- package/src/state/store.ts +22 -3
- package/src/tests/announcement-board.ts +12 -2
|
@@ -137,6 +137,7 @@ export function createAuth(storage, fetcher, translate = (key) => key, sessionSt
|
|
|
137
137
|
set name(value) { ensureIdentity(); browserIdentity.name = String(value ?? "").slice(0, 64); writeSession("chat.name", browserIdentity.name || null); saveIdentity(); },
|
|
138
138
|
get token() { return read("chat.token") || ""; }, set token(value) { write("chat.token", value || null); },
|
|
139
139
|
get locale() { return read("chat.locale") || "en"; }, set locale(value) { write("chat.locale", value || null); },
|
|
140
|
+
|
|
140
141
|
get joinedRoomIds() {
|
|
141
142
|
try {
|
|
142
143
|
const ids = JSON.parse(readSession("chat.joinedRoomIds") || "[]");
|
|
@@ -207,12 +208,26 @@ const messages = {
|
|
|
207
208
|
or: "or", newRoomNameLabel: "New room name", newRoomNamePlaceholder: "e.g. Weekend movie night",
|
|
208
209
|
createRoom: "Create room", joinRoomTitle: "Join a room", joinRoomHint: "Someone shared a room ID with you? Paste it here.",
|
|
209
210
|
createRoomTitle: "Create a room", createRoomHint: "Start a new room and invite people with its ID.",
|
|
211
|
+
requireApproval: "Require approval to join", requireApprovalHint: "New members need a human administrator's approval. Agents may also be approved by the administrator agent.",
|
|
212
|
+
joinPolicyEditHint: "New members need a human administrator's approval. Turning this off clears all pending requests.", joinPolicyOpenConfirm: "Turn off approval? All pending join requests will be cleared.",
|
|
213
|
+
approvalRequired: "Approval required", joinRequired: "Approval required", joinPendingStatus: "Approval pending",
|
|
214
|
+
joinPendingTitle: "Waiting for approval", joinPendingBody: ({ name }) => `Your request to join “${name}” was sent. A human administrator must approve it before you can join.`,
|
|
215
|
+
joinPendingHint: "You can leave this page; the request stays pending. Check the room list later.", joinPendingNotice: ({ name }) => `Request sent to join “${name}”. Waiting for a human administrator.`, joinPendingCheck: "Check again", joinPendingStop: "Stop waiting",
|
|
216
|
+
joinPendingGoneTitle: "Request not pending", joinPendingGoneBody: "It may have been denied or cleared. You can send a new request.", joinPendingAgain: "Request again",
|
|
217
|
+
joinPendingError: "Could not check the request. Try again.", joinPendingRoomGone: "This room is gone, or you no longer have access.",
|
|
218
|
+
joinNameTaken: "That name is already used in this room. Choose another name.",
|
|
219
|
+
joinRequestsTitle: "Join requests", joinRequestsHint: "Agent requests can also be approved by the administrator agent.", joinRequestsEmpty: "No pending requests.",
|
|
220
|
+
joinRequestsLoadFailed: "Could not load join requests.", joinRequestAlreadyHandled: "This request was already handled.", joinRequestApprove: "Approve", joinRequestDeny: "Deny", joinRequestAgent: "Agent", joinRequestHuman: "Human",
|
|
221
|
+
joinRequestApproveLabel: ({ name }) => `Approve ${name}`, joinRequestDenyLabel: ({ name }) => `Deny ${name}`,
|
|
222
|
+
joinRequestTime: ({ time }) => `Requested ${time}`, joinRequestApproved: ({ name }) => `${name} approved.`, joinRequestDenied: ({ name }) => `${name} denied.`,
|
|
223
|
+
joinRequestActionFailed: ({ message }) => `Could not update the request: ${message}`, membersWithRequests: ({ count }) => `Members, ${count} join request${count === 1 ? "" : "s"} pending`,
|
|
224
|
+
joinRequestBadgeOne: " request", joinRequestBadgeMany: " requests",
|
|
210
225
|
accessKeyTitle: "Access key", accessKeyHint: "This server asks for an access key. It stays in this browser and is sent with each request.",
|
|
211
226
|
tokenOptional: "Access token (optional)", bearerToken: "Bearer token",
|
|
212
227
|
tokenPlaceholder: "Enter if the server requires it", save: "Save",
|
|
213
228
|
tokenHint: "If the server requires an access token (401), all requests will include it.",
|
|
214
229
|
existingRooms: "Rooms", noRooms: "No rooms yet. Create one.", copyRoomId: "Copy room ID", loadingHistory: "Loading earlier messages",
|
|
215
|
-
editRoom: "Edit room", roomOwnerOnlyTitle: "Owner or administrator only", roomOwnerOnlyNote: ({ owner }) => `Only the room owner or a room administrator can change these settings. This room belongs to ${owner}.`, roomNameLabel: "Room name", roomDescriptionLabel: "Description", adminAgentLabel: "Administrator agent",
|
|
230
|
+
editRoom: "Edit room", roomOwnerOnlyTitle: "Owner or administrator only", roomOwnerOnlyNote: ({ owner }) => `Only the room owner or a room administrator can change these settings. This room belongs to ${owner}.`, roomNameLabel: "Room name", roomDescriptionLabel: "Description", adminAgentLabel: "Administrator agent", roomOwnerBadge: "Owner", roomAdminBadge: "Admin",
|
|
216
231
|
adminIdsLabel: "Human administrators", adminIdsHint: "These members can edit room details, manage members, delete files, and choose a successor. The owner always has the same powers.", adminIdsEmpty: "No other members are in this room yet.", newOwnerLabel: "New owner", newOwnerHint: "Hand the room to another person who is in it. Only the owner can do this; agents cannot own a room.",
|
|
217
232
|
successorLabel: "Successor if the owner leaves", successorNone: "Longest-present member", successorHint: "If the owner leaves, this person becomes owner. If an administrator leaves, this person takes that role. Leave empty to use the longest-present member.", ownerOnlySettingsNote: "Only the owner can change the administrator agent or hand off the room.", adminAgentHint: "The designated agent can use the admin tool to inspect this room and its history. Only the owner can change this; leave empty for none.",
|
|
218
233
|
noAdminAgent: "None", roomNameRequired: "Room name is required", openQuestions: ({ count }) => `${count} unanswered question${count === 1 ? "" : "s"}`,
|
|
@@ -226,9 +241,10 @@ const messages = {
|
|
|
226
241
|
reminderText: "Reminder text", reminderTemplateHint: "Use {{time}}, {{initiator}}, and {{room}} in your message.", reminderCreate: "Create reminder",
|
|
227
242
|
reminderLoading: "Loading reminders…", reminderEmpty: "No reminders yet.", reminderPaused: "Paused", reminderNext: ({ time }) => `Next: ${time}`,
|
|
228
243
|
reminderPause: "Pause", reminderResume: "Resume", reminderDelete: "Delete", reminderDeleteConfirm: "Delete this reminder?",
|
|
244
|
+
reminderEdit: "Edit", reminderEditHeading: "Edit reminder", reminderSave: "Save changes",
|
|
229
245
|
reminderCreated: "Reminder created.", reminderUpdated: "Reminder updated.", reminderDeleted: "Reminder deleted.",
|
|
230
246
|
reminderInvalid: "Check the date, 5-field CRON expression, IANA timezone, and reminder text.", reminderLoadFailed: "Could not load reminders. Your draft is still here.",
|
|
231
|
-
diagramLoading: "Rendering diagram…", diagramRenderFailed: "Diagram unavailable; showing its source.", resourceLoading: "Loading file…", resourceFailed: "This file could not be loaded.", resourceDownload: "Download", resourcePreview: "Preview", resourceHide: "Hide preview", zoomImage: "Open image", imagePreviewTitle: "Image preview",
|
|
247
|
+
diagramLoading: "Rendering diagram…", diagramRenderFailed: "Diagram unavailable; showing its source.", resourceLoading: "Loading file…", resourceFailed: "This file could not be loaded.", resourceDownload: "Download", resourceMoreActions: "More actions for {name}", resourcePreview: "Preview", resourceHide: "Hide preview", zoomImage: "Open image", imagePreviewTitle: "Image preview", imageZoomControls: "Image zoom", zoomIn: "Zoom in", zoomOut: "Zoom out", zoomReset: "Reset zoom", installTitle: "Install OC Chat", installBody: "Add it to your home screen for a full-screen chat.", installAction: "Install", installHow: "How to install", installNotNow: "Not now", installIosGuide: "Tap Share, then Add to Home Screen.",
|
|
232
248
|
announcementDelete: "Delete announcement",
|
|
233
249
|
announcementNew: "New announcement", announcementEmpty: "No announcements yet.", announcementLoading: "Loading announcements…",
|
|
234
250
|
announcementLoadFailed: "Could not load announcements. Your draft is still here.", announcementSaved: "Announcement saved.", announcementDeleted: "Announcement deleted.",
|
|
@@ -236,7 +252,7 @@ const messages = {
|
|
|
236
252
|
questionsLoading: "Loading questions…", questionsEmpty: "No unanswered questions.",
|
|
237
253
|
questionsFailed: "Could not load questions. Try again.", questionsUnsupported: "Unanswered questions are unavailable on this server.", questionLabel: "Question",
|
|
238
254
|
answerQuestion: "Reply", answerPlaceholder: "Write a reply…", sendAnswer: "Send reply", selectQuestion: "Reply to question", copyQuestion: "Copy question", questionCopied: "Question copied.", questionCopyFailed: "Could not copy question.",
|
|
239
|
-
answerFailed: "Reply failed. Your draft is still here.", answerTooLong: "Reply must be
|
|
255
|
+
answerFailed: "Reply failed. Your draft is still here.", answerTooLong: "Reply must be 5,000 characters or fewer.", questionAlreadyAnswered: "This question was answered elsewhere.",
|
|
240
256
|
adminBindingGuide: "Choose a room and an Agent in it. Send the invitation privately to finish setup.", adminRoomLabel: "Administrator room", adminDesignateAgent: "Invite Agent",
|
|
241
257
|
settings: "Settings", adminAccess: "Administration", adminToken: "Administration token", openAdministration: "Open administration", administration: "Administration", designations: "Designations", adminRoom: "Administrator room", targetRoom: "Agent membership room", adminScopeNote: "Choose an Agent in the administrator room. Administrators can manage all rooms.", targetAgent: "Registered agent", designate: "Designate administrator", revokeDesignation: "Revoke designation", globalStatus: "Global status", adminTasks: "Tasks", taskText: "Task", dispatchTask: "Dispatch task", timers: "Timers", planName: "Timer name", createTimer: "Create timer", tokenRequired: "The server requires an access token (401).",
|
|
242
258
|
adminLoading: "Loading administration…", refreshAdmin: "Refresh", adminRoomBadge: "admin", chooseAdminRoom: "Choose a normal room", chooseTargetRoom: "Choose an agent room", chooseAgent: "Choose a registered agent", taskTargetRoom: "Target room", taskTargetAgent: "Target agent", createAdminRoomFirst: "Create a normal room first, then select it as the admin room.", noAgents: "No registered agents", selectAdminAgent: "Choose an admin room and registered agent.", adminDesignated: "Administrator designation is active immediately and stays until you revoke it.", revokeConfirm: "Revoke this admin designation? The normal room will remain.", updateTask: "Update task", task_pending: "Pending", task_working: "Working", task_blocked: "Blocked", task_completed: "Completed", task_cancelled: "Cancelled", nextRun: ({ time, minutes }) => `Every ${minutes} min · next ${time}`, paused: "Paused", pauseTimer: "Pause", resumeTimer: "Resume", deleteTimer: "Delete", deleteTimerConfirm: ({ name }) => `Delete timer “${name}”?`,
|
|
@@ -244,8 +260,8 @@ const messages = {
|
|
|
244
260
|
noMessages: "No messages yet. Say something.", latestMessages: "Back to latest messages",
|
|
245
261
|
mentionMembers: "Choose a member to mention", messagePlaceholder: "Message · Enter to send",
|
|
246
262
|
attachments: "Attachments", addFiles: "Add files", dropFilesHere: "Drop files here to attach",
|
|
247
|
-
attachmentVolatile: "
|
|
248
|
-
uploadQueued: "Waiting to upload", uploadReady: "Ready to send", uploadPercent: ({ percent }) => `Uploading ${percent}%`,
|
|
263
|
+
attachmentVolatile: "Pasted files are recovered after reload; picked files stay in this tab.", attachmentNotPersisted: "This file is too large to save for reload. Keep this tab open until it is sent.", retryUpload: "Retry", removeFile: "Remove",
|
|
264
|
+
uploadQueued: "Waiting to upload", uploadReady: "Ready to send", sendAsFileFailed: "Upload failed. Your text is still in the composer.", uploadPercent: ({ percent }) => `Uploading ${percent}%`,
|
|
249
265
|
uploadFailed: ({ reason } = {}) => reason ? `Upload failed (${reason}). Retry or remove the file.` : "Upload failed. Retry or remove the file.",
|
|
250
266
|
fileUnreadable: "This file cannot be read: it may be a temporary file from another app, or still in the cloud. Save it to disk (or take a screenshot) and attach that.",
|
|
251
267
|
fileTooLarge: "File exceeds the server's current size limit.",
|
|
@@ -253,10 +269,18 @@ const messages = {
|
|
|
253
269
|
joinArrow: "Join →", joinDirectTitle: "Click to join directly", mentionEmpty: "No matching members",
|
|
254
270
|
joined: "Joined", joinAction: "Join room", unreadMessages: ({ count }) => `${count} unread`,
|
|
255
271
|
mentionHint: "↑↓ Select · Enter to confirm · Esc to close", today: "Today", yesterday: "Yesterday",
|
|
272
|
+
keyboardHints: "Keyboard shortcuts", shortcutsLabel: "Shortcuts",
|
|
273
|
+
shortcutsTitle: "Keyboard shortcuts", shortcutsLead: "ChatRoom shortcuts. Press Alt + / to open this list.",
|
|
274
|
+
shortcutsWriting: "Writing", shortcutsSend: "Send the message", shortcutsNewline: "Start a new line",
|
|
275
|
+
shortcutsMention: "Choose a member to mention", shortcutsRooms: "Rooms",
|
|
276
|
+
shortcutsSwitchRoom: "Switch to the previous or next room", shortcutsReading: "Reading",
|
|
277
|
+
shortcutsScroll: "Scroll messages while typing", shortcutsJump: "Jump to the start or end of the conversation", shortcutsMenus: "Menus and dialogs",
|
|
278
|
+
shortcutsClose: "Close the open menu, panel, or dialog",
|
|
256
279
|
earlierMessages: "Earlier messages omitted", messagesBetweenOmitted: "Messages between this reading point and latest are omitted.", you: "You", saved: "Saved",
|
|
257
280
|
savedMemory: "Saved for this tab only", copyFailed: ({ id }) => `Copy failed. Copy manually: ${id}`,
|
|
258
281
|
copyMessage: "Copy", copiedMessage: "Copied", copyMessageFailed: "Could not copy. Select and copy the message manually.",
|
|
259
|
-
replyMessage: "Reply", replyingTo: "Replying to", cancelReply: "Cancel reply", replyOpenOriginal: "View original message", replyOriginalUnavailable: "Original message is unavailable.",
|
|
282
|
+
replyMessage: "Reply", replyingTo: "Replying to", cancelReply: "Cancel reply", replyOpenOriginal: "View original message", replyOriginalUnavailable: "Original message is unavailable.", replyOriginalRecalled: "Original message was recalled.",
|
|
283
|
+
recallMessage: "Recall", recallSystemMessage: "Recall this room notice", recallSystemConfirm: "Recall this room notice? Everyone will see it as recalled.", recallConfirm: "Recall this message? Everyone will see it as recalled.", recallAdminConfirm: ({ name }) => `Recall ${name}'s message? Everyone will see it as recalled.`, recallFailed: "Could not recall this message.", messageRecalled: "Message recalled", recalledBy: ({ name }) => `Recalled by ${name}`, showRecalled: "View original", hideRecalled: "Hide original", revealFailed: "Load failed. Retry",
|
|
260
284
|
identityChanged: "This browser identity changed in another tab. Reload this tab before continuing.",
|
|
261
285
|
networkError: "Network connection failed", requestFailed: ({ status }) => `Request failed (HTTP ${status})`,
|
|
262
286
|
roomIdRequired: "Enter a room ID", nameRequired: "Enter your name", authRetry: "The server requires an access token. Enter it and try again.",
|
|
@@ -274,14 +298,17 @@ const messages = {
|
|
|
274
298
|
direct: "Direct", messagePrivately: "Message privately", removeMember: "Remove",
|
|
275
299
|
kickConfirm: ({ name }) => `Remove ${name} from this room? They can rejoin with the room ID.`,
|
|
276
300
|
deleteRoom: "Delete room", deleteConfirm: ({ name }) => `Delete “${name}” and all its messages? This cannot be undone.`,
|
|
277
|
-
allMembers: "Everyone", messageCount: ({ count }) => `${count} /
|
|
301
|
+
allMembers: "Everyone", messageCount: ({ count }) => `${count} / 5000`,
|
|
302
|
+
pasteAsFile: ({ count }) => `Pasted ${count} characters saved as a text file`,
|
|
303
|
+
sendAsFile: ({ count }) => `${count} characters exceed the limit; sending as a text file`,
|
|
278
304
|
privacyNote: "Anyone with the shared token can read direct messages and manage rooms; the server can read them too.",
|
|
279
305
|
resourceDelete: "Delete file", resourceDeleting: "Deleting…", resourceDeleteConfirm: ({ name }) => `Delete “${name}”? This cannot be undone.`, resourceDeleted: "File deleted.", resourceDeleteFailed: "Could not delete this file.",
|
|
280
306
|
systemJoined: ({ name }) => `${name} joined the room`, systemLeft: ({ name }) => `${name} left the room`, systemRemoved: ({ name }) => `${name} was removed from the room`,
|
|
281
|
-
systemDesignated: ({ actor, name }) => `${actor} designated ${name} as administrator`, systemRevoked: ({ actor }) => `${actor} revoked the administrator designation`, systemRenamed: ({ actor, from, to }) => `${actor} renamed the room from "${from}" to "${to}"`, systemDescribed: ({ actor }) => `${actor} updated the room description`, systemHanded: ({ actor, name }) => `${actor} handed the room to ${name}`, systemAdminsUpdated: ({ actor }) => `${actor} updated the room administrators`, systemSuccessorNamed: ({ actor, name }) => `${actor} named ${name} as the room successor`, systemSuccessorCleared: ({ actor }) => `${actor} cleared the room successor`,
|
|
307
|
+
systemDesignated: ({ actor, name }) => `${actor} designated ${name} as administrator`, systemRevoked: ({ actor }) => `${actor} revoked the administrator designation`, systemRenamed: ({ actor, from, to }) => `${actor} renamed the room from "${from}" to "${to}"`, systemDescribed: ({ actor }) => `${actor} updated the room description`, systemHanded: ({ actor, name }) => `${actor} handed the room to ${name}`, systemAdminsUpdated: ({ actor }) => `${actor} updated the room administrators`, systemSuccessorNamed: ({ actor, name }) => `${actor} named ${name} as the room successor`, systemSuccessorCleared: ({ actor }) => `${actor} cleared the room successor`, systemJoinPolicy: ({ actor, policy }) => policy === "approval" ? `${actor} now requires approval to join this room` : `${actor} opened this room to join without approval`,
|
|
282
308
|
activity_working: "Working", activity_idle: "Foreground idle", activity_waiting: "Waiting", activity_unknown: "Status unknown", activity_offline: "Status stale",
|
|
283
309
|
activityHint_working: "The agent reports active work.", activityHint_idle: "Foreground is idle; background work may continue.", activityHint_waiting: "The agent reports that it is waiting.", activityHint_unknown: "No activity report is available.", activityHint_offline: "The last status is stale; this does not prove the agent is offline.",
|
|
284
310
|
receiptCount: ({ count }) => `Read by ${count}`, receiptNone: "No readers yet", receiptNotLoaded: "Read status not loaded", readerPanelTitle: "Message readers", close: "Close", departedMember: "left",
|
|
311
|
+
confirmTitle: "Please confirm", cancel: "Cancel", confirmAction: "Confirm",
|
|
285
312
|
receiptEvidence_displayed: "Shown on screen", receiptEvidence_tool: "Fetched with room tool", receiptEvidence_context: "In agent context",
|
|
286
313
|
},
|
|
287
314
|
"zh-CN": {
|
|
@@ -293,11 +320,25 @@ const messages = {
|
|
|
293
320
|
newRoomNamePlaceholder: "例如:周末电影夜", createRoom: "创建新房间", tokenOptional: "访问令牌(可选)",
|
|
294
321
|
joinRoomTitle: "加入房间", joinRoomHint: "有人把房间 ID 分享给你?粘贴到这里。",
|
|
295
322
|
createRoomTitle: "创建房间", createRoomHint: "新建一个房间,再把房间 ID 发给别人。",
|
|
323
|
+
requireApproval: "加入需要审核", requireApprovalHint: "新成员需经人类管理员审核;Agent 也可以由管理员 Agent 审核。",
|
|
324
|
+
joinPolicyEditHint: "新成员需经人类管理员审核。关闭后,所有待审核申请都会被清除。", joinPolicyOpenConfirm: "关闭加入审核?所有待审核的加入申请都会被清除。",
|
|
325
|
+
approvalRequired: "需审核加入", joinRequired: "需审核加入", joinPendingStatus: "等待审核",
|
|
326
|
+
joinPendingTitle: "等待审核", joinPendingBody: ({ name }) => `加入“${name}”的申请已发送,需人类管理员审核通过后才能进入。`,
|
|
327
|
+
joinPendingHint: "可以离开此页面,申请会保留;稍后可在房间列表查看。", joinPendingNotice: ({ name }) => `已发送加入“${name}”的申请,正在等待人类管理员审核。`, joinPendingCheck: "再看一次", joinPendingStop: "不再等待",
|
|
328
|
+
joinPendingGoneTitle: "申请已不在等待", joinPendingGoneBody: "申请可能已被拒绝或清除,可以重新发送。", joinPendingAgain: "重新申请",
|
|
329
|
+
joinPendingError: "无法检查申请状态,请重试。", joinPendingRoomGone: "房间不存在,或你已无权访问。",
|
|
330
|
+
joinNameTaken: "这个昵称已被房间里的成员使用,请换一个。",
|
|
331
|
+
joinRequestsTitle: "加入申请", joinRequestsHint: "Agent 的申请也可以由管理员 Agent 审核。", joinRequestsEmpty: "暂无待审核申请。",
|
|
332
|
+
joinRequestsLoadFailed: "无法加载加入申请。", joinRequestAlreadyHandled: "这个申请已经被处理过了。", joinRequestApprove: "通过", joinRequestDeny: "拒绝", joinRequestAgent: "Agent", joinRequestHuman: "人类",
|
|
333
|
+
joinRequestApproveLabel: ({ name }) => `通过 ${name} 的加入申请`, joinRequestDenyLabel: ({ name }) => `拒绝 ${name} 的加入申请`,
|
|
334
|
+
joinRequestTime: ({ time }) => `申请于 ${time}`, joinRequestApproved: ({ name }) => `已通过 ${name} 的申请。`, joinRequestDenied: ({ name }) => `已拒绝 ${name} 的申请。`,
|
|
335
|
+
joinRequestActionFailed: ({ message }) => `操作失败:${message}`, membersWithRequests: ({ count }) => `成员,${count} 个待审核加入申请`,
|
|
336
|
+
joinRequestBadgeOne: " 个申请", joinRequestBadgeMany: " 个申请",
|
|
296
337
|
accessKeyTitle: "访问密钥", accessKeyHint: "这个服务器需要访问密钥。密钥保存在当前浏览器里,并随每个请求发送。",
|
|
297
338
|
bearerToken: "Bearer Token", tokenPlaceholder: "服务器要求时填写", save: "保存",
|
|
298
339
|
tokenHint: "若服务器设置了访问令牌(401),所有请求都会带上它。", existingRooms: "房间",
|
|
299
340
|
noRooms: "还没有房间,创建一个吧。", copyRoomId: "复制房间 ID", loadingHistory: "正在加载更早的消息",
|
|
300
|
-
editRoom: "编辑房间", roomOwnerOnlyTitle: "仅房主或管理员可修改", roomOwnerOnlyNote: ({ owner }) => `只有房主或房间管理员可以修改这些设置。这个房间属于 ${owner}。`, roomNameLabel: "房间名称", roomDescriptionLabel: "描述", adminAgentLabel: "管理员 Agent",
|
|
341
|
+
editRoom: "编辑房间", roomOwnerOnlyTitle: "仅房主或管理员可修改", roomOwnerOnlyNote: ({ owner }) => `只有房主或房间管理员可以修改这些设置。这个房间属于 ${owner}。`, roomNameLabel: "房间名称", roomDescriptionLabel: "描述", adminAgentLabel: "管理员 Agent", roomOwnerBadge: "房主", roomAdminBadge: "管理员",
|
|
301
342
|
adminIdsLabel: "成员管理员", adminIdsHint: "这些成员可以修改房间信息、管理成员、删除文件并指定接任者。房主始终拥有这些权限。", adminIdsEmpty: "房间里暂无其他成员。", newOwnerLabel: "新房主", newOwnerHint: "可以把房间交给房间里的另一个人。只有房主可以操作;Agent 不能成为房主。",
|
|
302
343
|
successorLabel: "房主离开后的接任者", successorNone: "最早加入的成员", successorHint: "房主离开后,此人接任房主;管理员离开后,此人接任管理员。留空则最早加入的成员接任房主。", ownerOnlySettingsNote: "只有房主可以更改管理员 Agent 或移交房间。", adminAgentHint: "被指定的 Agent 可用 admin 工具查看此房间及其历史。只有房主可以更改,留空表示不指定。",
|
|
303
344
|
noAdminAgent: "不指定", roomNameRequired: "房间名称不能为空", openQuestions: ({ count }) => `${count} 个待回答的问题`,
|
|
@@ -311,9 +352,10 @@ const messages = {
|
|
|
311
352
|
reminderText: "提醒内容", reminderTemplateHint: "可使用 {{time}}、{{initiator}} 和 {{room}}。", reminderCreate: "创建提醒",
|
|
312
353
|
reminderLoading: "正在加载提醒…", reminderEmpty: "暂无提醒。", reminderPaused: "已暂停", reminderNext: ({ time }) => `下次:${time}`,
|
|
313
354
|
reminderPause: "暂停", reminderResume: "恢复", reminderDelete: "删除", reminderDeleteConfirm: "确定删除此提醒?",
|
|
355
|
+
reminderEdit: "编辑", reminderEditHeading: "编辑提醒", reminderSave: "保存修改",
|
|
314
356
|
reminderCreated: "提醒已创建。", reminderUpdated: "提醒已更新。", reminderDeleted: "提醒已删除。",
|
|
315
357
|
reminderInvalid: "请检查日期、5 字段 CRON 表达式、IANA 时区和提醒内容。", reminderLoadFailed: "无法加载提醒,草稿仍已保留。",
|
|
316
|
-
diagramLoading: "正在渲染图表…", diagramRenderFailed: "图表无法显示,以下为源代码。", resourceLoading: "正在加载文件…", resourceFailed: "无法加载此文件。", resourceDownload: "下载", resourcePreview: "预览", resourceHide: "收起预览", zoomImage: "查看大图", imagePreviewTitle: "图片预览",
|
|
358
|
+
diagramLoading: "正在渲染图表…", diagramRenderFailed: "图表无法显示,以下为源代码。", resourceLoading: "正在加载文件…", resourceFailed: "无法加载此文件。", resourceDownload: "下载", resourceMoreActions: "{name} 的更多操作", resourcePreview: "预览", resourceHide: "收起预览", zoomImage: "查看大图", imagePreviewTitle: "图片预览", imageZoomControls: "图片缩放", zoomIn: "放大", zoomOut: "缩小", zoomReset: "重置缩放", installTitle: "安装 OC Chat", installBody: "添加到主屏幕,获得全屏聊天体验。", installAction: "安装", installHow: "如何安装", installNotNow: "暂不", installIosGuide: "点击共享按钮,然后选择“添加到主屏幕”。",
|
|
317
359
|
announcementDelete: "删除公告",
|
|
318
360
|
announcementNew: "新建公告", announcementEmpty: "暂无公告。", announcementLoading: "正在加载公告…",
|
|
319
361
|
announcementLoadFailed: "无法加载公告,草稿仍已保留。", announcementSaved: "公告已保存。", announcementDeleted: "公告已删除。",
|
|
@@ -321,7 +363,7 @@ const messages = {
|
|
|
321
363
|
questionsLoading: "正在加载问题…", questionsEmpty: "没有待回答的问题。",
|
|
322
364
|
questionsFailed: "无法加载问题,请重试。", questionsUnsupported: "此服务器不支持查看待回答问题。", questionLabel: "问题",
|
|
323
365
|
answerQuestion: "回复", answerPlaceholder: "写下回复…", sendAnswer: "发送回复", selectQuestion: "回复此问题", copyQuestion: "复制问题", questionCopied: "问题已复制。", questionCopyFailed: "无法复制问题。",
|
|
324
|
-
answerFailed: "回复失败,草稿仍已保留。", answerTooLong: "回复不能超过
|
|
366
|
+
answerFailed: "回复失败,草稿仍已保留。", answerTooLong: "回复不能超过 5,000 个字符。", questionAlreadyAnswered: "此问题已由其他人回答。",
|
|
325
367
|
adminBindingGuide: "选择管理员房间和其中的 Agent,再将邀请私下发送给该 Agent 完成设置。", adminRoomLabel: "管理员房间", adminDesignateAgent: "邀请 Agent",
|
|
326
368
|
adminAccess: "管理", adminToken: "管理令牌", openAdministration: "打开管理面板", administration: "管理面板", designations: "管理绑定", adminRoom: "管理员房间", targetRoom: "Agent 所属房间", adminScopeNote: "请选择管理员房间内的 Agent。管理员可以管理所有房间。", adminRoomBadge: "管理", targetAgent: "已注册 Agent", designate: "指定管理员", revokeDesignation: "撤销绑定", globalStatus: "全局状态", adminTasks: "任务", taskText: "任务内容", dispatchTask: "派发任务", timers: "定时任务", planName: "定时任务名称", createTimer: "创建定时任务",
|
|
327
369
|
adminLoading: "正在加载管理面板…", refreshAdmin: "刷新", adminRoomBadge: "管理", chooseAdminRoom: "选择普通房间", chooseTargetRoom: "选择 Agent 房间", chooseAgent: "选择已注册 Agent", taskTargetRoom: "任务目标房间", taskTargetAgent: "任务目标 Agent", createAdminRoomFirst: "请先按普通流程创建房间,再选作管理房间。", noAgents: "没有已注册的 Agent", selectAdminAgent: "请选择管理房间和已注册的 Agent。", adminDesignated: "管理员已立即生效,长期有效,直到撤销。", revokeConfirm: "撤销此管理绑定?普通房间会保留。", updateTask: "更新任务", task_pending: "待处理", task_working: "进行中", task_blocked: "受阻", task_completed: "已完成", task_cancelled: "已取消", nextRun: ({ time, minutes }) => `每 ${minutes} 分钟 · 下次 ${time}`, paused: "已暂停", pauseTimer: "暂停", resumeTimer: "恢复", deleteTimer: "删除", deleteTimerConfirm: ({ name }) => `删除定时任务“${name}”?`,
|
|
@@ -329,18 +371,26 @@ const messages = {
|
|
|
329
371
|
messageList: "消息列表", noMessages: "还没有消息,说点什么吧。", latestMessages: "回到最新消息",
|
|
330
372
|
mentionMembers: "选择要提及的成员", messagePlaceholder: "输入消息,Enter 发送",
|
|
331
373
|
attachments: "附件", addFiles: "添加文件", dropFilesHere: "将文件拖到这里添加",
|
|
332
|
-
attachmentVolatile: "
|
|
333
|
-
uploadQueued: "等待上传", uploadReady: "可以发送", uploadPercent: ({ percent }) => `正在上传 ${percent}%`,
|
|
374
|
+
attachmentVolatile: "粘贴的文件刷新后可恢复;文件选择器添加的文件仅在当前标签页有效。", attachmentNotPersisted: "文件过大,无法在刷新后恢复。发送完成前请保持此标签页打开。", retryUpload: "重试", removeFile: "移除",
|
|
375
|
+
uploadQueued: "等待上传", uploadReady: "可以发送", sendAsFileFailed: "上传失败,文字仍在输入框中。", uploadPercent: ({ percent }) => `正在上传 ${percent}%`,
|
|
334
376
|
uploadFailed: ({ reason } = {}) => reason ? `上传失败(${reason}),请重试或移除文件。` : "上传失败,请重试或移除文件。",
|
|
335
377
|
fileUnreadable: "这个文件读不出来:它可能是其他 App 的临时文件,或者还在云端。请先保存到本地(或截图)再发送。",
|
|
336
378
|
fileTooLarge: "文件超过服务器当前大小限制。",
|
|
337
379
|
send: "发送", roomMeta: ({ members, count }) => `${members} 人 · ${count} 条消息`, joinArrow: "加入 →",
|
|
338
380
|
joinDirectTitle: "点击直接加入", mentionEmpty: "没有匹配的成员", mentionHint: "↑↓ 选择 · Enter 确认 · Esc 关闭",
|
|
381
|
+
keyboardHints: "键盘快捷键", shortcutsLabel: "快捷键",
|
|
382
|
+
shortcutsTitle: "键盘快捷键", shortcutsLead: "ChatRoom 快捷键。按 Alt + / 打开此列表。",
|
|
383
|
+
shortcutsWriting: "输入", shortcutsSend: "发送消息", shortcutsNewline: "换行",
|
|
384
|
+
shortcutsMention: "选择要提及的成员", shortcutsRooms: "房间",
|
|
385
|
+
shortcutsSwitchRoom: "切换到上一个或下一个房间", shortcutsReading: "阅读",
|
|
386
|
+
shortcutsScroll: "输入时滚动消息", shortcutsJump: "跳到会话开头或结尾", shortcutsMenus: "菜单和对话框",
|
|
387
|
+
shortcutsClose: "关闭当前菜单、面板或对话框",
|
|
339
388
|
joined: "已加入", joinAction: "加入房间", unreadMessages: ({ count }) => `${count} 条未读`,
|
|
340
389
|
today: "今天", yesterday: "昨天", earlierMessages: "更早的消息已省略", messagesBetweenOmitted: "此阅读位置与最新消息之间的部分消息已省略。", you: "我", saved: "已保存",
|
|
341
390
|
savedMemory: "仅保存于当前标签页", copyFailed: ({ id }) => `复制失败,请手动复制:${id}`,
|
|
342
391
|
copyMessage: "复制", copiedMessage: "已复制", copyMessageFailed: "复制失败,请手动选择并复制消息。",
|
|
343
|
-
replyMessage: "回复", replyingTo: "回复给", cancelReply: "取消回复", replyOpenOriginal: "查看原始消息", replyOriginalUnavailable: "原始消息不可用。",
|
|
392
|
+
replyMessage: "回复", replyingTo: "回复给", cancelReply: "取消回复", replyOpenOriginal: "查看原始消息", replyOriginalUnavailable: "原始消息不可用。", replyOriginalRecalled: "原消息已撤回。",
|
|
393
|
+
recallMessage: "撤回", recallSystemMessage: "撤回这条房间通知", recallSystemConfirm: "撤回这条房间通知?所有人都会看到“消息已撤回”。", recallConfirm: "撤回这条消息?所有人都会看到“消息已撤回”。", recallAdminConfirm: ({ name }) => `撤回 ${name} 的消息?所有人都会看到“消息已撤回”。`, recallFailed: "撤回失败,请重试。", messageRecalled: "消息已撤回", recalledBy: ({ name }) => `${name} 撤回`, showRecalled: "查看原文", hideRecalled: "收起原文", revealFailed: "加载失败,重试",
|
|
344
394
|
identityChanged: "此浏览器身份已在另一个标签页中更改,请重新加载此标签页后继续。",
|
|
345
395
|
networkError: "网络连接失败", requestFailed: ({ status }) => `请求失败(HTTP ${status})`,
|
|
346
396
|
roomIdRequired: "请输入房间 ID", nameRequired: "请输入你的昵称", authRetry: "服务器要求访问令牌,请填写后重试",
|
|
@@ -354,13 +404,16 @@ const messages = {
|
|
|
354
404
|
refreshRooms: "刷新房间", identityLabel: ({ name }) => `当前昵称:${name}`, roomsMenu: "打开房间列表", closeRoomList: "关闭房间列表", direct: "私聊",
|
|
355
405
|
messagePrivately: "私聊", removeMember: "移除", kickConfirm: ({ name }) => `确定将 ${name} 移出此房间?对方仍可用房间 ID 重新加入。`,
|
|
356
406
|
deleteRoom: "删除房间", deleteConfirm: ({ name }) => `删除“${name}”及全部聊天记录?此操作无法撤销。`,
|
|
357
|
-
allMembers: "所有人", messageCount: ({ count }) => `${count} /
|
|
407
|
+
allMembers: "所有人", messageCount: ({ count }) => `${count} / 5000`,
|
|
408
|
+
pasteAsFile: ({ count }) => `已把粘贴的 ${count} 个字符保存为文本文件`,
|
|
409
|
+
sendAsFile: ({ count }) => `${count} 个字符超出上限,将作为文本文件发送`,
|
|
358
410
|
privacyNote: "持有共享令牌的人都可以读取私聊内容和管理房间;服务器也可以读取私聊内容。", resourceDelete: "删除文件", resourceDeleting: "正在删除…", resourceDeleteConfirm: ({ name }) => `确定删除“${name}”?此操作无法撤销。`, resourceDeleted: "文件已删除。", resourceDeleteFailed: "无法删除此文件。",
|
|
359
411
|
systemJoined: ({ name }) => `${name} 加入了房间`, systemLeft: ({ name }) => `${name} 离开了房间`, systemRemoved: ({ name }) => `${name} 被移出了房间`,
|
|
360
|
-
systemDesignated: ({ actor, name }) => `${actor} 指定 ${name} 为管理员`, systemRevoked: ({ actor }) => `${actor} 撤销了管理员指定`, systemRenamed: ({ actor, from, to }) => `${actor} 将房间名称从“${from}”改为“${to}”`, systemDescribed: ({ actor }) => `${actor} 更新了房间描述`, systemHanded: ({ actor, name }) => `${actor} 将房间移交给了 ${name}`, systemAdminsUpdated: ({ actor }) => `${actor} 更新了房间管理员`, systemSuccessorNamed: ({ actor, name }) => `${actor} 指定 ${name} 为房间继任者`, systemSuccessorCleared: ({ actor }) => `${actor} 清除了房间继任者`,
|
|
412
|
+
systemDesignated: ({ actor, name }) => `${actor} 指定 ${name} 为管理员`, systemRevoked: ({ actor }) => `${actor} 撤销了管理员指定`, systemRenamed: ({ actor, from, to }) => `${actor} 将房间名称从“${from}”改为“${to}”`, systemDescribed: ({ actor }) => `${actor} 更新了房间描述`, systemHanded: ({ actor, name }) => `${actor} 将房间移交给了 ${name}`, systemAdminsUpdated: ({ actor }) => `${actor} 更新了房间管理员`, systemSuccessorNamed: ({ actor, name }) => `${actor} 指定 ${name} 为房间继任者`, systemSuccessorCleared: ({ actor }) => `${actor} 清除了房间继任者`, systemJoinPolicy: ({ actor, policy }) => policy === "approval" ? `${actor} 开启了加入审核,新成员需要管理员批准` : `${actor} 关闭了加入审核,新成员可以直接加入`,
|
|
361
413
|
activity_working: "工作中", activity_idle: "前台空闲", activity_waiting: "等待中", activity_unknown: "状态未知", activity_offline: "状态已过期",
|
|
362
414
|
activityHint_working: "Agent 正在报告工作状态。", activityHint_idle: "前台空闲;后台任务仍可能继续。", activityHint_waiting: "Agent 正在报告等待状态。", activityHint_unknown: "暂无活动状态报告。", activityHint_offline: "最近的状态已过期;这不能证明 Agent 已离线。",
|
|
363
415
|
receiptCount: ({ count }) => `已读 ${count} 人`, receiptNone: "尚无人已读", receiptNotLoaded: "尚未加载已读状态", readerPanelTitle: "消息已读情况", close: "关闭", departedMember: "已离开",
|
|
416
|
+
confirmTitle: "请确认", cancel: "取消", confirmAction: "确认",
|
|
364
417
|
receiptEvidence_displayed: "已显示在屏幕上", receiptEvidence_tool: "通过房间工具读取", receiptEvidence_context: "进入上下文",
|
|
365
418
|
},
|
|
366
419
|
};
|
|
@@ -9,6 +9,7 @@ const patterns = [
|
|
|
9
9
|
[/^(.*?) revoked the administrator designation$/, "systemRevoked", (m) => ({ actor: m[1] })],
|
|
10
10
|
[/^(.*?) renamed the room from "(.*)" to "(.*)"$/, "systemRenamed", (m) => ({ actor: m[1], from: m[2], to: m[3] })],
|
|
11
11
|
[/^(.*?) updated the room description$/, "systemDescribed", (m) => ({ actor: m[1] })],
|
|
12
|
+
[/^(.*?) set join approval to (open|approval)$/, "systemJoinPolicy", (m) => ({ actor: m[1], policy: m[2] })],
|
|
12
13
|
[/^(.*?) handed the room to (.*)$/, "systemHanded", (m) => ({ actor: m[1], name: m[2] })],
|
|
13
14
|
];
|
|
14
15
|
|
|
@@ -32,8 +33,11 @@ export function setRoomPreview(entry, message) {
|
|
|
32
33
|
entry.preview = message.text;
|
|
33
34
|
entry.previewAt = message.createdAt;
|
|
34
35
|
entry.previewSenderId = message.senderId;
|
|
36
|
+
entry.previewRecalled = Boolean(message.recalledAt);
|
|
35
37
|
}
|
|
36
38
|
|
|
37
39
|
export function formatRoomPreview(entry, latest, app) {
|
|
40
|
+
// A recalled message must not leak its text through the room rail.
|
|
41
|
+
if (entry?.previewRecalled || latest?.recalledAt) return app.t("messageRecalled");
|
|
38
42
|
return formatSystemMessage(entry?.preview ? { senderId: entry.previewSenderId, text: entry.preview } : latest, app);
|
|
39
43
|
}
|
|
@@ -288,12 +288,12 @@
|
|
|
288
288
|
.reader-close:hover { border-color: var(--line); color: var(--ink); background: var(--surface-2); }
|
|
289
289
|
.close-icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-width: 1.8; }
|
|
290
290
|
.reader-panel .receipt-reader-list li { display: grid; gap: 3px; padding: 10px 0; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
|
|
291
|
-
.image-dialog { width: 100vw; max-width: none; height: 100dvh; max-height: none; margin: 0; padding: 20px; border: 0; background: transparent; }
|
|
291
|
+
.image-dialog { width: 100vw; max-width: none; height: 100dvh; max-height: none; margin: 0; padding: 20px; overflow: hidden; border: 0; background: transparent; }
|
|
292
292
|
.image-dialog[open] { display: grid; place-items: center; }
|
|
293
293
|
.image-dialog::backdrop { background: rgb(9 16 22 / .84); backdrop-filter: blur(3px); }
|
|
294
294
|
.image-dialog img { display: block; max-width: 100%; max-height: calc(100dvh - 40px); width: auto; height: auto; object-fit: contain; border-radius: 8px; animation: image-zoom-in .16s ease both; }
|
|
295
295
|
@keyframes image-zoom-in { from { opacity: 0; transform: scale(.97); } }
|
|
296
|
-
.image-dialog-close { position: fixed; top: 14px; right: 14px; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 1px solid rgb(255 255 255 / .34); border-radius: 50%; color: #fff; background: rgb(9 16 22 / .58); font: inherit; line-height: 1; cursor: pointer; }
|
|
296
|
+
.image-dialog-close { position: fixed; z-index: 2; top: 14px; right: 14px; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 1px solid rgb(255 255 255 / .34); border-radius: 50%; color: #fff; background: rgb(9 16 22 / .58); font: inherit; line-height: 1; cursor: pointer; }
|
|
297
297
|
.image-dialog-close .close-icon { width: 22px; height: 22px; }
|
|
298
298
|
.image-dialog-close:hover, .image-dialog-close:focus-visible { background: rgb(9 16 22 / .82); outline: 2px solid #fff; outline-offset: 2px; }
|
|
299
299
|
.msg-text img, .chat-resource img, .attachment-preview img { cursor: zoom-in; }
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/* Recall: the row-level action, the tombstone, and the reveal disclosure. */
|
|
2
|
+
.message-recall { display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 1px solid transparent; border-radius: 8px; color: var(--ink-3); background: transparent; cursor: pointer; }
|
|
3
|
+
.message-recall-icon { display: block; width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; }
|
|
4
|
+
.message-recall:hover, .message-recall:focus-visible { border-color: color-mix(in srgb, var(--danger) 32%, var(--line)); color: var(--danger); background: var(--danger-soft); }
|
|
5
|
+
.message-recall:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
|
|
6
|
+
.msg-text.recalled { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; border-style: dashed; border-color: color-mix(in srgb, var(--ink) 18%, transparent); background: color-mix(in srgb, var(--surface-2) 62%, var(--surface)); box-shadow: none; color: var(--ink-2); font-size: 14.5px; }
|
|
7
|
+
.msg.own .msg-text.recalled { background: color-mix(in srgb, var(--surface-2) 78%, var(--surface)); border-color: color-mix(in srgb, var(--ink) 18%, transparent); }
|
|
8
|
+
.msg-text.recalled > :not(:first-child) { margin-top: 0; }
|
|
9
|
+
.recalled-note { display: flex; align-items: center; gap: 6px; margin: 0; color: var(--ink-2); font-weight: 550; }
|
|
10
|
+
.recalled-mark { display: inline-flex; color: var(--ink-3); }
|
|
11
|
+
.recalled-icon { display: block; width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; }
|
|
12
|
+
.recalled-by { margin: 0; color: var(--ink-3); font-size: 12px; }
|
|
13
|
+
.recalled-reveal { min-height: 32px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink-2); background: var(--surface); font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; }
|
|
14
|
+
.recalled-reveal:hover, .recalled-reveal:focus-visible { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
|
|
15
|
+
.recalled-reveal:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
|
|
16
|
+
.recalled-reveal[disabled] { cursor: progress; opacity: .7; }
|
|
17
|
+
.recalled-body { width: 100%; padding-top: 7px; border-top: 1px solid var(--line); color: var(--ink); }
|
|
18
|
+
.recalled-body[hidden] { display: none; }
|
|
19
|
+
.msg.recalled-in .msg-text { animation: recall-in .18s ease both; }
|
|
20
|
+
@keyframes recall-in { from { opacity: .35; transform: translateY(-2px); } }
|
|
21
|
+
@media (prefers-reduced-motion: reduce) { .msg.recalled-in .msg-text { animation: none; } }
|
|
22
|
+
|
|
23
|
+
/* Room notices recall from the line itself. */
|
|
24
|
+
.sys.has-recall { padding-right: 36px; }
|
|
25
|
+
.sys .sys-recall { position: absolute; top: -6px; right: 4px; width: 32px; height: 32px; background: var(--surface); }
|
|
26
|
+
.sys-recalled { display: inline-flex; align-items: center; gap: 6px; }
|
|
27
|
+
.sys-recalled .recalled-icon { width: 14px; height: 14px; }
|
|
28
|
+
.sys .recalled-reveal { min-height: 30px; }
|
|
29
|
+
.sys .recalled-body { max-width: min(560px, 100%); padding-top: 0; border-top: 0; color: var(--ink-2); font-size: 12.5px; text-align: center; }
|
|
@@ -2,14 +2,24 @@
|
|
|
2
2
|
@media (max-width: 560px) {
|
|
3
3
|
#joinView { padding: 20px 14px; }
|
|
4
4
|
.entry-card { padding: 20px 18px 18px; }
|
|
5
|
+
.join-head { gap: 8px 16px; padding-bottom: 16px; }
|
|
5
6
|
.chat-head { padding: 12px 16px; }
|
|
6
7
|
.thread { padding: 16px 16px 4px; }
|
|
7
8
|
.jump { right: 12px; bottom: 10px; }
|
|
8
9
|
}
|
|
9
|
-
|
|
10
|
-
|
|
10
|
+
@media (max-width: 520px) {
|
|
11
|
+
.join-head { grid-template-columns: minmax(0, 1fr); }
|
|
12
|
+
.join-head .locale-control { grid-column: 1; grid-row: 2; justify-self: end; }
|
|
13
|
+
.join-head .tagline { grid-row: 3; }
|
|
14
|
+
}
|
|
15
|
+
/* The three setup cards stack below the masthead; rooms use two columns until phones. */
|
|
11
16
|
@media (max-width: 860px) {
|
|
12
|
-
.join-
|
|
17
|
+
.join-entries { grid-template-columns: minmax(0, 1fr); }
|
|
18
|
+
#createForm { grid-column: auto; }
|
|
19
|
+
#roomList { grid-template-columns: repeat(2, minmax(0, 1fr)); }
|
|
20
|
+
}
|
|
21
|
+
@media (max-width: 560px) {
|
|
22
|
+
#roomList { grid-template-columns: minmax(0, 1fr); }
|
|
13
23
|
}
|
|
14
24
|
|
|
15
25
|
/* Room workspace */
|
|
@@ -58,8 +68,8 @@
|
|
|
58
68
|
.r-preview { overflow: hidden; color: var(--ink-3); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
|
|
59
69
|
.r-badge { position: absolute; top: 8px; right: 9px; display: grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: 10px; font-weight: 700; }
|
|
60
70
|
.r-badge-question { background: var(--warning); color: var(--warning-ink); font-size: 12px; }
|
|
61
|
-
/* The rail footer
|
|
62
|
-
|
|
71
|
+
/* The rail footer keeps the empty composer's height so the divider lines meet when
|
|
72
|
+
idle. Files or wrapped lines grow only the composer, never this footer. */
|
|
63
73
|
.rail-foot { display: flex; flex-direction: column; justify-content: center; align-items: stretch; gap: 8px; margin-top: auto; min-height: var(--composer-block, 104px); padding: 12px 4px 14px; border-top: 1px solid color-mix(in srgb, var(--line) 80%, transparent); font-size: 12px; color: var(--ink-3); }
|
|
64
74
|
.rail-foot .anchor { width: 100%; }
|
|
65
75
|
.user-menu-trigger { display: flex; align-items: center; gap: 10px; width: 100%; min-width: 0; padding: 7px; border: 1px solid transparent; border-radius: 12px; color: var(--ink); background: transparent; font: inherit; text-align: left; cursor: pointer; transition: border-color .16s, background .16s, box-shadow .16s; }
|
|
@@ -86,12 +96,18 @@
|
|
|
86
96
|
.admin-access summary { margin: 0 0 8px; font-size: 13px; font-weight: 600; cursor: pointer; }
|
|
87
97
|
.admin-badge, .admin-agent-badge { display: inline-flex; align-items: center; width: fit-content; border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--line)); border-radius: 999px; color: var(--accent); background: var(--accent-soft); font-size: 10px; font-weight: 700; letter-spacing: .04em; line-height: 1.4; white-space: nowrap; }
|
|
88
98
|
.admin-badge { padding: 3px 8px; }
|
|
99
|
+
.admin-badge.owner-badge { border-color: color-mix(in srgb, var(--warning) 40%, var(--line)); color: var(--warning); background: color-mix(in srgb, var(--warning) 14%, var(--surface)); }
|
|
89
100
|
.admin-agent-badge { padding: 1px 6px; vertical-align: middle; }
|
|
90
101
|
.admin-scope-note { margin: 0 0 14px; padding: 10px 11px; border-left: 2px solid var(--accent); border-radius: 0 8px 8px 0; background: color-mix(in srgb, var(--accent-soft) 58%, transparent); line-height: 1.5; }
|
|
91
102
|
.admin-dialog { width: min(560px, calc(100vw - 32px)); max-width: none; max-height: 90dvh; overflow: auto; padding: 24px; color: var(--ink); background: linear-gradient(145deg, var(--surface), color-mix(in srgb, var(--accent-soft) 16%, var(--surface))); border: 1px solid color-mix(in srgb, var(--accent) 18%, var(--line)); border-radius: 20px; box-shadow: 0 24px 80px rgb(10 25 20 / .2); }
|
|
92
103
|
.admin-dialog::backdrop { background: rgb(9 22 18 / .52); backdrop-filter: blur(4px); }
|
|
104
|
+
/* Writing dialogs get desktop width; phones keep the same 16px gutter. */
|
|
105
|
+
#announcementDialog { width: min(880px, calc(100vw - 32px)); height: 88vh; height: min(88dvh, 780px); }
|
|
106
|
+
#reminderDialog { width: min(680px, calc(100vw - 32px)); }
|
|
93
107
|
.admin-dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
|
|
94
108
|
.admin-dialog-actions { display: flex; align-items: center; gap: 10px; }
|
|
109
|
+
.confirm-actions { display: flex; justify-content: flex-end; gap: 10px; }
|
|
110
|
+
#confirmMessage { margin: 12px 0 20px; color: var(--ink-2); }
|
|
95
111
|
.admin-dialog-head h2 { min-width: 0; margin: 0; font-family: var(--font-display); font-size: 25px; font-weight: 600; letter-spacing: -.02em; overflow-wrap: anywhere; }
|
|
96
112
|
.admin-dialog h3 { margin: 20px 0 9px; font-size: 14px; font-weight: 700; letter-spacing: .01em; }
|
|
97
113
|
.admin-guide { padding: 16px; border: 1px solid color-mix(in srgb, var(--line) 82%, transparent); border-radius: 14px; background: color-mix(in srgb, var(--surface) 84%, var(--accent-soft)); }
|
|
@@ -103,7 +119,7 @@
|
|
|
103
119
|
.admin-check span { min-width: 0; overflow-wrap: anywhere; }
|
|
104
120
|
.admin-check:hover { background: var(--surface-2); }
|
|
105
121
|
.admin-check input { flex: none; width: 16px; height: 16px; margin: 0; accent-color: var(--accent); }
|
|
106
|
-
.admin-dialog .admin-select { display: block; box-sizing: border-box; width: 100%; min-width: 0; min-height: 40px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); background: var(--surface); font: inherit; }
|
|
122
|
+
.admin-dialog .admin-select { display: block; box-sizing: border-box; width: 100%; min-width: 0; min-height: 40px; padding: 6px 32px 6px 10px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); background-color: var(--surface); font: inherit; }
|
|
107
123
|
.admin-dialog .admin-select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
|
|
108
124
|
.admin-enrollment { display: grid; gap: 8px; margin-top: 12px; padding: 12px; border-radius: 10px; background: var(--accent-soft); }
|
|
109
125
|
@media (max-width: 620px) { .admin-dialog { padding: 15px; } }
|
|
@@ -154,7 +170,11 @@
|
|
|
154
170
|
.room-rail { display: none; position: fixed; inset: 0 auto 0 0; z-index: 50; width: min(300px, 88vw); height: 100dvh; min-height: 0; padding: 20px 14px 0; background: var(--surface); border-right: 1px solid var(--line); box-shadow: var(--shadow); }
|
|
155
171
|
.room-rail.drawer-open { display: flex; }
|
|
156
172
|
.rail-brand { display: flex; margin-bottom: 22px; }
|
|
157
|
-
.rail-foot { display: flex; }
|
|
173
|
+
.rail-foot { display: flex; min-height: var(--composer-block, 93px); }
|
|
174
|
+
.rail-install { display: grid; gap: 6px; padding: 8px 4px 10px; border-top: 1px solid color-mix(in srgb, var(--line) 80%, transparent); }
|
|
175
|
+
.rail-install .rail-install-btn { width: 100%; min-height: 40px; }
|
|
176
|
+
.rail-install svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
|
|
177
|
+
.rail-install .hint { margin: 0; font-size: 11.5px; line-height: 1.45; }
|
|
158
178
|
.rail-label { margin: 0 8px 10px; font-size: 11px; }
|
|
159
179
|
.rail-composer { top: 32px; left: 12px; right: 12px; }
|
|
160
180
|
.rail-rooms { display: block; flex: 1; max-height: none; overflow: auto; }
|
|
@@ -162,14 +182,16 @@
|
|
|
162
182
|
#roomListChat .room-row { height: auto; padding: 10px 12px; }
|
|
163
183
|
#roomListChat .r-meta { font-size: 12px; }
|
|
164
184
|
#roomListChat .r-preview { display: block; }
|
|
165
|
-
#chatView > .chat-head { grid-column: 1; grid-row: 1; flex-wrap: wrap; align-items: center; padding:
|
|
185
|
+
#chatView > .chat-head { grid-column: 1; grid-row: 1; flex-wrap: wrap; align-items: center; padding: 6px 10px; gap: 4px 8px; }
|
|
166
186
|
#chatView > .conn-bar { grid-column: 1; grid-row: 2; }
|
|
167
187
|
#chatView > .msg-scroll { grid-column: 1; grid-row: 3; }
|
|
168
188
|
#chatView > .composer { grid-column: 1; grid-row: 4; }
|
|
169
|
-
.chat-head-actions { flex:
|
|
189
|
+
.chat-head-actions { flex: none; flex-wrap: nowrap; justify-content: flex-end; gap: 4px; margin-left: auto; }
|
|
170
190
|
.chat-head-actions > .locale-control { display: none; }
|
|
171
|
-
.chat-head-main { flex: 1 1
|
|
172
|
-
.room-title-row { gap: 6px; }
|
|
191
|
+
.chat-head-main { display: flex; flex: 1 1 200px; flex-wrap: wrap; align-items: center; gap: 2px 8px; min-width: 0; }
|
|
192
|
+
.room-title-row { flex: 1 1 0; gap: 6px; min-width: 0; }
|
|
193
|
+
.room-meta { flex: none; margin: 0; max-width: none; }
|
|
194
|
+
.room-description { flex: 1 1 100%; margin: 0; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
|
173
195
|
.chat-head-main h1 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 18px; }
|
|
174
196
|
.chat-head .chip { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; font-size: 0; }
|
|
175
197
|
#chatView > .chat-head .action-icon { display: block; }
|
|
@@ -184,13 +206,14 @@
|
|
|
184
206
|
#btnSend { padding: 12px 15px; }
|
|
185
207
|
}
|
|
186
208
|
@media (max-width: 480px) {
|
|
209
|
+
.chat-head-main { flex-basis: 100%; }
|
|
210
|
+
.chat-head-actions { flex-basis: 100%; margin-left: 0; }
|
|
187
211
|
#msgInput:placeholder-shown { min-height: calc(2.9em + 20px); }
|
|
188
212
|
}
|
|
189
213
|
@media (max-width: 420px) {
|
|
190
214
|
#chatView > .chat-head { align-items: center; }
|
|
191
|
-
.chat-head-actions { justify-content: flex-
|
|
215
|
+
.chat-head-actions { justify-content: flex-end; gap: 4px; }
|
|
192
216
|
.chat-head-actions .panel { max-height: min(70dvh, 520px); overflow: auto; }
|
|
193
|
-
.room-meta { max-width: 100px; overflow: hidden; }
|
|
194
217
|
}
|
|
195
218
|
@media (max-width: 300px) {
|
|
196
219
|
#chatView > .chat-head { padding: 8px; gap: 0; }
|
|
@@ -207,3 +230,8 @@
|
|
|
207
230
|
#btnRoomsDrawer { width: 28px; height: 28px; }
|
|
208
231
|
.room-title-row { gap: 3px; }
|
|
209
232
|
}
|
|
233
|
+
@media (max-width: 900px) {
|
|
234
|
+
#btnMembers { position: relative; }
|
|
235
|
+
#joinRequestBadge { position: absolute; top: -5px; right: -5px; margin: 0; font-size: 10px; }
|
|
236
|
+
.join-request-badge-word { display: none; }
|
|
237
|
+
}
|