mirror of
https://github.com/shumaiOne/shumai.git
synced 2026-11-24 15:39:06 +00:00
fix(webui): hide zoom/fit controls and comment draw button for audio assets
This commit is contained in:
@@ -647,6 +647,10 @@ export function PublicShareManager({
|
||||
mediaControllerRef.current?.pause()
|
||||
}}
|
||||
selectedCommentId={selectedCommentId}
|
||||
hideAnnotationControl={(isCompareMode
|
||||
? compareActiveAsset
|
||||
: currentSelectedItem
|
||||
)?.mediaType?.startsWith('audio/')}
|
||||
/>
|
||||
</div>
|
||||
</>
|
||||
|
||||
@@ -254,31 +254,33 @@ export const VideoControlBar: React.FC<ControlBarProps> = ({
|
||||
{/* Right Side: Zoom, Speed, Res, Download, Fullscreen */}
|
||||
<div className="relative flex items-center gap-3">
|
||||
{/* Zoom Controls */}
|
||||
<div className="flex items-center gap-1">
|
||||
<div className="flex items-center gap-1 rounded-md bg-muted p-0.5">
|
||||
{!isAudio && (
|
||||
<div className="flex items-center gap-1">
|
||||
<div className="flex items-center gap-1 rounded-md bg-muted p-0.5">
|
||||
<button
|
||||
onClick={() => onZoomChange(zoom * 0.8)}
|
||||
className="p-1 hover:text-primary rounded"
|
||||
>
|
||||
<Minus size={14} />
|
||||
</button>
|
||||
<span className="text-xs w-8 text-center tabular-nums">
|
||||
{Math.round(zoom * 100)}%
|
||||
</span>
|
||||
<button
|
||||
onClick={() => onZoomChange(zoom * 1.2)}
|
||||
className="p-1 hover:text-primary rounded"
|
||||
>
|
||||
<Plus size={14} />
|
||||
</button>
|
||||
</div>
|
||||
<button
|
||||
onClick={() => onZoomChange(zoom * 0.8)}
|
||||
className="p-1 hover:text-primary rounded"
|
||||
onClick={onZoomReset}
|
||||
className="text-xs font-medium px-2 py-1 rounded bg-muted hover:text-primary transition-colors"
|
||||
>
|
||||
<Minus size={14} />
|
||||
</button>
|
||||
<span className="text-xs w-8 text-center tabular-nums">
|
||||
{Math.round(zoom * 100)}%
|
||||
</span>
|
||||
<button
|
||||
onClick={() => onZoomChange(zoom * 1.2)}
|
||||
className="p-1 hover:text-primary rounded"
|
||||
>
|
||||
<Plus size={14} />
|
||||
Fit
|
||||
</button>
|
||||
</div>
|
||||
<button
|
||||
onClick={onZoomReset}
|
||||
className="text-xs font-medium px-2 py-1 rounded bg-muted hover:text-primary transition-colors"
|
||||
>
|
||||
Fit
|
||||
</button>
|
||||
</div>
|
||||
)}
|
||||
|
||||
{/* Playback Rate */}
|
||||
<DropdownMenu>
|
||||
|
||||
@@ -450,6 +450,7 @@ function FileViewPage() {
|
||||
mediaControllerRef.current?.pause()
|
||||
}}
|
||||
selectedCommentId={selectedCommentId}
|
||||
hideAnnotationControl={sidebarFile?.mediaType?.startsWith('audio/')}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user