diff --git a/public/css/style.css b/public/css/style.css index d94d3005..b86cf488 100644 --- a/public/css/style.css +++ b/public/css/style.css @@ -1359,6 +1359,10 @@ video { width: max-content; } +.\!w-28 { + width: 7rem !important; +} + .min-w-\[12rem\] { min-width: 12rem; } @@ -1734,6 +1738,14 @@ video { gap: 5rem; } +.gap-0 { + gap: 0px; +} + +.gap-0\.5 { + gap: 0.125rem; +} + .overflow-auto { overflow: auto; } @@ -1861,6 +1873,10 @@ video { border-top-width: 2px; } +.border-l { + border-left-width: 1px; +} + .border-none { border-style: none; } @@ -2160,6 +2176,11 @@ video { background-color: rgb(234 179 8 / var(--tw-bg-opacity)); } +.bg-secondary-50 { + --tw-bg-opacity: 1; + background-color: rgb(232 247 254 / var(--tw-bg-opacity)); +} + .bg-opacity-75 { --tw-bg-opacity: 0.75; } @@ -2534,6 +2555,14 @@ video { line-height: 1rem; } +.\!text-\[0\.66rem\] { + font-size: 0.66rem !important; +} + +.\!text-\[0\.68rem\] { + font-size: 0.68rem !important; +} + .\!font-semibold { font-weight: 600 !important; } diff --git a/src/components/ControlBar/ControlBar.tsx b/src/components/ControlBar/ControlBar.tsx index 7551ace1..d32b24df 100644 --- a/src/components/ControlBar/ControlBar.tsx +++ b/src/components/ControlBar/ControlBar.tsx @@ -1,3 +1,7 @@ +import RestartService from "../RestartServiceButton/RestartServiceButton"; +import FullScreenService from "../FullScreenService/FullScreenService"; +import VDIVolumeControl from "../VDIVolumeControl/VDIVolumeControl"; +import VDIControlButton from "../VDIControlButton/VDIControlButton"; import { ReactElement, useState } from "react"; import { MdOutlineKeyboardArrowDown, @@ -6,11 +10,7 @@ import { import FileBrowser from "../FileBrowser/FileBrowser"; import ServiceJobs from "../ServiceJobs/ServiceJobs"; import ServiceLogs from "../ServiceLogs/ServiceLogs"; -import RestartService from "../RestartServiceButton/RestartServiceButton"; -import FullScreenService from "../FullScreenService/FullScreenService"; import { FullScreenHandle } from "react-full-screen"; -import VDIVolumeControl from "../VDIVolumeControl/VDIVolumeControl"; -import VDIControlButton from "../VDIControlButton/VDIControlButton"; interface IControlBar { type: "ide" | "vdi"; @@ -26,7 +26,7 @@ export default function ControlBar({ return (
{isOpenMenu && ( -
+
diff --git a/src/components/SidebarLists/RobotsList.tsx b/src/components/SidebarLists/RobotsList.tsx index e273c9fe..1b205fcf 100644 --- a/src/components/SidebarLists/RobotsList.tsx +++ b/src/components/SidebarLists/RobotsList.tsx @@ -1,5 +1,5 @@ -import React, { Fragment, ReactElement, useEffect, useState } from "react"; import SidebarListLoader from "../SidebarListLoader/SidebarListLoader"; +import { Fragment, ReactElement, useEffect, useState } from "react"; import { envApplication } from "../../helpers/envProvider"; import StateCell from "../TableInformationCells/StateCell"; import SidebarInfo from "../SidebarInfo/SidebarInfo"; diff --git a/src/components/SidebarLists/SidebarListItem.tsx b/src/components/SidebarLists/SidebarListItem.tsx index a017e793..834b5126 100644 --- a/src/components/SidebarLists/SidebarListItem.tsx +++ b/src/components/SidebarLists/SidebarListItem.tsx @@ -4,6 +4,7 @@ import { useNavigate } from "react-router-dom"; import useMain from "../../hooks/useMain"; import { ReactElement } from "react"; import { toast } from "sonner"; +import { MdKeyboardArrowRight } from "react-icons/md"; interface ISidebarListItem { name: string; @@ -122,24 +123,79 @@ export default function SidebarListItem({ } }; + function handleNotSelectableClick() { + switch (type) { + case "organization": + setSelectedState({ + ...selectedState, + organization: data, + roboticsCloud: null, + instance: null, + fleet: null, + }); + setSidebarState({ ...sidebarState, isOpen: false }); + navigate(url); + break; + case "roboticscloud": + setSelectedState({ + ...selectedState, + roboticsCloud: data, + instance: null, + fleet: null, + }); + setSidebarState({ ...sidebarState, isOpen: false }); + navigate(url); + break; + case "instance": + if (data?.instanceCloudState === "ConnectionHub_Ready") { + setSelectedState({ + ...selectedState, + instance: data, + fleet: null, + }); + setSidebarState({ ...sidebarState, isOpen: false }); + navigate(url); + } else { + toast.error( + "Instance is not selectable now. Please try again later.", + ); + } + break; + case "fleet": + if ( + data?.fleetStatus === "Ready" || + data?.namespaceStatus === "Active" + ) { + setSelectedState({ ...selectedState, fleet: data }); + setSidebarState({ ...sidebarState, isOpen: false }); + navigate(url); + } else { + toast.error("Fleet is not selectable now. Please try again later."); + } + + break; + } + } + return (
handleSelectItem()} - className={`transition-300 flex w-full gap-4 rounded-l-lg border-r p-2.5 ${ - selected - ? "border-light-400 hover:bg-light-200" - : "border-light-200 hover:bg-light-100" - } ${notSelectable && "!border-0"}`} + className={`flex w-full gap-4 rounded-l-lg p-2.5 + ${selected ? " hover:bg-light-200" : " hover:bg-light-100"} + `} > rl
- {name} - {description} +

{name}

+

{description}

{!notSelectable && (
{ - switch (type) { - case "organization": - setSelectedState({ - ...selectedState, - organization: data, - roboticsCloud: null, - instance: null, - fleet: null, - }); - setSidebarState({ ...sidebarState, isOpen: false }); - navigate(url); - break; - case "roboticscloud": - setSelectedState({ - ...selectedState, - roboticsCloud: data, - instance: null, - fleet: null, - }); - setSidebarState({ ...sidebarState, isOpen: false }); - navigate(url); - break; - case "instance": - if (data?.instanceCloudState === "ConnectionHub_Ready") { - setSelectedState({ - ...selectedState, - instance: data, - fleet: null, - }); - setSidebarState({ ...sidebarState, isOpen: false }); - navigate(url); - } else { - toast.error( - "Instance is not selectable now. Please try again later.", - ); - } - break; - case "fleet": - if ( - data?.fleetStatus === "Ready" || - data?.namespaceStatus === "Active" - ) { - setSelectedState({ ...selectedState, fleet: data }); - setSidebarState({ ...sidebarState, isOpen: false }); - navigate(url); - } else { - toast.error( - "Fleet is not selectable now. Please try again later.", - ); - } - - break; - } - }} - className={`transition-300 flex items-center justify-center rounded-r-lg px-3.5 ${ + onClick={() => handleNotSelectableClick()} + className={`transition-300 flex h-full items-center justify-center border-l px-3 ${ selected - ? "border-light-400 hover:bg-light-200" - : "border-light-100 hover:bg-light-100" + ? "border-light-300 hover:bg-light-200" + : "border-light-200 hover:bg-light-100" } `} > - +
)}
diff --git a/src/components/SidebarMenu/SidebarMenu.tsx b/src/components/SidebarMenu/SidebarMenu.tsx index c271806b..d8bd5128 100644 --- a/src/components/SidebarMenu/SidebarMenu.tsx +++ b/src/components/SidebarMenu/SidebarMenu.tsx @@ -93,12 +93,6 @@ export default function PrivateSidebar(): ReactElement { ) : ( - {/* {!(envApplicationFleet || envApplication) && ( - - )} */}
- {/* */} handleGetControl()} - className="!h-11 !w-36 text-xs" + className="!h-9 !w-32 !text-[0.68rem]" /> ); } diff --git a/src/components/VDIVolumeControl/VDIVolumeControl.tsx b/src/components/VDIVolumeControl/VDIVolumeControl.tsx index ba27d17b..9939957f 100644 --- a/src/components/VDIVolumeControl/VDIVolumeControl.tsx +++ b/src/components/VDIVolumeControl/VDIVolumeControl.tsx @@ -21,6 +21,11 @@ export default function VDIVolumeControl(): ReactElement { handleVolumeControl(Number(e.target.value) / 100)} + style={{ + appearance: "auto", + color: "#AC2DFE", + accentColor: "currentcolor", + }} type="range" min="1" max="100"