mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-16 12:53:32 +00:00
refactor(operator): improvements to editing
This commit is contained in:
committed by
Carlos Valente
parent
aaeadd13cf
commit
1f2706a063
@@ -30,12 +30,12 @@
|
||||
flex-direction: column;
|
||||
gap: 0.5rem;
|
||||
|
||||
max-height: min(80vh, 600px);
|
||||
max-height: min(60vh, 600px);
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.label {
|
||||
background-color: var(--user-bg);
|
||||
background-color: var(--user-bg, $gray-900);
|
||||
width: fit-content;
|
||||
padding-inline: 1rem;
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { memo, RefObject, SyntheticEvent } from 'react';
|
||||
import { useLongPress } from '@mantine/hooks';
|
||||
import { MILLIS_PER_MINUTE, MILLIS_PER_SECOND } from 'ontime-utils';
|
||||
|
||||
import DelayIndicator from '../../../common/components/delay-indicator/DelayIndicator';
|
||||
import { useLongPress } from '../../../common/hooks/useLongPress';
|
||||
import { cx, getAccessibleColour } from '../../../common/utils/styleUtils';
|
||||
import { formatDuration, formatTime, useTimeUntilExpectedStart } from '../../../common/utils/time';
|
||||
import RunningTime from '../../viewers/common/running-time/RunningTime';
|
||||
@@ -55,8 +55,10 @@ function OperatorEvent({
|
||||
* gather behaviour for long press and context menu
|
||||
*/
|
||||
const handleLongPress = (event?: SyntheticEvent) => {
|
||||
// we dont have an event out of useLongPress
|
||||
event?.preventDefault();
|
||||
// prevent default if the event is cancelable to avoid browser intervention warnings
|
||||
if (event && event.cancelable) {
|
||||
event.preventDefault();
|
||||
}
|
||||
if (subscribed) {
|
||||
onLongPress({ id, cue, subscriptions: subscribed });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user