added logs list-v2

This commit is contained in:
Nalvazhuthi 2025-05-02 17:39:43 +05:30
commit db0f32ae85
10 changed files with 165 additions and 132 deletions

View File

@ -655,8 +655,8 @@ export const MonthlyROI = () => {
); );
}; };
export const ExpandIcon = () => { export const ExpandIcon = ({ isActive }: { isActive: boolean }) => {
return ( return isActive ? (
<svg <svg
width="20" width="20"
height="20" height="20"
@ -677,6 +677,36 @@ export const ExpandIcon = () => {
fill="var(--text-color)" fill="var(--text-color)"
/> />
</svg> </svg>
) : (
<svg
width="21"
height="20"
viewBox="0 0 21 20"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M5 5.6875H15.5"
stroke="var(--text-color)"
strokeWidth="1.4"
strokeLinecap="round"
strokeLinejoin="round"
/>
<path
d="M5 8.60156H15.5"
stroke="var(--text-color)"
strokeWidth="1.4"
strokeLinecap="round"
strokeLinejoin="round"
/>
<path
d="M5 10.6484L10.25 14.7318L15.5 10.6484"
stroke="var(--text-color)"
strokeWidth="1.4"
strokeLinecap="round"
strokeLinejoin="round"
/>
</svg>
); );
}; };

View File

@ -19,6 +19,10 @@ import {
import { getAvatarColor } from "../../../modules/collaboration/functions/getAvatarColor"; import { getAvatarColor } from "../../../modules/collaboration/functions/getAvatarColor";
const SimulationPlayer: React.FC = () => { const SimulationPlayer: React.FC = () => {
const MAX_SPEED = 8; // Maximum speed
const [expand, setExpand] = useState(true);
const { speed, setSpeed } = useAnimationPlaySpeed(); const { speed, setSpeed } = useAnimationPlaySpeed();
const [playSimulation, setPlaySimulation] = useState(false); const [playSimulation, setPlaySimulation] = useState(false);
const { setIsPlaying } = usePlayButtonStore(); const { setIsPlaying } = usePlayButtonStore();
@ -30,8 +34,7 @@ const SimulationPlayer: React.FC = () => {
// Button functions // Button functions
const handleReset = () => { const handleReset = () => {
setReset(true); setReset(!isReset);
// setReset(!isReset);
setSpeed(1); setSpeed(1);
}; };
const handlePlayStop = () => { const handlePlayStop = () => {
@ -50,7 +53,7 @@ const SimulationPlayer: React.FC = () => {
}; };
const calculateHandlePosition = () => { const calculateHandlePosition = () => {
return ((speed - 0.5) / (8 - 0.5)) * 100; return ((speed - 0.5) / (MAX_SPEED - 0.5)) * 100;
}; };
const handleMouseDown = () => { const handleMouseDown = () => {
@ -100,7 +103,6 @@ const SimulationPlayer: React.FC = () => {
{ name: "process 9", completed: 90 }, // 90% completed { name: "process 9", completed: 90 }, // 90% completed
{ name: "process 10", completed: 30 }, // 30% completed { name: "process 10", completed: 30 }, // 30% completed
]; ];
const [expand, setExpand] = useState(false);
// Move getRandomColor out of render // Move getRandomColor out of render
const getRandomColor = () => { const getRandomColor = () => {
const letters = "0123456789ABCDEF"; const letters = "0123456789ABCDEF";
@ -117,7 +119,7 @@ const SimulationPlayer: React.FC = () => {
const processPlayerRef = useRef<HTMLDivElement>(null); const processPlayerRef = useRef<HTMLDivElement>(null);
const processWrapperRef = useRef<HTMLDivElement>(null); const processWrapperRef = useRef<HTMLDivElement>(null);
const [playerPosition, setPlayerPosition] = useState(0); const [playerPosition, setPlayerPosition] = useState(20); // initial position
const handleProcessMouseDown = (e: React.MouseEvent) => { const handleProcessMouseDown = (e: React.MouseEvent) => {
if (!processWrapperRef.current) return; if (!processWrapperRef.current) return;
@ -196,7 +198,7 @@ const SimulationPlayer: React.FC = () => {
</div> </div>
</div> </div>
<div className="controls-wrapper"> <div className="controls-wrapper">
<div <button
className="simulation-button-container" className="simulation-button-container"
onClick={() => { onClick={() => {
handleReset(); handleReset();
@ -204,8 +206,8 @@ const SimulationPlayer: React.FC = () => {
> >
<ResetIcon /> <ResetIcon />
Reset Reset
</div> </button>
<div <button
className="simulation-button-container" className="simulation-button-container"
onClick={() => { onClick={() => {
handlePlayStop(); handlePlayStop();
@ -213,8 +215,8 @@ const SimulationPlayer: React.FC = () => {
> >
<PlayStopIcon /> <PlayStopIcon />
{playSimulation ? "Play" : "Stop"} {playSimulation ? "Play" : "Stop"}
</div> </button>
<div <button
className="simulation-button-container" className="simulation-button-container"
onClick={() => { onClick={() => {
handleExit(); handleExit();
@ -222,13 +224,13 @@ const SimulationPlayer: React.FC = () => {
> >
<ExitIcon /> <ExitIcon />
Exit Exit
</div> </button>
<div <button
className="simulation-button-container" className="expand-icon-container"
onClick={() => setExpand(!expand)} onClick={() => setExpand(!expand)}
> >
<ExpandIcon /> <ExpandIcon isActive={!expand} />
</div> </button>
</div> </div>
</div> </div>
<div className="progresser-wrapper"> <div className="progresser-wrapper">
@ -298,24 +300,24 @@ const SimulationPlayer: React.FC = () => {
<div className="marker marker-80"></div> <div className="marker marker-80"></div>
<div className="marker marker-90"></div> <div className="marker marker-90"></div>
<div className="custom-slider"> <div className="custom-slider">
<div <button
className={`slider-handle ${isDragging ? "dragging" : ""}`} className={`slider-handle ${isDragging ? "dragging" : ""}`}
style={{ left: `${calculateHandlePosition()}%` }} style={{ left: `${calculateHandlePosition()}%` }}
onMouseDown={handleMouseDown} onMouseDown={handleMouseDown}
> >
{speed.toFixed(1)}x {speed.toFixed(1)}x
</div> </button>
<input <input
type="range" type="range"
min="0.5" min="0.5"
max="8" max={MAX_SPEED}
step="0.1" step="0.1"
value={speed} value={speed}
onChange={handleSpeedChange} onChange={handleSpeedChange}
className="slider-input" className="slider-input"
/> />
</div> </div>
<div className="speed-label max-value">8x</div> <div className="speed-label max-value">4x</div>
</div> </div>
</div> </div>
</div> </div>
@ -328,25 +330,31 @@ const SimulationPlayer: React.FC = () => {
></div> ></div>
<div <div
className="process-wrapper" className="process-wrapper"
ref={processWrapperRef} style={{ padding: expand ? "0px" : "5px 35px" }}
onMouseDown={handleProcessMouseDown}
> >
{process.map((item, index) => ( <div
<div className="process-container"
key={index} ref={processWrapperRef}
className="process" onMouseDown={handleProcessMouseDown}
style={{ >
width: `${item.completed}%`, {process.map((item, index) => (
backgroundColor: getAvatarColor(index), <div
}} key={index}
></div> className="process"
))} style={{
width: `${item.completed}%`,
backgroundColor: getAvatarColor(index),
}}
>
<div
className="process-player"
ref={processPlayerRef}
style={{ left: playerPosition, position: "absolute" }}
></div>
</div>
))}
</div>
</div> </div>
<div
className="process-player"
ref={processPlayerRef}
style={{ left: playerPosition, position: "absolute" }}
></div>
</div> </div>
</div> </div>
</div> </div>

View File

@ -74,7 +74,7 @@ const Project: React.FC = () => {
<ROISummary /> <ROISummary />
</div> */} </div> */}
<KeyPressListener /> <KeyPressListener />
{/* {loadingProgress > 0 && <LoadingPage progress={loadingProgress} />} */} {loadingProgress > 0 && <LoadingPage progress={loadingProgress} />}
{!isPlaying && ( {!isPlaying && (
<> <>
{toggleThreeD && <ModuleToggle />} {toggleThreeD && <ModuleToggle />}

View File

@ -6,6 +6,7 @@
z-index: 1; z-index: 1;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
padding: 6px;
.selection-wrapper { .selection-wrapper {
display: flex; display: flex;
@ -16,7 +17,7 @@
gap: 6px; gap: 6px;
align-items: center; align-items: center;
background: var(--background-color); background: var(--background-color);
padding: 4px 6px; padding: 3px 6px;
border-radius: 12px; border-radius: 12px;
color: var(--text-color); color: var(--text-color);
@ -35,7 +36,7 @@
.version { .version {
border-radius: 12px; border-radius: 12px;
background: var(--background-color); background: var(--background-color);
padding: 4px 6px; padding: 3px 6px;
color: var(--text-button-color); color: var(--text-button-color);
font-weight: 200; font-weight: 200;
display: flex; display: flex;
@ -43,7 +44,7 @@
} }
.logs-detail { .logs-detail {
background-color: #fff; // background-color: #fff;
cursor: pointer; cursor: pointer;
} }

View File

@ -3,11 +3,11 @@
.simulation-player-wrapper { .simulation-player-wrapper {
position: fixed; position: fixed;
bottom: 50px; bottom: 12px;
left: 50%; left: 50%;
z-index: 2; z-index: 2;
transform: translate(-50%, 0); transform: translate(-50%, 0);
width: 70%; width: 70vw;
.simulation-player-container { .simulation-player-container {
background: var(--background-color); background: var(--background-color);
@ -16,24 +16,21 @@
display: flex; display: flex;
flex-direction: column; flex-direction: column;
gap: 8px; gap: 8px;
backdrop-filter: blur(10px);
outline: 1px solid var(--border-color);
.progresser-wrapper { .progresser-wrapper {
outline: 1px solid var(--border-color); outline: 1px solid var(--border-color);
background: var(--background-color); background: var(--background-color);
// background-color: var(--highlight-accent-color);
padding: 4px 5px;
border-radius: 12px; border-radius: 12px;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
gap: 12px; gap: 12px;
padding-top: 30px; padding: 12px 5px;
padding-top: 38px;
transition: height 0.2s linear; transition: height 0.2s linear;
} }
.controls-container { .controls-container {
@include flex-center; @include flex-center;
gap: 12px; gap: 12px;
@ -41,13 +38,12 @@
.production-details, .production-details,
.controls-wrapper { .controls-wrapper {
display: flex; @include flex-center;
gap: 6px; gap: 6px;
} }
.production-details { .production-details {
.production-wrapper { .production-wrapper {
display: flex; display: flex;
align-items: center; align-items: center;
flex-direction: column; flex-direction: column;
@ -56,33 +52,38 @@
.header { .header {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
gap: 6px gap: 6px;
} }
.progress-wrapper { .progress-wrapper {
width: 164px; width: 164px;
height: 8px; height: 8px;
border-radius: 5px; border-radius: 5px;
// overflow: hidden; background: var(--background-color-solid);
outline: 1px solid var(--border-color);
background: var(--background-color);
.progress { .progress {
border-radius: 5px; border-radius: 5px;
height: 100%; height: 100%;
background-color: var(--accent-color); background-color: var(--background-color-accent);
} }
} }
} }
} }
.expand-icon-container {
@include flex-center;
padding: 6px 8px;
cursor: pointer;
}
.simulation-button-container { .simulation-button-container {
@include flex-center; @include flex-center;
gap: 2px; gap: 2px;
padding: 6px 8px; padding: 4px 8px;
min-width: 64px; min-width: 64px;
background: var(--background-color); background: var(--background-color);
border-radius: #{$border-radius-small}; border-radius: #{$border-radius-extra-large};
height: fit-content;
cursor: pointer; cursor: pointer;
&:hover { &:hover {
@ -101,10 +102,8 @@
@include flex-center; @include flex-center;
gap: 32px; gap: 32px;
padding: 5px 16px; padding: 5px 16px;
// background: var(--background-color);
border-radius: #{$border-radius-medium}; border-radius: #{$border-radius-medium};
box-sizing: #{$box-shadow-medium}; box-sizing: #{$box-shadow-medium};
border-radius: 20px;
position: relative; position: relative;
.min-value, .min-value,
@ -118,11 +117,8 @@
width: 100%; width: 100%;
max-width: 80vw; max-width: 80vw;
height: 28px; height: 28px;
// background: var(--background-color-gray);
border-radius: #{$border-radius-small}; border-radius: #{$border-radius-small};
position: relative; position: relative;
// padding: 4px 26px;
.speed-label { .speed-label {
font-size: var(--font-size-tiny); font-size: var(--font-size-tiny);
@ -135,13 +131,13 @@
} }
&:last-child { &:last-child {
right: 0; right: -10px;
} }
} }
&::after { &::after {
content: ""; content: "";
background-color: #E5E5EA; background-color: #e5e5ea;
position: absolute; position: absolute;
top: 50%; top: 50%;
transform: translate(0, -50%); transform: translate(0, -50%);
@ -166,13 +162,15 @@
.slider-handle { .slider-handle {
position: absolute; position: absolute;
top: 50%; top: 50%;
width: 42px; min-width: 44px;
padding: 0 8px;
line-height: 20px; line-height: 20px;
text-align: center; text-align: center;
background: var(--accent-color); background: var(--background-color-button);
color: var(--primary-color); color: var(--text-button-color);
border-radius: #{$border-radius-small}; border-radius: #{$border-radius-large};
transform: translate(-50%, -50%); transform: translate(-50%, -50%);
font-size: var(--font-size-small);
cursor: pointer; cursor: pointer;
z-index: 2; z-index: 2;
} }
@ -226,23 +224,23 @@
} }
.time-displayer { .time-displayer {
display: flex; @include flex-space-between;
justify-content: space-between; gap: 24px;
height: auto; height: auto;
opacity: 1; opacity: 1;
// overflow: hidden;
transition: all 0.5s ease; transition: all 0.5s ease;
.start-time-wrappper, .start-time-wrappper,
.end-time-wrappper { .end-time-wrappper {
display: flex; @include flex-center;
align-items: center; gap: 4px;
gap: 12px; .icon {
@include flex-center;
}
} }
.time-progresser { .time-progresser {
width: 70%; flex: 1;
.timeline { .timeline {
padding: 16px; padding: 16px;
@ -255,18 +253,15 @@
height: 33px; height: 33px;
.label-dot-wrapper { .label-dot-wrapper {
display: flex; @include flex-center;
flex-direction: column;
align-items: center;
gap: 6px;
position: relative; position: relative;
.label { .label {
position: absolute; position: absolute;
top: -200%; top: -36px;
transform: translate(0, -0); transform: translate(0, -0);
font-size: 12px; font-size: 12px;
color: #666; color: var(--text-color);
white-space: nowrap; white-space: nowrap;
} }
@ -296,21 +291,21 @@
} }
} }
} }
} }
} }
.processDisplayer { .processDisplayer {
border-radius: 5px; border-radius: #{$border-radius-large};
// overflow: hidden;
outline: 1px solid var(--border-color); outline: 1px solid var(--border-color);
background: var(--background-color); background: var(--background-color);
padding: 14px 6px; padding: 20px 6px;
position: relative; position: relative;
.timmer {
width: auto;
position: absolute;
bottom: 0;
font-size: var(--font-size-tiny);
}
.timmer { .timmer {
width: auto; width: auto;
@ -328,6 +323,16 @@
right: 8px; right: 8px;
} }
.start-displayer {
bottom: 4px;
left: 16px;
}
.end-displayer {
bottom: 4px;
width: auto;
right: 16px;
}
.process-player { .process-player {
position: absolute; position: absolute;
top: 50%; top: 50%;
@ -337,27 +342,26 @@
left: 86.81px; left: 86.81px;
border-radius: 14px; border-radius: 14px;
border-width: 1px; border-width: 1px;
background: var(--accent-color, #6F42C1); background: var(--background-color-accent, #6f42c1);
} }
.process-wrapper{
.process-wrapper { .process-container {
display: flex; position: relative;
// padding: 0px 16px; display: flex;
width: 100%;
.process {
height: 5px; .process {
background-color: #4caf50; height: 5px;
color: white; border-radius: 4px;
text-align: center; color: white;
line-height: 30px; text-align: center;
transition: width 0.3s ease; line-height: 30px;
transition: width 0.3s ease;
}
} }
} }
} }
.simulation-player-container.open { .simulation-player-container.open {
.start-displayer, .start-displayer,
@ -365,6 +369,9 @@
display: none; display: none;
} }
.timmer {
display: none;
}
.progresser-wrapper { .progresser-wrapper {
padding-top: 4px; padding-top: 4px;
} }
@ -377,7 +384,7 @@
} }
.processDisplayer { .processDisplayer {
padding: 0; padding: 0 8px;
background: transparent; background: transparent;
.process-player { .process-player {
@ -385,5 +392,4 @@
display: none !important; display: none !important;
} }
} }
}
}

View File

@ -83,6 +83,8 @@
border-radius: #{$border-radius-medium}; border-radius: #{$border-radius-medium};
background: var(--background-color); background: var(--background-color);
backdrop-filter: blur(8px); backdrop-filter: blur(8px);
contain: layout paint;
will-change: backdrop-filter;
.option-list { .option-list {
display: flex; display: flex;

View File

@ -121,10 +121,8 @@
flex-direction: column; flex-direction: column;
gap: 6px; gap: 6px;
border-radius: 5.2px; border-radius: 5.2px;
width: 100%; width: 100%;
height: 150px; height: 150px;
display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
@ -254,7 +252,8 @@
gap: 5px; gap: 5px;
.header { .header {
color: #a0aec0; color: var(--text-color);
opacity: 0.8;
} }
.data-values { .data-values {
@ -413,7 +412,6 @@
/* FleetEfficiency.module.css */ /* FleetEfficiency.module.css */
.fleetEfficiency { .fleetEfficiency {
width: 100%;
min-height: 240px !important; min-height: 240px !important;
padding: 20px; padding: 20px;
background: var(--background-color); background: var(--background-color);

View File

@ -5,8 +5,8 @@
display: flex; display: flex;
flex-direction: column; flex-direction: column;
gap: 6px; gap: 6px;
padding-top: 12px;
padding: 6px; padding: 6px;
padding-top: 12px;
.floating { .floating {
min-height: 170px; min-height: 170px;
@ -28,13 +28,6 @@
} }
} }
.floatingWidgets-wrapper {
font-family: Arial, sans-serif;
color: #333;
}
.floating.working-state { .floating.working-state {
width: 100%; width: 100%;
height: 283px; height: 283px;
@ -51,7 +44,6 @@
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
margin-bottom: 20px; margin-bottom: 20px;
// flex-direction: column;
} }
.state { .state {

View File

@ -177,8 +177,6 @@
.panel { .panel {
position: absolute; position: absolute;
// background: var(--background-color);
// box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
transition: all 0.3s ease; transition: all 0.3s ease;
border-radius: 6px; border-radius: 6px;
overflow: auto; overflow: auto;
@ -415,8 +413,8 @@
} }
path { path {
stroke: var(--text-color); stroke: var(--text-button-color);
strokeWidth: 2; stroke-width: 2;
} }
} }
@ -920,8 +918,6 @@
// Add button // Add button
.extra-Bs {}
.extra-Bs-addopening { .extra-Bs-addopening {
animation: slideDown 0.3s ease forwards; animation: slideDown 0.3s ease forwards;
} }

View File

@ -15,7 +15,7 @@
font-size: var(--font-size-large); font-size: var(--font-size-large);
padding: 2px 8px; padding: 2px 8px;
background: var(--background-color-accent); background: var(--background-color-accent);
color: var(--text-color); color: var(--text-button-color);
border-radius: #{$border-radius-medium}; border-radius: #{$border-radius-medium};
box-shadow: var(--box-shadow-light); box-shadow: var(--box-shadow-light);
} }