Skip to content

Commit 3b074e6

Browse files
authored
style(cli): adding loading animation when updating version (#8285)
1 parent 1d15c7c commit 3b074e6

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

extensions/cli/src/ui/UpdateNotification.tsx

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Text } from "ink";
1+
import { Box, Text } from "ink";
22
import React, { useMemo } from "react";
33

44
import { useServices } from "../hooks/useService.js";
@@ -9,6 +9,7 @@ import {
99
} from "../services/types.js";
1010

1111
import { useTerminalSize } from "./hooks/useTerminalSize.js";
12+
import { LoadingAnimation } from "./LoadingAnimation.js";
1213

1314
interface UpdateNotificationProps {
1415
isRemoteMode?: boolean;
@@ -48,6 +49,15 @@ const UpdateNotification: React.FC<UpdateNotificationProps> = ({
4849
return <Text color="cyan">◉ Remote Mode</Text>;
4950
}
5051

52+
if (services.update?.status === UpdateStatus.UPDATING) {
53+
return (
54+
<Box columnGap={1}>
55+
<LoadingAnimation />
56+
<Text color={color}>{`${text}`}</Text>
57+
</Box>
58+
);
59+
}
60+
5161
return <Text color={color}>{`◉ ${text}`}</Text>;
5262
};
5363

0 commit comments

Comments
 (0)