mirror of
https://github.com/cpvalente/ontime.git
synced 2026-09-06 06:49:10 +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;
|
||||
}
|
||||
|
||||
const { hideTableSeconds } = table.options.meta.options;
|
||||
const event = row.original;
|
||||
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;
|
||||
@@ -117,7 +116,7 @@ function MakeDuration({ getValue, row, table, column }: CuesheetCellContext) {
|
||||
|
||||
const duration = getValue() as number;
|
||||
const isDurationLocked = event.timeStrategy === TimeStrategy.LockDuration;
|
||||
const formattedDuration = formatDuration(duration, hideTableSeconds);
|
||||
const formattedDuration = formatDuration(duration, false);
|
||||
|
||||
const canWrite = column.columnDef.meta?.canWrite;
|
||||
if (!canWrite) {
|
||||
|
||||
+1
-1
@@ -140,7 +140,7 @@ function ViewSettings({ optionsStore }: ViewSettingsProps) {
|
||||
defaultChecked={optionsStore.hideTableSeconds}
|
||||
onCheckedChange={(checked) => optionsStore.setOption('hideTableSeconds', checked)}
|
||||
/>
|
||||
Hide seconds in table
|
||||
Hide seconds in time tags
|
||||
</Editor.Label>
|
||||
<Editor.Label className={style.option}>
|
||||
<Checkbox
|
||||
|
||||
Reference in New Issue
Block a user