Spaces:
Sleeping
Sleeping
Commit
·
b50f5bd
1
Parent(s):
b615593
patch
Browse files
frontend/src/components/{Playlist.css → PlayQueue.css}
RENAMED
|
@@ -49,7 +49,7 @@
|
|
| 49 |
|
| 50 |
.track-title {
|
| 51 |
cursor: pointer;
|
| 52 |
-
font-size:
|
| 53 |
color: var(--text-color);
|
| 54 |
}
|
| 55 |
|
|
|
|
| 49 |
|
| 50 |
.track-title {
|
| 51 |
cursor: pointer;
|
| 52 |
+
font-size: .8rem;
|
| 53 |
color: var(--text-color);
|
| 54 |
}
|
| 55 |
|
frontend/src/components/PlaylQueue.js
CHANGED
|
@@ -4,8 +4,8 @@ import React, { useState } from "react";
|
|
| 4 |
import { useMusicPlayer } from "@/context/MusicPlayerContext";
|
| 5 |
import { formatTitle } from "@/lib/utils";
|
| 6 |
import { FaTrash } from "react-icons/fa";
|
| 7 |
-
import { TbPlaylistX } from "react-icons/tb";
|
| 8 |
-
import "./
|
| 9 |
|
| 10 |
const PlayQueue = () => {
|
| 11 |
const {
|
|
@@ -23,6 +23,9 @@ const PlayQueue = () => {
|
|
| 23 |
const handlePlayTrack = (src, title) => {
|
| 24 |
initializePlayer(src, title);
|
| 25 |
};
|
|
|
|
|
|
|
|
|
|
| 26 |
|
| 27 |
const handleClearPlaylist = () => {
|
| 28 |
if (window.confirm("Are you sure you want to clear the play queue?")) {
|
|
@@ -43,7 +46,7 @@ const PlayQueue = () => {
|
|
| 43 |
return (
|
| 44 |
isPlayEueOpen && (
|
| 45 |
<div className="playlist-container">
|
| 46 |
-
<h2>Play Queue</h2>
|
| 47 |
<div className="playlist-action-container">
|
| 48 |
<button onClick={() => setIsModalOpen(true)} className="save-button">
|
| 49 |
Save to Playlist
|
|
|
|
| 4 |
import { useMusicPlayer } from "@/context/MusicPlayerContext";
|
| 5 |
import { formatTitle } from "@/lib/utils";
|
| 6 |
import { FaTrash } from "react-icons/fa";
|
| 7 |
+
import { TbPlaylistX, TbX } from "react-icons/tb";
|
| 8 |
+
import "./PlayQueue.css";
|
| 9 |
|
| 10 |
const PlayQueue = () => {
|
| 11 |
const {
|
|
|
|
| 23 |
const handlePlayTrack = (src, title) => {
|
| 24 |
initializePlayer(src, title);
|
| 25 |
};
|
| 26 |
+
const handleIsPlayQueueOpen = () =>{
|
| 27 |
+
setIsPlayEueOpen(!isPlayEueOpen);
|
| 28 |
+
};
|
| 29 |
|
| 30 |
const handleClearPlaylist = () => {
|
| 31 |
if (window.confirm("Are you sure you want to clear the play queue?")) {
|
|
|
|
| 46 |
return (
|
| 47 |
isPlayEueOpen && (
|
| 48 |
<div className="playlist-container">
|
| 49 |
+
<div className="flex justify-between"><h2>Play Queue</h2> <button onClick={handleIsPlayQueueOpen}><TbX className="size-6"/> </button> </div>
|
| 50 |
<div className="playlist-action-container">
|
| 51 |
<button onClick={() => setIsModalOpen(true)} className="save-button">
|
| 52 |
Save to Playlist
|