mirror of
https://github.com/cpvalente/ontime.git
synced 2026-09-06 14:59:09 +00:00
fix(cuesheet): hide seconds option should not affect duration column
The "hide seconds" toggle in the Cuesheet table settings was also stripping seconds from the Duration column. It should only apply to the Start/End time tags, so the Duration column now always displays its full precision (including seconds). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SoUSFVFdmMQN5Ro86pRvBQ
This commit is contained in:
+2
-3
@@ -105,10 +105,9 @@ function MakeDuration({ getValue, row, table, column }: CuesheetCellContext) {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
const { hideTableSeconds } = table.options.meta.options;
|
|
||||||
const event = row.original;
|
const event = row.original;
|
||||||
if (!isOntimeEvent(event)) {
|
if (!isOntimeEvent(event)) {
|
||||||
return <MutedText numeric>{formatDuration(getValue() as number, hideTableSeconds)}</MutedText>;
|
return <MutedText numeric>{formatDuration(getValue() as number, false)}</MutedText>;
|
||||||
}
|
}
|
||||||
|
|
||||||
const { handleUpdateTimer } = table.options.meta;
|
const { handleUpdateTimer } = table.options.meta;
|
||||||
@@ -117,7 +116,7 @@ function MakeDuration({ getValue, row, table, column }: CuesheetCellContext) {
|
|||||||
|
|
||||||
const duration = getValue() as number;
|
const duration = getValue() as number;
|
||||||
const isDurationLocked = event.timeStrategy === TimeStrategy.LockDuration;
|
const isDurationLocked = event.timeStrategy === TimeStrategy.LockDuration;
|
||||||
const formattedDuration = formatDuration(duration, hideTableSeconds);
|
const formattedDuration = formatDuration(duration, false);
|
||||||
|
|
||||||
const canWrite = column.columnDef.meta?.canWrite;
|
const canWrite = column.columnDef.meta?.canWrite;
|
||||||
if (!canWrite) {
|
if (!canWrite) {
|
||||||
|
|||||||
+1
-1
@@ -140,7 +140,7 @@ function ViewSettings({ optionsStore }: ViewSettingsProps) {
|
|||||||
defaultChecked={optionsStore.hideTableSeconds}
|
defaultChecked={optionsStore.hideTableSeconds}
|
||||||
onCheckedChange={(checked) => optionsStore.setOption('hideTableSeconds', checked)}
|
onCheckedChange={(checked) => optionsStore.setOption('hideTableSeconds', checked)}
|
||||||
/>
|
/>
|
||||||
Hide seconds in table
|
Hide seconds in time tags
|
||||||
</Editor.Label>
|
</Editor.Label>
|
||||||
<Editor.Label className={style.option}>
|
<Editor.Label className={style.option}>
|
||||||
<Checkbox
|
<Checkbox
|
||||||
|
|||||||
Reference in New Issue
Block a user