) {
- const { muted, children, className, ...elementProps } = props;
- const classes = cx([style.textInput, muted && style.muted, className]);
+ const { delayed, muted, children, className, ...elementProps } = props;
+ const classes = cx([style.textInput, delayed && style.delayed, muted && style.muted, className]);
return (
{children}
diff --git a/apps/client/src/views/cuesheet/cuesheet-table/cuesheet-table-elements/TimeInput.tsx b/apps/client/src/views/cuesheet/cuesheet-table/cuesheet-table-elements/TimeInput.tsx
index 48fe7151e..873460add 100644
--- a/apps/client/src/views/cuesheet/cuesheet-table/cuesheet-table-elements/TimeInput.tsx
+++ b/apps/client/src/views/cuesheet/cuesheet-table/cuesheet-table-elements/TimeInput.tsx
@@ -7,13 +7,14 @@ import TextLikeInput from './TextLikeInput';
interface TimeInputDurationProps {
initialValue: number;
lockedValue: boolean;
+ delayed?: boolean;
onSubmit: (value: string) => void;
}
export default memo(TimeInputDuration);
function TimeInputDuration(props: PropsWithChildren) {
- const { initialValue, lockedValue, onSubmit, children } = props;
+ const { initialValue, lockedValue, delayed, onSubmit, children } = props;
const [isEditing, setIsEditing] = useState(false);
const [value, setValue] = useState(initialValue);
@@ -81,7 +82,7 @@ function TimeInputDuration(props: PropsWithChildren) {
handleCancelUpdate={handleFakeBlur}
/>
) : (
-
+
{children}
);
diff --git a/apps/client/src/views/cuesheet/cuesheet-table/cuesheet-table-elements/cuesheetCols.tsx b/apps/client/src/views/cuesheet/cuesheet-table/cuesheet-table-elements/cuesheetCols.tsx
index 128627791..ab629958a 100644
--- a/apps/client/src/views/cuesheet/cuesheet-table/cuesheet-table-elements/cuesheetCols.tsx
+++ b/apps/client/src/views/cuesheet/cuesheet-table/cuesheet-table-elements/cuesheetCols.tsx
@@ -24,15 +24,16 @@ function MakeStart({ getValue, row, table }: CellContext
+
{formattedTime}
- {delayValue !== 0 && showDelayedTimes && }
+
);
}
@@ -43,21 +44,24 @@ function MakeEnd({ getValue, row, table }: CellContext handleUpdateTimer(row.original.id, 'timeEnd', newValue);
const endTime = getValue() as number;
const isEndLocked = (row.original as OntimeEvent).timeStrategy === TimeStrategy.LockEnd;
+ const delayValue = (row.original as OntimeEvent)?.delay ?? 0;
- let formattedTime = millisToString(endTime);
+ const displayTime = showDelayedTimes ? endTime + delayValue : endTime;
+ let formattedTime = millisToString(displayTime);
if (hideTableSeconds) {
formattedTime = removeSeconds(formattedTime);
}
return (
-
+
{formattedTime}
+
);
}