Skip to content

Commit

Permalink
Merge pull request #17 from lovegaoshi/dev-noxplayer
Browse files Browse the repository at this point in the history
feat: 歌单刷新订阅进度条
  • Loading branch information
lovegaoshi authored Nov 12, 2023
2 parents e43cfb6 + d145807 commit 66ab40f
Show file tree
Hide file tree
Showing 56 changed files with 1,595 additions and 1,247 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@ build/
build/*.js
dist/
node_modules/
azusa-player-mobile"/
.snapshots/
*.min.js
109 changes: 109 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
module.exports = {
env: {
browser: true,
es2021: true,
node: true,
},
extends: [
'airbnb',
'plugin:@typescript-eslint/eslint-recommended',
'plugin:import/typescript',
'plugin:prettier/recommended',
],
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaFeatures: {
jsx: true,
},
ecmaVersion: 'latest',
sourceType: 'module',
},
plugins: ['react', '@typescript-eslint', 'prettier'],
settings: {
react: {
version: 'detect',
},
'import/resolver': {
alias: {
map: [
['@utils', './src/utils'],
['@contexts', './src/contexts'],
['@styles', './src/styles'],
['@objects', './src/objects'],
['@background', './src/background'],
['@stores', './src/stores'],
['@hooks', './src/hooks'],
],
extensions: ['.ts', '.js', '.jsx', '.json'],
},
},
},
rules: {
'prettier/prettier': ['error', { endOfLine: 'auto' }],
'import/extensions': [
'warn',
{
js: 'never',
jsx: 'never',
tsx: 'never',
ts: 'never',
},
],
'no-use-before-define': 'off',
'@typescript-eslint/no-use-before-define': ['off'], // solves 'React' was used before it was defined
'space-before-function-paren': 0,
'react/prop-types': 0,
'react/jsx-handler-names': 0,
'react/jsx-fragments': 0,
'react/no-unused-prop-types': 0,
'no-console': 'off',
'linebreak-style': 0,
'operator-linebreak': 'off',
'max-len': 'off',
'no-underscore-dangle': 'off',
'no-unused-vars': 'warn',
'react/jsx-filename-extension': [
1,
{
extensions: ['.js', '.jsx', '.ts', '.tsx'],
},
],
'react/jsx-one-expression-per-line': 'off',
'react/react-in-jsx-scope': 'off',
'react/no-unescaped-entities': 'off',
// no.
'arrow-body-style': 'off',
// no.
'no-plusplus': 'off',
// no.
'no-undef': 'off',
// no.
'no-restricted-syntax': 'off',
// no.
'consistent-return': 'off',
// no.
radix: 'off',
// && and ||? maybe. math operators? no. learn math.
'no-mixed-operators': 'off',
// i dont do this, but one line arrow functions interpreted I'm returning even though i dont use return.
'no-return-assign': 'off',
// no. just no.
'no-continue': 'off',
// no. just no.
'no-return-await': 'off',
// no.
'no-param-reassign': 'off',
// i use <<.
'no-bitwise': 'off',
// for the convenience to work with stupid async chrome API calls.
'no-await-in-loop': 'off',
// actually a feature not oversight. no.
'no-fallthrough': 'off',
'jsx-a11y/click-events-have-key-events': 'off',
// no. its readable.
'no-nested-ternary': 'off',
'react/no-array-index-key': 'off',
'react/jsx-props-no-spreading': 'off',
'react/destructuring-assignment': 'off',
},
};
95 changes: 0 additions & 95 deletions .eslintrc.json

This file was deleted.

3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "azusa-player-mobile"]
path = azusa-player-mobile
url = https://github.com/lovegaoshi/azusa-player-mobile.git
15 changes: 9 additions & 6 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
{
"editor.tabSize": 2,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},
"eslint.validate": ["javascript"]
}
"editor.tabSize": 2,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},
"eslint.validate": ["javascript"],
"search.exclude": {
"azusa-player-mobile": true
}
}
1 change: 1 addition & 0 deletions azusa-player-mobile
Submodule azusa-player-mobile added at 58a73a
64 changes: 34 additions & 30 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,41 +12,43 @@
"build": "webpack --env prod"
},
"devDependencies": {
"@babel/core": "^7.12.13",
"@babel/preset-env": "^7.12.13",
"@babel/preset-react": "^7.12.13",
"@babel/preset-typescript": "^7.12.16",
"@babel/core": "^7.23.3",
"@babel/preset-env": "^7.23.3",
"@babel/preset-react": "^7.23.3",
"@babel/preset-typescript": "^7.23.3",
"@pmmmwh/react-refresh-webpack-plugin": "^0.5.0",
"@types/md5": "^2.3.2",
"@types/react": "^18.0.35",
"@types/react-dom": "^18.0.11",
"@typescript-eslint/eslint-plugin": "^5.58.0",
"@typescript-eslint/parser": "^5.58.0",
"@types/md5": "^2.3.5",
"@types/react": "^18.2.37",
"@types/react-dom": "^18.2.15",
"@typescript-eslint/eslint-plugin": "^6.10.0",
"@typescript-eslint/parser": "^6.10.0",
"babel-loader": "^9.1.2",
"clean-webpack-plugin": "^4.0.0",
"copy-webpack-plugin": "7.0.0",
"copy-webpack-plugin": "11.0.0",
"css-loader": "^6.7.3",
"eslint": "^8.38.0",
"eslint": "^8.53.0",
"eslint-config-airbnb": "^19.0.4",
"eslint-config-prettier": "^8.8.0",
"eslint-import-resolver-webpack": "^0.13.0",
"eslint-plugin-import": "^2.27.5",
"eslint-plugin-jsx-a11y": "^6.7.1",
"eslint-plugin-prettier": "^4.2.1",
"eslint-config-prettier": "^9.0.0",
"eslint-import-resolver-alias": "^1.1.2",
"eslint-import-resolver-webpack": "^0.13.8",
"eslint-plugin-import": "^2.29.0",
"eslint-plugin-jsx-a11y": "^6.8.0",
"eslint-plugin-prettier": "^5.0.1",
"eslint-plugin-react": "^7.32.2",
"eslint-plugin-react-hooks": "^4.2.0",
"file-loader": "^6.2.0",
"html-webpack-plugin": "^5.0.0",
"lodash": "^4.17.20",
"mini-css-extract-plugin": "^2.7.5",
"node-sass": "^8.0.0",
"prettier": "^2.2.1",
"node-sass": "^9.0.0",
"prettier": "^3.0.3",
"progress-bar-webpack-plugin": "^2.1.0",
"react-refresh": "^0.14.0",
"sass-loader": "^13.2.2",
"style-loader": "^3.3.2",
"tsconfig-paths-webpack-plugin": "^4.1.0",
"typescript": "^5.0.4",
"webpack": "^5.21.2",
"webpack": "^5.89.0",
"webpack-cli": "^5.0.1",
"webpack-config-utils": "^2.3.1",
"webpack-dev-server": "^4.0.0"
Expand All @@ -58,23 +60,25 @@
"dependencies": {
"@emotion/react": "^11.7.1",
"@emotion/styled": "^11.6.0",
"@fontsource/roboto": "^4.5.1",
"@ffmpeg/ffmpeg": "^0.12.7",
"@ffmpeg/util": "^0.12.1",
"@fontsource/roboto": "^5.0.8",
"@fortawesome/fontawesome-free": "^6.4.0",
"@fortawesome/free-brands-svg-icons": "^6.4.0",
"@mui/icons-material": "^5.2.1",
"@mui/lab": "^5.0.0-alpha.122",
"@mui/material": "^5.12.0",
"@mui/styles": "^5.12.0",
"@types/chrome": "^0.0.231",
"@types/uuid": "^9.0.1",
"@mui/icons-material": "^5.14.16",
"@mui/lab": "^5.0.0-alpha.152",
"@mui/material": "^5.14.17",
"@mui/styles": "^5.14.17",
"@types/chrome": "^0.0.251",
"@types/uuid": "^9.0.7",
"bottleneck": "^2.19.5",
"buffer": "^6.0.3",
"cross-fetch": "^3.1.5",
"cross-fetch": "^4.0.0",
"crypto-browserify": "^3.12.0",
"dotenv-webpack": "^8.0.1",
"downloadjs": "^1.4.7",
"dropbox": "^10.34.0",
"fflate": "^0.7.4",
"fflate": "^0.8.1",
"file-saver": "^2.0.5",
"fs": "^0.0.1-security",
"is-mobile": "^4.0.0",
Expand All @@ -97,7 +101,7 @@
"stream-browserify": "^3.0.0",
"util": "^0.12.5",
"uuid": "^9.0.0",
"youtube-stream-url": "^2.4.1",
"zustand": "^4.3.8"
"youtube-stream-url": "^2.4.2",
"zustand": "^4.4.6"
}
}
25 changes: 14 additions & 11 deletions src/components/Fav.js → src/components/Fav/Fav.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,17 +35,20 @@ import PlayCircleIcon from '@mui/icons-material/PlayCircle';
import { contextMenu } from 'react-contexify';
import { useHotkeys } from 'react-hotkeys-hook';
import PlaylistAddIcon from '@mui/icons-material/PlaylistAdd';
import { skinPreset } from '../styles/skin';
import { getName } from '../utils/re';
import RandomGIFIcon from './buttons/randomGIF';
import { getPlayerSettingKey, readLocalStorage } from '../utils/ChromeStorage';
import { CurrentAudioContext } from '../contexts/CurrentAudioContext';
import FavSettingsButtons from './buttons/FavSettingsButton';
import SongSearchBar from './dialogs/songsearchbar';
import Menu from './menus/Favmenu';
import SongRenameDialog from './dialogs/SongRenameDialog';
import { StorageManagerCtx } from '../contexts/StorageManagerContext';
import { ScrollBar } from '../styles/styles';
import { skinPreset } from '../../styles/skin';
import { getName } from '../../utils/re';
import RandomGIFIcon from '../buttons/randomGIF';
import {
getPlayerSettingKey,
readLocalStorage,
} from '../../utils/ChromeStorage';
import { CurrentAudioContext } from '../../contexts/CurrentAudioContext';
import FavSettingsButtons from './FavSetting/FavSettingsButton';
import SongSearchBar from '../dialogs/songsearchbar';
import Menu from './Favmenu';
import SongRenameDialog from '../dialogs/SongRenameDialog';
import { StorageManagerCtx } from '../../contexts/StorageManagerContext';
import { ScrollBar } from '../../styles/styles';

const { colorTheme } = skinPreset;

Expand Down
14 changes: 7 additions & 7 deletions src/components/FavMobile.js → src/components/Fav/FavMobile.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ import EditOffIcon from '@mui/icons-material/EditOff';
import { FixedSizeList as List } from 'react-window';
import PlaylistAddIcon from '@mui/icons-material/PlaylistAdd';
import { songText, reParseSearch } from './Fav';
import { getName } from '../utils/re';
import { skinPreset } from '../styles/skin';
import RandomGIFIcon from './buttons/randomGIF';
import FavSettingsButtons from './buttons/FavSettingsButton';
import { getPlayerSettingKey } from '../utils/ChromeStorage';
import SongSearchBar from './dialogs/songsearchbar';
import { ScrollBar } from '../styles/styles';
import { getName } from '../../utils/re';
import { skinPreset } from '../../styles/skin';
import RandomGIFIcon from '../buttons/randomGIF';
import FavSettingsButtons from './FavSetting/FavSettingsButton';
import { getPlayerSettingKey } from '../../utils/ChromeStorage';
import SongSearchBar from '../dialogs/songsearchbar';
import { ScrollBar } from '../../styles/styles';

const { colorTheme } = skinPreset;

Expand Down
Loading

0 comments on commit 66ab40f

Please sign in to comment.