Skip to content

Commit

Permalink
refactor(breadcrumb and controller): 🎉 update breadcrumb and vdi-cont…
Browse files Browse the repository at this point in the history
…roller
  • Loading branch information
gokhangunduz committed Nov 24, 2023
1 parent 23e592f commit 359f368
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 18 deletions.
28 changes: 28 additions & 0 deletions public/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -1130,6 +1130,22 @@ video {
height: 100vh;
}

.h-\[44rem\] {
height: 44rem;
}

.h-\[43\.5rem\] {
height: 43.5rem;
}

.h-\[43\.6rem\] {
height: 43.6rem;
}

.h-\[43\.4rem\] {
height: 43.4rem;
}

.max-h-\[40rem\] {
max-height: 40rem;
}
Expand Down Expand Up @@ -2132,6 +2148,18 @@ video {
background-color: rgb(202 138 4 / var(--tw-bg-opacity));
}

.bg-opacity-50 {
--tw-bg-opacity: 0.5;
}

.bg-opacity-25 {
--tw-bg-opacity: 0.25;
}

.bg-opacity-75 {
--tw-bg-opacity: 0.75;
}

.\!p-0 {
padding: 0px !important;
}
Expand Down
7 changes: 6 additions & 1 deletion src/components/Breadcrumb/Breadcrumb.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {
RiUser3Fill,
RiUserSettingsFill,
} from "react-icons/ri";
import { envApplication } from "../../helpers/envProvider";

export default function Breadcrumb(): ReactElement {
const breadcrumbs = useBreadcrumbs();
Expand Down Expand Up @@ -73,7 +74,11 @@ export default function Breadcrumb(): ReactElement {
return (
<img
className="w-3"
src="/svg/general/robot/robot-gray.svg"
src={
envApplication
? "/svg/general/application/application-gray.svg"
: "/svg/general/robot/robot-gray.svg"
}
alt="rc"
/>
);
Expand Down
2 changes: 1 addition & 1 deletion src/components/CodeEditor/CodeEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ export default function CodeEditor(): ReactElement {
<iframe
allow="clipboard-read"
className={`animate__animated animate__fadeIn w-full ${
handleFullScreen?.active ? "h-screen" : "h-[45.4rem]"
handleFullScreen?.active ? "h-screen" : "h-[43.4rem]"
}`}
src={
activeTabCodeEditor === "Cloud IDE"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export default function RemoteDesktopController({
return (
<div className="absolute bottom-0 flex flex-col items-center ">
<button
className="rounded-t-lg border-x-2 border-t-2 border-layer-light-200 bg-layer-light-50 px-1"
className="rounded-t-lg border-x-2 border-t-2 border-layer-light-200 bg-layer-light-50 bg-opacity-75 px-1"
onClick={() => handleIsControllerOpen()}
>
{isControllerOpen ? (
Expand All @@ -59,7 +59,7 @@ export default function RemoteDesktopController({
)}
</button>
{isControllerOpen && (
<div className="flex w-full items-center justify-center gap-6 rounded-t-lg bg-layer-light-50 px-3 pb-1.5 pt-3">
<div className="flex w-full items-center justify-center gap-6 rounded-t-lg bg-layer-light-50 bg-opacity-75 px-3 pb-1.5 pt-3">
<FullScreenButton
isFullScreen={handleFullScreen.active}
handleFullScreen={
Expand Down
26 changes: 12 additions & 14 deletions src/components/RobotHeaderTabs/RobotHeaderTabs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,31 +59,31 @@ export default function RobotHeaderTabs(): ReactElement {
envApplication || (responseRobot && !responseRobot?.bridgeEnabled),
},
{
name: "Code Editor",
name: "Development Suite",
icon: <AiFillCode size={16} />,
isLoading:
!responseRobot ||
!(
responseRobot?.ideEnabled &&
responseRobot?.ideIngressEndpoint &&
responseRobot?.vdiEnabled &&
responseRobot?.vdiIngressEndpoint &&
isSettedCookie
),
) ||
!isRobotReady,

isHidden: false,
},
{
name: "Development Suite",
name: "Code Editor",
icon: <AiFillCode size={16} />,
isLoading:
!responseRobot ||
!(
responseRobot?.ideEnabled &&
responseRobot?.ideIngressEndpoint &&
responseRobot?.vdiEnabled &&
responseRobot?.vdiIngressEndpoint &&
isSettedCookie
) ||
!isRobotReady,

),
isHidden: false,
},
{
Expand All @@ -108,7 +108,7 @@ export default function RobotHeaderTabs(): ReactElement {
responseRobot?.ideIngressEndpoint &&
isSettedCookie
),
isHidden: false,
isHidden: true,
},
];

Expand All @@ -117,11 +117,9 @@ export default function RobotHeaderTabs(): ReactElement {
data-tut="robot-header-tabs"
className="flex items-end gap-6 overflow-x-auto px-6 pt-4"
>
{tabs
?.filter((tab: IrobotTab) => tab && tab)
.map((tab: IrobotTab, index: number) => {
return <RobotHeaderTab tab={tab} key={index} />;
})}
{tabs.map((tab: IrobotTab, index: number) => {
return <RobotHeaderTab tab={tab} key={index} />;
})}
</ul>
);
}

0 comments on commit 359f368

Please sign in to comment.