diff --git a/frontend/src/components/VideoListItemTable.tsx b/frontend/src/components/VideoListItemTable.tsx index f12a9aaa..52b7cc2a 100644 --- a/frontend/src/components/VideoListItemTable.tsx +++ b/frontend/src/components/VideoListItemTable.tsx @@ -26,12 +26,35 @@ const VideoListItemTable = ({ videoList, viewStyle }: VideoListItemProps) => { const useSiUnits = userConfig.file_size_unit === FileSizeUnits.Metric; + let pageIds: string[] = []; + if (videoList) { + pageIds = videoList.map(video => video.youtube_id); + } + + const anySelected = pageIds.some(id => selectedVideoIds.includes(id)); + + const handleToggleAllCheck = () => { + if (anySelected) { + pageIds.forEach(id => removeVideoId(id)); + } else { + pageIds.forEach(id => appendVideoId(id)); + } + }; + return (
- {showSelection && + )} diff --git a/frontend/src/style.css b/frontend/src/style.css index 55debd37..cccede24 100644 --- a/frontend/src/style.css +++ b/frontend/src/style.css @@ -178,7 +178,8 @@ button:disabled:hover { min-width: 100px; } -.video-item.table td img { +.video-item.table td img, +.video-item.table th img { width: 20px; height: 20px; }
} + {showSelection && ( + + + Title Channel Type