Skip to content

Commit 6107b86

Browse files
committed
Show url in login page
1 parent 65c7c11 commit 6107b86

File tree

1 file changed

+24
-1
lines changed

1 file changed

+24
-1
lines changed

cli/src/components/login-modal.tsx

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,9 @@ export const LoginModal = ({
385385
>
386386
<text style={{ wrapMode: 'word' }}>
387387
<span fg={theme.secondary}>
388-
{isNarrow ? 'Click to copy:' : 'Click link to copy:'}
388+
{isNarrow
389+
? 'Opening browser...'
390+
: 'Opening browser to complete login...'}
389391
</span>
390392
</text>
391393
<box
@@ -431,6 +433,27 @@ export const LoginModal = ({
431433
</text>
432434
</box>
433435
)}
436+
{/* Show raw URL as fallback for devices where open() doesn't work */}
437+
<box
438+
style={{
439+
marginTop: isVerySmall ? 1 : 2,
440+
flexDirection: 'column',
441+
alignItems: 'center',
442+
width: '100%',
443+
flexShrink: 0,
444+
}}
445+
>
446+
<text style={{ wrapMode: 'word' }}>
447+
<span fg={theme.muted}>
448+
{isNarrow ? 'Or copy URL:' : "Or copy this URL if browser didn't open:"}
449+
</span>
450+
</text>
451+
<text style={{ wrapMode: 'word' }}>
452+
<span fg={theme.muted}>
453+
{loginUrl}
454+
</span>
455+
</text>
456+
</box>
434457
</box>
435458
)}
436459
</box>

0 commit comments

Comments
 (0)