docs(spa): 登录卡文案去重,只改字符串不动结构与逻辑

授权卡里同一件事被讲了三遍:CONFIG_ENCRYPTION_KEY 在正文、占位符、
顶部横幅各出现一次;「不写 localStorage」在提示里说、在 setup 隐私说明里
又说一遍;「只在页面内存」在正文、提示、会话过期默认文案里各出现一次。

收敛到每句话只出现一处(正文讲动作与 TTL,占位符只提示粘贴,提示只讲
重新授权,存储与内存的事实保留在正文与 setup 隐私说明里):

- auth.bodyPre   输入启动必填的环境变量 -> 输入
- auth.bodyPost  服务端会签发有效期 15 分钟的管理会话;该值与会话只在当前页面内存中使用
                -> 管理会话有效期 15 分钟,只存在当前页面内存中
- auth.placeholder 输入 CONFIG_ENCRYPTION_KEY 的值 -> 粘贴该值
- auth.hint      不会写入 localStorage、sessionStorage 或 Cookie。关闭或刷新页面后需要重新授权
                -> 关闭或刷新页面后需要重新授权

EN 字典同步,web/index.html 里 3 处 data-i18n 回退文案跟着改。
键名、DOM 结构、data-i18n 键、逻辑与校验全部未动。
node --check web/config.js 通过;node --test web/config.test.mjs 6/6 通过。
This commit is contained in:
anonsaber 2026-09-30 23:35:32 +08:00
parent f9889288ba
commit 98d62e490c
2 changed files with 11 additions and 11 deletions

View File

@ -30,13 +30,13 @@
"setup.fetchError": "Unable to read the service startup status right now. To protect management credentials, the authorization entry stays hidden; confirm the service is available and re-check.", "setup.fetchError": "Unable to read the service startup status right now. To protect management credentials, the authorization entry stays hidden; confirm the service is available and re-check.",
"auth.eyebrow": "Authorization required", "auth.eyebrow": "Authorization required",
"auth.title": "Create admin session", "auth.title": "Create admin session",
"auth.bodyPre": "Enter the value of the required startup key ", "auth.bodyPre": "Enter ",
"auth.bodyPost": ". The server issues a 15-minute admin session; the key and session exist only in the current page memory.", "auth.bodyPost": ". The session lasts 15 minutes and lives only in this page's memory.",
"auth.label": "Business encryption key", "auth.label": "Business encryption key",
"auth.placeholder": "Enter the CONFIG_ENCRYPTION_KEY value", "auth.placeholder": "Paste the value",
"auth.submit": "Create session", "auth.submit": "Create session",
"auth.submitBusy": "Authorizing…", "auth.submitBusy": "Authorizing…",
"auth.hint": "Never written to localStorage, sessionStorage or cookies. You must re-authorize after closing or refreshing the page.", "auth.hint": "You must re-authorize after closing or refreshing the page.",
"config.aria": "Business configuration and runtime parameters", "config.aria": "Business configuration and runtime parameters",
"session.active": "Admin session active", "session.active": "Admin session active",
"session.expiryDefault": "Session kept only in current page memory", "session.expiryDefault": "Session kept only in current page memory",
@ -232,13 +232,13 @@
"setup.fetchError": "暂时无法读取服务启动状态。为保护管理凭据,授权入口保持隐藏;请确认服务可用后重新检查。", "setup.fetchError": "暂时无法读取服务启动状态。为保护管理凭据,授权入口保持隐藏;请确认服务可用后重新检查。",
"auth.eyebrow": "需要授权", "auth.eyebrow": "需要授权",
"auth.title": "创建管理会话", "auth.title": "创建管理会话",
"auth.bodyPre": "输入启动必填的环境变量 ", "auth.bodyPre": "输入 ",
"auth.bodyPost": " 的值。服务端会签发有效期 15 分钟的管理会话;该值与会话只在当前页面内存中使用。", "auth.bodyPost": ",管理会话有效期 15 分钟,只存在当前页面内存中。",
"auth.label": "业务加密密钥", "auth.label": "业务加密密钥",
"auth.placeholder": "输入 CONFIG_ENCRYPTION_KEY 的值", "auth.placeholder": "粘贴该值",
"auth.submit": "创建会话", "auth.submit": "创建会话",
"auth.submitBusy": "正在授权…", "auth.submitBusy": "正在授权…",
"auth.hint": "不会写入 localStorage、sessionStorage 或 Cookie。关闭或刷新页面后需要重新授权。", "auth.hint": "关闭或刷新页面后需要重新授权。",
"config.aria": "业务配置与运行参数", "config.aria": "业务配置与运行参数",
"session.active": "管理会话有效", "session.active": "管理会话有效",
"session.expiryDefault": "会话仅保存在当前页面内存", "session.expiryDefault": "会话仅保存在当前页面内存",

View File

@ -54,14 +54,14 @@
</div> </div>
<div><p class="eyebrow" data-i18n="auth.eyebrow">Authorization required</p><h2 id="auth-title" data-i18n="auth.title">Create admin session</h2></div> <div><p class="eyebrow" data-i18n="auth.eyebrow">Authorization required</p><h2 id="auth-title" data-i18n="auth.title">Create admin session</h2></div>
</div> </div>
<p class="panel-copy"><span data-i18n="auth.bodyPre">Enter the value of the required startup key </span><code>CONFIG_ENCRYPTION_KEY</code><span data-i18n="auth.bodyPost">. The server issues a 15-minute admin session; the key and session exist only in the current page memory.</span></p> <p class="panel-copy"><span data-i18n="auth.bodyPre">Enter </span><code>CONFIG_ENCRYPTION_KEY</code><span data-i18n="auth.bodyPost">. The session lasts 15 minutes and lives only in this page's memory.</span></p>
<form id="auth-form" class="auth-form" autocomplete="off"> <form id="auth-form" class="auth-form" autocomplete="off">
<label for="bootstrap-input" data-i18n="auth.label">Business encryption key</label> <label for="bootstrap-input" data-i18n="auth.label">Business encryption key</label>
<div class="token-row"> <div class="token-row">
<input id="bootstrap-input" name="admin-credential" type="password" autocomplete="new-password" spellcheck="false" required data-i18n-placeholder="auth.placeholder" placeholder="Enter the CONFIG_ENCRYPTION_KEY value" aria-describedby="bootstrap-hint" /> <input id="bootstrap-input" name="admin-credential" type="password" autocomplete="new-password" spellcheck="false" required data-i18n-placeholder="auth.placeholder" placeholder="Paste the value" aria-describedby="bootstrap-hint" />
<button id="connect-button" class="button button-primary" type="submit" data-i18n="auth.submit">Create session</button> <button id="connect-button" class="button button-primary" type="submit" data-i18n="auth.submit">Create session</button>
</div> </div>
<p id="bootstrap-hint" class="field-hint" data-i18n="auth.hint">Never written to localStorage, sessionStorage or cookies. You must re-authorize after closing or refreshing the page.</p> <p id="bootstrap-hint" class="field-hint" data-i18n="auth.hint">You must re-authorize after closing or refreshing the page.</p>
</form> </form>
</section> </section>