mirror of
https://github.com/shumaiOne/shumai.git
synced 2026-12-03 14:34:40 +00:00
feat(video): resize transcripts and follow playback earlier
This commit is contained in:
@@ -7,7 +7,7 @@ import { FileViewer } from '@/ui/components/file-viewer'
|
||||
import { FileViewerLeftSidebar } from '@/ui/components/file-viewer-left-sidebar'
|
||||
import { FileViewerRightSidebar } from '@/ui/components/file-viewer-right-sidebar'
|
||||
import { MobileFileDetail } from '@/ui/components/file-viewer/mobile-file-detail'
|
||||
import { TranscriptPanel } from '@/ui/components/file-viewer/transcript-panel'
|
||||
import { ResizableTranscriptPanel } from '@/ui/components/file-viewer/resizable-transcript-panel'
|
||||
import { FileDetailSkeleton } from '@/ui/components/loading-skeletons'
|
||||
import { ResizeHandle } from '@/ui/components/resize-handle'
|
||||
import { ShareLinkCreatedDialog } from '@/ui/components/share-link-created-dialog'
|
||||
@@ -83,6 +83,7 @@ function FileViewPage() {
|
||||
} = useShareLinkActions({ projectId, enabled: canEdit })
|
||||
const { teamId, ensureTeamIdForProject } = useTeamContextStore()
|
||||
const [rightSidebarWidth, setRightSidebarWidth] = useState(360)
|
||||
const [transcriptWidthPercent, setTranscriptWidthPercent] = useState(30)
|
||||
const [annotations, setAnnotations] = useState<Annotation[]>([])
|
||||
const { fileViewRightSidebarCollapsed } = useUiStore()
|
||||
const { isChatbotOpen } = useChatbotStore()
|
||||
@@ -822,7 +823,7 @@ function FileViewPage() {
|
||||
return (
|
||||
<div className="h-full flex flex-1 flex-col bg-background">
|
||||
<div className="h-full flex flex-1 overflow-hidden">
|
||||
<div className="flex-1 relative">
|
||||
<div className="relative min-w-0 flex-1">
|
||||
{isFetching && !isCompareMode && (
|
||||
<div className="absolute inset-0 z-10 flex items-center justify-center bg-background/50">
|
||||
<Loader2 className="h-8 w-8 animate-spin text-foreground" />
|
||||
@@ -859,11 +860,12 @@ function FileViewPage() {
|
||||
transcriptToggle={transcript?.toggle}
|
||||
>
|
||||
{transcript?.panel && (
|
||||
<TranscriptPanel
|
||||
<ResizableTranscriptPanel
|
||||
key={transcript.panel.assetId}
|
||||
{...transcript.panel}
|
||||
mediaControllerRef={mediaControllerRef}
|
||||
className="w-[30vw] max-w-[48%] border-r border-border"
|
||||
widthPercent={transcriptWidthPercent}
|
||||
setWidthPercent={setTranscriptWidthPercent}
|
||||
/>
|
||||
)}
|
||||
<div className={transcript?.panel ? 'hidden' : 'contents'}>
|
||||
|
||||
Reference in New Issue
Block a user