File tree Expand file tree Collapse file tree 2 files changed +15
-10
lines changed Expand file tree Collapse file tree 2 files changed +15
-10
lines changed Original file line number Diff line number Diff line change @@ -10,17 +10,10 @@ import { useLoginPolling } from '../hooks/use-login-polling'
1010import { useLogo } from '../hooks/use-logo'
1111import { useSheenAnimation } from '../hooks/use-sheen-animation'
1212import { useTheme } from '../hooks/use-theme'
13- import {
14- DEFAULT_TERMINAL_HEIGHT ,
15- MODAL_VERTICAL_MARGIN ,
16- MAX_MODAL_BASE_HEIGHT ,
17- WARNING_BANNER_HEIGHT ,
18- } from '../login/constants'
1913import {
2014 formatUrl ,
2115 generateFingerprintId ,
2216 calculateResponsiveLayout ,
23- calculateModalDimensions ,
2417} from '../login/utils'
2518import { useLoginStore } from '../state/login-store'
2619import { copyTextToClipboard } from '../utils/clipboard'
@@ -272,7 +265,7 @@ export const LoginModal = ({
272265 style = { {
273266 width : '100%' ,
274267 padding : 1 ,
275- backgroundColor : theme . error ,
268+ backgroundColor : theme . surface ,
276269 flexShrink : 0 ,
277270 } }
278271 >
@@ -364,10 +357,10 @@ export const LoginModal = ({
364357 } }
365358 >
366359 < text style = { { wrapMode : 'word' } } >
367- < span fg = { theme . primary } >
360+ < span fg = { '#00cc00' } >
368361 { isNarrow
369362 ? 'Press ENTER to login...'
370- : 'Press ENTER to open your browser and finish logging in ...' }
363+ : 'Press ENTER to open your browser and login ...' }
371364 </ span >
372365 </ text >
373366 </ box >
Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ interface UseLoginKeyboardHandlersParams {
1515 * Custom hook that handles keyboard input for the login modal
1616 * - Enter key: fetch login URL and open browser
1717 * - 'c' key: copy URL to clipboard
18+ * - Ctrl+C: exit the application
1819 */
1920export function useLoginKeyboardHandlers ( {
2021 loginUrl,
@@ -33,6 +34,17 @@ export function useLoginKeyboardHandlers({
3334 ! key . shift
3435
3536 const isCKey = key . name === 'c' && ! key . ctrl && ! key . meta && ! key . shift
37+ const isCtrlC = key . ctrl && key . name === 'c'
38+
39+ if ( isCtrlC ) {
40+ if (
41+ 'preventDefault' in key &&
42+ typeof key . preventDefault === 'function'
43+ ) {
44+ key . preventDefault ( )
45+ }
46+ process . exit ( 0 )
47+ }
3648
3749 if ( isEnter && ! hasOpenedBrowser && ! loading ) {
3850 if (
You can’t perform that action at this time.
0 commit comments