From 78505312f43fba0726ededca44df2691ebcf5f10 Mon Sep 17 00:00:00 2001 From: y574444354 <574444354@qq.com> Date: Thu, 9 Apr 2026 15:35:24 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=9B=B4=E6=96=B0=20WelcomeV2=20?= =?UTF-8?q?=E6=A0=B7=E5=BC=8F=E5=AF=B9=E9=BD=90=E5=92=8C=20ThemePicker=20?= =?UTF-8?q?=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/LogoV2/WelcomeV2.tsx | 289 ++++++++++------------------ src/components/ThemePicker.tsx | 2 +- 2 files changed, 108 insertions(+), 183 deletions(-) diff --git a/src/components/LogoV2/WelcomeV2.tsx b/src/components/LogoV2/WelcomeV2.tsx index 235c7cada..9c08a967d 100644 --- a/src/components/LogoV2/WelcomeV2.tsx +++ b/src/components/LogoV2/WelcomeV2.tsx @@ -4,6 +4,10 @@ import { env } from '../../utils/env.js'; const WELCOME_V2_WIDTH = 58; +const COSTRICT_ART_LINE1 = '█▀▀ █▀█ █▀ ▀█▀ █▀█ █ █▀▀ ▀█▀'; +const COSTRICT_ART_LINE2 = '█▄▄ █▄█ ▄█ █ █▀▄ █ █▄▄ █ '; +const DIVIDER_PREFIX = '…………'; // 4个…,每个占2列,共8列 + export function WelcomeV2(): React.ReactNode { const [theme] = useTheme(); const welcomeMessage = 'Welcome to CoStrict'; @@ -14,102 +18,70 @@ export function WelcomeV2(): React.ReactNode { if (['light', 'light-daltonized', 'light-ansi'].includes(theme)) { return ( - + - - {welcomeMessage} - v{MACRO.VERSION} + {welcomeMessage} + v{MACRO.VERSION} + + {'…………………………………………………………………………………………………………………………………………………………'} + {' ░░░░░░ '} + {' ░░░ ░░░░░░░░░░ '} + {' ░░░░░░░░░░░░░░░░░░░ '} + + + {'…………'} + + {' '} + {COSTRICT_ART_LINE1} - {'…………………………………………………………………………………………………………………………………………………………'} - {' '} - {' '} - {' '} - {' ░░░░░░ '} - {' ░░░ ░░░░░░░░░░ '} - {' ░░░░░░░░░░░░░░░░░░░ '} - {' '} - - {' ░░░░'} - {' ██ '} - - - {' ░░░░░░░░░░'} - {' ██▒▒██ '} - - {' ▒▒ ██ ▒'} - - {' '} - █████████ - {' ▒▒░░▒▒ ▒ ▒▒'} - - - {' '} - - ██▄█████▄██ - - {' ▒▒ ▒▒ '} - - - {' '} - █████████ - {' ░ ▒ '} - - - {'…………………'} - {'█ █ █ █'} - {'……………………………………………………………………░…………………………▒…………'} + + + {'…………'} + + {' '} + {COSTRICT_ART_LINE2} + {'…………………………………………'} ); } return ( - + - - {welcomeMessage} - v{MACRO.VERSION} + {welcomeMessage} + v{MACRO.VERSION} + + {'…………………………………………………………………………………………………………………………………………………………'} + {' * █████▓▓░ '} + {' * ███▓░ ░░ '} + {' ░░░░░░ ███▓░ '} + {' ░░░ ░░░░░░░░░░ ███▓░ '} + + {' ░░░░░░░░░░░░░░░░░░░ '} + * + {' ██▓░░ ▓ '} + + {' ░▓▓███▓▓░ '} + {' * ░░░░ '} + {' ░░░░░░░░ '} + {' * ░░░░░░░░░░░░░░░░ '} + {' * '} + + {' '} + + {' '} + {COSTRICT_ART_LINE1} - {'…………………………………………………………………………………………………………………………………………………………'} - {' '} - {' * █████▓▓░ '} - {' * ███▓░ ░░ '} - {' ░░░░░░ ███▓░ '} - {' ░░░ ░░░░░░░░░░ ███▓░ '} - - {' ░░░░░░░░░░░░░░░░░░░ '} - * - {' ██▓░░ ▓ '} - - {' ░▓▓███▓▓░ '} - {' * ░░░░ '} - {' ░░░░░░░░ '} - {' ░░░░░░░░░░░░░░░░ '} - - {' '} - █████████ - {' '} - * - - - - {' '} - ██▄█████▄██ - {' '} - * - {' '} - - - {' '} - █████████ - {' * '} - - - {'…………………'} - {'█ █ █ █'} - {'………………………………………………………………………………………………………………'} + + + {'…………'} + + {' '} + {COSTRICT_ART_LINE2} + {'………………………………………………………………'} ); @@ -125,116 +97,69 @@ function AppleTerminalWelcomeV2({ theme, welcomeMessage }: AppleTerminalWelcomeV if (isLightTheme) { return ( - + - - {welcomeMessage} - v{MACRO.VERSION} + {welcomeMessage} + v{MACRO.VERSION} + + {'…………………………………………………………………………………………………………………………………………………………'} + {' ░░░░░░ '} + {' ░░░ ░░░░░░░░░░ '} + {' ░░░░░░░░░░░░░░░░░░░ '} + + + {'…………'} + + {' '} + {COSTRICT_ART_LINE1} - {'…………………………………………………………………………………………………………………………………………………………'} - {' '} - {' '} - {' '} - {' ░░░░░░ '} - {' ░░░ ░░░░░░░░░░ '} - {' ░░░░░░░░░░░░░░░░░░░ '} - {' '} - - {' ░░░░'} - {' ██ '} - - - {' ░░░░░░░░░░'} - {' ██▒▒██ '} - - {' ▒▒ ██ ▒'} - {' ▒▒░░▒▒ ▒ ▒▒'} - - {' '} - - - {' '} - ▗{' '}▖{' '} - - - {' ▒▒ ▒▒ '} - - - {' '} - {' '.repeat(9)} - {' ░ ▒ '} - - - {'…………………'} - - - - {' '} - - - - {'……………………………………………………………………░…………………………▒…………'} + + + {'…………'} + + {' '} + {COSTRICT_ART_LINE2} + {'…………………………………………'} ); } return ( - + - - {welcomeMessage} - v{MACRO.VERSION} + {welcomeMessage} + v{MACRO.VERSION} + + {'…………………………………………………………………………………………………………………………………………………………'} + {' * █████▓▓░ '} + {' * ███▓░ ░░ '} + {' ░░░░░░ ███▓░ '} + {' ░░░ ░░░░░░░░░░ ███▓░ '} + + {' ░░░░░░░░░░░░░░░░░░░ '} + * + {' ██▓░░ ▓ '} + + {' ░▓▓███▓▓░ '} + {' * ░░░░ '} + {' ░░░░░░░░ '} + {' ░░░░░░░░░░░░░░░░ '} + + {'…………'} + + {' '} + {COSTRICT_ART_LINE1} - {'…………………………………………………………………………………………………………………………………………………………'} - {' '} - {' * █████▓▓░ '} - {' * ███▓░ ░░ '} - {' ░░░░░░ ███▓░ '} - {' ░░░ ░░░░░░░░░░ ███▓░ '} - - {' ░░░░░░░░░░░░░░░░░░░ '} - * - {' ██▓░░ ▓ '} - - {' ░▓▓███▓▓░ '} - {' * ░░░░ '} - {' ░░░░░░░░ '} - {' ░░░░░░░░░░░░░░░░ '} - - {' '} - * - - - - {' '} - - - {' '} - ▗{' '}▖{' '} - - - {' '} - * - {' '} - - - {' '} - {' '.repeat(9)} - {' * '} - - - {'…………………'} - - - - {' '} - - - - {'………………………………………………………………………………………………………………'} + + + {'…………'} + + {' '} + {COSTRICT_ART_LINE2} + {'…………………………………………'} ); diff --git a/src/components/ThemePicker.tsx b/src/components/ThemePicker.tsx index 2c99fc455..e586ddc4a 100644 --- a/src/components/ThemePicker.tsx +++ b/src/components/ThemePicker.tsx @@ -164,7 +164,7 @@ export function ThemePicker({ lines: [ ' function greet() {', '- console.log("Hello, World!");', - '+ console.log("Hello, Claude!");', + '+ console.log("Hello, CoStrict!");', ' }', ], }}