Peach: Local-first video metadata scraper and media manager.
fix(stats): 播放次数末档名字写短,手机上不和前一档挤在一起
longmeidao7611c7bf3455
diff --git a/frontend/src/react/stats/stats.ts b/frontend/src/react/stats/stats.tsindex 4bf3cd3c3..adeb73544 100644--- a/frontend/src/react/stats/stats.ts+++ b/frontend/src/react/stats/stats.ts@@ -151,10 +151,11 @@ export const bandRows = (rows: BandCount[], labels: Record<string, string> = {})export const lengthRows = (rows: BandCount[]): BarRow[] => bandRows(rows, LENGTH_LABEL);-/** 播放次数的分档:五次以内一次一档,往后并成两档,长尾不把柱子拉成一排细线。 */+/** 播放次数的分档:五次以内一次一档,往后并成两档,长尾不把柱子拉成一排细线。+ * 名字写短,390 宽的手机上七根柱子的类别名不互相挤掉。 */const REPLAY_BANDS: readonly [number, number, string][] = [[1, 1, '1 次'], [2, 2, '2 次'], [3, 3, '3 次'], [4, 4, '4 次'], [5, 5, '5 次'],- [6, 9, '6–9 次'], [10, Infinity, '10 次以上'],+ [6, 9, '6–9 次'], [10, Infinity, '≥10 次'],];export const replayRows = (rows: ReplayCount[]): BarRow[] =>diff --git a/frontend/test/react/stats.test.tsx b/frontend/test/react/stats.test.tsxindex 02dda5f7c..5be75bf40 100644--- a/frontend/test/react/stats.test.tsx+++ b/frontend/test/react/stats.test.tsx@@ -166,7 +166,7 @@ it('分布图的分档:时长换成分钟区间,文件类型多的在前,.toEqual([{ name: '1 次', value: 52 }, { name: '2 次', value: 13 }, { name: '3 次', value: 0 },{ name: '4 次', value: 6 }, { name: '5 次', value: 0 }, { name: '6–9 次', value: 2 },- { name: '10 次以上', value: 2 },+ { name: '≥10 次', value: 2 },]);});diff --git a/web/dist/peach-react.js b/web/dist/peach-react.jsindex c6c48e8a0..c695b442f 100644--- a/web/dist/peach-react.js+++ b/web/dist/peach-react.js@@ -39064,7 +39064,7 @@ var SF = (e, t) => t ? Math.round(e / t * 100) : 0, CF = (e) => e >= 3600 ? `${([10,Infinity,- "10 次以上"+ "≥10 次"]], IF = (e) => FF.map(([t, n, r]) => ({name: r,