Skip to content

Commit

Permalink
feat(version): release 0.30.4 version
Browse files Browse the repository at this point in the history
  • Loading branch information
gokhangunduz committed Jan 12, 2024
1 parent 7287478 commit 36cb08e
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 23 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.30.3",
"version": "0.30.4",
"private": true,
"scripts": {
"dev": "react-scripts start",
Expand Down
2 changes: 1 addition & 1 deletion src/components/Floor3D/Floor3D.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { Fragment } from "react";

export default function Floor3D(props: any) {
export default function Floor3D() {
return (
<Fragment>
<color attach="background" args={["#FFFFF0"]} />
Expand Down
8 changes: 2 additions & 6 deletions src/components/Machine3D/Machine3D.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,17 +75,13 @@ export default function Machine3D({ item }: IMachine3D) {
<meshNormalMaterial
transparent={
findBarcodeInput
? item.barcode.includes(findBarcodeInput)
? item.barcode === findBarcodeInput
? false
: true
: false
}
opacity={
findBarcodeInput
? item.barcode.includes(findBarcodeInput)
? 1
: 0.1
: 1
findBarcodeInput ? (item.barcode === findBarcodeInput ? 1 : 0.1) : 1
}
/>
{hovered && (
Expand Down
8 changes: 3 additions & 5 deletions src/components/Scene3D/Scene3D.tsx
Original file line number Diff line number Diff line change
@@ -1,24 +1,22 @@
import Control3D from "../Control3D/Control3D";
import { Canvas } from "@react-three/fiber";
import React, { ReactElement } from "react";
import { Fragment, ReactElement } from "react";
import Light3D from "../Light3D/Light3D";
import Floor3D from "../Floor3D/Floor3D";

interface IScene3D {
children?: ReactElement | ReactElement[];
ros?: any;
}

export default function Scene3D({
children,
ros,
}: IScene3D): ReactElement<IScene3D> {
return (
<Canvas dpr={[1, 1]} gl={{ powerPreference: "high-performance" }}>
{children}
<Fragment>{children}</Fragment>
<Light3D />
<Control3D />
<Floor3D ros={ros} />
<Floor3D />
</Canvas>
);
}
4 changes: 3 additions & 1 deletion src/contexts/RobotContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,9 @@ export default ({ children }: any) => {
// VDI - vIDE Test Connection
useEffect(() => {
const vdiClient: WebSocket | null =
isSettedCookie && connectionsReducer?.vdi === null
isSettedCookie &&
robotData.step1.services.vdi.socketEndpoint &&
connectionsReducer?.vdi === null
? new WebSocket(
(urls?.vdi || responseRobot?.vdiIngressEndpoint) +
"ws?password=admin",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import Card from "../../../components/Card/Card";

export default function BarcodeManagement({ ros }: any): ReactElement {
const [activeTab, setActiveTab] = useState<"2D" | "3D">("3D");

const handleFullScreen = useFullScreenHandle();

return (
Expand All @@ -17,7 +16,7 @@ export default function BarcodeManagement({ ros }: any): ReactElement {
{activeTab === "2D" ? (
<BarcodeManagement2D />
) : (
<BarcodeManagement3D ros={ros} />
<BarcodeManagement3D />
)}
</Fragment>
<BarcodeManagementControls
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ import Machine3D from "../../../components/Machine3D/Machine3D";
import Robot3D from "../../../components/Robot3D/Robot3D";
import Scene3D from "../../../components/Scene3D/Scene3D";

export default function App({ ros }: any) {
export default function BarcodeManagement3D() {
const { barcodeItems } = useBarcode();

return (
<div className="animate-fadeIn absolute inset-0">
<Scene3D ros={ros}>
<Scene3D>
{barcodeItems?.map((barcodeItem: any, barcodeItemIndex: number) => {
return <Machine3D key={barcodeItemIndex} item={barcodeItem} />;
})}
Expand Down
12 changes: 7 additions & 5 deletions src/pages/EnvironmentPage/TaskManagement/MissionManagement.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ export default function MissionManagement({ ros }: ITask): ReactElement {
<div className="flex h-full flex-col gap-2 py-2">
<div className="flex flex-col items-center justify-center gap-1 pb-1 font-medium ">
<span>Missions</span>
<span className="bg-primary-500 h-[2px] w-20" />
<span className="h-[2px] w-20 bg-primary-500" />
</div>
{missions?.length ? (
missions?.map((mission: any, missionIndex: number) => {
Expand Down Expand Up @@ -196,13 +196,15 @@ export default function MissionManagement({ ros }: ITask): ReactElement {
>
<TransformComponent>
<div
style={{
backgroundImage: `url(/images/bg-transparent.png)`,
}}
style={
{
// backgroundImage: `url(/images/bg-transparent.png)`,
}
}
className="flex w-full items-center justify-center"
>
<div
className="border-light-600 relative border-4"
className="relative border-4 border-light-600"
style={{
width: `${rosMapDetails?.resolution?.x}px`,
height: `${rosMapDetails?.resolution?.y}px`,
Expand Down

0 comments on commit 36cb08e

Please sign in to comment.