From aab470eb63e568104480ce7aae2b34fa005886a6 Mon Sep 17 00:00:00 2001 From: Aritra Kar Date: Wed, 26 Jul 2023 19:47:45 -0400 Subject: [PATCH] Updated README and cleaned up. --- README.md | 4 ++-- website/app/collection/favourites/page.tsx | 5 ++--- website/app/collection/genres/[genreId]/page.tsx | 2 +- website/app/collection/playlists/[playlistId]/page.tsx | 2 +- website/app/collection/playlists/page.tsx | 6 +++--- website/components/appstateprovider.tsx | 2 +- website/components/genreCard.tsx | 1 - website/components/mediaplayer.tsx | 1 - 8 files changed, 10 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 8dd5ef6..b3a2ac3 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ It supports the following features: - Song queueing - https://github.com/Raymo111/cs348/blob/main/website/components/appstateprovider.tsx - Song favouriting - - To be implemented + - https://github.com/Raymo111/cs348/blob/main/website/app/collection/favourites --- @@ -40,7 +40,7 @@ The production data is at: https://drive.google.com/file/d/1bCoon3Nj-6nh-_RE9vNY The testing data is at: https://drive.google.com/file/d/11nd32AImDeLA856__QpqkyL5lRC_An66/view?usp=drive_link -In order to load the data into the web application, please use the **`Upload`` tab** and batch-upload all the song files to be imported into the database. +In order to load the data into the web application, please use the **`Upload` tab** and batch-upload all the song files to be imported into the database. --- diff --git a/website/app/collection/favourites/page.tsx b/website/app/collection/favourites/page.tsx index c330e77..debac13 100644 --- a/website/app/collection/favourites/page.tsx +++ b/website/app/collection/favourites/page.tsx @@ -1,11 +1,10 @@ 'use client' import { useEffect, useState } from "react"; -import { apiGetCollectionFavourites, apiGetCollectionTracks, apiGetCollectionTracksSearch } from "@/components/apiclient"; +import { apiGetCollectionFavourites } from "@/components/apiclient"; import { useAppStateContext } from "@/components/appstateprovider"; import { APITrack } from "@/util/models/track"; -import {Grid, TextField, Typography, InputAdornment, CssBaseline} from "@mui/material"; -import { Search } from "@mui/icons-material"; +import {Grid, Typography, CssBaseline} from "@mui/material"; import { useRouter } from "next/navigation"; import { useLoginStateContext } from "@/components/loginstateprovider"; import AlertComponent, { AlertEntry } from "@/components/alerts"; diff --git a/website/app/collection/genres/[genreId]/page.tsx b/website/app/collection/genres/[genreId]/page.tsx index 294794b..583dc9f 100644 --- a/website/app/collection/genres/[genreId]/page.tsx +++ b/website/app/collection/genres/[genreId]/page.tsx @@ -1,7 +1,7 @@ "use client"; import { useLoginStateContext } from "@/components/loginstateprovider"; import { APIGenre } from "@/util/models/genre"; -import { Box, Button, Grid, Typography } from "@mui/material"; +import { Box, Button, Typography } from "@mui/material"; import { useRouter } from "next/navigation"; import { useEffect, useState } from "react"; import { AlertEntry } from "@/components/alerts"; diff --git a/website/app/collection/playlists/[playlistId]/page.tsx b/website/app/collection/playlists/[playlistId]/page.tsx index 4cc9d93..6d06130 100644 --- a/website/app/collection/playlists/[playlistId]/page.tsx +++ b/website/app/collection/playlists/[playlistId]/page.tsx @@ -6,7 +6,7 @@ import { Box, Typography, Button, TextField, Modal } from "@mui/material"; import { useRouter } from "next/navigation"; import { useEffect, useState } from "react"; import { AlertEntry } from "@/components/alerts"; -import { apiGetPlaylist, apiGetPlaylistTracks, apiPostCreatePlaylist } from "@/components/apiclient"; +import { apiGetPlaylist, apiGetPlaylistTracks } from "@/components/apiclient"; import { APITrack } from "@/util/models/track"; import TrackTable from "@/components/trackTable"; import PlayArrowIcon from '@mui/icons-material/PlayArrow'; diff --git a/website/app/collection/playlists/page.tsx b/website/app/collection/playlists/page.tsx index 2ea899c..94b9ab8 100644 --- a/website/app/collection/playlists/page.tsx +++ b/website/app/collection/playlists/page.tsx @@ -1,12 +1,12 @@ 'use client' -import { use, useEffect, useState } from "react"; -import { apiGetCollectionPlaylists, apiPostCreatePlaylist } from "@/components/apiclient"; +import { useEffect, useState } from "react"; +import { apiGetCollectionPlaylists } from "@/components/apiclient"; import { useLoginStateContext } from "@/components/loginstateprovider"; import { useRouter } from "next/navigation"; import { APIPlaylist } from "@/util/models/playlist"; import AlertComponent, { AlertEntry } from "@/components/alerts"; -import { Typography, Grid, Modal, TextField, Button, Dialog, DialogTitle, DialogContent, DialogActions } from "@mui/material"; +import { Typography, Grid, Button } from "@mui/material"; import PlaylistCard from "@/components/playlistCard"; import CreatePlaylistDialog from "@/components/createPlaylistDialog"; import { useAppStateContext } from "@/components/appstateprovider"; diff --git a/website/components/appstateprovider.tsx b/website/components/appstateprovider.tsx index a8e7a59..bfee763 100644 --- a/website/components/appstateprovider.tsx +++ b/website/components/appstateprovider.tsx @@ -1,7 +1,7 @@ 'use client' import { APITrack } from "@/util/models/track"; -import { createContext, useContext, useEffect, useReducer, useState } from "react"; +import { createContext, useContext, useReducer } from "react"; export enum RepeatType { OFF, diff --git a/website/components/genreCard.tsx b/website/components/genreCard.tsx index 121cecb..2cc2c6f 100644 --- a/website/components/genreCard.tsx +++ b/website/components/genreCard.tsx @@ -1,5 +1,4 @@ import React from "react"; -import { APIArtist } from "@/util/models/artist"; import { Typography, Card, CardActionArea, CardContent, CardMedia } from "@mui/material"; import { useRouter } from "next/navigation"; import { useAppStateContext } from "./appstateprovider"; diff --git a/website/components/mediaplayer.tsx b/website/components/mediaplayer.tsx index 9d61faa..c9aceb3 100644 --- a/website/components/mediaplayer.tsx +++ b/website/components/mediaplayer.tsx @@ -5,7 +5,6 @@ import { useAppStateContext } from "./appstateprovider"; import { useRef, useState, useEffect } from "react"; import AudioPlayer from 'react-h5-audio-player'; - import '@/components/mediaplayer.css'; import { PauseOutlined,