mirror of
https://github.com/shumaiOne/shumai.git
synced 2026-12-05 15:44:28 +00:00
fix(video): refine the sync to playback button
This commit is contained in:
@@ -11,7 +11,7 @@ import { m } from '@/ui/paraglide/messages.js'
|
||||
import { getLocale } from '@/ui/paraglide/runtime.js'
|
||||
import type { TranscriptSegment } from '@shumai/dtos'
|
||||
import { useQuery } from '@tanstack/react-query'
|
||||
import { ChevronDown, ChevronUp, LocateFixed, Search, X } from 'lucide-react'
|
||||
import { ChevronDown, ChevronUp, Search, X } from 'lucide-react'
|
||||
import { memo, useEffect, useLayoutEffect, useMemo, useRef, useState, type RefObject } from 'react'
|
||||
import { createTranscriptTimeline } from './transcript-timeline'
|
||||
import { useTranscriptScroll } from './use-transcript-scroll'
|
||||
@@ -379,13 +379,12 @@ export const TranscriptPanel = memo(function TranscriptPanel({
|
||||
<Button
|
||||
size="sm"
|
||||
variant="outline"
|
||||
className="pointer-events-auto bg-background shadow-md"
|
||||
className="pointer-events-auto rounded-full shadow-md dark:bg-background dark:hover:bg-accent"
|
||||
onClick={() => {
|
||||
viewportRef.current?.focus({ preventScroll: true })
|
||||
setFollowing(true)
|
||||
}}
|
||||
>
|
||||
<LocateFixed />
|
||||
{m.transcript_sync_to_playback()}
|
||||
</Button>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user