diff --git a/app/src/components/layout/controls/ControlsPlayer.tsx b/app/src/components/layout/controls/ControlsPlayer.tsx index 248c466..4f897d2 100644 --- a/app/src/components/layout/controls/ControlsPlayer.tsx +++ b/app/src/components/layout/controls/ControlsPlayer.tsx @@ -10,6 +10,7 @@ const ControlsPlayer = () => { const { setIsPlaying } = usePlayButtonStore(); const { activeModule } = useModuleStore(); const [walkMode, setWalkMode] = useState(false); + const [hidePlayer, setHidePlayer] = useState(false); const changeCamMode = () => { setWalkMode(!walkMode); @@ -17,37 +18,47 @@ const ControlsPlayer = () => { }; return (
-
- -
Running {activeModule}...
-
+ {!hidePlayer && ( +
+ +
Running {activeModule}...
+
+ )}
-
- - -
+ {!hidePlayer && ( +
+ + +
+ )} -
+
+ {!hidePlayer && "Hide"} +
); diff --git a/app/src/components/ui/simulation/simulationPlayer.tsx b/app/src/components/ui/simulation/simulationPlayer.tsx index d88dcae..de1652f 100644 --- a/app/src/components/ui/simulation/simulationPlayer.tsx +++ b/app/src/components/ui/simulation/simulationPlayer.tsx @@ -11,6 +11,7 @@ import { DailyProductionIcon, EndIcon, ExpandIcon, + EyeCloseIcon, HourlySimulationIcon, InfoIcon, MonthlyROI, @@ -30,6 +31,7 @@ const SimulationPlayer: React.FC = () => { const sliderRef = useRef(null); const [expand, setExpand] = useState(true); const [playSimulation, setPlaySimulation] = useState(false); + const [hidePlayer, setHidePlayer] = useState(false); const { speed, setSpeed } = useAnimationPlaySpeed(); const { setIsPlaying } = usePlayButtonStore(); @@ -161,10 +163,10 @@ const SimulationPlayer: React.FC = () => { return ( <> -
+
- {subModule === "analysis" && ( + {!hidePlayer && subModule === "analysis" && (
{/* hourlySimulation */}
@@ -213,7 +215,7 @@ const SimulationPlayer: React.FC = () => {
)} - {subModule !== "analysis" && ( + {!hidePlayer && subModule !== "analysis" && (
{playSimulation @@ -222,26 +224,30 @@ const SimulationPlayer: React.FC = () => {
)}
- - + {!hidePlayer && ( + + )} + {!hidePlayer && ( + + )} + {subModule === "analysis" && (
-
-
-
-
- -
-
-
23 April ,25
-
04:41 PM
-
-
-
-
- {intervals.map((label, index) => { - const segmentProgress = (index / totalSegments) * 100; - const isFilled = progress >= segmentProgress; - return ( - -
-
{label} mins
-
-
- {index < intervals.length - 1 && ( -
= ((index + 1) / totalSegments) * 100 - ? "filled" - : "" - }`} - >
- )} -
- ); - })} -
-
- -
-
-
00:10:20
-
-
- -
-
-
-
-
-
- -
- Speed -
-
-
0.5X
-
-
-
-
-
-
-
-
-
-
-
- - + {!hidePlayer && ( +
+
+
+
+ +
+
+
23 April ,25
+
04:41 PM
+
+
+
+
+ {intervals.map((label, index) => { + const segmentProgress = (index / totalSegments) * 100; + const isFilled = progress >= segmentProgress; + return ( + +
+
{label} mins
+
+
+ {index < intervals.length - 1 && ( +
= ((index + 1) / totalSegments) * 100 + ? "filled" + : "" + }`} + >
+ )} +
+ ); + })} +
+
+ +
+
+
00:10:20
+
+
+ +
+
+
+
+
+
+ +
+ Speed +
+
+
0.5X
+
+
+
+
+
+
+
+
+
+
+
+ + +
+
{MAX_SPEED}x
-
{MAX_SPEED}x
-
- {subModule === "analysis" && ( + )} + {!hidePlayer && subModule === "analysis" && (
00:00
24:00
diff --git a/app/src/styles/components/simulation/simulation.scss b/app/src/styles/components/simulation/simulation.scss index b664b37..f95518e 100644 --- a/app/src/styles/components/simulation/simulation.scss +++ b/app/src/styles/components/simulation/simulation.scss @@ -8,7 +8,16 @@ z-index: 2; transform: translate(-50%, 0); width: 70vw; - + transition: all 0.3s; + &.hide { + width: fit-content; + .simulation-player-container + .controls-container + .simulation-button-container { + width: 32px; + height: 24px; + } + } .simulation-player-container { background: var(--background-color); padding: 7px; @@ -90,11 +99,12 @@ @include flex-center; gap: 2px; padding: 4px 8px; - min-width: 64px; + width: 64px; background: var(--background-color); border-radius: #{$border-radius-extra-large}; height: fit-content; cursor: pointer; + transition: all 0.2s; &:hover { outline: 1px solid var(--border-color); @@ -357,7 +367,7 @@ @include flex-center; justify-content: space-between; position: fixed; - bottom: 40px; + bottom: 32px; left: 50%; transform: translate(-50%, 0); color: var(--accent-color); @@ -394,21 +404,23 @@ } .btn-wrapper { - display: flex; - justify-content: center; - align-items: center; + @include flex-center; gap: 2px; padding: 4px 8px; - min-width: 64px; + width: 64px; background: var(--background-color); border-radius: 20px; height: fit-content; cursor: pointer; - transition: color .2s; + transition: all 0.2s; + outline: 1px solid transparent; &:hover { outline: 1px solid var(--border-color); color: var(--accent-color); } + &.hide{ + width: 32px; + } .icon { width: 16px; height: 16px; diff --git a/app/src/styles/pages/realTimeViz.scss b/app/src/styles/pages/realTimeViz.scss index 5c7ba27..3140802 100644 --- a/app/src/styles/pages/realTimeViz.scss +++ b/app/src/styles/pages/realTimeViz.scss @@ -22,7 +22,6 @@ .floating { // width: calc(var(--realTimeViz-container-width) * 0.2px); - // transform: scale(min(1, calc(var(--realTimeViz-container-width) / 1000))); min-width: 230px; @@ -63,7 +62,6 @@ left: 50%; gap: 6px; border-radius: #{$border-radius-medium}; - overflow: auto; max-width: calc(100% - 500px); z-index: 3; @@ -71,6 +69,10 @@ pointer-events: all; transition: all 0.3s linear; + &.bottom{ + bottom: var(--bottomWidth); + } + &::-webkit-scrollbar { display: none; } @@ -118,7 +120,10 @@ } .zone-container.visualization-playing { - bottom: 70px; + bottom: 74px; + &.bottom{ + bottom: var(--bottomWidth); + } } .zone-wrapper.bottom {