mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-13 19:33:46 +00:00
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:
committed by
Carlos Valente
parent
1e1f547ce1
commit
ad2ef3b53f
@@ -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} />;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user