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

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 (89) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/README.md +12 -5
  3. package/README.zh-CN.md +12 -5
  4. package/cli.ts +26 -6
  5. package/dist/cli.js +7804 -0
  6. package/package.json +19 -6
  7. package/plugin.ts +7 -4
  8. package/server/admin-auth.ts +1 -1
  9. package/server/admin-routes.ts +2 -2
  10. package/server/admin-state.ts +2 -1
  11. package/server/assets/FLUENT-ICONS-LICENSE +25 -0
  12. package/server/assets/NOTICE.txt +2 -1
  13. package/server/assets/attachments.css +1 -1
  14. package/server/assets/base.css +29 -7
  15. package/server/assets/chat/admin.js +43 -3
  16. package/server/assets/chat/announcements.js +5 -3
  17. package/server/assets/chat/confirm-dialog.js +12 -2
  18. package/server/assets/chat/create-room-dialog.js +5 -3
  19. package/server/assets/chat/events.js +32 -7
  20. package/server/assets/chat/files.js +369 -0
  21. package/server/assets/chat/history-loader.js +36 -26
  22. package/server/assets/chat/icons.js +15 -0
  23. package/server/assets/chat/index.js +7 -1
  24. package/server/assets/chat/locales/de.js +19 -2
  25. package/server/assets/chat/locales/es.js +19 -2
  26. package/server/assets/chat/locales/fr.js +19 -2
  27. package/server/assets/chat/locales/it.js +19 -2
  28. package/server/assets/chat/locales/ja.js +19 -2
  29. package/server/assets/chat/locales/ko.js +19 -2
  30. package/server/assets/chat/markdown.js +5 -33
  31. package/server/assets/chat/message-polling.js +61 -6
  32. package/server/assets/chat/message-window.js +28 -0
  33. package/server/assets/chat/messages.js +32 -12
  34. package/server/assets/chat/palette.js +396 -0
  35. package/server/assets/chat/pwa.js +67 -9
  36. package/server/assets/chat/recall.js +3 -2
  37. package/server/assets/chat/replies.js +2 -1
  38. package/server/assets/chat/rooms.js +20 -7
  39. package/server/assets/chat/search.js +137 -0
  40. package/server/assets/chat/settings.js +11 -5
  41. package/server/assets/chat/shortcuts.js +1 -1
  42. package/server/assets/chat/state.js +38 -4
  43. package/server/assets/code-highlight.css +0 -5
  44. package/server/assets/conversation.css +5 -4
  45. package/server/assets/edit-room.css +77 -0
  46. package/server/assets/files.css +222 -0
  47. package/server/assets/fluent-icons.svg +42 -0
  48. package/server/assets/icons.css +9 -0
  49. package/server/assets/palette.css +263 -0
  50. package/server/assets/recall.css +2 -2
  51. package/server/assets/responsive.css +6 -5
  52. package/server/assets/room-create.css +1 -1
  53. package/server/assets/settings.css +10 -7
  54. package/server/chat-server.ts +46 -29
  55. package/server/chat.html +175 -61
  56. package/server/http-server.ts +182 -0
  57. package/server/join-requests.ts +4 -4
  58. package/server/manifest.webmanifest +1 -1
  59. package/server/member-routes.ts +3 -3
  60. package/server/message-recall-routes.ts +1 -1
  61. package/server/newrooms.ts +4 -4
  62. package/server/resource-routes.ts +19 -4
  63. package/server/room-join.ts +1 -1
  64. package/server/room-payload.ts +1 -1
  65. package/server/sw.js +12 -1
  66. package/server/wake.ts +1 -1
  67. package/src/README.md +4 -2
  68. package/src/config/file-config.ts +294 -0
  69. package/src/rooms/resource-read.ts +2 -1
  70. package/src/rooms/resource-upload.ts +6 -3
  71. package/src/rooms/resources.ts +7 -2
  72. package/src/runtime/watch.ts +13 -8
  73. package/src/state/receiver-state.ts +3 -5
  74. package/src/state/sqlite-state.ts +11 -7
  75. package/src/state/sqlite.ts +80 -0
  76. package/src/state/store.ts +1 -0
  77. package/src/tui/app.mjs +417 -0
  78. package/src/tui/config.mjs +194 -0
  79. package/src/tui/http.mjs +103 -0
  80. package/src/tui/main.mjs +176 -0
  81. package/src/tui/messages.mjs +67 -0
  82. package/src/tui/palette-app.mjs +265 -0
  83. package/src/tui/palette.mjs +101 -0
  84. package/src/tui/session.mjs +40 -0
  85. package/src/tui/ui-content.mjs +426 -0
  86. package/src/tui/ui-theme.mjs +60 -0
  87. package/src/tui/ui-view.mjs +452 -0
  88. package/src/tui/ui.mjs +262 -0
  89. package/src/tests/announcement-board.ts +0 -186
package/server/chat.html CHANGED
@@ -18,6 +18,7 @@
18
18
  </script>
19
19
  <meta name="mobile-web-app-capable" content="yes">
20
20
  <meta name="apple-mobile-web-app-capable" content="yes">
21
+ <link rel="stylesheet" href="/assets/icons.css">
21
22
  <link rel="stylesheet" href="/assets/base.css">
22
23
  <link rel="stylesheet" href="/assets/settings.css">
23
24
 
@@ -27,6 +28,9 @@
27
28
  <link rel="stylesheet" href="/assets/responsive.css">
28
29
  <link rel="stylesheet" href="/assets/code-highlight.css">
29
30
  <link rel="stylesheet" href="/assets/room-create.css">
31
+ <link rel="stylesheet" href="/assets/edit-room.css">
32
+ <link rel="stylesheet" href="/assets/palette.css">
33
+ <link rel="stylesheet" href="/assets/files.css">
30
34
  </head>
31
35
  <body>
32
36
 
@@ -43,7 +47,7 @@
43
47
  <header class="join-head">
44
48
  <div class="wordmark-row"><span class="brand-mark" aria-hidden="true">OC</span><p class="wordmark" data-i18n="brand">OC Chat</p><span class="version-tag">{{version}}</span></div>
45
49
  <button id="btnJoinSettings" class="join-settings" type="button" aria-haspopup="dialog" aria-controls="chatSettings" aria-expanded="false">
46
- <svg aria-hidden="true" viewBox="0 0 24 24"><path d="M4 7h9M17 7h3M4 17h3M11 17h9"/><circle cx="15" cy="7" r="2"/><circle cx="9" cy="17" r="2"/></svg>
50
+ <svg class="fluent-icon" aria-hidden="true" viewBox="0 0 24 24"><use href="/assets/fluent-icons.svg#fluent-options-24"></use></svg>
47
51
  <span data-i18n="settings">Settings</span>
48
52
  </button>
49
53
  <p class="tagline" data-i18n="tagline">A lightweight chat room. Enter a room ID to join, or create a new one.</p>
@@ -91,7 +95,7 @@
91
95
  <div id="joinError" class="alert" role="alert" hidden></div>
92
96
  </div>
93
97
  <section id="joinPending" class="join-pending" hidden aria-labelledby="joinPendingTitle">
94
- <span class="join-pending-mark" aria-hidden="true"><svg viewBox="0 0 24 24"><rect x="5" y="10" width="14" height="10" rx="2"/><path d="M8 10V7a4 4 0 0 1 8 0v3"/></svg></span>
98
+ <span class="join-pending-mark" aria-hidden="true"><svg class="fluent-icon" aria-hidden="true" viewBox="0 0 24 24"><use href="/assets/fluent-icons.svg#fluent-lock_closed-24"></use></svg></span>
95
99
  <div class="join-pending-copy">
96
100
  <h2 id="joinPendingTitle" tabindex="-1" data-i18n="joinPendingTitle">Waiting for approval</h2>
97
101
  <p id="joinPendingBody" role="status" aria-live="polite"></p>
@@ -133,20 +137,20 @@
133
137
  <h2 id="settingsHeading" tabindex="-1" data-i18n="settings">Settings</h2>
134
138
  <p class="settings-lead" data-i18n="settingsLocalHint">Language, theme, transition, and scrolling preferences are saved in this browser.</p>
135
139
  </div>
136
- <button id="btnCloseSettings" class="reader-close settings-close" type="button" aria-label="Close" data-i18n-aria-label="close"><svg class="close-icon" aria-hidden="true" viewBox="0 0 24 24"><path d="M6 6l12 12M18 6 6 18"/></svg></button>
140
+ <button id="btnCloseSettings" class="reader-close settings-close" type="button" aria-label="Close" data-i18n-aria-label="close"><svg class="fluent-icon close-icon" aria-hidden="true" viewBox="0 0 24 24"><use href="/assets/fluent-icons.svg#fluent-dismiss-24"></use></svg></button>
137
141
  </header>
138
142
  <div class="settings-body">
139
143
  <nav class="settings-nav" role="tablist" aria-label="Settings sections" data-i18n-aria-label="settingsSections">
140
144
  <button id="settingsTabGeneral" class="settings-tab" type="button" role="tab" aria-selected="true" aria-controls="settingsPanelGeneral" data-settings-tab="general">
141
- <svg aria-hidden="true" viewBox="0 0 24 24"><path d="M4 7h9M17 7h3M4 17h3M11 17h9"/><circle cx="15" cy="7" r="2"/><circle cx="9" cy="17" r="2"/></svg>
145
+ <svg class="fluent-icon" aria-hidden="true" viewBox="0 0 24 24"><use href="/assets/fluent-icons.svg#fluent-options-24"></use></svg>
142
146
  <span data-i18n="settingsGeneral">General</span>
143
147
  </button>
144
148
  <button id="settingsTabAppearance" class="settings-tab" type="button" role="tab" aria-selected="false" aria-controls="settingsPanelAppearance" tabindex="-1" data-settings-tab="appearance">
145
- <svg aria-hidden="true" viewBox="0 0 24 24"><circle cx="12" cy="12" r="8"/><path d="M12 4v16"/><path d="M12 4a8 8 0 0 1 0 16" fill="currentColor" stroke="none"/></svg>
149
+ <svg class="fluent-icon" aria-hidden="true" viewBox="0 0 24 24"><use href="/assets/fluent-icons.svg#fluent-circle_half_fill-24"></use></svg>
146
150
  <span data-i18n="settingsAppearance">Appearance</span>
147
151
  </button>
148
152
  <button id="settingsTabConnection" class="settings-tab" type="button" role="tab" aria-selected="false" aria-controls="settingsPanelConnection" tabindex="-1" data-settings-tab="connection">
149
- <svg aria-hidden="true" viewBox="0 0 24 24"><circle cx="8" cy="12" r="3"/><path d="M11 12h9M17 12v3M20 12v2"/></svg>
153
+ <svg class="fluent-icon" aria-hidden="true" viewBox="0 0 24 24"><use href="/assets/fluent-icons.svg#fluent-plug_connected-24"></use></svg>
150
154
  <span data-i18n="settingsConnection">Connection</span>
151
155
  </button>
152
156
  </nav>
@@ -155,7 +159,7 @@
155
159
  <div class="settings-row">
156
160
  <div class="settings-copy">
157
161
  <label class="settings-label locale-label" for="localeSelectSettings">
158
- <svg class="locale-icon" aria-hidden="true" viewBox="0 0 24 24"><circle cx="12" cy="12" r="9"/><path d="M3 12h18M12 3c2.5 2.7 3.8 5.7 3.8 9S14.5 18.3 12 21M12 3C9.5 5.7 8.2 8.7 8.2 12s1.3 6.3 3.8 9"/></svg>
162
+ <svg class="fluent-icon locale-icon" aria-hidden="true" viewBox="0 0 24 24"><use href="/assets/fluent-icons.svg#fluent-local_language-24"></use></svg>
159
163
  <span data-i18n="languageLabel">Language</span>
160
164
  </label>
161
165
  <p class="settings-hint" data-i18n="settingsLanguageHint">Applies right away and is saved in this browser.</p>
@@ -178,12 +182,12 @@
178
182
  </div>
179
183
  <input id="inContentTransition" class="settings-switch" type="checkbox" role="switch" aria-describedby="contentTransitionHint">
180
184
  </div>
181
- <div class="settings-row">
185
+ <div class="settings-row settings-step-row">
182
186
  <div class="settings-copy">
183
187
  <label class="settings-label" for="inPageStep" data-i18n="pageStep">Page scroll distance</label>
184
188
  <p id="pageStepHint" class="settings-hint" data-i18n="pageStepHint">How far PageUp and PageDown move per press, as a percentage of the conversation height. Default 90%.</p>
185
189
  </div>
186
- <div class="settings-number"><input id="inPageStep" class="input" type="number" min="20" max="200" step="5" inputmode="numeric" value="90" aria-describedby="pageStepHint"><span class="settings-number-unit" aria-hidden="true">%</span></div>
190
+ <div class="settings-range"><input id="inPageStep" type="range" min="20" max="200" step="5" value="90" aria-describedby="pageStepHint"><output id="pageStepValue" class="settings-range-value" for="inPageStep">90%</output></div>
187
191
  </div>
188
192
  </section>
189
193
  <section id="settingsPanelAppearance" class="settings-panel" role="tabpanel" aria-labelledby="settingsTabAppearance" hidden>
@@ -241,30 +245,30 @@
241
245
  <section id="chatView" class="view" hidden>
242
246
  <aside id="roomRail" class="room-rail" aria-label="Rooms" data-i18n-aria-label="roomsLabel">
243
247
  <div class="rail-brand"><span class="brand-mark">OC</span><span data-i18n="brand">OC Chat</span><span class="version-tag">{{version}}</span></div>
244
- <div class="rail-label"><span data-i18n="existingRooms">Rooms</span><span class="rail-tools"><button id="btnNewRoom" class="icon-btn" type="button" aria-label="Create a room" data-i18n-aria-label="newRoom" aria-haspopup="dialog" aria-controls="createRoomDialog" aria-expanded="false"><svg aria-hidden="true" viewBox="0 0 24 24"><path d="M12 5v14M5 12h14"/></svg></button><button id="btnRefreshRooms" class="icon-btn" type="button" aria-label="Refresh rooms" data-i18n-aria-label="refreshRooms"><svg aria-hidden="true" viewBox="0 0 24 24"><path d="M20 7v5h-5M4 17v-5h5"/><path d="M5.6 9a7 7 0 0 1 11.8-2L20 12M4 12l2.6 5a7 7 0 0 0 11.8-2"/></svg></button></span></div>
248
+ <div class="rail-label"><span data-i18n="existingRooms">Rooms</span><span class="rail-tools"><button id="btnNewRoom" class="icon-btn" type="button" aria-label="Create a room" data-i18n-aria-label="newRoom" aria-haspopup="dialog" aria-controls="createRoomDialog" aria-expanded="false"><svg class="fluent-icon" aria-hidden="true" viewBox="0 0 24 24"><use href="/assets/fluent-icons.svg#fluent-add-24"></use></svg></button><button id="btnRefreshRooms" class="icon-btn" type="button" aria-label="Refresh rooms" data-i18n-aria-label="refreshRooms"><svg class="fluent-icon" aria-hidden="true" viewBox="0 0 24 24"><use href="/assets/fluent-icons.svg#fluent-arrow_sync-24"></use></svg></button></span></div>
245
249
  <ul id="roomListChat" class="rail-rooms"></ul>
246
250
  <p id="roomListChatEmpty" class="hint" data-i18n="noRooms" hidden></p>
247
251
 
248
252
  <div id="railInstall" class="rail-install" hidden>
249
- <button id="btnRailInstall" class="btn ghost small rail-install-btn" type="button"><svg aria-hidden="true" viewBox="0 0 24 24"><path d="M12 4v10M8 10l4 4 4-4M5 19h14"/></svg><span data-i18n="installAction">Install</span></button>
253
+ <button id="btnRailInstall" class="btn ghost small rail-install-btn" type="button"><svg class="fluent-icon" aria-hidden="true" viewBox="0 0 24 24"><use href="/assets/fluent-icons.svg#fluent-arrow_download-24"></use></svg><span data-i18n="installAction">Install</span></button>
250
254
  <p id="railInstallGuide" class="hint" data-i18n="installIosGuide" hidden>Tap Share, then Add to Home Screen.</p>
251
255
  </div>
252
256
  <div class="rail-foot">
253
257
  <div class="anchor user-menu-anchor">
254
258
  <button id="btnSettings" class="user-menu-trigger" type="button" aria-label="Your profile and settings" data-i18n-aria-label="profileMenu" aria-haspopup="dialog" aria-controls="chatSettings" aria-expanded="false">
255
- <span id="profileAvatar" class="rail-avatar" aria-hidden="true">?</span><span id="railIdentity"></span><span class="user-menu-caret" aria-hidden="true">⌃</span>
259
+ <span id="profileAvatar" class="rail-avatar" aria-hidden="true">?</span><span id="railIdentity"></span><svg class="fluent-icon user-menu-caret" aria-hidden="true" viewBox="0 0 24 24"><use href="/assets/fluent-icons.svg#fluent-chevron_up-24"></use></svg>
256
260
  </button>
257
261
  </div>
258
262
  </div>
259
263
  </aside>
260
264
  <dialog id="createRoomDialog" class="admin-dialog create-room-dialog" aria-labelledby="createRoomHeading" aria-describedby="createRoomHint">
261
265
  <header class="create-room-head">
262
- <span class="create-room-mark" aria-hidden="true"><svg viewBox="0 0 24 24"><path d="M12 5v14M5 12h14"/></svg></span>
266
+ <span class="create-room-mark" aria-hidden="true"><svg class="fluent-icon" aria-hidden="true" viewBox="0 0 24 24"><use href="/assets/fluent-icons.svg#fluent-add-24"></use></svg></span>
263
267
  <div class="create-room-heading">
264
268
  <p class="create-room-eyebrow" data-i18n="existingRooms">Rooms</p>
265
269
  <h2 id="createRoomHeading" data-i18n="createRoomTitle">Create a room</h2>
266
270
  </div>
267
- <button id="btnCloseCreateRoom" class="reader-close" type="button" aria-label="Close" data-i18n-aria-label="close"><svg class="close-icon" aria-hidden="true" viewBox="0 0 24 24"><path d="M6 6l12 12M18 6 6 18"/></svg></button>
271
+ <button id="btnCloseCreateRoom" class="reader-close" type="button" aria-label="Close" data-i18n-aria-label="close"><svg class="fluent-icon close-icon" aria-hidden="true" viewBox="0 0 24 24"><use href="/assets/fluent-icons.svg#fluent-dismiss-24"></use></svg></button>
268
272
  </header>
269
273
  <p id="createRoomHint" class="create-room-hint" data-i18n="createRoomHint">Start a new room and invite people with its ID.</p>
270
274
  <form id="railRoomForm" class="create-room-form" novalidate>
@@ -286,32 +290,98 @@
286
290
  </div>
287
291
  </form>
288
292
  </dialog>
289
- <dialog id="editRoomDialog" class="admin-dialog" aria-labelledby="editRoomHeading">
290
- <header class="admin-dialog-head"><h2 id="editRoomHeading" data-i18n="editRoom">Edit room</h2><div class="admin-dialog-actions"><button id="btnCloseEditRoom" class="reader-close" type="button" aria-label="Close" data-i18n-aria-label="close"><svg class="close-icon" aria-hidden="true" viewBox="0 0 24 24"><path d="M6 6l12 12M18 6 6 18"/></svg></button></div></header>
291
- <p id="editRoomStatus" class="hint" role="status" aria-live="polite"></p>
292
- <form id="editRoomForm" class="admin-guide">
293
- <label class="field"><span class="field-label" data-i18n="roomNameLabel">Room name</span><input id="editRoomName" class="input" maxlength="64" autocomplete="off" required></label>
294
- <label class="field"><span class="field-label" data-i18n="roomDescriptionLabel">Description</span><textarea id="editRoomDescription" class="input" rows="3" maxlength="2000"></textarea></label>
295
- <div class="join-policy admin-join-policy">
296
- <input id="editRoomJoinPolicy" type="checkbox" role="switch" aria-describedby="editRoomJoinPolicyHint">
297
- <label for="editRoomJoinPolicy" class="join-policy-label" data-i18n="requireApproval">Require approval to join</label>
298
- </div>
299
- <p id="editRoomJoinPolicyHint" class="hint join-policy-hint" data-i18n="joinPolicyEditHint">New members need a human administrator's approval. Turning this off clears all pending requests.</p>
300
- <fieldset class="admin-fieldset"><legend class="field-label" data-i18n="adminIdsLabel">Human administrators</legend><div id="editRoomAdminIds" class="admin-checklist"></div><p id="editRoomAdminIdsEmpty" class="hint" data-i18n="adminIdsEmpty" hidden>No other members are in this room yet.</p><p class="hint" data-i18n="adminIdsHint">These members can edit room details, manage members, delete files, and choose a successor. The owner always has the same powers.</p></fieldset>
301
- <label class="field"><span class="field-label" data-i18n="successorLabel">Successor if the owner leaves</span><select id="editRoomSuccessor" class="admin-select"></select></label>
302
- <p class="hint" data-i18n="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.</p>
303
- <div id="editRoomOwnerOnly">
304
- <label class="field"><span class="field-label" data-i18n="adminAgentLabel">Administrator agent</span><select id="editRoomAdmin" class="admin-select"></select></label>
305
- <p class="hint" data-i18n="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.</p>
306
- <label class="field"><span class="field-label" data-i18n="newOwnerLabel">New owner</span><select id="editRoomOwner" class="admin-select"></select></label>
307
- <p class="hint" data-i18n="newOwnerHint">Hand the room to another person who is in it. Only the owner can do this; agents cannot own a room.</p>
293
+ <dialog id="editRoomDialog" class="admin-dialog edit-room-dialog" aria-labelledby="editRoomHeading">
294
+ <header class="admin-dialog-head edit-room-head">
295
+ <h2 id="editRoomHeading" tabindex="-1" data-i18n="editRoom">Edit room</h2>
296
+ <div class="admin-dialog-actions"><button id="btnCloseEditRoom" class="reader-close" type="button" aria-label="Close" data-i18n-aria-label="close"><svg class="fluent-icon close-icon" aria-hidden="true" viewBox="0 0 24 24"><use href="/assets/fluent-icons.svg#fluent-dismiss-24"></use></svg></button></div>
297
+ </header>
298
+ <form id="editRoomForm" class="edit-room-form" novalidate>
299
+ <div class="edit-room-body">
300
+ <nav class="settings-nav edit-room-nav" role="tablist" aria-label="Edit room sections" data-i18n-aria-label="editRoomSections">
301
+ <button id="editRoomTabDetails" class="settings-tab" type="button" role="tab" aria-selected="true" aria-controls="editRoomPanelDetails" data-edit-room-tab="details">
302
+ <svg class="fluent-icon" aria-hidden="true" viewBox="0 0 24 24"><use href="/assets/fluent-icons.svg#fluent-document-24"></use></svg>
303
+ <span data-i18n="editRoomDetails">Room details</span>
304
+ </button>
305
+ <button id="editRoomTabJoining" class="settings-tab" type="button" role="tab" aria-selected="false" aria-controls="editRoomPanelJoining" tabindex="-1" data-edit-room-tab="joining">
306
+ <svg class="fluent-icon" aria-hidden="true" viewBox="0 0 24 24"><use href="/assets/fluent-icons.svg#fluent-shield_checkmark-24"></use></svg>
307
+ <span data-i18n="editRoomJoining">Joining &amp; approval</span>
308
+ </button>
309
+ <button id="editRoomTabMembers" class="settings-tab" type="button" role="tab" aria-selected="false" aria-controls="editRoomPanelMembers" tabindex="-1" data-edit-room-tab="members">
310
+ <svg class="fluent-icon" aria-hidden="true" viewBox="0 0 24 24"><use href="/assets/fluent-icons.svg#fluent-people-24"></use></svg>
311
+ <span data-i18n="editRoomMembers">Members &amp; roles</span>
312
+ </button>
313
+ <button id="editRoomTabOwnership" class="settings-tab" type="button" role="tab" aria-selected="false" aria-controls="editRoomPanelOwnership" tabindex="-1" data-edit-room-tab="ownership">
314
+ <svg class="fluent-icon" aria-hidden="true" viewBox="0 0 24 24"><use href="/assets/fluent-icons.svg#fluent-key-24"></use></svg>
315
+ <span data-i18n="editRoomOwnership">Ownership</span>
316
+ </button>
317
+ </nav>
318
+ <div class="settings-content edit-room-content">
319
+ <section id="editRoomPanelDetails" class="settings-panel edit-room-panel" role="tabpanel" aria-labelledby="editRoomTabDetails">
320
+ <label class="field"><span class="field-label" data-i18n="roomNameLabel">Room name</span><input id="editRoomName" class="input" maxlength="64" autocomplete="off" required></label>
321
+ <label class="field"><span class="field-label" data-i18n="roomDescriptionLabel">Description</span><textarea id="editRoomDescription" class="input" rows="3" maxlength="2000"></textarea></label>
322
+ </section>
323
+ <section id="editRoomPanelJoining" class="settings-panel edit-room-panel" role="tabpanel" aria-labelledby="editRoomTabJoining" hidden>
324
+ <div class="join-policy admin-join-policy">
325
+ <input id="editRoomJoinPolicy" type="checkbox" role="switch" aria-describedby="editRoomJoinPolicyHint">
326
+ <label for="editRoomJoinPolicy" class="join-policy-label" data-i18n="requireApproval">Require approval to join</label>
327
+ </div>
328
+ <p id="editRoomJoinPolicyHint" class="hint join-policy-hint" data-i18n="joinPolicyEditHint">New members need a human administrator's approval. Turning this off clears all pending requests.</p>
329
+ </section>
330
+ <section id="editRoomPanelMembers" class="settings-panel edit-room-panel" role="tabpanel" aria-labelledby="editRoomTabMembers" hidden>
331
+ <fieldset class="admin-fieldset"><legend class="field-label" data-i18n="adminIdsLabel">Human administrators</legend><div id="editRoomAdminIds" class="admin-checklist"></div><p id="editRoomAdminIdsEmpty" class="hint" data-i18n="adminIdsEmpty" hidden>No other members are in this room yet.</p><p class="hint" data-i18n="adminIdsHint">These members can edit room details, manage members, delete files, and choose a successor. The owner always has the same powers.</p></fieldset>
332
+ <label class="field"><span class="field-label" data-i18n="successorLabel">Successor if the owner leaves</span><select id="editRoomSuccessor" class="admin-select"></select></label>
333
+ <p class="hint edit-room-hint" data-i18n="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.</p>
334
+ <p id="editRoomOwnerOnlyNote" class="hint edit-room-owner-note" data-i18n="ownerOnlySettingsNote" hidden>Only the owner can change the administrator agent or hand off the room.</p>
335
+ </section>
336
+ <section id="editRoomPanelOwnership" class="settings-panel edit-room-panel" role="tabpanel" aria-labelledby="editRoomTabOwnership" hidden>
337
+ <div id="editRoomOwnerOnly">
338
+ <label class="field"><span class="field-label" data-i18n="adminAgentLabel">Administrator agent</span><select id="editRoomAdmin" class="admin-select"></select></label>
339
+ <p class="hint edit-room-hint" data-i18n="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.</p>
340
+ <label class="field"><span class="field-label" data-i18n="newOwnerLabel">New owner</span><select id="editRoomOwner" class="admin-select"></select></label>
341
+ <p class="hint edit-room-hint" data-i18n="newOwnerHint">Hand the room to another person who is in it. Only the owner can do this; agents cannot own a room.</p>
342
+ </div>
343
+ </section>
344
+ </div>
308
345
  </div>
309
- <p id="editRoomOwnerOnlyNote" class="hint" data-i18n="ownerOnlySettingsNote" hidden>Only the owner can change the administrator agent or hand off the room.</p>
310
- <button class="btn primary small" type="submit" data-i18n="save">Save</button>
346
+ <footer class="edit-room-footer">
347
+ <p id="editRoomStatus" class="hint edit-room-status" role="status" aria-live="polite"></p>
348
+ <div class="edit-room-actions">
349
+ <button id="btnCancelEditRoom" class="btn ghost small" type="button" data-i18n="cancel">Cancel</button>
350
+ <button class="btn primary small" type="submit" data-i18n="save">Save</button>
351
+ </div>
352
+ </footer>
311
353
  </form>
312
354
  </dialog>
355
+ <dialog id="filesDialog" class="admin-dialog files-dialog" aria-labelledby="filesHeading">
356
+ <header class="files-head">
357
+ <div class="files-heading">
358
+ <p class="files-eyebrow" data-i18n="filesEyebrow">Room files</p>
359
+ <h2 id="filesHeading" tabindex="-1"><span data-i18n="filesTitle">Files</span><span id="filesRoomName" class="files-room-name"></span></h2>
360
+ </div>
361
+ <div class="files-head-actions">
362
+ <button id="btnRefreshFiles" class="icon-btn" type="button" aria-label="Refresh files" data-i18n-aria-label="filesRefresh"><svg class="fluent-icon" aria-hidden="true" viewBox="0 0 24 24"><use href="/assets/fluent-icons.svg#fluent-arrow_sync-24"></use></svg></button>
363
+ <button id="btnCloseFiles" class="reader-close" type="button" aria-label="Close" data-i18n-aria-label="close"><svg class="fluent-icon close-icon" aria-hidden="true" viewBox="0 0 24 24"><use href="/assets/fluent-icons.svg#fluent-dismiss-24"></use></svg></button>
364
+ </div>
365
+ </header>
366
+ <div class="files-toolbar">
367
+ <label class="files-filter">
368
+ <span class="files-filter-label" data-i18n="filesFilter">Uploaded by</span>
369
+ <select id="filesUploader" class="input files-select"></select>
370
+ </label>
371
+ <p id="filesSummary" class="files-summary" role="status" aria-live="polite"></p>
372
+ </div>
373
+ <p id="filesError" class="alert files-error" role="alert" hidden></p>
374
+ <div class="files-scroll">
375
+ <ul id="fileList" class="file-list" aria-label="Room files" data-i18n-aria-label="filesEyebrow"></ul>
376
+ <p id="filesEmpty" class="hint files-empty" hidden></p>
377
+ <button id="btnFilesMore" class="btn ghost small files-more" type="button" data-i18n="filesLoadMore" hidden>Load more</button>
378
+ </div>
379
+ <footer class="files-foot">
380
+ <p class="hint files-hint" data-i18n="filesHint">Preview images, audio, and video. Download any file.</p>
381
+ </footer>
382
+ </dialog>
313
383
  <dialog id="reminderDialog" class="admin-dialog reminder-dialog" aria-labelledby="reminderDialogHeading">
314
- <header class="admin-dialog-head"><h2 id="reminderDialogHeading" data-i18n="reminderCreate">Create reminder</h2><div class="admin-dialog-actions"><button id="btnCloseReminder" class="reader-close" type="button" aria-label="Close" data-i18n-aria-label="close"><svg class="close-icon" aria-hidden="true" viewBox="0 0 24 24"><path d="M6 6l12 12M18 6 6 18"/></svg></button></div></header>
384
+ <header class="admin-dialog-head"><h2 id="reminderDialogHeading" data-i18n="reminderCreate">Create reminder</h2><div class="admin-dialog-actions"><button id="btnCloseReminder" class="reader-close" type="button" aria-label="Close" data-i18n-aria-label="close"><svg class="fluent-icon close-icon" aria-hidden="true" viewBox="0 0 24 24"><use href="/assets/fluent-icons.svg#fluent-dismiss-24"></use></svg></button></div></header>
315
385
  <form id="reminderForm" class="admin-guide reminder-form">
316
386
  <label class="field"><span class="field-label" data-i18n="reminderSchedule">Schedule</span><select id="reminderType" class="input"><option value="once" data-i18n="reminderOnce">One time</option><option value="cron">CRON</option></select></label>
317
387
  <label class="field" id="reminderOnceField"><span class="field-label" data-i18n="reminderDate">Date and time</span><input id="reminderAt" class="input" type="datetime-local" required></label>
@@ -325,7 +395,7 @@
325
395
  </form>
326
396
  </dialog>
327
397
  <dialog id="announcementDialog" class="admin-dialog announcement-dialog" aria-labelledby="announcementDialogHeading">
328
- <header class="admin-dialog-head"><h2 id="announcementDialogHeading" data-i18n="announcementNew">New announcement</h2><div class="admin-dialog-actions"><button id="btnCloseAnnouncement" class="reader-close" type="button" aria-label="Close" data-i18n-aria-label="close"><svg class="close-icon" aria-hidden="true" viewBox="0 0 24 24"><path d="M6 6l12 12M18 6 6 18"/></svg></button></div></header>
398
+ <header class="admin-dialog-head"><h2 id="announcementDialogHeading" data-i18n="announcementNew">New announcement</h2><div class="admin-dialog-actions"><button id="btnCloseAnnouncement" class="reader-close" type="button" aria-label="Close" data-i18n-aria-label="close"><svg class="fluent-icon close-icon" aria-hidden="true" viewBox="0 0 24 24"><use href="/assets/fluent-icons.svg#fluent-dismiss-24"></use></svg></button></div></header>
329
399
  <form id="announcementForm" class="admin-guide announcement-form">
330
400
  <label class="field"><span class="field-label" data-i18n="announcementName">Name</span><input id="announcementName" class="input" maxlength="64" autocomplete="off" required></label>
331
401
  <label class="field"><span class="field-label" data-i18n="announcementContent">Content</span><textarea id="announcementContent" class="input" rows="4" maxlength="5000" aria-describedby="announcementCount"></textarea></label>
@@ -337,7 +407,7 @@
337
407
  <button id="roomDrawerBackdrop" class="room-drawer-backdrop" type="button" aria-label="Close room list" data-i18n-aria-label="closeRoomList" hidden></button>
338
408
  <header class="chat-head">
339
409
  <div class="chat-head-main">
340
- <div class="room-title-row"><button id="btnRoomsDrawer" class="chip rooms-drawer-trigger" type="button" aria-label="Open room list" data-i18n-aria-label="roomsMenu" aria-controls="roomRail" aria-expanded="false"><svg class="action-icon" aria-hidden="true" viewBox="0 0 24 24"><path d="M4 6h16M4 12h16M4 18h16"/></svg><span class="action-label">Rooms</span></button><h1 id="roomName"></h1></div>
410
+ <div class="room-title-row"><button id="btnRoomsDrawer" class="chip rooms-drawer-trigger" type="button" aria-label="Open room list" data-i18n-aria-label="roomsMenu" aria-controls="roomRail" aria-expanded="false"><svg class="fluent-icon action-icon" aria-hidden="true" viewBox="0 0 24 24"><use href="/assets/fluent-icons.svg#fluent-navigation-24"></use></svg><span class="action-label">Rooms</span></button><h1 id="roomName"></h1></div>
341
411
  <p class="room-meta">
342
412
  <button type="button" id="btnCopyId" class="copy-id" aria-label="Copy room ID" data-i18n-aria-label="copyRoomId" title="Click to copy the full room ID" data-i18n-title="copyRoomIdTitle">
343
413
  <span class="mono" id="roomIdShort"></span><span class="copy-ok" data-i18n="copied">Copied</span>
@@ -349,7 +419,7 @@
349
419
  <div class="chat-head-actions">
350
420
  <div class="anchor questions-anchor">
351
421
  <button class="chip questions-trigger" type="button" id="btnQuestions" aria-haspopup="true" aria-expanded="false" aria-controls="questionPanel">
352
- <svg class="action-icon" aria-hidden="true" viewBox="0 0 24 24"><path d="M9.5 9a2.5 2.5 0 1 1 4.6 1.4c-.7.9-2.1 1.3-2.1 2.8M12 17.5h.01"/><circle cx="12" cy="12" r="9"/></svg><span class="action-label" data-i18n="questions">Questions</span><span id="questionBadge" class="question-badge" hidden></span>
422
+ <svg class="fluent-icon action-icon" aria-hidden="true" viewBox="0 0 24 24"><use href="/assets/fluent-icons.svg#fluent-question_circle-24"></use></svg><span class="action-label" data-i18n="questions">Questions</span><span id="questionBadge" class="question-badge" hidden></span>
353
423
  </button>
354
424
  <section class="panel question-panel" id="questionPanel" aria-labelledby="questionHeading" hidden>
355
425
  <div class="question-panel-head"><h3 id="questionHeading" tabindex="-1" data-i18n="pendingQuestions">Pending questions</h3>
@@ -360,22 +430,14 @@
360
430
  </section>
361
431
  </div>
362
432
  <div class="anchor">
363
- <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>
433
+ <button class="chip" type="button" id="btnReminders" aria-haspopup="true" aria-expanded="false" aria-controls="reminderPanel"><svg class="fluent-icon action-icon" aria-hidden="true" viewBox="0 0 24 24"><use href="/assets/fluent-icons.svg#fluent-alert-24"></use></svg><span class="action-label" data-i18n="reminders">Reminders</span></button>
364
434
  <section class="panel reminder-panel" id="reminderPanel" aria-labelledby="reminderHeading" hidden>
365
435
  <div class="announcement-head"><h3 id="reminderHeading" tabindex="-1" data-i18n="reminders">Reminders</h3><div class="reminder-tools"><button type="button" id="btnNewReminder" class="btn primary small" data-i18n="reminderCreate">Create reminder</button><button type="button" id="btnRefreshReminders" class="question-refresh" data-i18n="refreshQuestions">Refresh</button></div></div>
366
436
  <p id="reminderStatus" class="hint" role="status" aria-live="polite"></p><ul id="reminderList" class="reminder-list"></ul>
367
437
  </section>
368
438
  </div>
369
439
  <div class="anchor">
370
- <button class="chip" type="button" id="btnAnnouncements" aria-haspopup="true" aria-expanded="false" aria-controls="announcementPanel"><svg class="action-icon" aria-hidden="true" viewBox="0 0 24 24"><path d="M5 4h14v16H5zM8 8h8M8 12h8M8 16h5"/></svg><span class="action-label" data-i18n="announcements">Announcements</span></button>
371
- <section class="panel announcement-panel" id="announcementPanel" aria-labelledby="announcementHeading" hidden>
372
- <div class="announcement-head"><h3 id="announcementHeading" tabindex="-1" data-i18n="announcements">Announcements</h3><div class="announcement-tools"><button type="button" id="btnNewAnnouncement" class="btn primary small" aria-haspopup="dialog" data-i18n="announcementNew">New announcement</button><button type="button" id="btnRefreshAnnouncements" class="question-refresh" data-i18n="refreshQuestions">Refresh</button></div></div>
373
- <p id="announcementStatus" class="hint" role="status" aria-live="polite"></p>
374
- <ul id="announcementList" class="announcement-list" aria-label="Announcements" data-i18n-aria-label="announcements"></ul>
375
- </section>
376
- </div>
377
- <div class="anchor">
378
- <button class="chip" type="button" id="btnMembers" aria-label="Members" data-i18n-aria-label="members" aria-haspopup="true" aria-expanded="false"><svg class="action-icon" aria-hidden="true" viewBox="0 0 24 24"><circle cx="9" cy="8" r="3"/><path d="M3.5 19v-1.5a5.5 5.5 0 0 1 11 0V19zM16 5.5a3 3 0 0 1 0 5.8M17 14a4.5 4.5 0 0 1 3.5 4.4V19h-3"/></svg><span class="action-label" data-i18n="members">Members</span><span id="joinRequestBadge" class="question-badge join-request-badge" aria-hidden="true" hidden><span id="joinRequestBadgeCount"></span></span></button>
440
+ <button class="chip" type="button" id="btnMembers" aria-label="Members" data-i18n-aria-label="members" aria-haspopup="true" aria-expanded="false"><svg class="fluent-icon action-icon" aria-hidden="true" viewBox="0 0 24 24"><use href="/assets/fluent-icons.svg#fluent-people-24"></use></svg><span class="action-label" data-i18n="members">Members</span><span id="joinRequestBadge" class="question-badge join-request-badge" aria-hidden="true" hidden><span id="joinRequestBadgeCount"></span></span></button>
379
441
  <div class="panel" id="memberPanel" hidden>
380
442
  <h3 data-i18n="members">Members</h3>
381
443
  <section id="joinRequests" class="join-requests" hidden aria-labelledby="joinRequestsTitle">
@@ -393,12 +455,19 @@
393
455
  </div>
394
456
  </div>
395
457
  <div class="anchor room-options-anchor">
396
- <button class="chip" type="button" id="btnRoomOptions" aria-haspopup="true" aria-expanded="false" aria-controls="roomOptions"><svg class="action-icon" aria-hidden="true" viewBox="0 0 24 24"><circle cx="5" cy="12" r="1"/><circle cx="12" cy="12" r="1"/><circle cx="19" cy="12" r="1"/></svg><span class="action-label" data-i18n="roomOptions">Options</span></button>
458
+ <button class="chip" type="button" id="btnRoomOptions" aria-haspopup="true" aria-expanded="false" aria-controls="roomOptions"><svg class="fluent-icon action-icon" aria-hidden="true" viewBox="0 0 24 24"><use href="/assets/fluent-icons.svg#fluent-more_horizontal-24"></use></svg><span class="action-label" data-i18n="roomOptions">Options</span></button>
397
459
  <div class="panel room-options-panel" id="roomOptions" hidden>
398
- <button class="menu-action" type="button" id="btnEditRoom" data-i18n="editRoom">Edit room</button>
399
- <button class="menu-action" type="button" id="btnLeave" data-i18n="leave">Leave room</button>
400
- <button class="menu-action danger-text" type="button" id="btnDeleteRoom" data-i18n="deleteRoom">Delete room</button>
460
+ <button class="menu-action" type="button" id="btnAnnouncements" aria-controls="announcementPanel"><svg class="fluent-icon" aria-hidden="true" viewBox="0 0 24 24"><use href="/assets/fluent-icons.svg#fluent-megaphone-24"></use></svg><span data-i18n="announcements">Announcements</span></button>
461
+ <button class="menu-action files-menu-action" type="button" id="btnFiles"><svg class="fluent-icon" aria-hidden="true" viewBox="0 0 24 24"><use href="/assets/fluent-icons.svg#fluent-folder-24"></use></svg><span data-i18n="filesTitle">Files</span></button>
462
+ <button class="menu-action" type="button" id="btnEditRoom"><svg class="fluent-icon" aria-hidden="true" viewBox="0 0 24 24"><use href="/assets/fluent-icons.svg#fluent-edit-24"></use></svg><span data-i18n="editRoom">Edit room</span></button>
463
+ <button class="menu-action" type="button" id="btnLeave"><svg class="fluent-icon" aria-hidden="true" viewBox="0 0 24 24"><use href="/assets/fluent-icons.svg#fluent-arrow_exit-24"></use></svg><span data-i18n="leave">Leave room</span></button>
464
+ <button class="menu-action danger-text" type="button" id="btnDeleteRoom"><svg class="fluent-icon" aria-hidden="true" viewBox="0 0 24 24"><use href="/assets/fluent-icons.svg#fluent-delete-24"></use></svg><span data-i18n="deleteRoom">Delete room</span></button>
401
465
  </div>
466
+ <section class="panel announcement-panel" id="announcementPanel" aria-labelledby="announcementHeading" hidden>
467
+ <div class="announcement-head"><h3 id="announcementHeading" tabindex="-1" data-i18n="announcements">Announcements</h3><div class="announcement-tools"><button type="button" id="btnNewAnnouncement" class="btn primary small" aria-haspopup="dialog" data-i18n="announcementNew">New announcement</button><button type="button" id="btnRefreshAnnouncements" class="question-refresh" data-i18n="refreshQuestions">Refresh</button></div></div>
468
+ <p id="announcementStatus" class="hint" role="status" aria-live="polite"></p>
469
+ <ul id="announcementList" class="announcement-list" aria-label="Announcements" data-i18n-aria-label="announcements"></ul>
470
+ </section>
402
471
  </div>
403
472
  </div>
404
473
  </header>
@@ -414,14 +483,14 @@
414
483
  <p id="msgEmpty" class="chat-empty" data-i18n="noMessages">No messages yet. Say something.</p>
415
484
  </div>
416
485
  <button type="button" id="btnJump" class="jump" aria-label="Back to latest messages" data-i18n-aria-label="latestMessages" hidden>
417
- <span aria-hidden="true">↓</span><span class="badge" id="jumpBadge" hidden></span>
486
+ <svg class="fluent-icon" aria-hidden="true" viewBox="0 0 24 24"><use href="/assets/fluent-icons.svg#fluent-arrow_down-24"></use></svg><span class="badge" id="jumpBadge" hidden></span>
418
487
  </button>
419
488
  </div>
420
489
 
421
490
  <aside id="readerPanel" class="reader-panel" role="dialog" aria-modal="false" aria-labelledby="readerHeading" hidden>
422
491
  <div class="reader-panel-head">
423
492
  <div><p id="readerCount" class="hint"></p><h2 id="readerHeading" tabindex="-1" data-i18n="readerPanelTitle">Message readers</h2></div>
424
- <button type="button" id="btnCloseReaders" class="reader-close" data-i18n-aria-label="close" aria-label="Close"><svg class="close-icon" aria-hidden="true" viewBox="0 0 24 24"><path d="M6 6l12 12M18 6 6 18"/></svg></button>
493
+ <button type="button" id="btnCloseReaders" class="reader-close" data-i18n-aria-label="close" aria-label="Close"><svg class="fluent-icon close-icon" aria-hidden="true" viewBox="0 0 24 24"><use href="/assets/fluent-icons.svg#fluent-dismiss-24"></use></svg></button>
425
494
  </div>
426
495
  <ul id="readerList" class="receipt-reader-list" aria-label="Message readers" data-i18n-aria-label="readerPanelTitle"></ul>
427
496
  </aside>
@@ -443,7 +512,7 @@
443
512
  <p id="attachmentStatus" class="attachment-status" role="status" aria-live="polite"></p>
444
513
  </section>
445
514
  <div class="composer-row">
446
- <button class="attachment-button" type="button" id="btnAddAttachments" aria-label="Add files" data-i18n-aria-label="addFiles" aria-controls="attachmentPicker" disabled><svg aria-hidden="true" viewBox="0 0 24 24"><path d="m21.44 11.05-9.19 9.19a6 6 0 0 1-8.49-8.49l9.19-9.19a4 4 0 0 1 5.66 5.66l-9.2 9.19a2 2 0 0 1-2.82-2.83l8.49-8.48"/></svg></button>
515
+ <button class="attachment-button" type="button" id="btnAddAttachments" aria-label="Add files" data-i18n-aria-label="addFiles" aria-controls="attachmentPicker" disabled><svg class="fluent-icon" aria-hidden="true" viewBox="0 0 24 24"><use href="/assets/fluent-icons.svg#fluent-attach-24"></use></svg></button>
447
516
  <input id="attachmentPicker" type="file" multiple hidden>
448
517
  <div id="msgInput" class="input message-editor" data-empty="true" role="textbox" aria-multiline="true" aria-label="Message" data-i18n-aria-label="messagePlaceholder" aria-placeholder="Type a message, Enter to send, Shift+Enter for a new line" data-i18n-aria-placeholder="messagePlaceholder" aria-autocomplete="list" aria-controls="mentionPicker" aria-expanded="false" aria-keyshortcuts="Enter Shift+Enter" enterkeyhint="send" autocapitalize="sentences" spellcheck="true" contenteditable="false" aria-disabled="true" tabindex="-1"></div>
449
518
  <button class="btn primary" type="button" id="btnSend" data-i18n="send" disabled>Send</button>
@@ -461,18 +530,18 @@
461
530
 
462
531
  <!-- Full-screen view of an image already loaded in the message list. -->
463
532
  <dialog id="imageDialog" class="image-dialog" aria-label="Image preview" data-i18n-aria-label="imagePreviewTitle">
464
- <button id="btnCloseImage" class="image-dialog-close" type="button" aria-label="Close" data-i18n-aria-label="close"><svg class="close-icon" aria-hidden="true" viewBox="0 0 24 24"><path d="M6 6l12 12M18 6 6 18"/></svg></button>
533
+ <button id="btnCloseImage" class="image-dialog-close" type="button" aria-label="Close" data-i18n-aria-label="close"><svg class="fluent-icon close-icon" aria-hidden="true" viewBox="0 0 24 24"><use href="/assets/fluent-icons.svg#fluent-dismiss-24"></use></svg></button>
465
534
  <div class="image-dialog-tools" role="group" aria-label="Image zoom" data-i18n-aria-label="imageZoomControls">
466
- <button id="btnZoomOut" class="image-dialog-tool" type="button" aria-label="Zoom out" data-i18n-aria-label="zoomOut">−</button>
535
+ <button id="btnZoomOut" class="image-dialog-tool" type="button" aria-label="Zoom out" data-i18n-aria-label="zoomOut"><svg class="fluent-icon" aria-hidden="true" viewBox="0 0 24 24"><use href="/assets/fluent-icons.svg#fluent-subtract-24"></use></svg></button>
467
536
  <button id="btnZoomReset" class="image-dialog-tool image-dialog-reset" type="button" aria-label="Reset zoom" data-i18n-aria-label="zoomReset"><span id="zoomLevel">100%</span></button>
468
- <button id="btnZoomIn" class="image-dialog-tool" type="button" aria-label="Zoom in" data-i18n-aria-label="zoomIn">+</button>
537
+ <button id="btnZoomIn" class="image-dialog-tool" type="button" aria-label="Zoom in" data-i18n-aria-label="zoomIn"><svg class="fluent-icon" aria-hidden="true" viewBox="0 0 24 24"><use href="/assets/fluent-icons.svg#fluent-add-24"></use></svg></button>
469
538
  </div>
470
539
  <img id="imageDialogImage" alt="">
471
540
  </dialog>
472
541
 
473
542
  <!-- Shown when someone who is not the room owner reaches for the settings. -->
474
543
  <dialog id="ownerOnlyDialog" class="admin-dialog" aria-labelledby="ownerOnlyHeading">
475
- <header class="admin-dialog-head"><h2 id="ownerOnlyHeading" data-i18n="roomOwnerOnlyTitle">Owner or administrator only</h2><div class="admin-dialog-actions"><button id="btnCloseOwnerOnly" class="reader-close" type="button" aria-label="Close" data-i18n-aria-label="close"><svg class="close-icon" aria-hidden="true" viewBox="0 0 24 24"><path d="M6 6l12 12M18 6 6 18"/></svg></button></div></header>
544
+ <header class="admin-dialog-head"><h2 id="ownerOnlyHeading" data-i18n="roomOwnerOnlyTitle">Owner or administrator only</h2><div class="admin-dialog-actions"><button id="btnCloseOwnerOnly" class="reader-close" type="button" aria-label="Close" data-i18n-aria-label="close"><svg class="fluent-icon close-icon" aria-hidden="true" viewBox="0 0 24 24"><use href="/assets/fluent-icons.svg#fluent-dismiss-24"></use></svg></button></div></header>
476
545
  <p id="ownerOnlyNote" class="hint"></p>
477
546
  <button id="btnOwnerOnlyOk" class="btn ghost small" type="button" data-i18n="close">Close</button>
478
547
  </dialog>
@@ -486,11 +555,39 @@
486
555
  </div>
487
556
  </dialog>
488
557
 
558
+ <!-- Alt+Space: message search and common commands in one keyboard-first surface. -->
559
+ <dialog id="paletteDialog" class="admin-dialog palette-dialog" aria-labelledby="paletteHeading" aria-describedby="paletteHint">
560
+ <header class="palette-head">
561
+ <div class="palette-heading">
562
+ <p id="paletteCombo" class="palette-eyebrow">Alt + Space</p>
563
+ <h2 id="paletteHeading" data-i18n="paletteTitle">Search and commands</h2>
564
+ </div>
565
+ <div class="palette-head-actions">
566
+ <button id="paletteScope" class="chip palette-scope" type="button" data-scope="room" aria-label="Search scope">
567
+ <svg class="fluent-icon" aria-hidden="true" viewBox="0 0 24 24"><use href="/assets/fluent-icons.svg#fluent-arrow_swap-24"></use></svg>
568
+ <span id="paletteScopeLabel">This room</span>
569
+ <kbd class="keys-key" aria-hidden="true">Tab</kbd>
570
+ </button>
571
+ <button id="btnClosePalette" class="reader-close" type="button" aria-label="Close" data-i18n-aria-label="close"><svg class="fluent-icon close-icon" aria-hidden="true" viewBox="0 0 24 24"><use href="/assets/fluent-icons.svg#fluent-dismiss-24"></use></svg></button>
572
+ </div>
573
+ </header>
574
+ <div class="palette-search">
575
+ <svg class="fluent-icon" aria-hidden="true" viewBox="0 0 24 24"><use href="/assets/fluent-icons.svg#fluent-search-24"></use></svg>
576
+ <input id="paletteInput" class="input palette-input" type="text" role="combobox" aria-autocomplete="list" aria-expanded="true" aria-controls="paletteList" aria-describedby="paletteHint" aria-label="Search messages" data-i18n-aria-label="paletteSearchLabel" placeholder="Search messages, or type > for commands" data-i18n-placeholder="palettePlaceholder" autocomplete="off" autocapitalize="off" spellcheck="false" enterkeyhint="go">
577
+ <span id="paletteMode" class="palette-mode" aria-hidden="true">Search</span>
578
+ </div>
579
+ <p id="paletteStatus" class="hint palette-status" role="status" aria-live="polite"></p>
580
+ <ul id="paletteList" class="palette-list" role="listbox" aria-label="Search and commands" data-i18n-aria-label="paletteTitle"></ul>
581
+ <footer class="palette-foot">
582
+ <p id="paletteHint" class="hint palette-hint" data-i18n="paletteHint">↑↓ select · Enter open · Tab scope · Esc close</p>
583
+ </footer>
584
+ </dialog>
585
+
489
586
  <!-- The complete ChatRoom shortcut list. Alt+/ is the only visible entry. -->
490
587
  <dialog id="shortcutsDialog" class="keys-dialog" aria-labelledby="shortcutsHeading">
491
588
  <header class="keys-dialog-head">
492
589
  <h2 id="shortcutsHeading" tabindex="-1" data-i18n="shortcutsTitle">Keyboard shortcuts</h2>
493
- <button id="btnCloseShortcuts" class="reader-close" type="button" aria-label="Close" data-i18n-aria-label="close"><svg class="close-icon" aria-hidden="true" viewBox="0 0 24 24"><path d="M6 6l12 12M18 6 6 18"/></svg></button>
590
+ <button id="btnCloseShortcuts" class="reader-close" type="button" aria-label="Close" data-i18n-aria-label="close"><svg class="fluent-icon close-icon" aria-hidden="true" viewBox="0 0 24 24"><use href="/assets/fluent-icons.svg#fluent-dismiss-24"></use></svg></button>
494
591
  </header>
495
592
  <p id="shortcutsLead" class="keys-lead" data-i18n="shortcutsLead">ChatRoom shortcuts. Press Alt + / to open this list.</p>
496
593
 
@@ -502,6 +599,12 @@
502
599
  <li><span class="keys-combo"><kbd class="keys-key">↑</kbd><kbd class="keys-key">↓</kbd><span class="keys-sep">·</span><kbd class="keys-key">Enter</kbd></span><span data-i18n="shortcutsMention">Choose a member to mention</span></li>
503
600
  </ul>
504
601
  </section>
602
+ <section class="keys-section">
603
+ <h3 data-i18n="shortcutsSearch">Search and commands</h3>
604
+ <ul class="keys-list">
605
+ <li><span class="keys-combo"><kbd class="keys-key shortcut-mod">Alt</kbd><span class="keys-sep">+</span><kbd class="keys-key">Space</kbd></span><span data-i18n="shortcutsOpenPalette">Open search and commands</span></li>
606
+ </ul>
607
+ </section>
505
608
  <section class="keys-section">
506
609
  <h3 data-i18n="shortcutsRooms">Rooms</h3>
507
610
  <ul class="keys-list">
@@ -529,6 +632,17 @@
529
632
 
530
633
  </main>
531
634
 
635
+ <aside id="pwaUpdate" class="pwa-update" role="status" aria-live="polite" aria-labelledby="pwaUpdateTitle" hidden>
636
+ <div class="pwa-update-copy">
637
+ <strong id="pwaUpdateTitle" data-i18n="pwaUpdateTitle">Update available</strong>
638
+ <p data-i18n="pwaUpdateBody">A new version is ready. Reload now, or update the next time you open the app.</p>
639
+ </div>
640
+ <div class="pwa-update-actions">
641
+ <button id="btnPwaUpdate" class="btn primary small" type="button" data-i18n="pwaUpdateNow">Update now</button>
642
+ <button id="btnPwaLater" class="btn ghost small" type="button" data-i18n="pwaUpdateLater">Later</button>
643
+ </div>
644
+ </aside>
645
+
532
646
  <script src="/assets/marked-18.0.4.js"></script>
533
647
  <script src="/assets/dompurify-3.4.7.js"></script>
534
648
  <script src="/assets/highlight-10.7.3.min.js"></script>