// desktop/src/components/login/HeicodeLoginPage.tsx // // Production-grade login surface. Layout follows // docs/product-package/11-product-prototype-wireframes.md §1 // (brand wordmark + tagline + single sign-in card) but the visual // system was tightened up: // // - 36px chrome strip with drag region + window controls // - Layered gradient backdrop (violet/blue glow at top, vignette at // bottom) so the login surface feels like a hero, not a form // - Centered logo image + wordmark above tagline; both pull the // same gradient as --gradient-brand-wordmark so the login screen // matches the app icon you see in the title bar / taskbar / dock // - Single CTA card on a generous max-w-sm canvas // - Footer copy lives at the very bottom, not floating in the middle // // Visual references: Linear / Vercel / Raycast desktop login screens. import { useEffect } from 'react' import { useHeicodeAuthStore } from '../../stores/heicodeAuthStore' import { ProviderLoginCard } from './ProviderLoginCard' import { WindowControls } from '../layout/WindowControls' import { useTranslation } from '../../i18n' export function HeicodeLoginPage() { const t = useTranslation() const { providers, hasFetched, isLoading, error, fetch: fetchAuth, stopOAuthPolling, } = useHeicodeAuthStore() useEffect(() => { if (!hasFetched) { void fetchAuth() } return () => { stopOAuthPolling() } }, [hasFetched, fetchAuth, stopOAuthPolling]) return (
{/* ─── Chrome strip ────────────────────────────────────── */}
Heicode
{/* ─── Layered backdrop ────────────────────────────────── */} {/* Top violet halo */}
{/* Lower blue glow */}
{/* Subtle grain — adds the "real product" tactility */}
\")", }} /> {/* ─── Content ─────────────────────────────────────────── */}
{/* App icon — the H glass. Drop-shadow tinted with violet so the icon reads as continuous with the gradient backdrop. */}

Heicode

{t('login.tagline')}

{!hasFetched && isLoading ? (
{t('common.loading')}
) : null} {/* docs/product-package/08 §"登录" + §"客户端不应该出现的内容": Login screen only shows the Heicode provider. The legacy `official` (Claude Official) preset was removed from the provider type entirely; no filter needed any more. */} {hasFetched && providers.length === 0 ? (
{t('login.errors.noProviders')}
) : null} {hasFetched && providers.length > 0 ? (
{providers.map((provider) => ( ))}
) : null} {error ? (
{error}
) : null}

{t('login.footer.heicodeProvidesModels')}

) }