From cf4c026d79db84103e200ebb3427e83191b0bdb8 Mon Sep 17 00:00:00 2001
From: Vishnu <vishnu@hexrfactory.com>
Date: Fri, 4 Apr 2025 13:42:46 +0530
Subject: [PATCH] update asset library URL, fix dropdown item comment, and
 adjust line color based on theme

---
 app/.env                                                      | 2 +-
 app/src/components/layout/sidebarLeft/Outline.tsx             | 2 +-
 .../modules/scene/controls/selection/boundingBoxHelper.tsx    | 4 +++-
 app/src/modules/scene/controls/selection/moveControls.tsx     | 2 +-
 app/src/modules/scene/controls/selection/rotateControls.tsx   | 2 +-
 .../services/factoryBuilder/assest/assets/getCategoryAsset.ts | 3 +--
 6 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/app/.env b/app/.env
index 5740621..c50d174 100644
--- a/app/.env
+++ b/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
 
 # 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
 REACT_APP_IOT_SOCKET_SERVER_URL =185.100.212.76:5010
diff --git a/app/src/components/layout/sidebarLeft/Outline.tsx b/app/src/components/layout/sidebarLeft/Outline.tsx
index bad3b59..b7d5803 100644
--- a/app/src/components/layout/sidebarLeft/Outline.tsx
+++ b/app/src/components/layout/sidebarLeft/Outline.tsx
@@ -12,7 +12,7 @@ const Outline: React.FC = () => {
 
   const dropdownItems = [
     { id: "1", name: "Ground Floor" },
-    { id: "2", name: "Floor 1" },
+    // { id: "2", name: "Floor 1" },
   ]; // Example dropdown items
 
   return (
diff --git a/app/src/modules/scene/controls/selection/boundingBoxHelper.tsx b/app/src/modules/scene/controls/selection/boundingBoxHelper.tsx
index ebc3761..dd9d251 100644
--- a/app/src/modules/scene/controls/selection/boundingBoxHelper.tsx
+++ b/app/src/modules/scene/controls/selection/boundingBoxHelper.tsx
@@ -44,11 +44,13 @@ const BoundingBox = ({ boundingBoxRef }: any) => {
         };
     }, [selectedAssets]);
 
+    const savedTheme: string | null = localStorage.getItem("theme") || "light";
+    
     return (
         <>
             {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}>
                         <boxGeometry args={boxProps.args} />
                         <meshBasicMaterial />
diff --git a/app/src/modules/scene/controls/selection/moveControls.tsx b/app/src/modules/scene/controls/selection/moveControls.tsx
index 350b487..bd55c95 100644
--- a/app/src/modules/scene/controls/selection/moveControls.tsx
+++ b/app/src/modules/scene/controls/selection/moveControls.tsx
@@ -238,7 +238,7 @@ function MoveControls({ movedObjects, setMovedObjects, itemsGroupRef, copiedObje
                             return updatedEvents;
                         });
 
-                        // socket.emit("v2:model-asset:add", data);
+                        socket.emit("v2:model-asset:add", data);
                     }
                 } else {
 
diff --git a/app/src/modules/scene/controls/selection/rotateControls.tsx b/app/src/modules/scene/controls/selection/rotateControls.tsx
index 6ad8309..1489651 100644
--- a/app/src/modules/scene/controls/selection/rotateControls.tsx
+++ b/app/src/modules/scene/controls/selection/rotateControls.tsx
@@ -241,7 +241,7 @@ function RotateControls({ rotatedObjects, setRotatedObjects, movedObjects, setMo
                             return updatedEvents;
                         });
 
-                        // socket.emit("v2:model-asset:add", data);
+                        socket.emit("v2:model-asset:add", data);
                     }
                 } else {
 
diff --git a/app/src/services/factoryBuilder/assest/assets/getCategoryAsset.ts b/app/src/services/factoryBuilder/assest/assets/getCategoryAsset.ts
index a1ac727..7c422df 100644
--- a/app/src/services/factoryBuilder/assest/assets/getCategoryAsset.ts
+++ b/app/src/services/factoryBuilder/assest/assets/getCategoryAsset.ts
@@ -1,8 +1,7 @@
 let BackEnd_url = `http://${process.env.REACT_APP_SERVER_ASSET_LIBRARY_URL}`;
 export const getCategoryAsset = async (categoryName: any) => {
   try {
-    const response = await fetch(
-      `${BackEnd_url}/api/v2/getCatagoryAssets/${categoryName}`,
+    const response = await fetch(`${BackEnd_url}/api/v2/getCategoryAssets/${categoryName}`,
       {
         method: "GET",
         headers: {