style(cli): adding loading animation when updating version (#8285)
This commit is contained in:
parent
1d15c7c3df
commit
3b074e6565
1 changed files with 11 additions and 1 deletions
|
|
@ -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>;
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue