feat: apply standard login page design
This commit is contained in:
@@ -481,7 +481,27 @@ describe('completion feedback motion', () => {
|
||||
expect(css).toContain('@media(prefers-reduced-motion:reduce){.task-row.just-completed,.habit-row.just-completed,.task-row.just-completed .task-check-mark,.habit-row.just-completed .task-check-mark{animation:none}.task-row.completion-exiting,.habit-row.completion-exiting{animation:none}}')
|
||||
})
|
||||
|
||||
it('syncs the browser IANA timezone before loading user task data', () => {
|
||||
it('stacks the desktop calendar copy to align with weather and gold', () => {
|
||||
expect(css).toContain('@media(min-width:721px){.today-environment__calendar{flex-direction:column;align-items:flex-start;gap:0}.today-environment__calendar small{margin-top:2px;font-size:10.5px}}')
|
||||
})
|
||||
|
||||
it('uses the approved internal-standard login composition and material tokens', () => {
|
||||
expect(app).toContain('class="auth-brand"')
|
||||
expect(app).toContain('class="brand brand-lockup"')
|
||||
expect(app).toContain('<h1 id="auth-title">{{ initialized ? \'欢迎回来\' : \'创建你的 dodo\' }}</h1>')
|
||||
expect(app).toContain("{{ initialized ? '登录后继续处理今天的事项。' : '创建账号后开始整理你的事项。' }}")
|
||||
expect(app).toContain('<p v-if="initialized" class="auth-footnote">登录后继续你的清单</p>')
|
||||
expect(app).toContain('<form class="auth-card" aria-labelledby="auth-title" @submit.prevent="submitAuth">')
|
||||
expect(app).toContain('<button type="submit" class="primary">')
|
||||
expect(css).toMatch(/\.auth-card\{[^}]*width:min\(400px,100%\)[^}]*padding:36px[^}]*border:1px solid var\(--border-cream\)[^}]*border-radius:var\(--radius-card\)/)
|
||||
expect(css).toContain('.auth-brand .brand{gap:9px;font-size:28px;letter-spacing:-2px}')
|
||||
expect(css).toContain('.auth-brand .brand-logo{width:34px;height:34px}')
|
||||
expect(css).toMatch(/\.auth-card input\{[^}]*min-height:46px[^}]*background:var\(--surface-raised\)/)
|
||||
expect(css).toContain('.auth-card>.primary{min-height:46px}')
|
||||
expect(css).toMatch(/@media\(max-width:930px\)\{\.auth-shell\{padding:18px\}\.auth-card\{padding:30px 24px\}/)
|
||||
})
|
||||
|
||||
it('syncs browser IANA timezone before loading user task data', () => {
|
||||
expect(app).toContain("Intl.DateTimeFormat().resolvedOptions().timeZone")
|
||||
expect(app).toContain("await api('/me', { method: 'PATCH', body: JSON.stringify({ timezone }) })")
|
||||
const bootstrapBlock = app.slice(app.indexOf('async function bootstrap()'), app.indexOf('async function submitAuth()'))
|
||||
|
||||
Reference in New Issue
Block a user