style(cli): adding loading animation when updating version (#8285)

This commit is contained in:
Aditya Mitra 2025-10-21 00:53:42 +05:30 • committed by GitHub
parent 1d15c7c3df
commit 3b074e6565
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,4 +1,4 @@
import { Text } from "ink";
import { Box, Text } from "ink";
import React, { useMemo } from "react";
import { useServices } from "../hooks/useService.js";
@ -9,6 +9,7 @@ import {
} from "../services/types.js";
import { useTerminalSize } from "./hooks/useTerminalSize.js";
import { LoadingAnimation } from "./LoadingAnimation.js";
interface UpdateNotificationProps {
isRemoteMode?: boolean;
@ -48,6 +49,15 @@ const UpdateNotification: React.FC<UpdateNotificationProps> = ({
return <Text color="cyan">◉ Remote Mode</Text>;
}
if (services.update?.status === UpdateStatus.UPDATING) {
return (
<Box columnGap={1}>
<LoadingAnimation />
<Text color={color}>{`${text}`}</Text>
</Box>
);
}
return <Text color={color}>{`◉ ${text}`}</Text>;
};