codev / src /components /LogoV2 /WelcomeV2.tsx
chenbhao's picture
chore: rename VersperClaw to Codev, update org to chenbhao
96f34e3
Raw
History Blame Contribute Delete
12.4 kB
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>
)
}