refactor: Update SVG attributes for consistency and improve styling in analysis icons; remove unused imports in ProductionCapacity component; enhance simulation player UI with custom slider wrapper
This commit is contained in:
parent
c8c0f9a9c0
commit
27817f00d4
|
@ -11,8 +11,8 @@ export function ThroughputSummaryIcon() {
|
|||
<circle cx="15.5" cy="15.5" r="12.5" fill="#FC9D2F" />
|
||||
</g>
|
||||
<path
|
||||
fill-rule="evenodd"
|
||||
clip-rule="evenodd"
|
||||
fillRule="evenodd"
|
||||
clipRule="evenodd"
|
||||
d="M16.0538 14.9132L16.3701 15.857L16.5788 16.4964C17.1249 18.1921 17.3904 19.2217 17.3904 19.6797C17.3904 20.7584 16.516 21.6328 15.4373 21.6328C14.3586 21.6328 13.4842 20.7584 13.4842 19.6797C13.4842 19.1667 13.8173 17.9367 14.5045 15.857L14.8208 14.9132C15.0206 14.3241 15.8539 14.3241 16.0538 14.9132ZM15.4373 9.91406C19.0329 9.91406 21.9477 12.8289 21.9477 16.4245C21.9477 17.7303 21.5618 18.9803 20.8504 20.0427C20.6504 20.3415 20.246 20.4215 19.9472 20.2214C19.6485 20.0214 19.5684 19.617 19.7685 19.3182C20.3375 18.4685 20.6456 17.4703 20.6456 16.4245C20.6456 13.548 18.3138 11.2161 15.4373 11.2161C12.5608 11.2161 10.229 13.548 10.229 16.4245C10.229 17.4703 10.5371 18.4685 11.1061 19.3182C11.3062 19.617 11.2261 20.0214 10.9274 20.2214C10.6286 20.4215 10.2242 20.3415 10.0242 20.0427C9.31277 18.9803 8.92688 17.7303 8.92688 16.4245C8.92688 12.8289 11.8417 9.91406 15.4373 9.91406ZM15.4373 17.2051L15.2235 17.8956L15.0757 18.3975C14.8838 19.0684 14.7863 19.5028 14.7863 19.6797C14.7863 20.0392 15.0777 20.3307 15.4373 20.3307C15.7969 20.3307 16.0883 20.0392 16.0883 19.6797C16.0883 19.4634 15.9424 18.862 15.6568 17.9143L15.4373 17.2051Z"
|
||||
fill="white"
|
||||
/>
|
||||
|
@ -24,9 +24,9 @@ export function ThroughputSummaryIcon() {
|
|||
width="33.6927"
|
||||
height="33.6927"
|
||||
filterUnits="userSpaceOnUse"
|
||||
color-interpolation-filters="sRGB"
|
||||
colorInterpolationFilters="sRGB"
|
||||
>
|
||||
<feFlood flood-opacity="0" result="BackgroundImageFix" />
|
||||
<feFlood floodOpacity="0" result="BackgroundImageFix" />
|
||||
<feColorMatrix
|
||||
in="SourceAlpha"
|
||||
type="matrix"
|
||||
|
@ -66,34 +66,35 @@ export function ProductionCapacityIcon() {
|
|||
fill="none"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
>
|
||||
<rect width="25" height="25" rx="12.5" fill="#6F42C1" />
|
||||
<g clipPath="url(#clip0_4107_2562)">
|
||||
<path
|
||||
fillRule="evenodd"
|
||||
clipRule="evenodd"
|
||||
d="M13.5167 7.88281H15.3741C15.668 7.88281 15.9053 8.09496 15.9053 8.35581V13.0575H9.079L9.00279 13.0583V8.35581C9.00279 8.09417 9.24007 7.88281 9.53393 7.88281H11.3921V10.251C11.3921 10.3138 11.4204 10.3735 11.4707 10.4183C11.5226 10.4633 11.5891 10.4879 11.6577 10.4875H13.2511C13.3201 10.4881 13.3868 10.4635 13.4389 10.4183C13.4625 10.3971 13.4815 10.3713 13.4949 10.3426C13.5082 10.3138 13.5157 10.2826 13.5167 10.251V7.88281ZM9.079 14.0389H15.921C16.4243 14.0491 16.9035 14.2561 17.2559 14.6157C17.6082 14.9752 17.8056 15.4585 17.8056 15.9619C17.8056 16.4653 17.6082 16.9486 17.2559 17.3082C16.9035 17.6677 16.4243 17.8748 15.921 17.885H9.079C8.82319 17.8901 8.56892 17.8442 8.33108 17.7499C8.09324 17.6556 7.87661 17.5147 7.69387 17.3357C7.51113 17.1566 7.36596 16.9428 7.26685 16.707C7.16775 16.4711 7.1167 16.2178 7.1167 15.9619C7.1167 15.7061 7.16775 15.4528 7.26685 15.2169C7.36596 14.981 7.51113 14.7673 7.69387 14.5882C7.87661 14.4091 8.09324 14.2683 8.33108 14.174C8.56892 14.0796 8.82319 14.0337 9.079 14.0389ZM10.4626 15.956C10.4626 16.1384 10.3902 16.3132 10.2613 16.4422C10.1323 16.5711 9.95748 16.6435 9.77514 16.6435C9.59281 16.6435 9.41794 16.5711 9.28901 16.4422C9.16008 16.3132 9.08764 16.1384 9.08764 15.956C9.08764 15.7737 9.16008 15.5988 9.28901 15.4699C9.41794 15.341 9.59281 15.2685 9.77514 15.2685C9.95748 15.2685 10.1323 15.341 10.2613 15.4699C10.3902 15.5988 10.4626 15.7737 10.4626 15.956ZM13.1914 15.956C13.1914 16.1384 13.119 16.3132 12.9901 16.4422C12.8611 16.5711 12.6863 16.6435 12.5039 16.6435C12.3216 16.6435 12.1467 16.5711 12.0178 16.4422C11.8889 16.3132 11.8164 16.1384 11.8164 15.956C11.8164 15.7737 11.8889 15.5988 12.0178 15.4699C12.1467 15.341 12.3216 15.2685 12.5039 15.2685C12.6863 15.2685 12.8611 15.341 12.9901 15.4699C13.119 15.5988 13.1914 15.7737 13.1914 15.956ZM15.2319 16.6427C15.4143 16.6427 15.5891 16.5703 15.7181 16.4414C15.847 16.3124 15.9194 16.1376 15.9194 15.9552C15.9194 15.7729 15.847 15.598 15.7181 15.4691C15.5891 15.3402 15.4143 15.2677 15.2319 15.2677C15.0496 15.2677 14.8747 15.3402 14.7458 15.4691C14.6169 15.598 14.5444 15.7729 14.5444 15.9552C14.5444 16.1376 14.6169 16.3124 14.7458 16.4414C14.8747 16.5703 15.0496 16.6427 15.2319 16.6427Z"
|
||||
fill="var(--text-color)"
|
||||
<g filter="url(#filter0_d_4178_3534)">
|
||||
<rect
|
||||
x="4"
|
||||
width="25"
|
||||
height="25"
|
||||
rx="12.5"
|
||||
fill="#6F42C1"
|
||||
shapeRendering="crispEdges"
|
||||
/>
|
||||
<g clip-path="url(#clip0_4173_2653)">
|
||||
<g clipPath="url(#clip0_4178_3534)">
|
||||
<path
|
||||
fill-rule="evenodd"
|
||||
clip-rule="evenodd"
|
||||
d="M17.5167 7.88281H19.3741C19.6679 7.88281 19.9052 8.09496 19.9052 8.35581V13.0575H13.0789L13.0027 13.0583V8.35581C13.0027 8.09417 13.24 7.88281 13.5339 7.88281H15.3921V10.251C15.3921 10.3138 15.4204 10.3735 15.4707 10.4183C15.5225 10.4633 15.589 10.4879 15.6577 10.4875H17.2511C17.32 10.4881 17.3868 10.4635 17.4389 10.4183C17.4624 10.3971 17.4815 10.3713 17.4948 10.3426C17.5082 10.3138 17.5156 10.2826 17.5167 10.251V7.88281ZM13.0789 14.0389H19.9209C20.4242 14.0491 20.9035 14.2561 21.2558 14.6157C21.6081 14.9752 21.8055 15.4585 21.8055 15.9619C21.8055 16.4653 21.6081 16.9486 21.2558 17.3082C20.9035 17.6677 20.4242 17.8748 19.9209 17.885H13.0789C12.8231 17.8901 12.5689 17.8442 12.331 17.7499C12.0932 17.6556 11.8766 17.5147 11.6938 17.3357C11.5111 17.1566 11.3659 16.9428 11.2668 16.707C11.1677 16.4711 11.1166 16.2178 11.1166 15.9619C11.1166 15.7061 11.1677 15.4528 11.2668 15.2169C11.3659 14.981 11.5111 14.7673 11.6938 14.5882C11.8766 14.4091 12.0932 14.2683 12.331 14.174C12.5689 14.0796 12.8231 14.0337 13.0789 14.0389ZM14.4626 15.956C14.4626 16.1384 14.3901 16.3132 14.2612 16.4422C14.1323 16.5711 13.9574 16.6435 13.7751 16.6435C13.5927 16.6435 13.4179 16.5711 13.2889 16.4422C13.16 16.3132 13.0876 16.1384 13.0876 15.956C13.0876 15.7737 13.16 15.5988 13.2889 15.4699C13.4179 15.341 13.5927 15.2685 13.7751 15.2685C13.9574 15.2685 14.1323 15.341 14.2612 15.4699C14.3901 15.5988 14.4626 15.7737 14.4626 15.956ZM17.1914 15.956C17.1914 16.1384 17.1189 16.3132 16.99 16.4422C16.8611 16.5711 16.6862 16.6435 16.5039 16.6435C16.3215 16.6435 16.1467 16.5711 16.0177 16.4422C15.8888 16.3132 15.8164 16.1384 15.8164 15.956C15.8164 15.7737 15.8888 15.5988 16.0177 15.4699C16.1467 15.341 16.3215 15.2685 16.5039 15.2685C16.6862 15.2685 16.8611 15.341 16.99 15.4699C17.1189 15.5988 17.1914 15.7737 17.1914 15.956ZM19.2319 16.6427C19.4142 16.6427 19.5891 16.5703 19.718 16.4414C19.8469 16.3124 19.9194 16.1376 19.9194 15.9552C19.9194 15.7729 19.8469 15.598 19.718 15.4691C19.5891 15.3402 19.4142 15.2677 19.2319 15.2677C19.0495 15.2677 18.8747 15.3402 18.7457 15.4691C18.6168 15.598 18.5444 15.7729 18.5444 15.9552C18.5444 16.1376 18.6168 16.3124 18.7457 16.4414C18.8747 16.5703 19.0495 16.6427 19.2319 16.6427Z"
|
||||
fillRule="evenodd"
|
||||
clipRule="evenodd"
|
||||
d="M17.5167 7.88281H19.3741C19.668 7.88281 19.9053 8.09496 19.9053 8.35581V13.0575H13.079L13.0028 13.0583V8.35581C13.0028 8.09417 13.2401 7.88281 13.5339 7.88281H15.3921V10.251C15.3921 10.3138 15.4204 10.3735 15.4707 10.4183C15.5226 10.4633 15.5891 10.4879 15.6577 10.4875H17.2511C17.3201 10.4881 17.3868 10.4635 17.4389 10.4183C17.4625 10.3971 17.4815 10.3713 17.4949 10.3426C17.5082 10.3138 17.5157 10.2826 17.5167 10.251V7.88281ZM13.079 14.0389H19.921C20.4243 14.0491 20.9035 14.2561 21.2559 14.6157C21.6082 14.9752 21.8056 15.4585 21.8056 15.9619C21.8056 16.4653 21.6082 16.9486 21.2559 17.3082C20.9035 17.6677 20.4243 17.8748 19.921 17.885H13.079C12.8232 17.8901 12.5689 17.8442 12.3311 17.7499C12.0932 17.6556 11.8766 17.5147 11.6939 17.3357C11.5111 17.1566 11.366 16.9428 11.2669 16.707C11.1677 16.4711 11.1167 16.2178 11.1167 15.9619C11.1167 15.7061 11.1677 15.4528 11.2669 15.2169C11.366 14.981 11.5111 14.7673 11.6939 14.5882C11.8766 14.4091 12.0932 14.2683 12.3311 14.174C12.5689 14.0796 12.8232 14.0337 13.079 14.0389ZM14.4626 15.956C14.4626 16.1384 14.3902 16.3132 14.2613 16.4422C14.1323 16.5711 13.9575 16.6435 13.7751 16.6435C13.5928 16.6435 13.4179 16.5711 13.289 16.4422C13.1601 16.3132 13.0876 16.1384 13.0876 15.956C13.0876 15.7737 13.1601 15.5988 13.289 15.4699C13.4179 15.341 13.5928 15.2685 13.7751 15.2685C13.9575 15.2685 14.1323 15.341 14.2613 15.4699C14.3902 15.5988 14.4626 15.7737 14.4626 15.956ZM17.1914 15.956C17.1914 16.1384 17.119 16.3132 16.9901 16.4422C16.8611 16.5711 16.6863 16.6435 16.5039 16.6435C16.3216 16.6435 16.1467 16.5711 16.0178 16.4422C15.8889 16.3132 15.8164 16.1384 15.8164 15.956C15.8164 15.7737 15.8889 15.5988 16.0178 15.4699C16.1467 15.341 16.3216 15.2685 16.5039 15.2685C16.6863 15.2685 16.8611 15.341 16.9901 15.4699C17.119 15.5988 17.1914 15.7737 17.1914 15.956ZM19.2319 16.6427C19.4143 16.6427 19.5891 16.5703 19.7181 16.4414C19.847 16.3124 19.9194 16.1376 19.9194 15.9552C19.9194 15.7729 19.847 15.598 19.7181 15.4691C19.5891 15.3402 19.4143 15.2677 19.2319 15.2677C19.0496 15.2677 18.8747 15.3402 18.7458 15.4691C18.6169 15.598 18.5444 15.7729 18.5444 15.9552C18.5444 16.1376 18.6169 16.3124 18.7458 16.4414C18.8747 16.5703 19.0496 16.6427 19.2319 16.6427Z"
|
||||
fill="white"
|
||||
/>
|
||||
</g>
|
||||
</g>
|
||||
<defs>
|
||||
<filter
|
||||
id="filter0_d_4173_2653"
|
||||
id="filter0_d_4178_3534"
|
||||
x="0"
|
||||
y="0"
|
||||
width="33"
|
||||
height="33"
|
||||
filterUnits="userSpaceOnUse"
|
||||
color-interpolation-filters="sRGB"
|
||||
colorInterpolationFilters="sRGB"
|
||||
>
|
||||
<feFlood flood-opacity="0" result="BackgroundImageFix" />
|
||||
<feFlood floodOpacity="0" result="BackgroundImageFix" />
|
||||
<feColorMatrix
|
||||
in="SourceAlpha"
|
||||
type="matrix"
|
||||
|
@ -110,16 +111,16 @@ export function ProductionCapacityIcon() {
|
|||
<feBlend
|
||||
mode="normal"
|
||||
in2="BackgroundImageFix"
|
||||
result="effect1_dropShadow_4173_2653"
|
||||
result="effect1_dropShadow_4178_3534"
|
||||
/>
|
||||
<feBlend
|
||||
mode="normal"
|
||||
in="SourceGraphic"
|
||||
in2="effect1_dropShadow_4173_2653"
|
||||
in2="effect1_dropShadow_4178_3534"
|
||||
result="shape"
|
||||
/>
|
||||
</filter>
|
||||
<clipPath id="clip0_4173_2653">
|
||||
<clipPath id="clip0_4178_3534">
|
||||
<rect
|
||||
width="11"
|
||||
height="11"
|
||||
|
|
|
@ -8,7 +8,6 @@ import {
|
|||
PointElement,
|
||||
} from "chart.js";
|
||||
import { PowerIcon, ProductionCapacityIcon } from "../../icons/analysis";
|
||||
import { ThroughputIcon } from "../../icons/3dChartIcons";
|
||||
|
||||
ChartJS.register(LineElement, CategoryScale, LinearScale, PointElement);
|
||||
|
||||
|
|
|
@ -87,6 +87,7 @@ const SimulationPlayer: React.FC = () => {
|
|||
document.removeEventListener("mousemove", handleMouseMove);
|
||||
document.removeEventListener("mouseup", handleMouseUp);
|
||||
};
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, []);
|
||||
// Slider function ends
|
||||
|
||||
|
@ -310,25 +311,29 @@ const SimulationPlayer: React.FC = () => {
|
|||
<div className="marker marker-70"></div>
|
||||
<div className="marker marker-80"></div>
|
||||
<div className="marker marker-90"></div>
|
||||
<div className="custom-slider">
|
||||
<button
|
||||
className={`slider-handle ${isDragging ? "dragging" : ""}`}
|
||||
style={{ left: `${calculateHandlePosition()}%` }}
|
||||
onMouseDown={handleMouseDown}
|
||||
>
|
||||
{speed.toFixed(1)}x
|
||||
</button>
|
||||
<input
|
||||
type="range"
|
||||
min="0.5"
|
||||
max={MAX_SPEED}
|
||||
step="0.1"
|
||||
value={speed}
|
||||
onChange={handleSpeedChange}
|
||||
className="slider-input"
|
||||
/>
|
||||
<div className="custom-slider-wrapper">
|
||||
<div className="custom-slider">
|
||||
<button
|
||||
className={`slider-handle ${
|
||||
isDragging ? "dragging" : ""
|
||||
}`}
|
||||
style={{ left: `${calculateHandlePosition()}%` }}
|
||||
onMouseDown={handleMouseDown}
|
||||
>
|
||||
{speed.toFixed(1)}x
|
||||
</button>
|
||||
<input
|
||||
type="range"
|
||||
min="0.5"
|
||||
max={MAX_SPEED}
|
||||
step="0.1"
|
||||
value={speed}
|
||||
onChange={handleSpeedChange}
|
||||
className="slider-input"
|
||||
/>
|
||||
</div>
|
||||
<div className="speed-label max-value">4x</div>
|
||||
</div>
|
||||
<div className="speed-label max-value">4x</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -369,6 +374,7 @@ const SimulationPlayer: React.FC = () => {
|
|||
</div>
|
||||
</div>
|
||||
{/* {subModule === "analysis" && ( */}
|
||||
{subModule === "analysis" && (
|
||||
<div className="analysis">
|
||||
<div className="analysis-wrapper">
|
||||
<ProductionCapacity />
|
||||
|
@ -376,6 +382,7 @@ const SimulationPlayer: React.FC = () => {
|
|||
</div>
|
||||
<ROISummary />
|
||||
</div>
|
||||
)}
|
||||
{/* )} */}
|
||||
</>
|
||||
);
|
||||
|
|
|
@ -45,8 +45,7 @@
|
|||
.sub-header {
|
||||
font-weight: 300;
|
||||
font-size: var(--font-size-tiny);
|
||||
color: var(--text-color);
|
||||
opacity: 0.8;
|
||||
color: var(--text-button-color);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -98,6 +97,7 @@
|
|||
|
||||
.metrics-section {
|
||||
padding-top: 16px;
|
||||
border-top: 1px solid var(--background-color-gray);
|
||||
|
||||
.metric {
|
||||
display: flex;
|
||||
|
@ -164,9 +164,6 @@
|
|||
|
||||
.footer-card {
|
||||
width: 100%;
|
||||
background: var(--background-color-gray);
|
||||
|
||||
border: 1px solid var(--border-color);
|
||||
background: var(--background-color);
|
||||
border-radius: 6px;
|
||||
padding: 8px;
|
||||
|
@ -231,7 +228,6 @@
|
|||
width: 100%;
|
||||
gap: 6px;
|
||||
padding-top: 3px;
|
||||
|
||||
.shift-wrapper {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
@ -275,11 +271,6 @@
|
|||
}
|
||||
}
|
||||
|
||||
.roiSummary-container {
|
||||
max-height: 60vh;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.roiSummary-wrapper {
|
||||
max-width: 470px;
|
||||
background-color: var(--background-color);
|
||||
|
@ -300,19 +291,15 @@
|
|||
border: 1px solid var(--border-color);
|
||||
|
||||
.info {
|
||||
opacity: 0.8;
|
||||
|
||||
span {
|
||||
font-size: var(--font-size-xlarge);
|
||||
|
||||
&:first-child {
|
||||
color: #31c756;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
&:last-child {
|
||||
color: var(--text-color);
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -363,8 +350,6 @@
|
|||
|
||||
&:last-child {
|
||||
align-items: center;
|
||||
|
||||
|
||||
}
|
||||
|
||||
.metric-label {
|
||||
|
@ -382,21 +367,13 @@
|
|||
}
|
||||
}
|
||||
|
||||
.metric-item.net-profit {
|
||||
.metric-label {
|
||||
|
||||
span {
|
||||
color: #21ad50;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.metric-wrapper {
|
||||
display: flex;
|
||||
gap: 6px;
|
||||
|
||||
.metric-item {
|
||||
border-radius: #{$border-radius-small};
|
||||
padding: 8px;
|
||||
border-radius: #{$border-radius-large};
|
||||
background: var(--background-color);
|
||||
border: 1px solid var(--border-color);
|
||||
}
|
||||
|
@ -461,7 +438,6 @@
|
|||
padding: 8px;
|
||||
text-align: left;
|
||||
border: 1px solid var(--border-color);
|
||||
font-size: var(--font-size-small);
|
||||
}
|
||||
|
||||
th {
|
||||
|
@ -502,24 +478,6 @@
|
|||
color: #488ef6;
|
||||
}
|
||||
}
|
||||
|
||||
.placeHolder-wrapper {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 6px;
|
||||
padding-top: 6px;
|
||||
|
||||
.placeHolder {
|
||||
height: 11px;
|
||||
width: 100%;
|
||||
background: #EAEAEA;
|
||||
border-radius: 4px;
|
||||
|
||||
&:nth-child(2) {
|
||||
width: 50%;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -144,14 +144,21 @@
|
|||
|
||||
&::after {
|
||||
content: "";
|
||||
background-color: #e5e5ea;
|
||||
background: var(--background-color-solid);
|
||||
opacity: 0.4;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
transform: translate(0, -50%);
|
||||
width: 100%;
|
||||
height: 3px;
|
||||
}
|
||||
|
||||
.custom-slider-wrapper {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
padding: 0 26px;
|
||||
background: transparent;
|
||||
border-radius: #{$border-radius-large};
|
||||
}
|
||||
.custom-slider {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
|
@ -185,11 +192,13 @@
|
|||
|
||||
.marker {
|
||||
position: absolute;
|
||||
background-color: var(--text-disabled);
|
||||
background: var(--background-color-solid);
|
||||
opacity: 0.6;
|
||||
width: 2px;
|
||||
height: 12px;
|
||||
border-radius: 1px;
|
||||
top: 8px;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.marker.marker-10 {
|
||||
|
|
Loading…
Reference in New Issue