update asset library URL, fix dropdown item comment, and adjust line color based on theme
This commit is contained in:
parent
df0b4a297a
commit
cf4c026d79
2
app/.env
2
app/.env
|
@ -11,7 +11,7 @@ REACT_APP_SERVER_REST_API_BASE_URL=185.100.212.76:5000
|
||||||
REACT_APP_SERVER_MARKETPLACE_URL=185.100.212.76:50011
|
REACT_APP_SERVER_MARKETPLACE_URL=185.100.212.76:50011
|
||||||
|
|
||||||
# Base URL for the asset library server, used for asset library images and model blob id.
|
# Base URL for the asset library server, used for asset library images and model blob id.
|
||||||
REACT_APP_SERVER_ASSET_LIBRARY_URL=192.168.0.111:3501
|
REACT_APP_SERVER_ASSET_LIBRARY_URL=185.100.212.76:50011
|
||||||
|
|
||||||
# base url for IoT socket server
|
# base url for IoT socket server
|
||||||
REACT_APP_IOT_SOCKET_SERVER_URL =185.100.212.76:5010
|
REACT_APP_IOT_SOCKET_SERVER_URL =185.100.212.76:5010
|
||||||
|
|
|
@ -12,7 +12,7 @@ const Outline: React.FC = () => {
|
||||||
|
|
||||||
const dropdownItems = [
|
const dropdownItems = [
|
||||||
{ id: "1", name: "Ground Floor" },
|
{ id: "1", name: "Ground Floor" },
|
||||||
{ id: "2", name: "Floor 1" },
|
// { id: "2", name: "Floor 1" },
|
||||||
]; // Example dropdown items
|
]; // Example dropdown items
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|
|
@ -44,11 +44,13 @@ const BoundingBox = ({ boundingBoxRef }: any) => {
|
||||||
};
|
};
|
||||||
}, [selectedAssets]);
|
}, [selectedAssets]);
|
||||||
|
|
||||||
|
const savedTheme: string | null = localStorage.getItem("theme") || "light";
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
{points.length > 0 && (
|
{points.length > 0 && (
|
||||||
<>
|
<>
|
||||||
<Line points={points} color="yellow" lineWidth={2.5} segments />
|
<Line points={points} color={savedTheme === "dark" ? "#c4abf1" : "#6f42c1"} lineWidth={2.7} segments />
|
||||||
<mesh ref={boundingBoxRef} visible={false} position={boxProps.position}>
|
<mesh ref={boundingBoxRef} visible={false} position={boxProps.position}>
|
||||||
<boxGeometry args={boxProps.args} />
|
<boxGeometry args={boxProps.args} />
|
||||||
<meshBasicMaterial />
|
<meshBasicMaterial />
|
||||||
|
|
|
@ -238,7 +238,7 @@ function MoveControls({ movedObjects, setMovedObjects, itemsGroupRef, copiedObje
|
||||||
return updatedEvents;
|
return updatedEvents;
|
||||||
});
|
});
|
||||||
|
|
||||||
// socket.emit("v2:model-asset:add", data);
|
socket.emit("v2:model-asset:add", data);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
|
|
|
@ -241,7 +241,7 @@ function RotateControls({ rotatedObjects, setRotatedObjects, movedObjects, setMo
|
||||||
return updatedEvents;
|
return updatedEvents;
|
||||||
});
|
});
|
||||||
|
|
||||||
// socket.emit("v2:model-asset:add", data);
|
socket.emit("v2:model-asset:add", data);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
let BackEnd_url = `http://${process.env.REACT_APP_SERVER_ASSET_LIBRARY_URL}`;
|
let BackEnd_url = `http://${process.env.REACT_APP_SERVER_ASSET_LIBRARY_URL}`;
|
||||||
export const getCategoryAsset = async (categoryName: any) => {
|
export const getCategoryAsset = async (categoryName: any) => {
|
||||||
try {
|
try {
|
||||||
const response = await fetch(
|
const response = await fetch(`${BackEnd_url}/api/v2/getCategoryAssets/${categoryName}`,
|
||||||
`${BackEnd_url}/api/v2/getCatagoryAssets/${categoryName}`,
|
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
headers: {
|
headers: {
|
||||||
|
|
Loading…
Reference in New Issue