diff --git a/README.md b/README.md index 6d0caaf..46d243a 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ WebSpeak 是一个自托管的 TeamSpeak 浏览器客户端与访客接入网关 - Web 管理闭环:默认账号首次登录强制改密、单管理员登录、概览、服务器设置和真实连接测试。 - 运维控制台:受控邀请创建/撤销/过期/限次、活动会话列表与单会话断开、审计事件、结构化日志查看、脱敏诊断报告和 SQLite 备份导出。 - `fixed` 与 `open` 两种访问模式。 -- 可选的持久 TeamSpeak identity:身份私钥仅保存在浏览器 IndexedDB,可导入/导出;访客也可继续使用临时身份。 +- 可选的持久 TeamSpeak identity:身份私钥仅保存在浏览器 IndexedDB,访客也可继续使用临时身份。 - 浏览器本地收藏、最近服务器、昵称、语言、音频设备/模式/音量和按 TeamSpeak UID 保存的成员音量。 - 可清除全部 WebSpeak 本地数据;不保存服务器密码。 - TeamSpeak 密码使用安装级主密钥加密保存,不向管理 API 返回明文。 @@ -130,7 +130,7 @@ data/ - 日志、管理 API 和 Overview 不返回服务器密码、管理员密码或身份私钥。 - 普通用户 identity 只通过当前 Join Ticket/Session 在内存中使用,不写入 Gateway 数据库、日志或诊断信息。 -浏览器身份导出文件包含可冒用该 TeamSpeak identity 的私密凭据,只应保存到可信位置;不要上传到 WebSpeak 或提交到 Git。 +浏览器保存的 TeamSpeak identity 私钥不会上传到 WebSpeak,也不会写入网关数据库、日志或诊断信息。 请备份整个 `data/` 目录。只有数据库而没有对应 `master.key` 时,已加密的 TeamSpeak 密码无法恢复。不要提交 `data/`、`config.json`、证书、私钥或日志。 @@ -307,7 +307,7 @@ The first login is forced to a password-change screen. Set a password of at leas Local state is stored under `data/` in SQLite plus a 32-byte `master.key`. Admin passwords use `crypto.scrypt`. A new instance starts with `admin/admin` and marks that credential for mandatory rotation on first login. TeamSpeak secrets use AES-256-GCM. Admin sessions are server-side with HttpOnly/SameSite Strict cookies, same-origin and CSRF checks, and fixed login throttling. -A normal user's identity is used only in memory for the current Join Ticket/Session and is never written to the Gateway database, logs, or diagnostics. An exported browser identity file contains private credentials that can impersonate the TeamSpeak identity. Keep it in a trusted location; never upload it to WebSpeak or commit it to Git. +A normal user's identity is used only in memory for the current Join Ticket/Session unless the user enables device remembering. When enabled, the private material stays in browser IndexedDB and is never written to the Gateway database, logs, or diagnostics; the web client does not provide identity file import/export. In fixed mode, guests cannot override the configured target. In open mode, arbitrary public targets are validated after DNS resolution; private, loopback, link-local, multicast, broadcast, and reserved addresses are rejected. Session passwords travel through an opaque one-time Join Ticket and are never placed in share or WebSocket URLs. diff --git a/web/src/views/AdminView.vue b/web/src/views/AdminView.vue index 8f335a4..dad531c 100644 --- a/web/src/views/AdminView.vue +++ b/web/src/views/AdminView.vue @@ -43,11 +43,11 @@

{{ tr('operations') }}

{{ tr('operationsLead') }}

{{ tr('updateNotice', { version: operations.diagnostics.version || '—' }) }}
-
+

{{ tr('sessions') }}

{{ tr('sessionsLead') }}

{{ operations.sessions.length }}
{{ tr('nickname') }}{{ tr('sessionState') }}{{ tr('age') }}{{ tr('memberCount') }}
{{ session.nickname }}{{ session.target }}{{ sessionStateLabel(session.state) }}{{ formatAge(session.ageSeconds) }}{{ session.memberCount }}
{{ tr('sessionEmpty') }}

{{ tr('invites') }}

{{ tr('invitesLead') }}

{{ tr('unlimitedUses') }}
{{ tr('inviteCreated') }}{{ tr('inviteSecurity') }}
{{ invite.channel || tr('defaultChannel') }}{{ invite.target }} · {{ formatDate(invite.expiresAt) }}
{{ inviteStatusLabel(invite.status) }}{{ invite.useCount }}/{{ invite.maxUses || '∞' }}
-

{{ tr('diagnostics') }}

{{ tr('diagnosticsLead') }}

{{ tr('downloadReport') }}
{{ tr('version') }}
{{ operations.diagnostics.version || '—' }}
{{ tr('runtime') }}
{{ operations.diagnostics.node || '—' }}
{{ tr('platform') }}
{{ operations.diagnostics.platform || '—' }} / {{ operations.diagnostics.arch || '—' }}
{{ tr('databaseSchema') }}
v{{ operations.diagnostics.schemaVersion || '—' }}
{{ tr('createdSessions') }}
{{ operations.diagnostics.createdSessions }}

{{ tr('logViewer') }}

{{ tr('logViewerLead') }}

{{ tr('logsUnavailable') }}
{{ entry.level }}
{{ entry.message || '—' }}{{ formatDate(entry.timestamp) }}
{{ tr('noLogs') }}

{{ tr('audit') }}

{{ tr('auditLead') }}

  • {{ eventName(event.event) }}{{ formatDate(event.createdAt) }}
  • {{ tr('auditEmpty') }}
+

{{ tr('diagnostics') }}

{{ tr('diagnosticsLead') }}

{{ tr('downloadReport') }}
{{ tr('version') }}
{{ operations.diagnostics.version || '—' }}
{{ tr('runtime') }}
{{ operations.diagnostics.node || '—' }}
{{ tr('platform') }}
{{ operations.diagnostics.platform || '—' }} / {{ operations.diagnostics.arch || '—' }}
{{ tr('databaseSchema') }}
v{{ operations.diagnostics.schemaVersion || '—' }}
{{ tr('createdSessions') }}
{{ operations.diagnostics.createdSessions }}

{{ tr('logViewer') }}

{{ tr('logViewerLead') }}

{{ tr('logsUnavailable') }}
{{ entry.level }}
{{ entry.message || '—' }}{{ formatDate(entry.timestamp) }}
{{ tr('noLogs') }}

{{ tr('audit') }}

{{ tr('auditLead') }}

  • {{ eventName(event.event) }}{{ formatDate(event.createdAt) }}
  • {{ tr('auditEmpty') }}
@@ -453,4 +453,44 @@ async function parseResponse(response: Response) { const value = await response. @media(max-width:520px){.operation-card{padding:18px}.table-wrap{margin-left:-18px;margin-right:-18px;margin-bottom:-18px}.invite-form-grid,.diagnostic-list{grid-template-columns:1fr}.generated-link{display:grid}.invite-row{align-items:flex-start;flex-direction:column}.invite-row-meta{width:100%;justify-content:flex-end}.lower-operations{margin-top:14px}} .target-fields{display:grid;grid-template-columns:minmax(0,1fr) 132px;gap:12px} @media(max-width:520px){.target-fields{grid-template-columns:1fr}} + +/* Keep administration inside the browser viewport. Long data sets scroll in + their own cards instead of pushing the whole page below the fold. */ +.admin-shell{height:100dvh;min-height:100dvh;overflow:hidden} +.admin-main{min-height:0;display:flex;flex-direction:column;overflow:hidden} +.admin-topbar{flex:0 0 auto} +.page-content{flex:1 1 auto;min-height:0;overflow-y:auto} +.operations-page{display:flex;flex-direction:column;width:min(1400px,calc(100% - 48px));height:calc(100dvh - 82px);overflow:hidden;padding-top:28px;padding-bottom:18px} +.operations-page .page-heading{flex:0 0 auto;margin-bottom:16px} +.operations-page .system-notice{flex:0 0 auto;margin-bottom:12px} +.operations-page .operations-grid{min-width:0;min-height:0} +.operations-primary{flex:0 0 auto;grid-template-columns:minmax(0,1.2fr) minmax(360px,.8fr)} +.operations-primary>.operation-card{min-height:0;overflow:hidden} +.operations-primary .table-wrap{max-height:190px} +.operations-primary .invite-list{max-height:132px;overflow-y:auto} +.lower-operations{flex:1 1 0;grid-template-columns:minmax(210px,.9fr) minmax(0,1.1fr) minmax(210px,.9fr);margin-top:14px} +.lower-operations>.operation-card{min-height:0} +.diagnostics-card,.logs-card,.audit-card{overflow:hidden} +.diagnostics-card{display:flex;flex-direction:column;overflow-y:auto} +.diagnostics-card .secondary-button{margin-top:auto} +.logs-card,.audit-card{display:flex;flex-direction:column} +.logs-card .log-list,.audit-card .event-list{flex:1 1 0;min-height:0;max-height:none;overflow-y:auto} + +@media(max-width:850px){ + .admin-main{height:100%} + .operations-page{width:min(100% - 28px,700px);height:auto;min-height:calc(100dvh - 82px);overflow:visible} + .operations-page .lower-operations{flex:none} +} + +/* Keep every admin surface inside the viewport. The page content and data + lists are the scroll containers, never the document body. */ +:global(html),:global(body),:global(#app){width:100%;height:100dvh;min-height:0;max-height:100dvh;overflow:hidden} +.admin-root{height:100dvh;min-height:0;overflow:hidden} +.login-page{height:100dvh;min-height:0;overflow:hidden} +.login-card{max-height:calc(100dvh - 50px);overflow-y:auto} + +@media(max-width:850px){ + .admin-shell{display:flex;flex-direction:column} + .admin-main{height:auto;flex:1 1 auto} +} diff --git a/web/src/views/WebClient.vue b/web/src/views/WebClient.vue index 0320b0b..0601789 100644 --- a/web/src/views/WebClient.vue +++ b/web/src/views/WebClient.vue @@ -64,7 +64,7 @@ -
{{ t('identityOptions') }}
+
{{ t('identityOptions') }}