fix(client): hide MeetingCard checkbox when not in selection mode
This commit is contained in:
@@ -10,7 +10,7 @@ import { Button } from '@/components/ui/button';
|
||||
import { Card, CardContent } from '@/components/ui/card';
|
||||
import { Checkbox } from '@/components/ui/checkbox';
|
||||
import { useProjects } from '@/contexts/project-state';
|
||||
import { cn } from '@/lib/utils';
|
||||
|
||||
import { formatDuration, formatRelativeTime } from '@/lib/utils/format';
|
||||
|
||||
interface MeetingCardProps {
|
||||
@@ -41,34 +41,34 @@ export const MeetingCard = forwardRef<HTMLDivElement, MeetingCardProps>(function
|
||||
<Link to={meetingHref}>
|
||||
<Card interactive className="group h-full">
|
||||
<div className="flex">
|
||||
<fieldset
|
||||
aria-label={`Select ${meeting.title}`}
|
||||
className={cn(
|
||||
'flex items-center justify-center shrink-0 transition-all duration-200 border-0 p-0 m-0',
|
||||
isSelectable ? 'w-10 pl-3' : 'w-0 overflow-hidden'
|
||||
)}
|
||||
onClick={(e) => {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
}}
|
||||
onKeyDown={(e) => {
|
||||
if (e.key === 'Enter' || e.key === ' ') {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
}
|
||||
}}
|
||||
>
|
||||
<Checkbox
|
||||
checked={isSelected}
|
||||
disabled={meeting.state === 'recording'}
|
||||
onCheckedChange={(checked) => onSelect?.(meeting.id, checked as boolean)}
|
||||
{isSelectable && (
|
||||
<div
|
||||
role="group"
|
||||
aria-label={`Select ${meeting.title}`}
|
||||
className="flex items-center justify-center shrink-0 w-10 pl-3"
|
||||
onClick={(e) => {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
}}
|
||||
aria-label={`Select meeting: ${meeting.title}`}
|
||||
/>
|
||||
</fieldset>
|
||||
onKeyDown={(e) => {
|
||||
if (e.key === 'Enter' || e.key === ' ') {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
}
|
||||
}}
|
||||
>
|
||||
<Checkbox
|
||||
checked={isSelected}
|
||||
disabled={meeting.state === 'recording'}
|
||||
onCheckedChange={(checked) => onSelect?.(meeting.id, checked as boolean)}
|
||||
onClick={(e) => {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
}}
|
||||
aria-label={`Select meeting: ${meeting.title}`}
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
<CardContent className="p-5 space-y-3 flex-1 min-w-0">
|
||||
<div className="flex items-start justify-between">
|
||||
<h3 className="font-medium text-foreground line-clamp-2 flex-1">{meeting.title}</h3>
|
||||
|
||||
Reference in New Issue
Block a user