fix(cli): reset logo to flat frame when loading completes (#786)
Co-authored-by: Letta <noreply@letta.com>
This commit is contained in:
@@ -124,13 +124,16 @@ function getSnapshot(): number {
|
||||
|
||||
interface AnimatedLogoProps {
|
||||
color?: string;
|
||||
/** When false, show static frame 0 (flat logo). Defaults to true. */
|
||||
animate?: boolean;
|
||||
}
|
||||
|
||||
export function AnimatedLogo({
|
||||
color = colors.welcome.accent,
|
||||
animate = true,
|
||||
}: AnimatedLogoProps) {
|
||||
const tick = useSyncExternalStore(subscribe, getSnapshot);
|
||||
const frame = tick % logoFrames.length;
|
||||
const frame = animate ? tick % logoFrames.length : 0;
|
||||
|
||||
const logoLines = logoFrames[frame]?.split("\n") ?? [];
|
||||
|
||||
|
||||
@@ -117,7 +117,10 @@ export function WelcomeScreen({
|
||||
<Box flexDirection="row" marginTop={1}>
|
||||
{/* Left column: Logo */}
|
||||
<Box flexDirection="column" paddingLeft={1} paddingRight={2}>
|
||||
<AnimatedLogo color={colors.welcome.accent} />
|
||||
<AnimatedLogo
|
||||
color={colors.welcome.accent}
|
||||
animate={loadingState !== "ready"}
|
||||
/>
|
||||
</Box>
|
||||
|
||||
{/* Right column: Text info */}
|
||||
|
||||
Reference in New Issue
Block a user