refactor(op): improve status recognition

This commit is contained in:
Carlos Valente
2026-07-14 11:08:56 +02:00
committed by Carlos Valente
parent 5001dda284
commit 7e7d35980a
3 changed files with 19 additions and 4 deletions
@@ -120,6 +120,21 @@
letter-spacing: 1px; letter-spacing: 1px;
} }
.live {
color: $ui-black;
background-color: $ui-white;
}
.due {
color: $ui-black;
background-color: $orange-500;
}
.done {
color: $white-60;
background-color: $white-7;
}
.runningTime { .runningTime {
grid-area: running; grid-area: running;
font-size: 1.25rem; font-size: 1.25rem;
@@ -162,11 +162,11 @@ function OperatorEventSchedule({
isLinkedToLoaded, isLinkedToLoaded,
}: OperatorEventScheduleProps) { }: OperatorEventScheduleProps) {
if (isPast) { if (isPast) {
return <span className={style.timeUntil}>DONE</span>; return <span className={cx([style.timeUntil, style.done])}>DONE</span>;
} }
if (isSelected) { if (isSelected) {
return <span className={style.timeUntil}>LIVE</span>; return <span className={cx([style.timeUntil, style.live])}>LIVE</span>;
} }
return ( return (
@@ -195,7 +195,7 @@ function TimeUntil({ timeStart, delay, dayOffset, totalGap, isLinkedToLoaded }:
const timeUntilString = isDue ? 'DUE' : `${formatDuration(Math.abs(timeUntil), timeUntil > 2 * MILLIS_PER_MINUTE)}`; const timeUntilString = isDue ? 'DUE' : `${formatDuration(Math.abs(timeUntil), timeUntil > 2 * MILLIS_PER_MINUTE)}`;
return ( return (
<span className={style.timeUntil} data-testid='time-until'> <span className={cx([style.timeUntil, isDue && style.due])} data-testid='time-until'>
{timeUntilString} {timeUntilString}
</span> </span>
); );
@@ -27,7 +27,7 @@
flex: 0 0 auto; flex: 0 0 auto;
align-items: center; align-items: center;
gap: 0.5rem; gap: 0.5rem;
color: rgba($ui-white, 0.55); color: color-mix(in srgb, currentColor 60%, transparent);
font-size: 0.875rem; font-size: 0.875rem;
font-weight: 500; font-weight: 500;
} }