继续收口认证入口弹窗壳层

新增 PlatformAuthModalShell 统一认证白底弹窗壳层

登录入口和邀请码弹窗复用共享认证壳层

补充认证壳层和 AuthGate 接入测试

同步 PlatformUiKit 文档和 Hermes 决策记录
This commit is contained in:
2026-06-11 18:09:54 +08:00
parent 291ab06a5b
commit 59facaf14b
7 changed files with 324 additions and 245 deletions

View File

@@ -592,6 +592,8 @@ test('auth gate hides register entry and opens invite modal for new sms account'
await user.click(screen.getByRole('button', { name: '进入作品' }));
const dialog = await screen.findByRole('dialog', { name: '账号入口' });
expect(dialog.className).toContain('platform-auth-card');
expect(dialog.className).toContain('platform-modal-shell');
expect(within(dialog).queryByRole('tab', { name: '注册' })).toBeNull();
expect(within(dialog).queryByLabelText('邀请码')).toBeNull();
await user.type(within(dialog).getByLabelText('手机号'), '13800000000');
@@ -609,6 +611,8 @@ test('auth gate hides register entry and opens invite modal for new sms account'
const inviteDialog = await screen.findByRole('dialog', {
name: '请填写邀请码',
});
expect(inviteDialog.className).toContain('platform-auth-card');
expect(inviteDialog.className).toContain('platform-modal-shell');
const inviteCodeInput = within(inviteDialog).getByLabelText(
'邀请码',
) as HTMLInputElement;
@@ -799,6 +803,8 @@ test('login modal resets draft state every time it is reopened', async () => {
await user.click(await screen.findByRole('button', { name: '进入作品' }));
const firstDialog = screen.getByRole('dialog', { name: '账号入口' });
expect(firstDialog.className).toContain('platform-auth-card');
expect(firstDialog.className).toContain('platform-modal-shell');
await user.type(within(firstDialog).getByLabelText('手机号'), '13800000000');
await user.click(
within(firstDialog).getByRole('button', { name: '获取验证码' }),