Skip to content

Commit

Permalink
Merge pull request #303 from Yooooomi/release/1.7.2
Browse files Browse the repository at this point in the history
Release/1.7.2
  • Loading branch information
Yooooomi authored Nov 1, 2023
2 parents 43fc34d + ad6e19e commit 857dffc
Show file tree
Hide file tree
Showing 24 changed files with 1,705 additions and 729 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ You can follow the instructions [here](https://github.com/Yooooomi/your_spotify/
| TIMEZONE | Europe/Paris | The timezone of your stats, only affects read requests since data is saved with UTC time |
| LOG_LEVEL | info | The log level, debug is useful if you encouter any bugs |
| COOKIE_VALIDITY_MS | 1h | Validity time of the authentication cookie, following [this pattern](https://github.com/vercel/ms) |
| MONGO_NO_ADMIN_RIGHTS | false | Do not ask for admin right on the Mongo database |
## CORS
Expand Down
1 change: 0 additions & 1 deletion client/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ module.exports = {
es2021: true,
},
extends: [
'plugin:react/recommended',
'plugin:react-hooks/recommended',
'airbnb',
'airbnb-typescript',
Expand Down
48 changes: 24 additions & 24 deletions client/package.json
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
{
"name": "client_ts",
"version": "1.7.0",
"version": "1.7.2",
"private": true,
"dependencies": {
"@emotion/react": "11.11.1",
"@emotion/styled": "11.11.0",
"@mui/icons-material": "5.14.1",
"@mui/material": "5.14.1",
"@mui/system": "5.14.1",
"@mui/x-date-pickers": "6.10.1",
"@reduxjs/toolkit": "1.9.5",
"axios": "1.4.0",
"@mui/icons-material": "5.14.16",
"@mui/material": "5.14.16",
"@mui/system": "5.14.16",
"@mui/x-date-pickers": "6.17.0",
"@reduxjs/toolkit": "1.9.7",
"axios": "1.6.0",
"clsx": "2.0.0",
"date-fns": "2.30.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": "8.1.1",
"react-router-dom": "6.14.2",
"react-redux": "8.1.3",
"react-router-dom": "6.18.0",
"react-scripts": "^5.0.1",
"recharts": "2.7.2",
"recharts": "2.9.2",
"redux": "4.2.1",
"web-vitals": "3.4.0"
"web-vitals": "3.5.0"
},
"scripts": {
"start": "react-scripts start",
Expand All @@ -44,23 +44,23 @@
]
},
"devDependencies": {
"@types/node": "20.4.4",
"@types/react-copy-to-clipboard": "5.0.4",
"@types/react-date-range": "1.4.4",
"@types/react-dom": "18.2.7",
"@typescript-eslint/eslint-plugin": "6.1.0",
"@typescript-eslint/parser": "6.1.0",
"eslint": "8.45.0",
"@types/node": "20.8.10",
"@types/react-copy-to-clipboard": "5.0.6",
"@types/react-date-range": "1.4.7",
"@types/react-dom": "18.2.14",
"@typescript-eslint/eslint-plugin": "6.9.1",
"@typescript-eslint/parser": "6.9.1",
"eslint": "8.52.0",
"eslint-config-airbnb": "^19.0.4",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-config-airbnb-typescript": "17.1.0",
"eslint-config-prettier": "8.8.0",
"eslint-plugin-import": "2.27.5",
"eslint-config-prettier": "9.0.0",
"eslint-plugin-import": "2.29.0",
"eslint-plugin-jsx-a11y": "6.7.1",
"eslint-plugin-prettier": "5.0.0",
"eslint-plugin-react": "7.33.0",
"eslint-plugin-prettier": "5.0.1",
"eslint-plugin-react": "7.33.2",
"eslint-plugin-react-hooks": "^4.6.0",
"prettier": "3.0.0",
"typescript": "5.1.6"
"prettier": "3.0.3",
"typescript": "5.2.2"
}
}
31 changes: 30 additions & 1 deletion client/src/components/Layout/Sider/Sider.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import React, { useCallback, useContext } from 'react';
import { useCallback, useContext } from 'react';
import clsx from 'clsx';
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';
Expand All @@ -14,6 +16,11 @@ import SiderSearch from '../../SiderSearch';
import { Artist, TrackWithFullAlbum } from '../../../services/types';
import SiderCategory from './SiderCategory/SiderCategory';
import { links } from './types';
import {
selectUpdateAvailable,
selectVersion,
} from '../../../services/redux/modules/settings/selector';
import Text from '../../Text';

interface SiderProps {
className?: string;
Expand Down Expand Up @@ -64,6 +71,9 @@ export default function Sider({ className, isDrawer }: SiderProps) {

const toCopy = useShareLink();

const version = useSelector(selectVersion);
const updateAvailable = useSelector(selectUpdateAvailable);

if (!user) {
return null;
}
Expand All @@ -86,6 +96,25 @@ export default function Sider({ className, isDrawer }: SiderProps) {
/>
))}
</nav>
<div className={s.versionwrapper}>
{version && (
<Text noStyle className={s.version}>
v{version}
</Text>
)}
{updateAvailable && (
<Tooltip title="An update is available">
<a
href="https://github.com/Yooooomi/your_spotify/releases"
target="_blank"
rel="noreferrer">
<Text onDark>
<UpdateIcon fontSize="small" color="info" />
</Text>
</a>
</Tooltip>
)}
</div>
</div>
);
}
17 changes: 0 additions & 17 deletions client/src/components/Layout/Sider/SiderTitle/SiderTitle.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
import { Tooltip } from '@mui/material';
import { InfoOutlined as UpdateIcon } from '@mui/icons-material';
import { useContext, useEffect } from 'react';
import { useSelector } from 'react-redux';
import { Link } from 'react-router-dom';
import { selectUpdateAvailable } from '../../../../services/redux/modules/settings/selector';
import { getVersion } from '../../../../services/redux/modules/settings/thunk';
import { useAppDispatch } from '../../../../services/redux/tools';
import Text from '../../../Text';
Expand All @@ -13,7 +9,6 @@ import { LayoutContext } from '../../LayoutContext';
export default function UpdateChecker() {
const layoutContext = useContext(LayoutContext);
const dispatch = useAppDispatch();
const updateAvailable = useSelector(selectUpdateAvailable);

useEffect(() => {
dispatch(getVersion());
Expand All @@ -26,18 +21,6 @@ export default function UpdateChecker() {
Your Spotify
</Text>
</Link>
{updateAvailable && (
<Tooltip title="An update is available">
<a
href="https://github.com/Yooooomi/your_spotify/releases"
target="_blank"
rel="noreferrer">
<Text onDark>
<UpdateIcon />
</Text>
</a>
</Tooltip>
)}
</div>
);
}
14 changes: 14 additions & 0 deletions client/src/components/Layout/Sider/index.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,17 @@
margin-bottom: 32px;
color: white;
}

.versionwrapper {
display: flex;
flex-direction: row;
align-items: center;
justify-content: flex-start;
gap: 8px;
}

.version {
color: rgb(108, 108, 108);
font-size: 0.8em;
transform: translateY(-1px);
}
2 changes: 1 addition & 1 deletion client/src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ h6 {
:root {
--track-options: 34px;
--radius: 6px;
--page-padding: 32px;
--page-padding: 16px;
--accent: #FB717B;
--header-image-size: 60px;
}
Expand Down
5 changes: 0 additions & 5 deletions client/src/services/theme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,6 @@ export const useTheme = () => {
},
},
MuiTabs: {
defaultProps: {
disableRipple: true,
focusRipple: false,
disableTouchRipple: true,
},
styleOverrides: {
root: {
backgroundColor: 'var(--header-background)',
Expand Down
Loading

0 comments on commit 857dffc

Please sign in to comment.