fix(comment): restrict timestamp capture toggle and badges to video files

This commit is contained in:
yiling
2026-05-27 16:16:32 +08:00
parent 1a8712175e
commit 08b9c7ae0e
3 changed files with 33 additions and 19 deletions
+5 -5
View File
@@ -3,11 +3,11 @@ import type { UserInfo } from '@/dtos/team'
import { client } from '@/ui/api/client'
import { Button } from '@/ui/components/ui/button'
import {
Dialog,
DialogContent,
DialogDescription,
DialogHeader,
DialogTitle,
Dialog,
DialogContent,
DialogDescription,
DialogHeader,
DialogTitle,
} from '@/ui/components/ui/dialog'
import { Separator } from '@/ui/components/ui/separator'
import { formatTimeAgo } from '@/ui/lib/time'
+11 -9
View File
@@ -709,15 +709,17 @@ export const ChatInput = React.forwardRef<HTMLDivElement, ChatInputProps>(
multiple
onChange={handleFileSelect}
/>
<Button
onClick={() => setIsTimestampEnabled(!isTimestampEnabled)}
variant={isTimestampEnabled ? 'secondary' : 'ghost'}
size="icon"
className={`p-2 rounded-full cursor-pointer ${isTimestampEnabled ? 'text-blue-600 bg-blue-50 dark:bg-blue-900/20' : ''}`}
title={isTimestampEnabled ? 'Disable Timestamp' : 'Enable Timestamp'}
>
<Clock className="w-4 h-4" />
</Button>
{currentTime !== undefined && frameRate !== undefined && (
<Button
onClick={() => setIsTimestampEnabled(!isTimestampEnabled)}
variant={isTimestampEnabled ? 'secondary' : 'ghost'}
size="icon"
className={`p-2 rounded-full cursor-pointer ${isTimestampEnabled ? 'text-blue-600 bg-blue-50 dark:bg-blue-900/20' : ''}`}
title={isTimestampEnabled ? 'Disable Timestamp' : 'Enable Timestamp'}
>
<Clock className="w-4 h-4" />
</Button>
)}
<Button
onClick={() => fileInputRef.current?.click()}
className="p-2 rounded-full cursor-pointer"