feat(webui): add compare versions view for version stacks

Add a Compare Versions mode to the file detail page (authenticated and
public share) that splits the viewer into two 50/50 panes showing two
versions side by side.

- Breadcrumb file menu gains a Compare Versions entry (version stacks
  with >=2 versions); the file segment is hidden in compare mode.
- URL-driven state (compare/cmpLeft/cmpRight/cmpActive) on both file
  routes so the view is refresh/share-safe.
- Per-side topbar with filename, version, version-switch dropdown, an
  active-side highlight, and an X exit button.
- Shared control bar reflects the active pane; for same-type media it
  coordinates both panes (play/pause, seek, frame-step, zoom, pan sync),
  seekbar length matches the active side while the shorter side holds its
  last frame; only the active side plays audio; resolution/download apply
  to the active side; fullscreen covers the whole compare view.
- Right sidebar (comments/fields) binds to the active side; comment
  selection seeks the active pane and annotations/comments can be created.
- Reuses useFramePlayer + DrawingCanvas without modifying the existing
  single-file video player.
- Unit tests for compare selection/clamp logic.
This commit is contained in:
yiling
2026-07-04 10:20:16 +08:00
parent e7273f1a02
commit 6c3d3ea2b3
25 changed files with 2056 additions and 38 deletions
+3
View File
@@ -433,6 +433,9 @@
"versions": "Versions",
"manage_versions": "Manage versions...",
"compare_versions": "Compare Versions",
"exit_compare": "Exit compare",
"switch_version": "Switch version",
"show_left_sidebar": "Show Left Sidebar",
"hide_left_sidebar": "Hide Left Sidebar",
"show_right_sidebar": "Show Right Sidebar",
+3
View File
@@ -433,6 +433,9 @@
"versions": "版本",
"manage_versions": "管理版本...",
"compare_versions": "对比版本",
"exit_compare": "退出对比",
"switch_version": "切换版本",
"show_left_sidebar": "显示左侧边栏",
"hide_left_sidebar": "隐藏左侧边栏",
"show_right_sidebar": "显示右侧边栏",