From 8af9ad59b3969ebda19eae146b9904e44f2ced7f Mon Sep 17 00:00:00 2001 From: c00b3r Date: Thu, 5 Jun 2025 17:40:33 +0500 Subject: [PATCH] feat: update DesktopCard for loading state --- src/components/DesktopCard.tsx | 10 ++++++-- src/components/ProjectSelector.tsx | 4 +-- src/components/icons/SpinIcon.tsx | 40 ++++++++++++++++++++++++++++++ 3 files changed, 50 insertions(+), 4 deletions(-) create mode 100644 src/components/icons/SpinIcon.tsx diff --git a/src/components/DesktopCard.tsx b/src/components/DesktopCard.tsx index bcad047..8ff993b 100644 --- a/src/components/DesktopCard.tsx +++ b/src/components/DesktopCard.tsx @@ -10,6 +10,7 @@ import UnlinkIcon from "./icons/UnlinkIcon"; import clsx from "clsx"; import ChevronRightIcon from "./icons/ChevronRightIcon"; import CurrentSessionModal from "./modals/CurrentSessionModal"; +import SpinIcon from "./icons/SpinIcon"; interface IDesktopCardProps { server: IServer; @@ -52,8 +53,13 @@ export default function DesktopCard({ server }: IDesktopCardProps) {
{server.sessions?.[0]?.status === "starting" ? ( -
- загрузка... +
+ + + +
+ Начинаем сеанс +
) : server.sessions?.[0]?.status === "started" ? (
diff --git a/src/components/ProjectSelector.tsx b/src/components/ProjectSelector.tsx index 6488801..a497716 100644 --- a/src/components/ProjectSelector.tsx +++ b/src/components/ProjectSelector.tsx @@ -39,7 +39,7 @@ function ProjectSelector({ >

Проект

-

{selectedProject?.name}

+

{selectedProject?.name}

@@ -89,7 +89,7 @@ function ProjectSelector({ />
-

{project.name}

+

{project.name}

{activeProject && project.name === activeProject.name && ( diff --git a/src/components/icons/SpinIcon.tsx b/src/components/icons/SpinIcon.tsx new file mode 100644 index 0000000..f64e60b --- /dev/null +++ b/src/components/icons/SpinIcon.tsx @@ -0,0 +1,40 @@ +function SpinIcon() { + return ( + + + +
+ + + + + + + + + + ); +} + +export default SpinIcon;