| import React from 'react' |
| import { Box, Text, useTheme } from 'src/ink.js' |
| import { env } from '../../utils/env.js' |
|
|
| const WELCOME_V2_WIDTH = 58 |
|
|
| export function WelcomeV2(): React.ReactNode { |
| const [theme] = useTheme() |
| const welcomeMessage = 'Welcome to Codev' |
|
|
| if (env.terminal === 'Apple_Terminal') { |
| return ( |
| <AppleTerminalWelcomeV2 theme={theme} welcomeMessage={welcomeMessage} /> |
| ) |
| } |
|
|
| if (['light', 'light-daltonized', 'light-ansi'].includes(theme)) { |
| return ( |
| <Box width={WELCOME_V2_WIDTH}> |
| <Text> |
| <Text> |
| <Text color="clawd_body">{welcomeMessage} </Text> |
| <Text dimColor>v{MACRO.VERSION} </Text> |
| </Text> |
| <Text> |
| {'β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦'} |
| </Text> |
| <Text> |
| {' '} |
| </Text> |
| <Text> |
| {' '} |
| </Text> |
| <Text> |
| {' '} |
| </Text> |
| <Text> |
| {' ββββββ '} |
| </Text> |
| <Text> |
| {' βββ ββββββββββ '} |
| </Text> |
| <Text> |
| {' βββββββββββββββββββ '} |
| </Text> |
| <Text> |
| {' '} |
| </Text> |
| <Text> |
| <Text dimColor>{' ββββ'}</Text> |
| <Text>{' ββ '}</Text> |
| </Text> |
| <Text> |
| <Text dimColor>{' ββββββββββ'}</Text> |
| <Text>{' ββββββ '}</Text> |
| </Text> |
| <Text> |
| {' ββ ββ β'} |
| </Text> |
| <Text> |
| {' '} |
| <Text color="clawd_body"> βββββββββ </Text> |
| {' ββββββ β ββ'} |
| </Text> |
| <Text> |
| {' '} |
| <Text color="clawd_body" backgroundColor="clawd_background"> |
| βββββββββββ |
| </Text> |
| {' ββ ββ '} |
| </Text> |
| <Text> |
| {' '} |
| <Text color="clawd_body"> βββββββββ </Text> |
| {' β β '} |
| </Text> |
| <Text> |
| {'β¦β¦β¦β¦β¦β¦β¦'} |
| <Text color="clawd_body">{'β β β β'}</Text> |
| {'β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦ββ¦β¦β¦β¦β¦β¦β¦β¦β¦β¦ββ¦β¦β¦β¦'} |
| </Text> |
| </Text> |
| </Box> |
| ) |
| } |
|
|
| return ( |
| <Box width={WELCOME_V2_WIDTH}> |
| <Text> |
| <Text> |
| <Text color="clawd_body">{welcomeMessage} </Text> |
| <Text dimColor>v{MACRO.VERSION} </Text> |
| </Text> |
| <Text> |
| {'β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦'} |
| </Text> |
| <Text> |
| {' '} |
| </Text> |
| <Text> |
| {' * ββββββββ '} |
| </Text> |
| <Text> |
| {' * βββββ ββ '} |
| </Text> |
| <Text> |
| {' ββββββ βββββ '} |
| </Text> |
| <Text> |
| {' βββ ββββββββββ βββββ '} |
| </Text> |
| <Text> |
| <Text>{' βββββββββββββββββββ '}</Text> |
| <Text bold>*</Text> |
| <Text>{' βββββ β '}</Text> |
| </Text> |
| <Text> |
| {' βββββββββ '} |
| </Text> |
| <Text dimColor> |
| {' * ββββ '} |
| </Text> |
| <Text dimColor> |
| {' ββββββββ '} |
| </Text> |
| <Text dimColor> |
| {' ββββββββββββββββ '} |
| </Text> |
| <Text> |
| {' '} |
| <Text color="clawd_body"> βββββββββ </Text> |
| {' '} |
| <Text dimColor>*</Text> |
| <Text> </Text> |
| </Text> |
| <Text> |
| {' '} |
| <Text color="clawd_body">βββββββββββ</Text> |
| <Text>{' '}</Text> |
| <Text bold>*</Text> |
| <Text>{' '}</Text> |
| </Text> |
| <Text> |
| {' '} |
| <Text color="clawd_body"> βββββββββ </Text> |
| {' * '} |
| </Text> |
| <Text> |
| {'β¦β¦β¦β¦β¦β¦β¦'} |
| <Text color="clawd_body">{'β β β β'}</Text> |
| {'β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦'} |
| </Text> |
| </Text> |
| </Box> |
| ) |
| } |
|
|
| type AppleTerminalWelcomeV2Props = { |
| theme: string |
| welcomeMessage: string |
| } |
|
|
| function AppleTerminalWelcomeV2({ |
| theme, |
| welcomeMessage, |
| }: AppleTerminalWelcomeV2Props): React.ReactNode { |
| const isLightTheme = ['light', 'light-daltonized', 'light-ansi'].includes( |
| theme, |
| ) |
|
|
| if (isLightTheme) { |
| return ( |
| <Box width={WELCOME_V2_WIDTH}> |
| <Text> |
| <Text> |
| <Text color="clawd_body">{welcomeMessage} </Text> |
| <Text dimColor>v{MACRO.VERSION} </Text> |
| </Text> |
| <Text> |
| {'β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦'} |
| </Text> |
| <Text> |
| {' '} |
| </Text> |
| <Text> |
| {' '} |
| </Text> |
| <Text> |
| {' '} |
| </Text> |
| <Text> |
| {' ββββββ '} |
| </Text> |
| <Text> |
| {' βββ ββββββββββ '} |
| </Text> |
| <Text> |
| {' βββββββββββββββββββ '} |
| </Text> |
| <Text> |
| {' '} |
| </Text> |
| <Text> |
| <Text dimColor>{' ββββ'}</Text> |
| <Text>{' ββ '}</Text> |
| </Text> |
| <Text> |
| <Text dimColor>{' ββββββββββ'}</Text> |
| <Text>{' ββββββ '}</Text> |
| </Text> |
| <Text> |
| {' ββ ββ β'} |
| </Text> |
| <Text> |
| {' ββββββ β ββ'} |
| </Text> |
| <Text> |
| {' '} |
| <Text color="clawd_body">β</Text> |
| <Text color="clawd_background" backgroundColor="clawd_body"> |
| {' '} |
| β{' '}β{' '} |
| </Text> |
| <Text color="clawd_body">β</Text> |
| {' ββ ββ '} |
| </Text> |
| <Text> |
| {' '} |
| <Text backgroundColor="clawd_body">{' '.repeat(9)}</Text> |
| {' β β '} |
| </Text> |
| <Text> |
| {'β¦β¦β¦β¦β¦β¦β¦'} |
| <Text backgroundColor="clawd_body"> </Text> |
| <Text> </Text> |
| <Text backgroundColor="clawd_body"> </Text> |
| <Text>{' '}</Text> |
| <Text backgroundColor="clawd_body"> </Text> |
| <Text> </Text> |
| <Text backgroundColor="clawd_body"> </Text> |
| {'β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦ββ¦β¦β¦β¦β¦β¦β¦β¦β¦β¦ββ¦β¦β¦β¦'} |
| </Text> |
| </Text> |
| </Box> |
| ) |
| } |
|
|
| return ( |
| <Box width={WELCOME_V2_WIDTH}> |
| <Text> |
| <Text> |
| <Text color="clawd_body">{welcomeMessage} </Text> |
| <Text dimColor>v{MACRO.VERSION} </Text> |
| </Text> |
| <Text> |
| {'β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦'} |
| </Text> |
| <Text> |
| {' '} |
| </Text> |
| <Text> |
| {' * ββββββββ '} |
| </Text> |
| <Text> |
| {' * βββββ ββ '} |
| </Text> |
| <Text> |
| {' ββββββ βββββ '} |
| </Text> |
| <Text> |
| {' βββ ββββββββββ βββββ '} |
| </Text> |
| <Text> |
| <Text>{' βββββββββββββββββββ '}</Text> |
| <Text bold>*</Text> |
| <Text>{' βββββ β '}</Text> |
| </Text> |
| <Text> |
| {' βββββββββ '} |
| </Text> |
| <Text dimColor> |
| {' * ββββ '} |
| </Text> |
| <Text dimColor> |
| {' ββββββββ '} |
| </Text> |
| <Text dimColor> |
| {' ββββββββββββββββ '} |
| </Text> |
| <Text> |
| {' '} |
| <Text dimColor>*</Text> |
| <Text> </Text> |
| </Text> |
| <Text> |
| {' '} |
| <Text color="clawd_body">β</Text> |
| <Text color="clawd_background" backgroundColor="clawd_body"> |
| {' '} |
| β{' '}β{' '} |
| </Text> |
| <Text color="clawd_body">β</Text> |
| <Text>{' '}</Text> |
| <Text bold>*</Text> |
| <Text>{' '}</Text> |
| </Text> |
| <Text> |
| {' '} |
| <Text backgroundColor="clawd_body">{' '.repeat(9)}</Text> |
| {' * '} |
| </Text> |
| <Text> |
| {'β¦β¦β¦β¦β¦β¦β¦'} |
| <Text backgroundColor="clawd_body"> </Text> |
| <Text> </Text> |
| <Text backgroundColor="clawd_body"> </Text> |
| <Text>{' '}</Text> |
| <Text backgroundColor="clawd_body"> </Text> |
| <Text> </Text> |
| <Text backgroundColor="clawd_body"> </Text> |
| {'β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦'} |
| </Text> |
| </Text> |
| </Box> |
| ) |
| } |
|
|