diff --git a/apps/web/src/pages/editing-planner/utils/timeline.ts b/apps/web/src/pages/editing-planner/utils/timeline.ts deleted file mode 100644 index ed44f0fc6..000000000 --- a/apps/web/src/pages/editing-planner/utils/timeline.ts +++ /dev/null @@ -1,22 +0,0 @@ -/** 格式化时间为 mm:ss */ -export const formatTime = (sec: number): string => { - const m = Math.floor(sec / 60) - const s = Math.floor(sec % 60) - return `${m}:${s.toString().padStart(2, "0")}` -} - -/** 格式化裁剪时间(精确到 0.1 秒) */ -export const formatTrimTime = (sec: number): string => { - return `${sec.toFixed(1)}s` -} - -/** 生成时间标尺刻度 */ -export const generateRulerMarks = (totalDuration: number, step: number): number[] => { - const marks: number[] = [] - // #1790: 无片段时不显示时间刻度 - if (totalDuration <= 0) return marks - for (let t = 0; t <= totalDuration + step; t += step) { - marks.push(t) - } - return marks -}