refactor: small fixes and style tweaks

fix: prevent reflow on editing images

fix: schedule overview

fix: report on all events

refactor: over-under time colours

fix: prevent edit on delete
This commit is contained in:
Carlos Valente
2025-07-14 11:45:41 +02:00
committed by Carlos Valente
parent 1e1f547ce1
commit ad2ef3b53f
22 changed files with 135 additions and 141 deletions
@@ -50,12 +50,12 @@ $indeterminate-width: clamp(32px, 3vw, 48px);
color: $ontime-delay-text;
}
&--ahead {
color: $green-500;
&--over {
color: $playback-over;
}
&--behind {
color: $orange-500;
&--under {
color: $playback-under;
}
}
@@ -1,4 +1,5 @@
import { useRuntimeOffset } from '../../../common/hooks/useSocket';
import { getOffsetState } from '../../../common/utils/offset';
import { cx } from '../../../common/utils/styleUtils';
import { formatTime } from '../../../common/utils/time';
import SuperscriptTime from '../../../features/viewers/common/superscript-time/SuperscriptTime';
@@ -121,11 +122,7 @@ function ProjectedTime(props: OffsetTimeProps) {
const projectedOffset = offset - delay;
const projectedTime = formatTime(time - offset, formatOptions);
const projectedState = getOffsetState(projectedOffset);
return (
<SuperscriptTime
className={cx([projectedOffset > 0 && 'entry-times--ahead', projectedOffset < 0 && 'entry-times--behind'])}
time={projectedTime}
/>
);
return <SuperscriptTime className={`entry-times--${projectedState}`} time={projectedTime} />;
}