mirror of
https://github.com/shumaiOne/shumai.git
synced 2026-12-03 14:34:40 +00:00
fix(video): refine transcript viewing and generation
This commit is contained in:
@@ -74,10 +74,7 @@ const SegmentRow = memo(function SegmentRow({
|
||||
<button
|
||||
type="button"
|
||||
aria-current={active ? 'true' : undefined}
|
||||
className={cn(
|
||||
'block w-full cursor-pointer select-text rounded-md px-3 py-2 text-start hover:bg-accent focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring focus-visible:outline-none',
|
||||
active && 'bg-primary/10 font-medium text-foreground',
|
||||
)}
|
||||
className="block w-full cursor-pointer select-text rounded-md px-3 py-2 text-start hover:bg-accent focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring focus-visible:outline-none"
|
||||
onClick={(event) => {
|
||||
const selection = window.getSelection()
|
||||
if (
|
||||
@@ -95,7 +92,10 @@ const SegmentRow = memo(function SegmentRow({
|
||||
{formatTranscriptTime(segment.startMs)} – {formatTranscriptTime(segment.endMs)}
|
||||
</span>
|
||||
<span
|
||||
className="block text-sm leading-relaxed whitespace-pre-wrap wrap-anywhere"
|
||||
className={cn(
|
||||
'block text-sm leading-relaxed whitespace-pre-wrap wrap-anywhere',
|
||||
active && 'font-bold text-primary',
|
||||
)}
|
||||
dir="auto"
|
||||
>
|
||||
{matches?.map((match) => {
|
||||
@@ -108,7 +108,7 @@ const SegmentRow = memo(function SegmentRow({
|
||||
<mark
|
||||
data-current-match={selected ? '' : undefined}
|
||||
className={cn(
|
||||
'rounded-sm bg-primary/15 text-foreground',
|
||||
'rounded-sm bg-primary/15 px-px text-foreground',
|
||||
selected && 'bg-primary text-primary-foreground',
|
||||
)}
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user