feat(core): Wave 3.5 前端 — 注册页/登录双态 + 邀请制 API 接线(认证定调:无邮箱)

scaffolding: types.ts 加 Invitation 类型;api.ts 加 listInvitations/createInvitation/revokeInvitation +
  register() 加 invite_code;route-config AuthMode "login"|"register" + /register 返回 register 态;
  App.tsx onModeChange 按 mode 切 /login↔/register URL
auth-screen.tsx(sub-agent):登录+注册双态(按 initialMode 渲染),去掉 /register→/login 强制改写;
  注册表单 = 团队名/用户名/密码/确认密码/邀请码(去邮箱!)+ 左价值点 + 协议勾选 + 一致性校验,
  有码提示「加入团队」无码「开新团队」;登录补第三方(微信/飞书+OR线)+ 切换行 + lead/mono;登录保持秒进
styles.css:仅加 .auth-* 注册态/第三方/切换行 CSS(restraint token)

验证: tsc 0 · build 0 · 走查 登录(无邮箱/第三方×2/切换/秒进698ms)+ 注册(5字段/0邮箱/0「邮箱」文案)
  + 切换态(URL→/register)全过 · 0 console error

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
seaislee1209
2026-06-19 12:41:36 +08:00
co-authored by Claude Opus 4.8
parent ba855cc219
commit c0a8582f3b
7 changed files with 648 additions and 25 deletions
+214
View File
@@ -1075,6 +1075,213 @@ nav button svg { width: 14px; height: 14px; color: var(--ink-3); }
font-weight: 400;
}
/* lead 引导文案 + mono 副标(登录补、注册自带) */
.auth-exact-page .auth-form .lead {
font-size: 13px;
color: var(--black-alpha-56);
margin: 0 0 22px;
line-height: 1.6;
}
.auth-exact-page.auth-login-page .auth-form .lead { margin: 0 0 20px; }
/* OR 分割线 + 第三方 SSO(登录页) */
.auth-exact-page .divider {
display: flex;
align-items: center;
gap: 10px;
margin: 18px 0 14px;
}
.auth-exact-page .divider .line { flex: 1; height: 1px; background: var(--border-faint); }
.auth-exact-page .divider .txt {
font-family: var(--font-mono);
font-size: 12px;
color: var(--black-alpha-32);
letter-spacing: .08em;
text-transform: uppercase;
}
.auth-exact-page .sso-row {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 10px;
}
.auth-exact-page .sso-btn {
background: var(--surface);
border: 1px solid var(--border-faint);
border-radius: var(--r-md);
padding: 10px 12px;
font-size: 13px;
color: var(--accent-black);
cursor: pointer;
font-family: inherit;
display: inline-flex;
align-items: center;
justify-content: center;
gap: 8px;
transition: border-color var(--t-base);
}
.auth-exact-page .sso-btn:hover { border-color: var(--black-alpha-32); }
.auth-exact-page .sso-btn svg { width: 14px; height: 14px; }
/* 登录 / 注册切换行 */
.auth-exact-page .switch-row {
margin-top: 18px;
text-align: center;
font-size: 13px;
color: var(--black-alpha-56);
}
.auth-exact-page .switch-row a {
color: var(--heat);
text-decoration: none;
font-weight: 500;
}
.auth-exact-page .switch-row a:hover { text-decoration: underline; }
/* ── 注册态:表单更宽 + 自然流(不再绝对定位 .auth-form) ── */
.auth-exact-page.auth-register-page .auth-wrap {
height: auto;
min-height: 620px;
align-items: stretch;
}
.auth-exact-page.auth-register-page .auth-brand {
flex: 0 0 calc(100% - 460px);
width: calc(100% - 460px);
}
.auth-exact-page.auth-register-page .auth-form {
position: static;
width: 460px;
flex: 0 0 460px;
height: auto;
min-height: 0;
align-self: stretch;
padding: 40px 44px 32px;
}
.auth-exact-page.auth-register-page .auth-form form {
flex: 0 0 auto;
margin-top: 22px;
}
.auth-exact-page.auth-register-page .auth-form .h-row { gap: 6px; }
.auth-exact-page.auth-register-page .auth-form h2 { font-size: 24px; }
/* 注册:品牌区顶对齐 hero + 价值点列表 */
.auth-exact-page .auth-brand .hero.hero-top {
margin-top: 26px;
margin-bottom: 0;
}
.auth-exact-page .auth-brand .hero.hero-top h1 { font-size: 28px; }
.auth-exact-page .val-list {
margin: 28px 0 0;
display: flex;
flex-direction: column;
gap: 14px;
}
.auth-exact-page .val-item {
display: grid;
grid-template-columns: 22px minmax(0, 1fr);
gap: 12px;
align-items: start;
}
.auth-exact-page .val-item .ic-v {
width: 22px;
height: 22px;
border: 1px solid rgba(255, 255, 255, .18);
border-radius: var(--r-sm);
display: grid;
place-items: center;
color: var(--heat);
}
.auth-exact-page .val-item .ic-v svg { width: 12px; height: 12px; }
.auth-exact-page .val-item .txt-v {
font-size: 13px;
color: rgba(255, 255, 255, .78);
line-height: 1.5;
}
.auth-exact-page .val-item .txt-v b { color: var(--accent-white); font-weight: 600; }
/* 注册:label 行尾提示 + 双列密码 + 邀请码动态提示 + 协议勾选 */
.auth-exact-page .field-label .hint {
margin-left: auto;
font-size: 11.5px;
font-weight: 400;
color: var(--black-alpha-32);
}
.auth-exact-page .field-row {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 12px;
margin-bottom: 16px;
}
.auth-exact-page .field-row .field { margin-bottom: 0; }
.auth-exact-page .field-note {
margin: 7px 0 0;
font-size: 12px;
color: var(--black-alpha-48);
font-family: var(--font-mono);
letter-spacing: .02em;
}
.auth-exact-page .agree {
display: flex;
align-items: flex-start;
gap: 8px;
font-size: 12.5px;
color: var(--black-alpha-56);
line-height: 1.6;
margin: 8px 0 18px;
cursor: pointer;
user-select: none;
}
.auth-exact-page .agree input {
margin-top: 3px;
width: 13px;
height: 13px;
accent-color: var(--heat);
flex-shrink: 0;
}
.auth-exact-page .agree a { color: var(--heat); text-decoration: none; }
.auth-exact-page .agree a:hover { text-decoration: underline; }
.auth-exact-page .agree.has-error a { color: var(--accent-crimson); }
/* 注册:CTA / 提示在表单内自然流(不借用 .auth-submit-zone 的绝对定位) */
.auth-exact-page.auth-register-page .btn-cta { margin-top: 4px; }
.auth-exact-page.auth-register-page .form-error,
.auth-exact-page.auth-register-page .login-progress {
position: static;
margin: 0 0 12px;
}
/* ── 登录态:加了 OR / 第三方 / 切换行后内容变高,改自然流让卡片随内容长高 ── */
.auth-exact-page.auth-login-page .auth-wrap {
height: auto;
min-height: 560px;
align-items: stretch;
}
.auth-exact-page.auth-login-page .auth-brand {
flex: 0 0 calc(100% - 420px);
width: calc(100% - 420px);
}
.auth-exact-page.auth-login-page .auth-form {
position: static;
width: 420px;
flex: 0 0 420px;
height: auto;
min-height: 0;
align-self: stretch;
}
.auth-exact-page.auth-login-page .auth-form form {
flex: 0 0 auto;
margin-top: 24px;
}
.auth-exact-page.auth-login-page .auth-submit-zone {
position: static;
width: auto;
margin: 0;
padding-top: 0;
}
.auth-exact-page.auth-login-page .form-error,
.auth-exact-page.auth-login-page .login-progress {
position: static;
margin: 0 0 12px;
}
@media (max-width: 820px) {
.auth-exact-page .auth-wrap {
flex-direction: column;
@@ -1097,6 +1304,13 @@ nav button svg { width: 14px; height: 14px; color: var(--ink-3); }
width: auto;
margin-top: auto;
}
.auth-exact-page.auth-register-page .auth-brand,
.auth-exact-page.auth-register-page .auth-form {
flex: 0 0 auto;
width: auto;
}
.auth-exact-page.auth-register-page .val-list { display: none; }
.auth-exact-page.auth-register-page .auth-form { padding: 32px 28px; }
}
/* Dashboard 区类(.dash-grid/.dash-side/.recent-row/.shortcut/.tip)已迁入