@@ -43,54 +43,57 @@ export function SettingsAccount() {
4343 if ( ! isAuthenticated ) {
4444 if ( isPending && devMode ) {
4545 return (
46- < Container
47- title = "Manual callback"
48- description = "Paste the callback URL below."
49- >
50- < div className = "flex flex-col gap-2" >
51- < Input
52- type = "text"
53- className = "text-sm"
54- placeholder = "hyprnote://auth?access_token=...& refresh_token = ..."
55- value = { callbackUrl }
56- onChange = { ( e ) => setCallbackUrl ( e . target . value ) }
57- />
58- < div className = "flex gap-2" >
59- < Button
60- onClick = { ( ) => auth ?. handleAuthCallback ( callbackUrl ) }
61- className = "flex-1"
62- >
63- Submit
64- </ Button >
65- < Button variant = "outline" onClick = { ( ) => setDevMode ( false ) } >
66- Back
67- </ Button >
68- </ div >
46+ < div className = "flex flex-col gap-3" >
47+ < div className = "flex flex-col gap-1.5" >
48+ < h2 className = "text-sm font-medium" > Manual callback</ h2 >
49+ < p className = "text-xs text-neutral-500" >
50+ Paste the callback URL from your browser
51+ </ p >
52+ </ div >
53+ < Input
54+ type = "text"
55+ className = "text-xs font-mono"
56+ placeholder = "hyprnote://auth?access_token=...& refresh_token = ..."
57+ value = { callbackUrl }
58+ onChange = { ( e ) => setCallbackUrl ( e . target . value ) }
59+ />
60+ < div className = "flex gap-2" >
61+ < Button
62+ onClick = { ( ) => auth ?. handleAuthCallback ( callbackUrl ) }
63+ className = "flex-1"
64+ >
65+ Submit
66+ </ Button >
67+ < Button variant = "outline" onClick = { ( ) => setDevMode ( false ) } >
68+ Back
69+ </ Button >
6970 </ div >
70- </ Container >
71+ </ div >
7172 ) ;
7273 }
7374
7475 if ( isPending ) {
7576 return (
76- < Container
77- title = "Not redirected?"
78- description = "Click below to reopen the sign-in page."
79- action = {
80- < Button onClick = { handleSignIn } >
81- < span > Reopen sign-in page</ span >
77+ < div className = "flex flex-col gap-4" >
78+ < div className = "flex flex-col gap-1.5" >
79+ < h2 className = "text-sm font-medium" > Waiting for sign-in...</ h2 >
80+ < p className = "text-xs text-neutral-500" >
81+ Complete the sign-in process in your browser
82+ </ p >
83+ </ div >
84+ < div className = "flex flex-col gap-2" >
85+ < Button onClick = { handleSignIn } variant = "outline" className = "w-full" >
86+ Reopen sign-in page
8287 </ Button >
83- }
84- >
85- { import . meta. env . DEV && (
86- < p
88+ < Button
8789 onClick = { ( ) => setDevMode ( true ) }
88- className = "text-xs text-neutral-600 cursor-pointer hover:text-neutral-900"
90+ variant = "ghost"
91+ className = "w-full text-xs"
8992 >
90- Click here to workaround deeplink.
91- </ p >
92- ) }
93- </ Container >
93+ Having trouble? Paste callback URL manually
94+ </ Button >
95+ </ div >
96+ </ div >
9497 ) ;
9598 }
9699
@@ -181,7 +184,7 @@ function Container({
181184 children,
182185} : {
183186 title : string ;
184- description : string ;
187+ description ? : string ;
185188 action ?: ReactNode ;
186189 children ?: ReactNode ;
187190} ) {
@@ -190,7 +193,9 @@ function Container({
190193 < div className = "flex flex-row items-center justify-between gap-4" >
191194 < div className = "flex flex-col gap-2" >
192195 < h1 className = "text-md font-semibold" > { title } </ h1 >
193- < p className = "text-sm text-neutral-600" > { description } </ p >
196+ { description && (
197+ < p className = "text-sm text-neutral-600" > { description } </ p >
198+ ) }
194199 </ div >
195200 { action ? < div className = "flex-shrink-0" > { action } </ div > : null }
196201 </ div >
0 commit comments