feat(ui): 登录/注册页对齐 06-工作台UI规范 + 显示密码按钮 + 文案修正
- 新增 web/auth-ui.css(规范对齐层:主色#2f6fed/输入框r8 15px 白底/按钮r8 15px 6px14px/卡片r12)
刻意不改共享的 design.css(5 页全站换肤另立一期)
- 登录页:删掉「shell 频繁要求审批」提示;文案改「登录进入AI世界」;去掉预填的 value=guest
- 登录+注册:密码框加「显示密码」按钮(原生 button,键盘可达 + aria)
- ⚠️ 新文件曾因 Cloudflare 缓存 404 达 31 天 ⇒ 改名 auth-ui.css 绕开(缺陷已记档 83 §四)
This commit is contained in:
1 parent
f25723b743
commit
5869a4a979
3 files changed
+113
-3
No files matched your search
@@ -0,0 +1,73 @@
|
|||||||
|
/* auth.css —— 登录 / 注册页的规范对齐层(2026-09-13)
|
||||||
|
*
|
||||||
|
* 背景:本页原来直接用 design.css,而它是一套**深色 OS-desktop 体系**(`--accent #4d7cfe`、
|
||||||
|
* 卡片 r20、重投影、输入框 r10/14px),与 `06-工作台UI规范.md` **冲突**。
|
||||||
|
* 规范第 4 行:「**冲突时以本文档为准**」,第 5 行:**门户页面在适用范围内**。
|
||||||
|
* 因此这里按规范取值**就近覆盖**(§2 Token / §4.1 按钮 / §4.2 输入框 / 圆角 8px / 正文 15px)。
|
||||||
|
*
|
||||||
|
* ⚠️ 刻意**不改 design.css** —— 它被 5 个页面共用,整站换肤超出本次范围且风险大;
|
||||||
|
* 「静态页全站对齐规范」应作为**单独一期**做(见档案 83)。
|
||||||
|
*/
|
||||||
|
|
||||||
|
:root {
|
||||||
|
--a-bg: #f5f6f8; /* 规范 --bg */
|
||||||
|
--a-panel: #ffffff; /* 规范 --panel */
|
||||||
|
--a-border: #e3e6ea; /* 规范 --border */
|
||||||
|
--a-text: #24292f; /* 规范 --text */
|
||||||
|
--a-dim: #6b7280; /* 规范 --dim */
|
||||||
|
--a-primary: #2f6fed; /* 规范 --primary */
|
||||||
|
--a-primary-hover: #2a5fd0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 页面底色:规范是亮色工具类后台(原为深蓝渐变) */
|
||||||
|
.auth-bg {
|
||||||
|
background: var(--a-bg) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 卡片:规范 §3 —— r12 + `0 1px 3px rgba(0,0,0,.08)`,不用重投影 */
|
||||||
|
.auth-card {
|
||||||
|
border: 1px solid var(--a-border);
|
||||||
|
border-radius: 12px;
|
||||||
|
box-shadow: 0 1px 3px rgba(0, 0, 0, .08);
|
||||||
|
color: var(--a-text);
|
||||||
|
}
|
||||||
|
.auth-sub { color: var(--a-dim); font-size: 14px; }
|
||||||
|
|
||||||
|
/* 表单:§4.2 —— 输入框 `6px 10px` / r8 / 15px / 白底 / 1px 描边 */
|
||||||
|
.field label { font-size: 14px; color: var(--a-text); }
|
||||||
|
.field input {
|
||||||
|
padding: 6px 10px;
|
||||||
|
font-size: 15px;
|
||||||
|
border: 1px solid var(--a-border);
|
||||||
|
border-radius: 8px;
|
||||||
|
background: var(--a-panel);
|
||||||
|
color: var(--a-text);
|
||||||
|
}
|
||||||
|
.field input:focus {
|
||||||
|
border-color: var(--a-primary);
|
||||||
|
box-shadow: 0 0 0 3px rgba(47, 111, 237, .15);
|
||||||
|
background: var(--a-panel);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 密码框:右侧「显示密码」按钮(§4.1 .btn-icon 量级 `5px 9px`) */
|
||||||
|
.pw-wrap { position: relative; }
|
||||||
|
.pw-wrap input { padding-right: 60px; }
|
||||||
|
.pw-toggle {
|
||||||
|
position: absolute; top: 50%; right: 4px; transform: translateY(-50%);
|
||||||
|
display: inline-flex; align-items: center; justify-content: center; gap: 4px;
|
||||||
|
padding: 5px 9px; border: 0; border-radius: 6px; cursor: pointer;
|
||||||
|
background: transparent; color: var(--a-dim); font-size: 13px; line-height: 1;
|
||||||
|
transition: color .15s, background .15s;
|
||||||
|
}
|
||||||
|
.pw-toggle:hover { color: var(--a-primary); background: #eaf1fe; }
|
||||||
|
.pw-toggle:focus-visible { outline: 2px solid var(--a-primary); outline-offset: 1px; }
|
||||||
|
|
||||||
|
/* 按钮:§4.1 —— `.btn` `6px 14px` / r8 / 15px;primary `#2f6fed`;:disabled opacity .5 */
|
||||||
|
.btn { padding: 6px 14px; border-radius: 8px; font-size: 15px; }
|
||||||
|
.btn[disabled] { opacity: .5; }
|
||||||
|
.btn.primary { background: var(--a-primary); }
|
||||||
|
.btn.primary:hover { background: var(--a-primary-hover); filter: none; }
|
||||||
|
|
||||||
|
/* 链接 / 次级文字 */
|
||||||
|
.auth-alt { color: var(--a-dim); font-size: 14px; }
|
||||||
|
.auth-alt a { color: var(--a-primary); }
|
||||||
+21
-3
@@ -6,6 +6,7 @@
|
|||||||
<title>登录</title>
|
<title>登录</title>
|
||||||
<link rel="icon" href="/logo.svg" />
|
<link rel="icon" href="/logo.svg" />
|
||||||
<link rel="stylesheet" href="/design.css" />
|
<link rel="stylesheet" href="/design.css" />
|
||||||
|
<link rel="stylesheet" href="/auth-ui.css" />
|
||||||
<style>
|
<style>
|
||||||
/* 档案 81 · R2-UI:提交忙碌态(点击后立刻可见;对齐 06-工作台UI规范 的按钮/圆角/主色) */
|
/* 档案 81 · R2-UI:提交忙碌态(点击后立刻可见;对齐 06-工作台UI规范 的按钮/圆角/主色) */
|
||||||
.btn[disabled] { opacity: .72; cursor: not-allowed; }
|
.btn[disabled] { opacity: .72; cursor: not-allowed; }
|
||||||
@@ -23,20 +24,22 @@
|
|||||||
<img class="logo" src="/logo.svg" alt="logo" />
|
<img class="logo" src="/logo.svg" alt="logo" />
|
||||||
<span class="wordmark"><svg viewBox="0 0 131 24" fill="currentColor" fill-rule="evenodd" xmlns="http://www.w3.org/2000/svg"><title>DeepSeek</title><path d="M117.986 0h-3.21v19.404h3.21V0zM8.7 5.215h1.83v2.838H8.7c-1.135 0-2.28.282-3.019 1.068-.738.785-1.016 1.99-1.016 3.194s.267 2.408 1.016 3.193c.75.786 1.884 1.068 3.018 1.068 1.135 0 2.28-.282 3.018-1.068.739-.785 1.017-1.99 1.017-3.193V.649h3.21v18.755h-3.21V18.21h-.589a3.498 3.498 0 01-.192.199c-.803.733-2.034.995-3.243.995-1.894 0-3.788-.472-5.03-1.78C2.44 16.314 2 14.303 2 12.303c0-2 .45-4 1.68-5.32 1.242-1.308 3.136-1.77 5.02-1.77zM57.564 18.9h-1.83v-2.837h1.83c1.134 0 2.28-.283 3.017-1.068.739-.785 1.017-1.99 1.017-3.194s-.267-2.408-1.017-3.194c-.749-.785-1.883-1.068-3.017-1.068s-2.28.283-3.018 1.068c-.738.786-1.017 1.99-1.017 3.194v11.655h-3.21V4.712h3.21v1.194h.59a3.42 3.42 0 01.186-.194l.005-.005c.803-.733 2.034-.995 3.243-.995 1.895 0 3.788.471 5.03 1.78 1.241 1.31 1.68 3.32 1.68 5.32 0 2-.45 4-1.68 5.319-1.23 1.32-3.135 1.77-5.019 1.77zM32.05 13.204v-1.14c0-2.064-.46-4.137-1.754-5.498-1.285-1.362-3.264-1.843-5.223-1.843-1.958 0-3.928.492-5.222 1.843-1.295 1.35-1.755 3.434-1.755 5.497 0 2.063.47 4.136 1.755 5.498 1.284 1.36 3.264 1.843 5.222 1.843 1.959 0 3.938-.493 5.223-1.843.663-.692 1.102-1.582 1.38-2.566h-3.168a5.026 5.026 0 01-.3.367c-.77.816-1.958 1.11-3.135 1.11-1.177 0-2.365-.304-3.136-1.11-.77-.807-1.048-2.063-1.048-3.299 0-1.236.278-2.482 1.049-3.298.77-.817 1.958-1.11 3.135-1.11 1.177 0 2.365.293 3.136 1.11.535.565.834 1.34.963 2.167H23.5v2.272h8.55zM48.168 12.063v1.141h-8.55v-2.272h5.671c-.129-.827-.428-1.602-.963-2.167-.77-.817-1.959-1.11-3.136-1.11s-2.365.293-3.136 1.11c-.77.816-1.049 2.063-1.049 3.298 0 1.236.279 2.492 1.05 3.299.77.806 1.958 1.11 3.135 1.11 1.177 0 2.365-.294 3.136-1.11.107-.116.203-.241.299-.367h3.168c-.278.985-.717 1.874-1.38 2.566-1.285 1.35-3.264 1.843-5.223 1.843s-3.938-.482-5.222-1.843c-1.285-1.362-1.756-3.435-1.756-5.498s.46-4.147 1.755-5.497c1.296-1.351 3.264-1.843 5.223-1.843s3.938.481 5.222 1.843c1.296 1.36 1.756 3.434 1.756 5.497zM78.635 18.315c-1.284.806-3.263 1.089-5.222 1.089-1.958 0-3.917-.294-5.212-1.09-1.295-.795-1.755-2.03-1.755-3.246h3.767c0 .472.225.953.824 1.257.6.304 1.54.419 2.462.419.92 0 1.851-.115 2.46-.42.611-.303.825-.784.825-1.256 0-.47-.214-.952-.824-1.256-.61-.304-1.627-.419-2.547-.419-1.777 0-3.563-.293-4.73-1.09-1.167-.795-1.584-2.03-1.584-3.245 0-1.215.417-2.44 1.584-3.246 1.167-.807 2.953-1.09 4.73-1.09 1.776 0 3.564.294 4.73 1.09 1.167.795 1.584 2.031 1.584 3.246h-3.264c0-.471-.203-.942-.749-1.257-.546-.303-1.391-.419-2.226-.419s-1.68.105-2.226.42c-.556.303-.75.785-.75 1.256 0 .47.204.942.75 1.256.545.304 1.316.42 2.151.42 1.959 0 3.938.292 5.222 1.088 1.295.796 1.756 2.032 1.756 3.246 0 1.215-.471 2.44-1.756 3.247zM96.507 12.063v1.141h-8.55v-2.272h5.672c-.129-.827-.429-1.602-.963-2.167-.771-.817-1.959-1.11-3.136-1.11s-2.366.293-3.136 1.11c-.77.816-1.048 2.063-1.048 3.298 0 1.236.278 2.492 1.048 3.299.77.806 1.959 1.11 3.135 1.11 1.178 0 2.366-.294 3.137-1.11.106-.116.203-.241.3-.367h3.167c-.279.985-.717 1.874-1.38 2.566-1.284 1.35-3.265 1.843-5.224 1.843-1.957 0-3.938-.482-5.222-1.843-1.284-1.362-1.754-3.435-1.754-5.498s.46-4.147 1.754-5.497c1.296-1.351 3.265-1.843 5.222-1.843 1.96 0 3.94.481 5.224 1.843 1.294 1.36 1.754 3.434 1.754 5.497zM112.624 13.204v-1.14c0-2.064-.46-4.137-1.754-5.498-1.285-1.362-3.265-1.843-5.223-1.843-1.959 0-3.928.492-5.222 1.843-1.296 1.35-1.756 3.434-1.756 5.497 0 2.063.471 4.136 1.756 5.498 1.284 1.36 3.263 1.843 5.222 1.843 1.958 0 3.938-.493 5.223-1.843.663-.692 1.102-1.582 1.38-2.566h-3.168l-.012.016c-.093.12-.185.24-.288.35-.77.817-1.957 1.11-3.135 1.11-1.177 0-2.365-.303-3.136-1.11-.77-.806-1.049-2.062-1.049-3.298 0-1.236.279-2.482 1.049-3.298.771-.817 1.959-1.11 3.136-1.11 1.178 0 2.365.293 3.135 1.11.536.565.836 1.34.964 2.167h-5.672v2.272h8.55zM128.73 19.404l-5.264-7.78 5.264-6.252h-3.97l-5.265 6.251 5.265 7.78h3.97z"/></svg></span>
|
<span class="wordmark"><svg viewBox="0 0 131 24" fill="currentColor" fill-rule="evenodd" xmlns="http://www.w3.org/2000/svg"><title>DeepSeek</title><path d="M117.986 0h-3.21v19.404h3.21V0zM8.7 5.215h1.83v2.838H8.7c-1.135 0-2.28.282-3.019 1.068-.738.785-1.016 1.99-1.016 3.194s.267 2.408 1.016 3.193c.75.786 1.884 1.068 3.018 1.068 1.135 0 2.28-.282 3.018-1.068.739-.785 1.017-1.99 1.017-3.193V.649h3.21v18.755h-3.21V18.21h-.589a3.498 3.498 0 01-.192.199c-.803.733-2.034.995-3.243.995-1.894 0-3.788-.472-5.03-1.78C2.44 16.314 2 14.303 2 12.303c0-2 .45-4 1.68-5.32 1.242-1.308 3.136-1.77 5.02-1.77zM57.564 18.9h-1.83v-2.837h1.83c1.134 0 2.28-.283 3.017-1.068.739-.785 1.017-1.99 1.017-3.194s-.267-2.408-1.017-3.194c-.749-.785-1.883-1.068-3.017-1.068s-2.28.283-3.018 1.068c-.738.786-1.017 1.99-1.017 3.194v11.655h-3.21V4.712h3.21v1.194h.59a3.42 3.42 0 01.186-.194l.005-.005c.803-.733 2.034-.995 3.243-.995 1.895 0 3.788.471 5.03 1.78 1.241 1.31 1.68 3.32 1.68 5.32 0 2-.45 4-1.68 5.319-1.23 1.32-3.135 1.77-5.019 1.77zM32.05 13.204v-1.14c0-2.064-.46-4.137-1.754-5.498-1.285-1.362-3.264-1.843-5.223-1.843-1.958 0-3.928.492-5.222 1.843-1.295 1.35-1.755 3.434-1.755 5.497 0 2.063.47 4.136 1.755 5.498 1.284 1.36 3.264 1.843 5.222 1.843 1.959 0 3.938-.493 5.223-1.843.663-.692 1.102-1.582 1.38-2.566h-3.168a5.026 5.026 0 01-.3.367c-.77.816-1.958 1.11-3.135 1.11-1.177 0-2.365-.304-3.136-1.11-.77-.807-1.048-2.063-1.048-3.299 0-1.236.278-2.482 1.049-3.298.77-.817 1.958-1.11 3.135-1.11 1.177 0 2.365.293 3.136 1.11.535.565.834 1.34.963 2.167H23.5v2.272h8.55zM48.168 12.063v1.141h-8.55v-2.272h5.671c-.129-.827-.428-1.602-.963-2.167-.77-.817-1.959-1.11-3.136-1.11s-2.365.293-3.136 1.11c-.77.816-1.049 2.063-1.049 3.298 0 1.236.279 2.492 1.05 3.299.77.806 1.958 1.11 3.135 1.11 1.177 0 2.365-.294 3.136-1.11.107-.116.203-.241.299-.367h3.168c-.278.985-.717 1.874-1.38 2.566-1.285 1.35-3.264 1.843-5.223 1.843s-3.938-.482-5.222-1.843c-1.285-1.362-1.756-3.435-1.756-5.498s.46-4.147 1.755-5.497c1.296-1.351 3.264-1.843 5.223-1.843s3.938.481 5.222 1.843c1.296 1.36 1.756 3.434 1.756 5.497zM78.635 18.315c-1.284.806-3.263 1.089-5.222 1.089-1.958 0-3.917-.294-5.212-1.09-1.295-.795-1.755-2.03-1.755-3.246h3.767c0 .472.225.953.824 1.257.6.304 1.54.419 2.462.419.92 0 1.851-.115 2.46-.42.611-.303.825-.784.825-1.256 0-.47-.214-.952-.824-1.256-.61-.304-1.627-.419-2.547-.419-1.777 0-3.563-.293-4.73-1.09-1.167-.795-1.584-2.03-1.584-3.245 0-1.215.417-2.44 1.584-3.246 1.167-.807 2.953-1.09 4.73-1.09 1.776 0 3.564.294 4.73 1.09 1.167.795 1.584 2.031 1.584 3.246h-3.264c0-.471-.203-.942-.749-1.257-.546-.303-1.391-.419-2.226-.419s-1.68.105-2.226.42c-.556.303-.75.785-.75 1.256 0 .47.204.942.75 1.256.545.304 1.316.42 2.151.42 1.959 0 3.938.292 5.222 1.088 1.295.796 1.756 2.032 1.756 3.246 0 1.215-.471 2.44-1.756 3.247zM96.507 12.063v1.141h-8.55v-2.272h5.672c-.129-.827-.429-1.602-.963-2.167-.771-.817-1.959-1.11-3.136-1.11s-2.366.293-3.136 1.11c-.77.816-1.048 2.063-1.048 3.298 0 1.236.278 2.492 1.048 3.299.77.806 1.959 1.11 3.135 1.11 1.178 0 2.366-.294 3.137-1.11.106-.116.203-.241.3-.367h3.167c-.279.985-.717 1.874-1.38 2.566-1.284 1.35-3.265 1.843-5.224 1.843-1.957 0-3.938-.482-5.222-1.843-1.284-1.362-1.754-3.435-1.754-5.498s.46-4.147 1.754-5.497c1.296-1.351 3.265-1.843 5.222-1.843 1.96 0 3.94.481 5.224 1.843 1.294 1.36 1.754 3.434 1.754 5.497zM112.624 13.204v-1.14c0-2.064-.46-4.137-1.754-5.498-1.285-1.362-3.265-1.843-5.223-1.843-1.959 0-3.928.492-5.222 1.843-1.296 1.35-1.756 3.434-1.756 5.497 0 2.063.471 4.136 1.756 5.498 1.284 1.36 3.263 1.843 5.222 1.843 1.958 0 3.938-.493 5.223-1.843.663-.692 1.102-1.582 1.38-2.566h-3.168l-.012.016c-.093.12-.185.24-.288.35-.77.817-1.957 1.11-3.135 1.11-1.177 0-2.365-.303-3.136-1.11-.77-.806-1.049-2.062-1.049-3.298 0-1.236.279-2.482 1.049-3.298.771-.817 1.959-1.11 3.136-1.11 1.178 0 2.365.293 3.135 1.11.536.565.836 1.34.964 2.167h-5.672v2.272h8.55zM128.73 19.404l-5.264-7.78 5.264-6.252h-3.97l-5.265 6.251 5.265 7.78h3.97z"/></svg></span>
|
||||||
</div>
|
</div>
|
||||||
<p class="auth-sub">登录你的 DSH 云桌面</p>
|
<p class="auth-sub">登录进入AI世界</p>
|
||||||
|
|
||||||
<form id="login">
|
<form id="login">
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<label for="username">用户名</label>
|
<label for="username">用户名</label>
|
||||||
<input id="username" name="username" autocomplete="username" value="guest" required />
|
<input id="username" name="username" autocomplete="username" required />
|
||||||
</div>
|
</div>
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<label for="password">密码</label>
|
<label for="password">密码</label>
|
||||||
|
<div class="pw-wrap">
|
||||||
<input id="password" name="password" type="password" autocomplete="current-password" required />
|
<input id="password" name="password" type="password" autocomplete="current-password" required />
|
||||||
|
<button class="pw-toggle" type="button" id="pwToggle" aria-label="显示密码" aria-pressed="false">显示</button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<button class="btn primary" type="submit">登 录</button>
|
<button class="btn primary" type="submit">登 录</button>
|
||||||
|
|
||||||
<p style="margin:14px 0 0;font-size:12px;line-height:1.7;color:#8a8f98">提示:若会话中 shell 频繁要求审批,<b>新开一个会话</b>即可使用完全权限(无需逐条确认)。</p>
|
|
||||||
<p class="msg" id="msg"></p>
|
<p class="msg" id="msg"></p>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
@@ -44,6 +47,21 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
|
// 档案 83 · 显示/隐藏密码(对齐 06-工作台UI规范 的 .btn-icon 交互;键盘可达 = 原生 button)
|
||||||
|
const pwInput = document.getElementById('password')
|
||||||
|
const pwBtn = document.getElementById('pwToggle')
|
||||||
|
if (pwInput && pwBtn) {
|
||||||
|
pwBtn.addEventListener('click', () => {
|
||||||
|
const show = pwInput.type === 'password'
|
||||||
|
pwInput.type = show ? 'text' : 'password'
|
||||||
|
pwBtn.textContent = show ? '隐藏' : '显示'
|
||||||
|
pwBtn.setAttribute('aria-label', show ? '隐藏密码' : '显示密码')
|
||||||
|
pwBtn.setAttribute('aria-pressed', String(show))
|
||||||
|
pwInput.focus()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
const form = document.getElementById('login')
|
const form = document.getElementById('login')
|
||||||
const msg = document.getElementById('msg')
|
const msg = document.getElementById('msg')
|
||||||
// 档案 81 · R2-UI:任何提交都要有"看得见"的忙碌态(否则几秒内用户会以为没反应)
|
// 档案 81 · R2-UI:任何提交都要有"看得见"的忙碌态(否则几秒内用户会以为没反应)
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
<title>注册</title>
|
<title>注册</title>
|
||||||
<link rel="icon" href="/logo.svg" />
|
<link rel="icon" href="/logo.svg" />
|
||||||
<link rel="stylesheet" href="/design.css" />
|
<link rel="stylesheet" href="/design.css" />
|
||||||
|
<link rel="stylesheet" href="/auth-ui.css" />
|
||||||
<style>
|
<style>
|
||||||
/* 档案 81 · R2-UI:提交忙碌态(点击后立刻可见;对齐 06-工作台UI规范 的按钮/圆角/主色) */
|
/* 档案 81 · R2-UI:提交忙碌态(点击后立刻可见;对齐 06-工作台UI规范 的按钮/圆角/主色) */
|
||||||
.btn[disabled] { opacity: .72; cursor: not-allowed; }
|
.btn[disabled] { opacity: .72; cursor: not-allowed; }
|
||||||
@@ -32,7 +33,10 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<label for="password">密码(至少 8 位)</label>
|
<label for="password">密码(至少 8 位)</label>
|
||||||
|
<div class="pw-wrap">
|
||||||
<input id="password" name="password" type="password" autocomplete="new-password" required />
|
<input id="password" name="password" type="password" autocomplete="new-password" required />
|
||||||
|
<button class="pw-toggle" type="button" id="pwToggle" aria-label="显示密码" aria-pressed="false">显示</button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<button class="btn primary" type="submit">注 册</button>
|
<button class="btn primary" type="submit">注 册</button>
|
||||||
<p class="msg" id="msg"></p>
|
<p class="msg" id="msg"></p>
|
||||||
@@ -42,6 +46,21 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
|
// 档案 83 · 显示/隐藏密码(对齐 06-工作台UI规范 的 .btn-icon 交互;键盘可达 = 原生 button)
|
||||||
|
const pwInput = document.getElementById('password')
|
||||||
|
const pwBtn = document.getElementById('pwToggle')
|
||||||
|
if (pwInput && pwBtn) {
|
||||||
|
pwBtn.addEventListener('click', () => {
|
||||||
|
const show = pwInput.type === 'password'
|
||||||
|
pwInput.type = show ? 'text' : 'password'
|
||||||
|
pwBtn.textContent = show ? '隐藏' : '显示'
|
||||||
|
pwBtn.setAttribute('aria-label', show ? '隐藏密码' : '显示密码')
|
||||||
|
pwBtn.setAttribute('aria-pressed', String(show))
|
||||||
|
pwInput.focus()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
const form = document.getElementById('register')
|
const form = document.getElementById('register')
|
||||||
const msg = document.getElementById('msg')
|
const msg = document.getElementById('msg')
|
||||||
// 档案 81 · R2-UI:任何提交都要有"看得见"的忙碌态(否则几秒内用户会以为没反应)
|
// 档案 81 · R2-UI:任何提交都要有"看得见"的忙碌态(否则几秒内用户会以为没反应)
|
||||||
|
|||||||
Reference in new issue
Block a user