diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index 1f09df2..06af0a9 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -667,6 +667,8 @@ function App() { onResetSearch={resetSearch} theme={themeMode} toggleTheme={toggleTheme} + collections={collections} + videos={videos} /> {/* Bilibili Parts Modal */} diff --git a/frontend/src/components/AuthorsList.tsx b/frontend/src/components/AuthorsList.tsx index 0fd4cba..40d2270 100644 --- a/frontend/src/components/AuthorsList.tsx +++ b/frontend/src/components/AuthorsList.tsx @@ -15,9 +15,10 @@ import { Video } from '../types'; interface AuthorsListProps { videos: Video[]; + onItemClick?: () => void; } -const AuthorsList: React.FC = ({ videos }) => { +const AuthorsList: React.FC = ({ videos, onItemClick }) => { const [isOpen, setIsOpen] = useState(true); const [authors, setAuthors] = useState([]); const theme = useTheme(); @@ -64,6 +65,7 @@ const AuthorsList: React.FC = ({ videos }) => { key={author} component={Link} to={`/author/${encodeURIComponent(author)}`} + onClick={onItemClick} sx={{ pl: 2, borderRadius: 1 }} > diff --git a/frontend/src/components/Collections.tsx b/frontend/src/components/Collections.tsx index 9fd75a6..7ee060e 100644 --- a/frontend/src/components/Collections.tsx +++ b/frontend/src/components/Collections.tsx @@ -16,9 +16,10 @@ import { Collection } from '../types'; interface CollectionsProps { collections: Collection[]; + onItemClick?: () => void; } -const Collections: React.FC = ({ collections }) => { +const Collections: React.FC = ({ collections, onItemClick }) => { const [isOpen, setIsOpen] = useState(true); const theme = useTheme(); const isMobile = useMediaQuery(theme.breakpoints.down('md')); @@ -51,6 +52,7 @@ const Collections: React.FC = ({ collections }) => { key={collection.id} component={Link} to={`/collection/${collection.id}`} + onClick={onItemClick} sx={{ pl: 2, borderRadius: 1 }} > diff --git a/frontend/src/components/ConfirmationModal.tsx b/frontend/src/components/ConfirmationModal.tsx index 3f6bdc0..6e62941 100644 --- a/frontend/src/components/ConfirmationModal.tsx +++ b/frontend/src/components/ConfirmationModal.tsx @@ -76,7 +76,7 @@ const ConfirmationModal: React.FC = ({ onClose(); }} color={isDanger ? 'error' : 'primary'} - variant="contained" + variant="outlined" autoFocus > {confirmText} diff --git a/frontend/src/components/DeleteCollectionModal.tsx b/frontend/src/components/DeleteCollectionModal.tsx index bae8e60..5c94689 100644 --- a/frontend/src/components/DeleteCollectionModal.tsx +++ b/frontend/src/components/DeleteCollectionModal.tsx @@ -74,7 +74,7 @@ const DeleteCollectionModal: React.FC = ({ {videoCount > 0 && ( + + + + )} diff --git a/frontend/src/pages/Home.tsx b/frontend/src/pages/Home.tsx index 1e8c396..6ac4064 100644 --- a/frontend/src/pages/Home.tsx +++ b/frontend/src/pages/Home.tsx @@ -271,7 +271,7 @@ const Home: React.FC = ({ ) : ( {/* Sidebar container for Collections and Authors */} - + diff --git a/frontend/src/pages/VideoPlayer.tsx b/frontend/src/pages/VideoPlayer.tsx index db8510c..d5e7b0a 100644 --- a/frontend/src/pages/VideoPlayer.tsx +++ b/frontend/src/pages/VideoPlayer.tsx @@ -338,6 +338,7 @@ const VideoPlayer: React.FC = ({ src={`${BACKEND_URL}${video.videoPath || video.sourceUrl}`} onPlay={() => setIsPlaying(true)} onPause={() => setIsPlaying(false)} + playsInline > Your browser does not support the video tag. @@ -432,7 +433,7 @@ const VideoPlayer: React.FC = ({ Add to Collection