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
+115
-5
No files matched your search
+20
-1
@@ -6,6 +6,7 @@
|
||||
<title>注册</title>
|
||||
<link rel="icon" href="/logo.svg" />
|
||||
<link rel="stylesheet" href="/design.css" />
|
||||
<link rel="stylesheet" href="/auth-ui.css" />
|
||||
<style>
|
||||
/* 档案 81 · R2-UI:提交忙碌态(点击后立刻可见;对齐 06-工作台UI规范 的按钮/圆角/主色) */
|
||||
.btn[disabled] { opacity: .72; cursor: not-allowed; }
|
||||
@@ -32,7 +33,10 @@
|
||||
</div>
|
||||
<div class="field">
|
||||
<label for="password">密码(至少 8 位)</label>
|
||||
<input id="password" name="password" type="password" autocomplete="new-password" required />
|
||||
<div class="pw-wrap">
|
||||
<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>
|
||||
<button class="btn primary" type="submit">注 册</button>
|
||||
<p class="msg" id="msg"></p>
|
||||
@@ -42,6 +46,21 @@
|
||||
</div>
|
||||
|
||||
<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 msg = document.getElementById('msg')
|
||||
// 档案 81 · R2-UI:任何提交都要有"看得见"的忙碌态(否则几秒内用户会以为没反应)
|
||||
|
||||
Reference in new issue
Block a user