Skip to content

Commit

Permalink
Merge pull request #368 from Yooooomi/release/1.9.0
Browse files Browse the repository at this point in the history
fixed search bar loading, bumped version, improved readme
  • Loading branch information
Yooooomi authored Mar 12, 2024
2 parents c3ae876 + cfe15ef commit e866e79
Show file tree
Hide file tree
Showing 10 changed files with 391 additions and 377 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,14 +91,14 @@ You can follow the instructions [here](https://github.com/Yooooomi/your_spotify/
| API_ENDPOINT | REQUIRED | The endpoint of your server |
| SPOTIFY_PUBLIC | REQUIRED | The public key of your Spotify application (cf [Creating the Spotify Application](#creating-the-spotify-application)) |
| SPOTIFY_SECRET | REQUIRED | The secret key of your Spotify application (cf [Creating the Spotify Application](#creating-the-spotify-application)) |
| CORS | _not defined_ | List of comma-separated origin allowed |
| MAX_IMPORT_CACHE_SIZE | Infinite | The maximum element in the cache when importing data from an outside source, more cache means less requests to Spotify, resulting in faster imports |
| MONGO_ENDPOINT | mongodb://mongo:27017/your_spotify | The endpoint of the Mongo database, where **mongo** is the name of your service in the compose file |
| PORT | 8080 | The port of the server, do not modify if you're using docker |
| TIMEZONE | Europe/Paris | The timezone of your stats, only affects read requests since data is saved with UTC time |
| MONGO_ENDPOINT | mongodb://mongo:27017/your_spotify | The endpoint of the Mongo database, where **mongo** is the name of your service in the compose file |
| LOG_LEVEL | info | The log level, debug is useful if you encouter any bugs |
| CORS | _not defined_ | List of comma-separated origin allowed |
| COOKIE_VALIDITY_MS | 1h | Validity time of the authentication cookie, following [this pattern](https://github.com/vercel/ms) |
| MAX_IMPORT_CACHE_SIZE | Infinite | The maximum element in the cache when importing data from an outside source, more cache means less requests to Spotify, resulting in faster imports |
| MONGO_NO_ADMIN_RIGHTS | false | Do not ask for admin right on the Mongo database |
| PORT | 8080 | The port of the server, **do not** modify if you're using docker |
## CORS
Expand Down
20 changes: 10 additions & 10 deletions apps/client/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@your_spotify/client",
"version": "1.8.1",
"version": "1.9.0",
"private": true,
"scripts": {
"start": "DISABLE_ESLINT_PLUGIN=true react-scripts start",
Expand All @@ -12,29 +12,29 @@
"dependencies": {
"@emotion/react": "11.11.4",
"@emotion/styled": "11.11.0",
"@mui/icons-material": "5.15.11",
"@mui/material": "5.15.11",
"@mui/system": "5.15.11",
"@mui/x-date-pickers": "6.19.5",
"@mui/icons-material": "5.15.12",
"@mui/material": "5.15.12",
"@mui/system": "5.15.12",
"@mui/x-date-pickers": "6.19.6",
"@reduxjs/toolkit": "2.2.1",
"axios": "1.6.7",
"clsx": "2.1.0",
"date-fns": "3.3.1",
"date-fns": "3.4.0",
"react": "^18.2.0",
"react-copy-to-clipboard": "^5.1.0",
"react-dom": "^18.2.0",
"react-infinite-scroll-component": "^6.1.0",
"react-redux": "9.1.0",
"react-router-dom": "6.22.2",
"recharts": "2.12.1",
"react-router-dom": "6.22.3",
"recharts": "2.12.2",
"redux": "5.0.1",
"web-vitals": "3.5.2"
},
"devDependencies": {
"@types/node": "20.11.22",
"@types/node": "20.11.26",
"@types/react-copy-to-clipboard": "5.0.7",
"@types/react-date-range": "1.4.9",
"@types/react-dom": "18.2.19",
"@types/react-dom": "18.2.21",
"@your_spotify/dev": "*",
"react-scripts": "^5.0.1"
},
Expand Down
2 changes: 1 addition & 1 deletion apps/client/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
Restricting connect-src is done at start of the client server.
-->
<meta http-equiv="Content-Security-Policy" content="default-src 'self'; object-src 'none'; script-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self' https://i.scdn.co; connect-src *;" />
<meta http-equiv="Content-Security-Policy" content="default-src 'self'; object-src 'none'; script-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self' https://i.scdn.co; connect-src http://localhost:8080;" />

<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
Expand Down
24 changes: 12 additions & 12 deletions apps/client/src/components/Layout/Sider/Sider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,23 @@ import { useLocation, useNavigate } from "react-router-dom";
import { useSelector } from "react-redux";
import { SystemUpdateAlt as UpdateIcon } from "@mui/icons-material";

import { Tooltip } from '@mui/material';
import s from './index.module.css';
import { useShareLink } from '../../../services/hooks/hooks';
import { alertMessage } from '../../../services/redux/modules/message/reducer';
import { selectUser } from '../../../services/redux/modules/user/selector';
import { useAppDispatch } from '../../../services/redux/tools';
import { LayoutContext } from '../LayoutContext';
import SiderTitle from './SiderTitle';
import SiderSearch from '../../SiderSearch';
import { Album, Artist, TrackWithFullAlbum } from '../../../services/types';
import SiderCategory from './SiderCategory/SiderCategory';
import { links } from './types';
import { Tooltip } from "@mui/material";
import { useShareLink } from "../../../services/hooks/hooks";
import { alertMessage } from "../../../services/redux/modules/message/reducer";
import { selectUser } from "../../../services/redux/modules/user/selector";
import { useAppDispatch } from "../../../services/redux/tools";
import { LayoutContext } from "../LayoutContext";
import SiderSearch from "../../SiderSearch";
import { Album, Artist, TrackWithFullAlbum } from "../../../services/types";
import {
selectUpdateAvailable,
selectVersion,
} from "../../../services/redux/modules/settings/selector";
import Text from "../../Text";
import SiderCategory from "./SiderCategory/SiderCategory";
import { links } from "./types";
import SiderTitle from "./SiderTitle";
import s from "./index.module.css";

interface SiderProps {
className?: string;
Expand Down
1 change: 0 additions & 1 deletion apps/client/src/components/Loader/Loader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ interface LoaderProps extends HTMLProps<"div"> {

export default function Loader({ text, className, ...other }: LoaderProps) {
return (
// eslint-disable-next-line react/jsx-props-no-spreading
<div className={clsx(s.root, className)} {...other}>
<CircularProgress size={24} />
{text && (
Expand Down
8 changes: 4 additions & 4 deletions apps/client/src/components/SiderSearch/SiderSearch.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,15 @@ export default function SiderSearch({

const internOnArtistClick = useCallback(
(artist: Artist) => {
setSearch('');
setSearch("");
onArtistClick?.(artist);
},
[onArtistClick],
);

const internOnAlbumClick = useCallback(
(album: Album) => {
setSearch('');
setSearch("");
onAlbumClick?.(album);
},
[onAlbumClick],
Expand Down Expand Up @@ -76,7 +76,7 @@ export default function SiderSearch({
<Paper
className={s.results}
style={{ width: inputRef.current?.clientWidth }}>
{loading && results === null && <Loader />}
{loading && results === null && <Loader className={s.alert} />}
{!loading && search.length < 3 && (
<Text className={s.alert} element="strong">
At least 3 characters
Expand Down Expand Up @@ -139,7 +139,7 @@ export default function SiderSearch({
<button
type="button"
key={res.id}
className={clsx('no-button', s.result)}
className={clsx("no-button", s.result)}
onClick={() => internOnAlbumClick(res)}>
<IdealImage
className={s.resultimage}
Expand Down
10 changes: 4 additions & 6 deletions apps/dev/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,20 @@
"version": "0.0.1",
"private": true,
"dependencies": {
"@typescript-eslint/eslint-plugin": "7.1.0",
"@typescript-eslint/parser": "7.1.0",
"@typescript-eslint/eslint-plugin": "7.2.0",
"@typescript-eslint/parser": "7.2.0",
"@vercel/ncc": "^0.38.1",
"concurrently": "8.2.2",
"eslint": "8.57.0",
"eslint-config-airbnb": "^19.0.4",
"eslint-config-airbnb-typescript": "17.1.0",
"eslint-config-prettier": "9.1.0",
"eslint-import-resolver-typescript": "^3.6.1",
"eslint-plugin-import": "2.29.1",
"eslint-plugin-jsx-a11y": "6.8.0",
"eslint-plugin-prettier": "5.1.3",
"eslint-plugin-react": "7.33.2",
"eslint-plugin-react": "7.34.0",
"eslint-plugin-react-hooks": "^4.6.0",
"prettier": "3.2.5",
"ts-node": "10.9.2",
"typescript": "5.3.3"
"typescript": "5.4.2"
}
}
12 changes: 6 additions & 6 deletions apps/server/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@your_spotify/server",
"version": "1.8.1",
"version": "1.9.0",
"private": true,
"scripts": {
"start": "node lib/index.js",
Expand All @@ -15,24 +15,24 @@
"axios": "1.6.7",
"cookie-parser": "^1.4.5",
"cors": "^2.8.5",
"express": "4.18.2",
"express": "4.18.3",
"jsonwebtoken": "9.0.2",
"migrate": "2.1.0",
"mongodb": "6.3.0",
"mongoose": "8.2.0",
"mongodb": "6.5.0",
"mongoose": "8.2.1",
"morgan": "^1.10.0",
"multer": "^1.4.5-lts.1",
"uuid": "9.0.1",
"zod": "^3.22.4"
},
"devDependencies": {
"@types/axios": "^0.14.0",
"@types/cookie-parser": "1.4.6",
"@types/cookie-parser": "1.4.7",
"@types/cors": "2.8.17",
"@types/jsonwebtoken": "9.0.6",
"@types/morgan": "1.9.9",
"@types/multer": "1.4.11",
"@types/node": "20.11.22",
"@types/node": "20.11.26",
"@types/uuid": "9.0.8",
"@your_spotify/dev": "*"
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@your_spotify/root",
"version": "1.8.1",
"version": "1.9.0",
"repository": "git@github.com:Yooooomi/your_spotify.git",
"author": "Timothee <timothee.boussus@gmail.com>",
"private": true,
Expand Down
Loading

0 comments on commit e866e79

Please sign in to comment.