feat(admin): Phase 1 注册邀请码逻辑 — 码必填 + kind 分流 + validate-invite + 注册页码优先重做
后端:Invitation.kind(join_team/create_team)+ team 可空 + migration;RegisterSerializer 邀请码必填, create_team 开新团队当 owner+发试用额度、join_team 幂等入伙不重复发额度,删「空码开团队」; validate-invite 免登录验码端点;团管发码恒 join_team;InvitationSerializer 增 kind/team_name。 前端:注册页码优先(验过才展开;create_team 填团队名 / join_team 只读团队名,不暴露团队列表)、 邀请链接 ?invite= 自动验码、api.validateInvite、验码行/状态提示样式(仅 token)。 测试:accounts 22/22 单测过(RegisterInviteCodeTests + ValidateInviteTests); 无头 e2e _admin-p1.mjs 全断言过 + 0 console error;tsc+build 绿。 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
443023a1a9
commit
3f8547564c
@@ -1217,6 +1217,32 @@ nav button svg { width: 14px; height: 14px; color: var(--ink-3); }
|
||||
font-family: var(--font-mono);
|
||||
letter-spacing: .02em;
|
||||
}
|
||||
/* 注册码优先:验码行(输入 + 验证按钮)+ 状态提示 + 只读团队名 */
|
||||
.auth-exact-page .invite-verify-row {
|
||||
display: flex;
|
||||
align-items: stretch;
|
||||
gap: 8px;
|
||||
}
|
||||
.auth-exact-page .invite-verify-row .field-input-wrap { flex: 1; }
|
||||
.auth-exact-page .invite-verify-btn {
|
||||
flex-shrink: 0;
|
||||
height: auto;
|
||||
align-self: stretch;
|
||||
padding: 0 18px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.auth-exact-page .field-note.ok {
|
||||
color: var(--accent-forest);
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 5px;
|
||||
}
|
||||
.auth-exact-page .field-note.err { color: var(--accent-crimson); }
|
||||
.auth-exact-page .field-input-wrap.is-readonly input {
|
||||
background: var(--black-alpha-4);
|
||||
color: var(--black-alpha-56);
|
||||
cursor: default;
|
||||
}
|
||||
.auth-exact-page .agree {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
|
||||
Reference in New Issue
Block a user