Skip to content

Commit

Permalink
refactor(hidden-frame): 🎉 update hidden frame logic
Browse files Browse the repository at this point in the history
  • Loading branch information
gokhangunduz committed Aug 9, 2023
1 parent 7942c9a commit 88c1779
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 8 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ui",
"version": "0.10.5",
"version": "0.10.6",
"private": true,
"dependencies": {
"@emotion/css": "^11.10.6",
Expand Down
25 changes: 19 additions & 6 deletions src/pages/RobotPage/Overview/Overview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import WorkspacesTable from "../../../components/WorkspacesTable/WorkspacesTable
import BuildManagerStepsTable from "../../../components/BuildManagerStepsTable/BuildManagerStepsTable";
import LaunchManagerStepsTable from "../../../components/LaunchManagerStepsTable/LaunchManagerStepsTable";
import useWindow from "../../../hooks/useWindow";
import { envOnPremise } from "../../../helpers/envProvider";
interface IOverview {
responseRobot: any;
responseBuildManager: any;
Expand All @@ -29,13 +30,25 @@ export default function Overview({
<div className="col-span-full lg:col-span-4">
<InformationWidget
title={url?.robotName || ""}
subtitle="From this page, you can see all the details of the robot, control the robot, assign tasks, control the environments running on the robot or develop the robot's software."
subtitle={
envOnPremise
? "From this page, you can see all the details of the application, control the application, control the environments running on the application or develop the application's software."
: "From this page, you can see all the details of the robot, control the robot, assign tasks, control the environments running on the robot or develop the robot's software."
}
component={
<Button
text="Teleoperation of Robot"
className="!w-44 !h-10 !text-xs"
onClick={informationWidgetAction}
/>
envOnPremise ? (
<Button
text="Development Suite"
className="!w-44 !h-10 !text-xs"
onClick={informationWidgetAction}
/>
) : (
<Button
text="Teleoperation of Robot"
className="!w-44 !h-10 !text-xs"
onClick={informationWidgetAction}
/>
)
}
/>
</div>
Expand Down
5 changes: 4 additions & 1 deletion src/pages/RobotPage/RobotPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import { useParams } from "react-router-dom";
import Overview from "./Overview/Overview";
import useMain from "../../hooks/useMain";
import HiddenFrame from "../../components/HiddenFrame/HiddenFrame";
import { envOnPremise } from "../../helpers/envProvider";

export default function RobotPage(): ReactElement {
const [responseRobot, setResponseRobot] = useState<any>(undefined);
Expand Down Expand Up @@ -280,7 +281,9 @@ export default function RobotPage(): ReactElement {
responseBuildManager={responseBuildManager}
responseLaunchManagers={responseLaunchManagers}
informationWidgetAction={() => {
setActiveTab("Teleoperation");
setActiveTab(
envOnPremise ? "Development Suite" : "Teleoperation"
);
}}
/>
);
Expand Down

0 comments on commit 88c1779

Please sign in to comment.