@@ -18,17 +18,37 @@ function FeatureCard({ title, body }: { title: string; body: string }) {
1818 ) ;
1919}
2020
21- function LoadingPanel ( { title, body } : { title : string ; body : string } ) {
21+ function SessionStatusPanel ( { mode } : { mode : "checking" | "redirecting" } ) {
22+ const status = mode === "checking"
23+ ? {
24+ title : "Checking account" ,
25+ body : "If you are already signed in, we will open your workspace. Otherwise you can continue here." ,
26+ }
27+ : {
28+ title : "Opening workspace" ,
29+ body : "You are signed in. We are taking you to the right Cloud destination." ,
30+ } ;
31+
2232 return (
23- < div className = "den-frame grid gap-3 p-6 md:p-7" >
33+ < div className = "den-frame flex min-h-[420px] flex-col justify-between gap-8 p-6 md:p-7" role = "status" aria-live = "polite ">
2434 < div className = "grid gap-3" >
25- < p className = "den-eyebrow" > OpenWork Cloud</ p >
26- < h2 className = "den-title-lg" > { title } </ h2 >
27- < p className = "den-copy" > { body } </ p >
28- </ div >
29- < div className = "h-2 overflow-hidden rounded-full bg-[var(--dls-hover)]" >
30- < div className = "h-full w-1/3 animate-pulse rounded-full bg-[var(--dls-accent)]" />
35+ < p className = "den-eyebrow" > Account</ p >
36+ < div className = "rounded-[1.5rem] border border-[var(--dls-border)] bg-[var(--dls-hover)]/60 p-4" >
37+ < div className = "flex items-start gap-3" >
38+ < span className = "relative mt-1 flex h-2.5 w-2.5 shrink-0" >
39+ < span className = "absolute inline-flex h-full w-full animate-ping rounded-full bg-[var(--dls-accent)] opacity-30" />
40+ < span className = "relative inline-flex h-2.5 w-2.5 rounded-full bg-[var(--dls-accent)]" />
41+ </ span >
42+ < div className = "min-w-0" >
43+ < p className = "m-0 text-[14px] font-medium text-[var(--dls-text-primary)]" > { status . title } </ p >
44+ < p className = "mt-1 text-[13px] leading-6 text-[var(--dls-text-secondary)]" > { status . body } </ p >
45+ </ div >
46+ </ div >
47+ </ div >
3148 </ div >
49+ < p className = "m-0 text-xs leading-5 text-[var(--dls-text-secondary)]" >
50+ No action needed.
51+ </ p >
3252 </ div >
3353 ) ;
3454}
@@ -63,14 +83,6 @@ export function AuthScreen() {
6383 } ) ;
6484 } , [ hasResolvedSession , pathname , resolveUserLandingRoute , router ] ) ;
6585
66- if ( ! sessionHydrated ) {
67- return (
68- < section className = "den-page flex w-full items-center py-4 lg:min-h-[calc(100vh-2.5rem)]" >
69- < LoadingPanel title = "Checking your session." body = "Loading your Cloud account state..." />
70- </ section >
71- ) ;
72- }
73-
7486 return (
7587 < section className = "den-page flex w-full items-center py-4 lg:min-h-[calc(100vh-2.5rem)]" >
7688 < div className = "grid w-full gap-6 lg:grid-cols-[minmax(0,1fr)_minmax(360px,440px)]" >
@@ -138,11 +150,10 @@ export function AuthScreen() {
138150 </ div >
139151
140152 < div className = "order-1 lg:order-2" >
141- { hasResolvedSession ? (
142- < LoadingPanel
143- title = "Redirecting to your workspace."
144- body = "We found your account and are sending you to the right Cloud destination now."
145- />
153+ { ! sessionHydrated ? (
154+ < SessionStatusPanel mode = "checking" />
155+ ) : hasResolvedSession ? (
156+ < SessionStatusPanel mode = "redirecting" />
146157 ) : (
147158 < AuthPanel />
148159 ) }
0 commit comments