diff --git a/.eslintignore b/.eslintignore deleted file mode 100644 index a6f34fe..0000000 --- a/.eslintignore +++ /dev/null @@ -1,4 +0,0 @@ -node_modules -dist -out -.gitignore diff --git a/.eslintrc.cjs b/.eslintrc.cjs deleted file mode 100644 index 387378b..0000000 --- a/.eslintrc.cjs +++ /dev/null @@ -1,137 +0,0 @@ -/* eslint-env node */ -require('@rushstack/eslint-patch/modern-module-resolution'); - -module.exports = { - extends: [ - 'eslint:recommended', - 'plugin:@typescript-eslint/recommended', - '@vue/typescript/recommended', - 'plugin:vue/vue3-recommended', - 'plugin:vue-scoped-css/base', - '@electron-toolkit', - '@electron-toolkit/eslint-config-ts/eslint-recommended', - 'plugin:prettier/recommended' - ], - env: { - browser: true, - node: true, - jest: true, - es6: true - }, - globals: { - defineProps: 'readonly', - defineEmits: 'readonly' - }, - plugins: ['vue', '@typescript-eslint', 'simple-import-sort'], - parserOptions: { - parser: '@typescript-eslint/parser', - sourceType: 'module', - allowImportExportEverywhere: true, - ecmaFeatures: { - jsx: true - } - }, - settings: { - 'import/extensions': ['.js', '.jsx', '.ts', '.tsx'] - }, - rules: { - 'vue/require-default-prop': 'off', - 'vue/multi-word-component-names': 'off', - 'no-underscore-dangle': 'off', - 'no-nested-ternary': 'off', - 'no-console': 'off', - 'no-await-in-loop': 'off', - 'no-continue': 'off', - 'no-restricted-syntax': 'off', - 'no-return-assign': 'off', - 'no-unused-expressions': 'off', - 'no-return-await': 'off', - 'no-plusplus': 'off', - 'no-param-reassign': 'off', - 'no-shadow': 'off', - 'guard-for-in': 'off', - 'import/extensions': 'off', - 'import/no-unresolved': 'off', - 'import/no-extraneous-dependencies': 'off', - 'import/prefer-default-export': 'off', - 'import/first': 'off', - '@typescript-eslint/no-explicit-any': 'off', - '@typescript-eslint/explicit-module-boundary-types': 'off', - 'vue/first-attribute-linebreak': 0, - '@typescript-eslint/no-unused-vars': [ - 'error', - { - argsIgnorePattern: '^_', - varsIgnorePattern: '^_' - } - ], - 'no-unused-vars': [ - 'error', - { - argsIgnorePattern: '^_', - varsIgnorePattern: '^_' - } - ], - 'no-use-before-define': 'off', - '@typescript-eslint/no-use-before-define': 'off', - '@typescript-eslint/ban-ts-comment': 'off', - '@typescript-eslint/ban-types': 'off', - 'class-methods-use-this': 'off', - 'simple-import-sort/imports': 'error', - 'simple-import-sort/exports': 'error' - }, - overrides: [ - { - files: ['*.vue'], - rules: { - 'vue/component-name-in-template-casing': [2, 'kebab-case'], - 'vue/require-default-prop': 0, - 'vue/multi-word-component-names': 0, - 'vue/no-reserved-props': 0, - 'vue/no-v-html': 0, - 'vue-scoped-css/enforce-style-type': [ - 'error', - { - allows: ['scoped'] - } - ], - '@typescript-eslint/explicit-function-return-type': 'off', - // 需要行尾分号 - 'prettier/prettier': ['error', { endOfLine: 'auto' }] - } - }, - { - files: ['*.ts', '*.tsx'], - rules: { - 'max-classes-per-file': 'off', - 'no-await-in-loop': 'off', - 'dot-notation': 'off', - 'constructor-super': 'off', - 'getter-return': 'off', - 'no-const-assign': 'off', - 'no-dupe-args': 'off', - 'no-dupe-class-members': 'off', - 'no-dupe-keys': 'off', - 'no-func-assign': 'off', - 'no-import-assign': 'off', - 'no-new-symbol': 'off', - 'no-obj-calls': 'off', - 'no-redeclare': 'off', - 'no-setter-return': 'off', - 'no-this-before-super': 'off', - 'no-undef': 'off', - 'no-unreachable': 'off', - 'no-unsafe-negation': 'off', - 'no-var': 'error', - 'prefer-const': 'error', - 'prefer-rest-params': 'error', - 'prefer-spread': 'error', - 'valid-typeof': 'off', - 'consistent-return': 'off', - 'no-promise-executor-return': 'off', - 'prefer-promise-reject-errors': 'off', - '@typescript-eslint/explicit-function-return-type': 'off' - } - } - ] -}; diff --git a/.github/ISSUE_TEMPLATE/bug-report.zh-CN.yml b/.github/ISSUE_TEMPLATE/bug-report.zh-CN.yml index 717e651..464b493 100644 --- a/.github/ISSUE_TEMPLATE/bug-report.zh-CN.yml +++ b/.github/ISSUE_TEMPLATE/bug-report.zh-CN.yml @@ -1,6 +1,6 @@ name: 反馈 Bug description: 通过 github 模板进行 Bug 反馈。 -title: "描述问题的标题" +title: '描述问题的标题' body: - type: markdown attributes: diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index f92d028..eecc553 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -1,5 +1,5 @@ blank_issues_enabled: true contact_links: - - name: - url: - about: \ No newline at end of file + - name: + url: + about: diff --git a/.github/ISSUE_TEMPLATE/feature-report.zh-CN.yml b/.github/ISSUE_TEMPLATE/feature-report.zh-CN.yml index 09e97f0..923247f 100644 --- a/.github/ISSUE_TEMPLATE/feature-report.zh-CN.yml +++ b/.github/ISSUE_TEMPLATE/feature-report.zh-CN.yml @@ -1,6 +1,6 @@ name: 反馈新功能 description: 通过 github 模板进行新功能反馈。 -title: "描述问题的标题" +title: '描述问题的标题' body: - type: markdown attributes: diff --git a/.github/issue-shoot.md b/.github/issue-shoot.md index 1d541e8..da19b91 100644 --- a/.github/issue-shoot.md +++ b/.github/issue-shoot.md @@ -1,4 +1,5 @@ ## IssueShoot + - 预估时长: {{ .duration }} - 期望完成时间: {{ .deadline }} - 开发难度: {{ .level }} diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 030db6b..1792305 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -8,11 +8,11 @@ on: jobs: release: runs-on: ${{ matrix.os }} - + strategy: matrix: os: [macos-latest, windows-latest, ubuntu-latest] - + steps: - name: Check out Git repository uses: actions/checkout@v4 @@ -85,4 +85,4 @@ jobs: draft: false prerelease: false env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index b48b47e..548ce75 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -16,7 +16,7 @@ jobs: uses: actions/setup-node@v3 with: node-version: '18' - + - name: 创建环境变量文件 run: | echo "VITE_API=${{ secrets.VITE_API }}" > .env.production.local @@ -36,7 +36,7 @@ jobs: host: ${{ secrets.SERVER_HOST }} username: ${{ secrets.SERVER_USERNAME }} key: ${{ secrets.DEPLOY_KEY }} - source: "out/renderer/*" + source: 'out/renderer/*' target: ${{ secrets.DEPLOY_PATH }} strip_components: 2 @@ -48,4 +48,4 @@ jobs: key: ${{ secrets.DEPLOY_KEY }} script: | cd ${{ secrets.DEPLOY_PATH }} - echo "部署完成于 $(date)" \ No newline at end of file + echo "部署完成于 $(date)" diff --git a/.prettierrc.yaml b/.prettierrc.yaml deleted file mode 100644 index b7283f3..0000000 --- a/.prettierrc.yaml +++ /dev/null @@ -1,5 +0,0 @@ -singleQuote: true -semi: true -printWidth: 100 -trailingComma: none -endOfLine: auto diff --git a/CHANGELOG.md b/CHANGELOG.md index 5981bd4..a8f9dbd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,29 +1,32 @@ # 更新日志 ## v4.8.2 + ### 🎨 优化 + - 重新设计pc端歌词页面Mini播放栏 - 添加清除歌曲自定义解析功能 ### 🐛 Bug 修复 + - 修复歌曲单独解析失败问题 - 修复歌词页面加入歌单抽屉被遮挡问题 - ## v4.8.1 ### 🐛 Bug 修复 + - 修复无法快捷键调整问题 ### 🎨 优化 + - 优化音乐资源解析 - 去除无用代码,优化加载速度 - - ## v4.8.0 ### ✨ 新功能 + - 增强移动端播放页面效果,添加播放模式选择,添加横屏模式,添加播放列表功能 ([81b61e4](https://github.com/algerkong/AlgerMusicPlayer/commit/81b61e4)),([0d89e15](https://github.com/algerkong/AlgerMusicPlayer/commit/0d89e15)),([9345805](https://github.com/algerkong/AlgerMusicPlayer/commit/9345805)) - 优化移动端界面动画效果,播放栏,返回效果等一系列功能 - 添加下载管理页面, 引入文件类型检测库以支持多种音频格式,支持自定义文件名格式和下载路径配置 ([3ac3159](https://github.com/algerkong/AlgerMusicPlayer/commit/3ac3159)),([b203077](https://github.com/algerkong/AlgerMusicPlayer/commit/b203077)) @@ -34,7 +37,8 @@ - 添加歌词时间矫正功能,支持增加和减少矫正时间 ([c975344](https://github.com/algerkong/AlgerMusicPlayer/commit/c975344)) ### 🐛 Bug 修复 -- 修复音频初始化音量问题,完善翻译 ([#320](https://github.com/algerkong/AlgerMusicPlayer/pull/320)) 感谢[Qumo](https://github.com/Hellodwadawd12312312)的pr + +- 修复音频初始化音量问题,完善翻译 ([#320](https://github.com/algerkong/AlgerMusicPlayer/pull/320)) 感谢[Qumo](https://github.com/Hellodwadawd12312312)的pr - 重构每日推荐数据加载逻辑,提取为独立函数并优化用户状态判断 ([5e704a1](https://github.com/algerkong/AlgerMusicPlayer/commit/5e704a1)) - 修复刷新后第一次播放出现的无法播放问题 ([6f1909a](https://github.com/algerkong/AlgerMusicPlayer/commit/6f1909a)) - 修复更多设置弹窗被歌词窗口遮挡问题,并优化为互斥弹窗,优化样式 ([62e5166](https://github.com/algerkong/AlgerMusicPlayer/commit/62e5166)) @@ -42,8 +46,8 @@ - 修复音频服务相关问题 ([090103b](https://github.com/algerkong/AlgerMusicPlayer/commit/090103b)),([5ee60d7](https://github.com/algerkong/AlgerMusicPlayer/commit/5ee60d7)) - 修复播放栏无法控制隐藏问题 ([d227ac8](https://github.com/algerkong/AlgerMusicPlayer/commit/d227ac8)) - ### 🎨 优化 + - 优化歌曲列表组件布局([fabcf28](https://github.com/algerkong/AlgerMusicPlayer/commit/fabcf28)) - 重构播放控制逻辑,添加播放进度恢复功能并清理无用代码 ([b9c38d2](https://github.com/algerkong/AlgerMusicPlayer/commit/b9c38d2)) - 优化提示组件,支持位置和图标显示选项 ([155bdf2](https://github.com/algerkong/AlgerMusicPlayer/commit/155bdf2)) @@ -53,7 +57,9 @@ - 代码优化 ## 赞赏支持☕️ + [赞赏列表](http://donate.alger.fun/) +
| 微信赞赏 | diff --git a/DEV.md b/DEV.md index 0b98daf..836903f 100644 --- a/DEV.md +++ b/DEV.md @@ -105,18 +105,18 @@ AlgerMusicPlayer/ 渲染进程是基于 Vue 3 的前端应用,负责 UI 渲染和用户交互。 - **components/**: 包含各种 UI 组件 - - **common/**: 通用组件 - - **home/**: 首页相关组件 - - **lyric/**: 歌词显示组件 - - **settings/**: 设置界面组件 - - **MusicList.vue**: 音乐列表组件 - - **MvPlayer.vue**: MV 播放器 - - **EQControl.vue**: 均衡器控制 - - **...**: 其他组件 + - **common/**: 通用组件 + - **home/**: 首页相关组件 + - **lyric/**: 歌词显示组件 + - **settings/**: 设置界面组件 + - **MusicList.vue**: 音乐列表组件 + - **MvPlayer.vue**: MV 播放器 + - **EQControl.vue**: 均衡器控制 + - **...**: 其他组件 - **store/**: Pinia 状态管理 - - **modules/**: 各功能模块的状态管理 - - **index.ts**: 状态管理入口 + - **modules/**: 各功能模块的状态管理 + - **index.ts**: 状态管理入口 - **views/**: 页面视图组件 @@ -142,25 +142,28 @@ AlgerMusicPlayer/ - 避免使用枚举,使用 const 对象代替 - 使用 tailwind 实现响应式设计 - ### 如何启动? + 安装依赖(最好使用node18+): + ``` npm install ``` - #### 桌面端开发 + 启动桌面端开发: + ``` npm run dev ``` - #### 网页端开发 -如果只启动网页端开发,需要自己部署服务 netease-cloud-music-api + +如果只启动网页端开发,需要自己部署服务 netease-cloud-music-api 需要复制一份 `.env.development.local` 到 `src/renderer` 下 + ``` # .env.development.local @@ -171,6 +174,7 @@ VITE_API_MUSIC = *** ``` 启动web端开发: + ``` npm run dev:web ``` @@ -178,15 +182,17 @@ npm run dev:web ### 打包 打包桌面端: + ``` npm run build:win ``` + 打包后的文件在 /dist 下 - - 打包网页端: + ``` npm run build ``` -打包后的文件在 /out/renderer 下 \ No newline at end of file + +打包后的文件在 /out/renderer 下 diff --git a/README.md b/README.md index 9969597..274392f 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,3 @@ -
|---|