mirror of
https://github.com/zoriya/v10.git
synced 2026-08-16 02:45:09 +00:00
refactor: rename formatDuration to formatDisplayTime
Renames the time formatting utility to be more generic since it's used for both duration and currentTime display: - Add formatDisplayTime as the primary function name - Update all component references to use formatDisplayTime - Keep formatDuration as deprecated alias for backward compatibility - More semantic naming that reflects actual usage across components 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
committed by
Christian Pillsbury
co-authored by
Claude
parent
5bd0a154db
commit
0746d400af
@@ -3,7 +3,7 @@ import {
|
||||
StateHook,
|
||||
PropsHook,
|
||||
} from '../utils/component-factory';
|
||||
import { durationDisplayStateDefinition, formatDuration } from '@vjs-10/media-store';
|
||||
import { durationDisplayStateDefinition, formatDisplayTime } from '@vjs-10/media-store';
|
||||
import { namedNodeMapToObject } from '../utils/element-utils.js';
|
||||
|
||||
export function getTemplateHTML(
|
||||
@@ -57,7 +57,7 @@ export class DurationDisplayBase extends HTMLElement {
|
||||
// Update the span content with formatted duration
|
||||
const spanElement = this.shadowRoot?.querySelector('span') as HTMLElement;
|
||||
if (spanElement) {
|
||||
spanElement.textContent = formatDuration(state.duration);
|
||||
spanElement.textContent = formatDisplayTime(state.duration);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user