mirror of
https://github.com/cpvalente/ontime.git
synced 2026-09-10 16:49:41 +00:00
feat: add flag property
This commit is contained in:
@@ -2,6 +2,7 @@ import { MouseEvent, useEffect, useLayoutEffect, useRef, useState } from 'react'
|
||||
import {
|
||||
IoAdd,
|
||||
IoDuplicateOutline,
|
||||
IoFlag,
|
||||
IoFolder,
|
||||
IoLink,
|
||||
IoReorderTwo,
|
||||
@@ -33,6 +34,7 @@ interface RundownEventProps {
|
||||
duration: number;
|
||||
timeStrategy: TimeStrategy;
|
||||
linkStart: boolean;
|
||||
flag: boolean;
|
||||
countToEnd: boolean;
|
||||
eventIndex: number;
|
||||
endAction: EndAction;
|
||||
@@ -74,6 +76,7 @@ export default function RundownEvent({
|
||||
duration,
|
||||
timeStrategy,
|
||||
linkStart,
|
||||
flag,
|
||||
countToEnd,
|
||||
eventIndex,
|
||||
endAction,
|
||||
@@ -118,7 +121,6 @@ export default function RundownEvent({
|
||||
},
|
||||
{
|
||||
type: 'item',
|
||||
|
||||
label: 'Unlink from previous',
|
||||
icon: IoUnlink,
|
||||
onClick: () =>
|
||||
@@ -135,7 +137,6 @@ export default function RundownEvent({
|
||||
: [
|
||||
{
|
||||
type: 'item',
|
||||
|
||||
label: 'Toggle link to previous',
|
||||
icon: IoLink,
|
||||
onClick: () =>
|
||||
@@ -144,18 +145,25 @@ export default function RundownEvent({
|
||||
value: linkStart,
|
||||
}),
|
||||
},
|
||||
{ type: 'divider' },
|
||||
|
||||
{
|
||||
type: 'item',
|
||||
|
||||
label: flag ? 'Remove flag' : 'Add flag',
|
||||
icon: IoFlag,
|
||||
onClick: () =>
|
||||
actionHandler('update', {
|
||||
field: 'flag',
|
||||
value: !flag,
|
||||
}),
|
||||
},
|
||||
{ type: 'divider' },
|
||||
{
|
||||
type: 'item',
|
||||
label: 'Add to swap',
|
||||
icon: IoAdd,
|
||||
onClick: () => setSelectedEventId(eventId),
|
||||
},
|
||||
{
|
||||
type: 'item',
|
||||
|
||||
label: `Swap this event with ${selectedEventId ?? ''}`,
|
||||
icon: IoSwapVertical,
|
||||
onClick: () => {
|
||||
|
||||
@@ -3,13 +3,13 @@ import {
|
||||
IoArrowDown,
|
||||
IoArrowUp,
|
||||
IoBan,
|
||||
IoFlag,
|
||||
IoFlash,
|
||||
IoPlay,
|
||||
IoPlayForward,
|
||||
IoPlaySkipForward,
|
||||
IoTime,
|
||||
} from 'react-icons/io5';
|
||||
import { LuArrowDownToLine } from 'react-icons/lu';
|
||||
import { EndAction, Playback, TimerType, TimeStrategy } from 'ontime-types';
|
||||
|
||||
import Tooltip from '../../../common/components/tooltip/Tooltip';
|
||||
@@ -143,7 +143,7 @@ function RundownEventInner({
|
||||
<EndActionIcon action={endAction} className={style.statusIcon} />
|
||||
</Tooltip>
|
||||
<Tooltip text={`${countToEnd ? 'Count to End' : 'Count duration'}`} render={<span />}>
|
||||
<IoFlag className={`${style.statusIcon} ${countToEnd ? style.active : style.disabled}`} />
|
||||
<LuArrowDownToLine className={`${style.statusIcon} ${countToEnd ? style.active : style.disabled}`} />
|
||||
</Tooltip>
|
||||
<Tooltip text='Event has Triggers' render={<span />}>
|
||||
<IoFlash className={`${style.statusIcon} ${hasTriggers ? style.active : style.disabled}`} />
|
||||
|
||||
Reference in New Issue
Block a user