Browse Source

Finished all pages, TODO modals

pull/8/head
astria 4 months ago
parent
commit
5b7fecb1ac
  1. 199
      backend/logs/access.log
  2. 2
      frontend/src/components/ChannelLastVideos.jsx
  3. 2
      frontend/src/components/VideoStatListElement.jsx
  4. 48
      frontend/src/pages/Channel.jsx
  5. 4
      frontend/src/pages/Playlist.jsx
  6. 4
      frontend/src/pages/Search.jsx

199
backend/logs/access.log

@ -9679,3 +9679,202 @@
[2025-08-25 16:58:58.430] [undefined] POST(/): failed due to invalid values with status 400
[2025-08-25 16:59:05.144] [undefined] POST(/): failed due to invalid values with status 400
[2025-08-25 17:09:10.630] [undefined] GET(/see-later): 'See Later' playlist retrieved for user with id 1 with status 200
[2025-08-25 18:22:19.895] [undefined] GET(/:id): try to get channel with id 1
[2025-08-25 18:22:19.907] [undefined] GET(/:id): Successfully get channel with id 1 with status 200
[2025-08-25 18:22:29.780] [undefined] POST(/login): try to login with username 'astria'
[2025-08-25 18:22:29.790] [undefined] POST(/login): failed to login with status 401
[2025-08-25 18:22:31.958] [undefined] POST(/login): try to login with username 'astria'
[2025-08-25 18:22:31.967] [undefined] POST(/login): failed to login with status 401
[2025-08-25 18:22:33.297] [undefined] GET(/see-later): 'See Later' playlist retrieved for user with id 1 with status 200
[2025-08-25 18:22:38.558] [undefined] GET(/:id/channel): try to retrieve channel of user 1
[2025-08-25 18:22:38.563] [undefined] GET(/:id/channel): successfully retrieved channel of user 1 with status 200
[2025-08-25 18:22:38.568] [undefined] GET(/:id/history): try to retrieve history of user 1
[2025-08-25 18:22:38.574] [undefined] GET(/:id/history): successfully retrieved history of user 1 with status 200
[2025-08-25 18:22:38.582] [undefined] GET(/user/:id): Playlists retrieved for user with id 1 with status 200
[2025-08-25 18:24:46.650] [undefined] GET(/:id): try to get channel with id 1
[2025-08-25 18:24:46.659] [undefined] GET(/:id/stats): try to get stats
[2025-08-25 18:24:46.665] [undefined] GET(/:id): Successfully get channel with id 1 with status 200
[2025-08-25 18:24:46.673] [undefined] GET(/:id/stats): Successfully get stats with status 200
[2025-08-25 18:25:59.068] [undefined] GET(/:id): try to get channel with id 1
[2025-08-25 18:25:59.079] [undefined] GET(/:id/stats): try to get stats
[2025-08-25 18:25:59.084] [undefined] GET(/:id): Successfully get channel with id 1 with status 200
[2025-08-25 18:25:59.094] [undefined] GET(/:id/stats): Successfully get stats with status 200
[2025-08-25 18:26:12.014] [undefined] GET(/:id): try to get channel with id 1
[2025-08-25 18:26:12.024] [undefined] GET(/:id/stats): try to get stats
[2025-08-25 18:26:12.030] [undefined] GET(/:id): Successfully get channel with id 1 with status 200
[2025-08-25 18:26:12.038] [undefined] GET(/:id/stats): Successfully get stats with status 200
[2025-08-25 18:26:17.427] [undefined] GET(/:id): try to get channel with id 1
[2025-08-25 18:26:17.438] [undefined] GET(/:id/stats): try to get stats
[2025-08-25 18:26:17.443] [undefined] GET(/:id): Successfully get channel with id 1 with status 200
[2025-08-25 18:26:17.453] [undefined] GET(/:id/stats): Successfully get stats with status 200
[2025-08-25 18:26:48.205] [undefined] GET(/:id): try to get channel with id 1
[2025-08-25 18:26:48.217] [undefined] GET(/:id/stats): try to get stats
[2025-08-25 18:26:48.222] [undefined] GET(/:id): Successfully get channel with id 1 with status 200
[2025-08-25 18:26:48.231] [undefined] GET(/:id/stats): Successfully get stats with status 200
[2025-08-25 18:26:49.668] [undefined] GET(/:id): try to get channel with id 1
[2025-08-25 18:26:49.680] [undefined] GET(/:id/stats): try to get stats
[2025-08-25 18:26:49.686] [undefined] GET(/:id): Successfully get channel with id 1 with status 200
[2025-08-25 18:26:49.695] [undefined] GET(/:id/stats): Successfully get stats with status 200
[2025-08-25 18:27:22.959] [undefined] GET(/:id): try to get channel with id 1
[2025-08-25 18:27:22.971] [undefined] GET(/:id/stats): try to get stats
[2025-08-25 18:27:22.977] [undefined] GET(/:id): Successfully get channel with id 1 with status 200
[2025-08-25 18:27:22.986] [undefined] GET(/:id/stats): Successfully get stats with status 200
[2025-08-25 18:27:28.948] [undefined] GET(/:id): try to get channel with id 1
[2025-08-25 18:27:28.956] [undefined] GET(/:id/stats): try to get stats
[2025-08-25 18:27:28.963] [undefined] GET(/:id): Successfully get channel with id 1 with status 200
[2025-08-25 18:27:28.973] [undefined] GET(/:id/stats): Successfully get stats with status 200
[2025-08-25 18:28:06.521] [undefined] GET(/:id): try to get channel with id 1
[2025-08-25 18:28:06.533] [undefined] GET(/:id/stats): try to get stats
[2025-08-25 18:28:06.538] [undefined] GET(/:id): Successfully get channel with id 1 with status 200
[2025-08-25 18:28:06.547] [undefined] GET(/:id/stats): Successfully get stats with status 200
[2025-08-25 18:28:15.964] [undefined] GET(/:id): try to get channel with id 1
[2025-08-25 18:28:15.977] [undefined] GET(/:id/stats): try to get stats
[2025-08-25 18:28:15.986] [undefined] GET(/:id): Successfully get channel with id 1 with status 200
[2025-08-25 18:28:15.999] [undefined] GET(/:id/stats): Successfully get stats with status 200
[2025-08-25 18:28:24.624] [undefined] GET(/:id): try to get channel with id 1
[2025-08-25 18:28:24.636] [undefined] GET(/:id/stats): try to get stats
[2025-08-25 18:28:24.642] [undefined] GET(/:id): Successfully get channel with id 1 with status 200
[2025-08-25 18:28:24.651] [undefined] GET(/:id/stats): Successfully get stats with status 200
[2025-08-25 18:28:46.895] [undefined] GET(/:id): try to get channel with id 1
[2025-08-25 18:28:46.915] [undefined] GET(/:id/stats): try to get stats
[2025-08-25 18:28:46.920] [undefined] GET(/:id): Successfully get channel with id 1 with status 200
[2025-08-25 18:28:46.929] [undefined] GET(/:id/stats): Successfully get stats with status 200
[2025-08-25 18:28:58.305] [undefined] GET(/:id): try to get channel with id 1
[2025-08-25 18:28:58.317] [undefined] GET(/:id/stats): try to get stats
[2025-08-25 18:28:58.322] [undefined] GET(/:id): Successfully get channel with id 1 with status 200
[2025-08-25 18:28:58.332] [undefined] GET(/:id/stats): Successfully get stats with status 200
[2025-08-25 18:28:59.376] [undefined] GET(/:id/likes/day): try to get likes per day
[2025-08-25 18:28:59.388] [undefined] GET(/:id): try to get video 1
[2025-08-25 18:28:59.393] [undefined] GET(/:id/likes/day): successfully retrieved likes per day with status 200
[2025-08-25 18:28:59.405] [undefined] GET(/:id): successfully get video 1 with status 200
[2025-08-25 18:29:19.132] [undefined] GET(/see-later): 'See Later' playlist retrieved for user with id 1 with status 200
[2025-08-25 18:37:02.981] [undefined] GET(/see-later): 'See Later' playlist retrieved for user with id 1 with status 200
[2025-08-25 18:37:34.554] [undefined] GET(/:id): try to get channel with id 1
[2025-08-25 18:37:34.564] [undefined] GET(/:id): Successfully get channel with id 1 with status 200
[2025-08-25 18:37:34.584] [undefined] GET(/:id/channel/subscribed): check if user 1 is subscribed to channel 1
[2025-08-25 18:37:34.589] [undefined] GET(/:id/channel/subscribed): user 1 is not subscribed to channel 1 with status 200
[2025-08-25 18:38:03.708] [undefined] GET(/:id): try to get channel with id 1
[2025-08-25 18:38:03.719] [undefined] GET(/:id): Successfully get channel with id 1 with status 200
[2025-08-25 18:38:03.737] [undefined] GET(/:id/channel/subscribed): check if user 1 is subscribed to channel 1
[2025-08-25 18:38:03.742] [undefined] GET(/:id/channel/subscribed): user 1 is not subscribed to channel 1 with status 200
[2025-08-25 18:38:12.531] [undefined] GET(/:id): try to get channel with id 1
[2025-08-25 18:38:12.542] [undefined] GET(/:id): Successfully get channel with id 1 with status 200
[2025-08-25 18:38:12.565] [undefined] GET(/:id/channel/subscribed): check if user 1 is subscribed to channel 1
[2025-08-25 18:38:12.569] [undefined] GET(/:id/channel/subscribed): user 1 is not subscribed to channel 1 with status 200
[2025-08-25 18:38:45.424] [undefined] GET(/:id): try to get channel with id 1
[2025-08-25 18:38:45.435] [undefined] GET(/:id): Successfully get channel with id 1 with status 200
[2025-08-25 18:38:45.455] [undefined] GET(/:id/channel/subscribed): check if user 1 is subscribed to channel 1
[2025-08-25 18:38:45.461] [undefined] GET(/:id/channel/subscribed): user 1 is not subscribed to channel 1 with status 200
[2025-08-25 18:38:51.373] [undefined] GET(/:id): try to get channel with id 1
[2025-08-25 18:38:51.383] [undefined] GET(/:id): Successfully get channel with id 1 with status 200
[2025-08-25 18:38:51.400] [undefined] GET(/:id/channel/subscribed): check if user 1 is subscribed to channel 1
[2025-08-25 18:38:51.404] [undefined] GET(/:id/channel/subscribed): user 1 is not subscribed to channel 1 with status 200
[2025-08-25 18:39:08.866] [undefined] GET(/:id): try to get channel with id 1
[2025-08-25 18:39:08.877] [undefined] GET(/:id): Successfully get channel with id 1 with status 200
[2025-08-25 18:39:08.894] [undefined] GET(/:id/channel/subscribed): check if user 1 is subscribed to channel 1
[2025-08-25 18:39:08.899] [undefined] GET(/:id/channel/subscribed): user 1 is not subscribed to channel 1 with status 200
[2025-08-25 18:39:15.758] [undefined] GET(/:id): try to get channel with id 1
[2025-08-25 18:39:15.770] [undefined] GET(/:id): Successfully get channel with id 1 with status 200
[2025-08-25 18:39:15.788] [undefined] GET(/:id/channel/subscribed): check if user 1 is subscribed to channel 1
[2025-08-25 18:39:15.794] [undefined] GET(/:id/channel/subscribed): user 1 is not subscribed to channel 1 with status 200
[2025-08-25 18:39:26.630] [undefined] POST(/:id/subscribe): try to toggle subscription for channel with id 1
[2025-08-25 18:39:26.640] [undefined] POST(/:id/subscribe): Successfully subscribed to channel with status 200
[2025-08-25 18:39:40.692] [undefined] GET(/:id): try to get channel with id 1
[2025-08-25 18:39:40.704] [undefined] GET(/:id): Successfully get channel with id 1 with status 200
[2025-08-25 18:39:40.728] [undefined] GET(/:id/channel/subscribed): check if user 1 is subscribed to channel 1
[2025-08-25 18:39:40.733] [undefined] GET(/:id/channel/subscribed): user 1 is subscribed to channel 1 with status 200
[2025-08-25 18:39:53.975] [undefined] GET(/:id): try to get channel with id 1
[2025-08-25 18:39:53.986] [undefined] GET(/:id): Successfully get channel with id 1 with status 200
[2025-08-25 18:39:54.009] [undefined] GET(/:id/channel/subscribed): check if user 1 is subscribed to channel 1
[2025-08-25 18:39:54.014] [undefined] GET(/:id/channel/subscribed): user 1 is subscribed to channel 1 with status 200
[2025-08-25 18:40:18.210] [undefined] GET(/:id): try to get channel with id 1
[2025-08-25 18:40:18.221] [undefined] GET(/:id): Successfully get channel with id 1 with status 200
[2025-08-25 18:40:18.242] [undefined] GET(/:id/channel/subscribed): check if user 1 is subscribed to channel 1
[2025-08-25 18:40:18.248] [undefined] GET(/:id/channel/subscribed): user 1 is subscribed to channel 1 with status 200
[2025-08-25 18:40:37.777] [undefined] GET(/:id): try to get channel with id 1
[2025-08-25 18:40:37.788] [undefined] GET(/:id): Successfully get channel with id 1 with status 200
[2025-08-25 18:40:37.809] [undefined] GET(/:id/channel/subscribed): check if user 1 is subscribed to channel 1
[2025-08-25 18:40:37.815] [undefined] GET(/:id/channel/subscribed): user 1 is subscribed to channel 1 with status 200
[2025-08-25 18:41:01.406] [undefined] GET(/:id): try to get channel with id 1
[2025-08-25 18:41:01.417] [undefined] GET(/:id): Successfully get channel with id 1 with status 200
[2025-08-25 18:41:01.442] [undefined] GET(/:id/channel/subscribed): check if user 1 is subscribed to channel 1
[2025-08-25 18:41:01.447] [undefined] GET(/:id/channel/subscribed): user 1 is subscribed to channel 1 with status 200
[2025-08-25 18:41:11.804] [undefined] GET(/:id): try to get channel with id 1
[2025-08-25 18:41:11.815] [undefined] GET(/:id): Successfully get channel with id 1 with status 200
[2025-08-25 18:41:11.872] [undefined] GET(/:id/channel/subscribed): check if user 1 is subscribed to channel 1
[2025-08-25 18:41:11.877] [undefined] GET(/:id/channel/subscribed): user 1 is subscribed to channel 1 with status 200
[2025-08-25 18:41:22.616] [undefined] GET(/:id): try to get channel with id 1
[2025-08-25 18:41:22.628] [undefined] GET(/:id): Successfully get channel with id 1 with status 200
[2025-08-25 18:41:22.646] [undefined] GET(/:id/channel/subscribed): check if user 1 is subscribed to channel 1
[2025-08-25 18:41:22.651] [undefined] GET(/:id/channel/subscribed): user 1 is subscribed to channel 1 with status 200
[2025-08-25 18:41:54.710] [undefined] GET(/:id): try to get channel with id 1
[2025-08-25 18:41:54.722] [undefined] GET(/:id): Successfully get channel with id 1 with status 200
[2025-08-25 18:41:54.810] [undefined] GET(/:id/channel/subscribed): check if user 1 is subscribed to channel 1
[2025-08-25 18:41:54.815] [undefined] GET(/:id/channel/subscribed): user 1 is subscribed to channel 1 with status 200
[2025-08-25 18:42:05.744] [undefined] GET(/:id): try to get channel with id 1
[2025-08-25 18:42:05.754] [undefined] GET(/:id): Successfully get channel with id 1 with status 200
[2025-08-25 18:42:05.792] [undefined] GET(/:id/channel/subscribed): check if user 1 is subscribed to channel 1
[2025-08-25 18:42:05.797] [undefined] GET(/:id/channel/subscribed): user 1 is subscribed to channel 1 with status 200
[2025-08-25 18:42:15.211] [undefined] GET(/:id): try to get channel with id 1
[2025-08-25 18:42:15.222] [undefined] GET(/:id): Successfully get channel with id 1 with status 200
[2025-08-25 18:42:15.269] [undefined] GET(/:id/channel/subscribed): check if user 1 is subscribed to channel 1
[2025-08-25 18:42:15.274] [undefined] GET(/:id/channel/subscribed): user 1 is subscribed to channel 1 with status 200
[2025-08-25 18:42:16.393] [undefined] POST(/:id/subscribe): try to toggle subscription for channel with id 1
[2025-08-25 18:42:16.405] [undefined] POST(/:id/subscribe): Successfully unsubscribed from channel with status 200
[2025-08-25 18:42:17.007] [undefined] POST(/:id/subscribe): try to toggle subscription for channel with id 1
[2025-08-25 18:42:17.017] [undefined] POST(/:id/subscribe): Successfully subscribed to channel with status 200
[2025-08-25 18:43:59.798] [undefined] GET(/:id): try to get channel with id 1
[2025-08-25 18:43:59.808] [undefined] GET(/:id): Successfully get channel with id 1 with status 200
[2025-08-25 18:43:59.825] [undefined] GET(/:id/channel/subscribed): check if user 1 is subscribed to channel 1
[2025-08-25 18:43:59.831] [undefined] GET(/:id/channel/subscribed): user 1 is subscribed to channel 1 with status 200
[2025-08-25 18:44:21.538] [undefined] GET(/see-later): 'See Later' playlist retrieved for user with id 1 with status 200
[2025-08-25 18:44:24.056] [undefined] GET(/:id/channel): try to retrieve channel of user 1
[2025-08-25 18:44:24.061] [undefined] GET(/:id/channel): successfully retrieved channel of user 1 with status 200
[2025-08-25 18:44:24.065] [undefined] GET(/:id/history): try to retrieve history of user 1
[2025-08-25 18:44:24.071] [undefined] GET(/:id/history): successfully retrieved history of user 1 with status 200
[2025-08-25 18:44:24.080] [undefined] GET(/user/:id): Playlists retrieved for user with id 1 with status 200
[2025-08-25 18:44:26.208] [undefined] GET(/:id): Playlist retrieved with id 1 with status 200
[2025-08-25 18:44:28.595] [undefined] GET(/:id/channel): try to retrieve channel of user 1
[2025-08-25 18:44:28.600] [undefined] GET(/:id/channel): successfully retrieved channel of user 1 with status 200
[2025-08-25 18:44:28.650] [undefined] GET(/:id/history): try to retrieve history of user 1
[2025-08-25 18:44:28.656] [undefined] GET(/:id/history): successfully retrieved history of user 1 with status 200
[2025-08-25 18:44:28.665] [undefined] GET(/user/:id): Playlists retrieved for user with id 1 with status 200
[2025-08-25 18:44:30.040] [undefined] GET(/see-later): 'See Later' playlist retrieved for user with id 1 with status 200
[2025-08-25 18:44:32.641] [undefined] GET(/:id): try to get video 1
[2025-08-25 18:44:32.645] [undefined] GET(/user/:id): Playlists retrieved for user with id 1 with status 200
[2025-08-25 18:44:32.656] [undefined] GET(/:id): successfully get video 1 with status 200
[2025-08-25 18:44:32.675] [undefined] GET(/:id/similar): try to get similar videos for video 1
[2025-08-25 18:44:32.688] [undefined] GET(/:id/similar): successfully get similar videos for video 1 with status 200
[2025-08-25 18:44:32.775] [undefined] GET(/:id/views): try to add views for video 1
[2025-08-25 18:44:32.784] [undefined] GET(/:id/views): successfully added views for video 1 with status 200
[2025-08-25 18:44:34.748] [undefined] POST(/:id): Video added to playlist with id 1 with status 200
[2025-08-25 18:44:35.763] [undefined] GET(/see-later): 'See Later' playlist retrieved for user with id 1 with status 200
[2025-08-25 18:44:41.776] [undefined] GET(/:id/history): try to retrieve history of user 1
[2025-08-25 18:44:41.782] [undefined] GET(/:id/channel): try to retrieve channel of user 1
[2025-08-25 18:44:41.786] [undefined] GET(/:id/history): successfully retrieved history of user 1 with status 200
[2025-08-25 18:44:41.791] [undefined] GET(/:id/channel): successfully retrieved channel of user 1 with status 200
[2025-08-25 18:44:41.802] [undefined] GET(/user/:id): Playlists retrieved for user with id 1 with status 200
[2025-08-25 18:44:46.676] [undefined] GET(/:id): Playlist retrieved with id 1 with status 200
[2025-08-25 18:48:05.590] [undefined] GET(/:id): Playlist retrieved with id 1 with status 200
[2025-08-25 18:48:20.667] [undefined] GET(/:id): Playlist retrieved with id 1 with status 200
[2025-08-25 18:48:29.790] [undefined] GET(/see-later): 'See Later' playlist retrieved for user with id 1 with status 200
[2025-08-25 18:50:10.568] [undefined] GET(/:id): try to get video 1
[2025-08-25 18:50:10.573] [undefined] GET(/user/:id): Playlists retrieved for user with id 1 with status 200
[2025-08-25 18:50:10.584] [undefined] GET(/:id): successfully get video 1 with status 200
[2025-08-25 18:50:10.602] [undefined] GET(/:id/similar): try to get similar videos for video 1
[2025-08-25 18:50:10.613] [undefined] GET(/:id/similar): successfully get similar videos for video 1 with status 200
[2025-08-25 18:50:10.709] [undefined] GET(/:id/views): try to add views for video 1
[2025-08-25 18:50:10.718] [undefined] GET(/:id/views): successfully added views for video 1 with status 200
[2025-08-25 18:50:18.485] [undefined] POST(/:id/subscribe): try to toggle subscription for channel with id 1
[2025-08-25 18:50:18.495] [undefined] POST(/:id/subscribe): Successfully unsubscribed from channel with status 200
[2025-08-25 18:50:19.134] [undefined] POST(/:id/subscribe): try to toggle subscription for channel with id 1
[2025-08-25 18:50:31.012] [undefined] GET(/:id): try to get video 1
[2025-08-25 18:50:31.016] [undefined] GET(/user/:id): Playlists retrieved for user with id 1 with status 200
[2025-08-25 18:50:31.031] [undefined] GET(/:id): successfully get video 1 with status 200
[2025-08-25 18:50:31.062] [undefined] GET(/:id/similar): try to get similar videos for video 1
[2025-08-25 18:50:31.078] [undefined] GET(/:id/similar): successfully get similar videos for video 1 with status 200
[2025-08-25 18:50:31.131] [undefined] GET(/:id/views): try to add views for video 1
[2025-08-25 18:50:31.140] [undefined] GET(/:id/views): successfully added views for video 1 with status 200
[2025-08-25 18:50:31.676] [undefined] POST(/:id/subscribe): try to toggle subscription for channel with id 1
[2025-08-25 18:50:31.686] [undefined] POST(/:id/subscribe): Successfully subscribed to channel with status 200
[2025-08-25 18:50:39.047] [undefined] GET(/see-later): 'See Later' playlist retrieved for user with id 1 with status 200

2
frontend/src/components/ChannelLastVideos.jsx

@ -3,7 +3,7 @@ import VideoCard from "./VideoCard.jsx";
export default function ChannelLastVideos({ videos }) {
return (
<div className="grid grid-cols-4 gap-8">
<div className="grid grid-cols-1 lg:grid-cols-4 gap-8">
{
videos && videos.length > 0 ? (
videos.map((video) => (

2
frontend/src/components/VideoStatListElement.jsx

@ -9,7 +9,7 @@ export default function VideoStatListElement ({ video, onClick }) {
className="w-1/4 aspect-video rounded-sm"
/>
<div>
<h3 className="text-white text-2xl font-montserrat font-bold" >{video.title}</h3>
<h3 className="text-white text-lg lg:text-2xl font-montserrat font-bold" >{video.title.slice(0, 25)}{video.title.length > 25 ? "...":""}</h3>
<p className="text-white text-lg font-montserrat font-normal">Vues: {video.views}</p>
<p className="text-white text-lg font-montserrat font-normal">Likes: {video.likes}</p>
<p className="text-white text-lg font-montserrat font-normal">Commentaires: {video.comments}</p>

48
frontend/src/pages/Channel.jsx

@ -57,37 +57,39 @@ export default function Channel() {
<div className="min-w-screen min-h-screen bg-linear-to-br from-left-gradient to-right-gradient">
<Navbar isSearchPage={false} alerts={alerts} onCloseAlert={onCloseAlert} />
<main className="pt-[118px] px-36" >
<main className="pt-[48px] lg:pt-[118px] px-5 lg:px-36" >
{/* Channel Header */}
<div className="glassmorphism p-4" >
<div className="flex items-center gap-4" >
<div className="lg:flex items-center gap-4" >
<img
src={channel && channel.picture}
alt={channel && channel.name}
className="w-[192px] aspect-square object-cover rounded-full border-2 border-white"
className="w-[96px] lg:w-[192px] aspect-square object-cover rounded-full border-2 border-white"
/>
<div>
<h1 className="font-montserrat font-bold text-3xl text-white" >{channel && channel.name}</h1>
<p className="font-montserrat font-medium text-xl text-white" >{channel && channel.subscriptions} abonné(es)</p>
<div className="flex items-center" >
<div>
<h1 className="font-montserrat font-bold text-3xl text-white" >{channel && channel.name}</h1>
<p className="font-montserrat font-medium text-xl text-white" >{channel && channel.subscriptions} abonné(es)</p>
</div>
{
isSubscribedToChannel ? (
<button
className="ml-5 bg-primary text-white font-montserrat font-bold px-4 py-1 h-1/2 rounded-md cursor-pointer"
onClick={handleSubscribe}
>
se désabonner
</button>
) : (
<button
className="ml-5 bg-primary text-white font-montserrat font-bold px-4 py-1 h-1/2 rounded-md cursor-pointer"
onClick={handleSubscribe}
>
s'abonner
</button>
)
}
</div>
{
isSubscribedToChannel ? (
<button
className="ml-5 bg-primary text-white font-montserrat font-bold px-4 py-2 rounded-md cursor-pointer"
onClick={handleSubscribe}
>
se désabonner
</button>
) : (
<button
className="ml-5 bg-primary text-white font-montserrat font-bold px-4 py-2 rounded-md cursor-pointer"
onClick={handleSubscribe}
>
s'abonner
</button>
)
}
</div>
<h2 className="font-bold font-montserrat text-white text-xl mt-4" >Description</h2>

4
frontend/src/pages/Playlist.jsx

@ -51,7 +51,7 @@ export default function Playlist() {
<div className="min-w-screen min-h-screen bg-linear-to-br from-left-gradient to-right-gradient">
<Navbar isSearchPage={false} alerts={alerts} onCloseAlert={onCloseAlert} />
<main className="px-36 w-full pt-[118px]">
<main className="px-5 lg:px-36 w-full pt-[48px] lg:pt-[118px]">
<h1 className="font-bold font-montserrat text-3xl text-white" >{playlist && playlist.name}</h1>
{/* CONTROLS */}
@ -70,7 +70,7 @@ export default function Playlist() {
</button>
</div>
<div className="grid grid-cols-4 gap-8 mt-12">
<div className="grid grid-cols-1 lg:grid-cols-4 gap-8 mt-12">
{
playlist && playlist.videos && playlist.videos.length > 0 ? playlist.videos.map(video => (
<VideoCard

4
frontend/src/pages/Search.jsx

@ -53,7 +53,7 @@ export default function Search() {
<div className="min-w-screen min-h-screen bg-linear-to-br from-left-gradient to-right-gradient">
<Navbar isSearchPage={true} alerts={alerts} onCloseAlert={onCloseAlert}/>
<main className="px-36 pt-[118px]">
<main className="px-5 lg:px-36 pt-[48px] lg:pt-[118px]">
{/* MEGA SEARCH BAR */}
<div className="flex items-center w-full gap-8" >
@ -109,7 +109,7 @@ export default function Search() {
</div>
{/* RESULTS */}
<div className="grid grid-cols-4 gap-8 mt-8">
<div className="grid grid-cols-1 lg:grid-cols-4 gap-8 mt-8">
{results && results.length > 0 ? (
results.map((result, index) => {
if (result.type === "video") {

Loading…
Cancel
Save