From 0207b92f2ad18da5fadcb38caf8c68c2908811a7 Mon Sep 17 00:00:00 2001 From: imsyy Date: Tue, 23 May 2023 17:30:57 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=AE=8C=E5=96=84=20i18n=20=E6=94=AF?= =?UTF-8?q?=E6=8C=81=20&=20fix:=20ios=20=E7=AB=AF=E5=9B=BE=E6=A0=87?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=20#38?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 8 +- pnpm-lock.yaml | 496 ++++++++++---------- src/App.vue | 28 +- src/api/song.js | 1 + src/components/DataList/AllArtists.vue | 9 +- src/components/DataList/CoverLists.vue | 1 + src/components/DataModal/PlayListDrawer.vue | 2 +- src/components/Nav/index.vue | 4 +- src/components/Pagination/index.vue | 19 +- src/components/Player/BigPlayer.vue | 4 +- src/components/Player/PlayerCover.vue | 4 +- src/components/Player/index.vue | 16 +- src/locale/lang/en.js | 171 ++++++- src/locale/lang/zh-CN.js | 156 +++++- src/main.js | 38 +- src/store/musicData.js | 58 +-- src/store/settingData.js | 5 +- src/store/userData.js | 27 +- src/utils/Player.js | 17 +- src/utils/getLanguageData.js | 88 ++++ src/utils/timeTools.js | 34 +- src/views/Album/AlbumView.vue | 144 ++++-- src/views/Artist/all-songs.vue | 20 +- src/views/Artist/index.vue | 48 +- src/views/Artist/songs.vue | 2 +- src/views/Comment/CommentView.vue | 22 +- src/views/DailySongs/DailySongsView.vue | 12 +- src/views/Discover/artists.vue | 7 +- src/views/Discover/playlists.vue | 22 +- src/views/Discover/toplists.vue | 12 +- src/views/History/HistoryView.vue | 14 +- src/views/Home/HomeView.vue | 2 - src/views/Login/LoginView.vue | 55 ++- src/views/NewAlbum/NewAlbumView.vue | 22 +- src/views/PlayList/PlayListView.vue | 143 ++++-- src/views/Search/albums.vue | 9 +- src/views/Search/artists.vue | 6 +- src/views/Search/index.vue | 24 +- src/views/Search/playlists.vue | 7 +- src/views/Search/songs.vue | 5 +- src/views/Search/videos.vue | 9 +- src/views/Setting/index.vue | 12 +- src/views/Setting/main.vue | 205 ++++---- src/views/Setting/other.vue | 22 +- src/views/Setting/player.vue | 77 +-- src/views/Song/SongView.vue | 213 +++++++-- src/views/State/403.vue | 8 +- src/views/State/404.vue | 8 +- src/views/State/500.vue | 10 +- src/views/User/album.vue | 4 +- src/views/User/artists.vue | 4 +- src/views/User/cloud.vue | 42 +- src/views/User/index.vue | 6 +- src/views/User/like.vue | 4 +- src/views/User/playlists.vue | 6 +- src/views/Video/VideoView.vue | 61 ++- 56 files changed, 1607 insertions(+), 846 deletions(-) create mode 100644 src/utils/getLanguageData.js diff --git a/package.json b/package.json index 4c54143..c5a2a59 100644 --- a/package.json +++ b/package.json @@ -33,11 +33,11 @@ "@jridgewell/sourcemap-codec": "^1.4.14", "@rollup/plugin-terser": "^0.4.0", "@vicons/material": "^0.12.0", - "@vitejs/plugin-vue": "^3.2.0", - "naive-ui": "^2.34.2", + "@vitejs/plugin-vue": "^4.2.3", + "naive-ui": "^2.34.4", "unplugin-auto-import": "^0.12.0", "unplugin-vue-components": "^0.22.11", - "vite": "^3.2.4", - "vite-plugin-pwa": "^0.14.1" + "vite": "^4.3.8", + "vite-plugin-pwa": "^0.15.0" } } \ No newline at end of file diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 6a02586..9ca0ba9 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -42,7 +42,7 @@ dependencies: version: 5.0.0 vite-plugin-html: specifier: ^3.2.0 - version: 3.2.0(vite@3.2.4) + version: 3.2.0(vite@4.3.8) vue: specifier: ^3.2.45 version: 3.2.45 @@ -67,11 +67,11 @@ devDependencies: specifier: ^0.12.0 version: 0.12.0 '@vitejs/plugin-vue': - specifier: ^3.2.0 - version: 3.2.0(vite@3.2.4)(vue@3.2.45) + specifier: ^4.2.3 + version: 4.2.3(vite@4.3.8)(vue@3.2.45) naive-ui: - specifier: ^2.34.2 - version: 2.34.2(vue@3.2.45) + specifier: ^2.34.4 + version: 2.34.4(vue@3.2.45) unplugin-auto-import: specifier: ^0.12.0 version: 0.12.0(rollup@2.79.1) @@ -79,11 +79,11 @@ devDependencies: specifier: ^0.22.11 version: 0.22.11(rollup@2.79.1)(vue@3.2.45) vite: - specifier: ^3.2.4 - version: 3.2.4(sass@1.56.1) + specifier: ^4.3.8 + version: 4.3.8(sass@1.56.1) vite-plugin-pwa: - specifier: ^0.14.1 - version: 0.14.1(vite@3.2.4)(workbox-build@6.5.4)(workbox-window@6.5.4) + specifier: ^0.15.0 + version: 0.15.0(vite@4.3.8)(workbox-build@6.5.4)(workbox-window@6.5.4) packages: @@ -1268,22 +1268,182 @@ packages: resolution: {integrity: sha512-kBJtf7PH6aWwZ6fka3zQ0p6SBYzx4fl1LoZXE2RrnYST9Xljm7WfKJrU4g/Xr3Beg72MLrp1AWNUmuYJTL7Cow==} dev: true - /@esbuild/android-arm@0.15.16: - resolution: {integrity: sha512-nyB6CH++2mSgx3GbnrJsZSxzne5K0HMyNIWafDHqYy7IwxFc4fd/CgHVZXr8Eh+Q3KbIAcAe3vGyqIPhGblvMQ==} + /@esbuild/android-arm64@0.17.19: + resolution: {integrity: sha512-KBMWvEZooR7+kzY0BtbTQn0OAYY7CsiydT63pVEaPtVYF0hXbUaOyZog37DKxK7NF3XacBJOpYT4adIJh+avxA==} + engines: {node: '>=12'} + cpu: [arm64] + os: [android] + requiresBuild: true + optional: true + + /@esbuild/android-arm@0.17.19: + resolution: {integrity: sha512-rIKddzqhmav7MSmoFCmDIb6e2W57geRsM94gV2l38fzhXMwq7hZoClug9USI2pFRGL06f4IOPHHpFNOkWieR8A==} engines: {node: '>=12'} cpu: [arm] os: [android] requiresBuild: true optional: true - /@esbuild/linux-loong64@0.15.16: - resolution: {integrity: sha512-SDLfP1uoB0HZ14CdVYgagllgrG7Mdxhkt4jDJOKl/MldKrkQ6vDJMZKl2+5XsEY/Lzz37fjgLQoJBGuAw/x8kQ==} + /@esbuild/android-x64@0.17.19: + resolution: {integrity: sha512-uUTTc4xGNDT7YSArp/zbtmbhO0uEEK9/ETW29Wk1thYUJBz3IVnvgEiEwEa9IeLyvnpKrWK64Utw2bgUmDveww==} + engines: {node: '>=12'} + cpu: [x64] + os: [android] + requiresBuild: true + optional: true + + /@esbuild/darwin-arm64@0.17.19: + resolution: {integrity: sha512-80wEoCfF/hFKM6WE1FyBHc9SfUblloAWx6FJkFWTWiCoht9Mc0ARGEM47e67W9rI09YoUxJL68WHfDRYEAvOhg==} + engines: {node: '>=12'} + cpu: [arm64] + os: [darwin] + requiresBuild: true + optional: true + + /@esbuild/darwin-x64@0.17.19: + resolution: {integrity: sha512-IJM4JJsLhRYr9xdtLytPLSH9k/oxR3boaUIYiHkAawtwNOXKE8KoU8tMvryogdcT8AU+Bflmh81Xn6Q0vTZbQw==} + engines: {node: '>=12'} + cpu: [x64] + os: [darwin] + requiresBuild: true + optional: true + + /@esbuild/freebsd-arm64@0.17.19: + resolution: {integrity: sha512-pBwbc7DufluUeGdjSU5Si+P3SoMF5DQ/F/UmTSb8HXO80ZEAJmrykPyzo1IfNbAoaqw48YRpv8shwd1NoI0jcQ==} + engines: {node: '>=12'} + cpu: [arm64] + os: [freebsd] + requiresBuild: true + optional: true + + /@esbuild/freebsd-x64@0.17.19: + resolution: {integrity: sha512-4lu+n8Wk0XlajEhbEffdy2xy53dpR06SlzvhGByyg36qJw6Kpfk7cp45DR/62aPH9mtJRmIyrXAS5UWBrJT6TQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [freebsd] + requiresBuild: true + optional: true + + /@esbuild/linux-arm64@0.17.19: + resolution: {integrity: sha512-ct1Tg3WGwd3P+oZYqic+YZF4snNl2bsnMKRkb3ozHmnM0dGWuxcPTTntAF6bOP0Sp4x0PjSF+4uHQ1xvxfRKqg==} + engines: {node: '>=12'} + cpu: [arm64] + os: [linux] + requiresBuild: true + optional: true + + /@esbuild/linux-arm@0.17.19: + resolution: {integrity: sha512-cdmT3KxjlOQ/gZ2cjfrQOtmhG4HJs6hhvm3mWSRDPtZ/lP5oe8FWceS10JaSJC13GBd4eH/haHnqf7hhGNLerA==} + engines: {node: '>=12'} + cpu: [arm] + os: [linux] + requiresBuild: true + optional: true + + /@esbuild/linux-ia32@0.17.19: + resolution: {integrity: sha512-w4IRhSy1VbsNxHRQpeGCHEmibqdTUx61Vc38APcsRbuVgK0OPEnQ0YD39Brymn96mOx48Y2laBQGqgZ0j9w6SQ==} + engines: {node: '>=12'} + cpu: [ia32] + os: [linux] + requiresBuild: true + optional: true + + /@esbuild/linux-loong64@0.17.19: + resolution: {integrity: sha512-2iAngUbBPMq439a+z//gE+9WBldoMp1s5GWsUSgqHLzLJ9WoZLZhpwWuym0u0u/4XmZ3gpHmzV84PonE+9IIdQ==} engines: {node: '>=12'} cpu: [loong64] os: [linux] requiresBuild: true optional: true + /@esbuild/linux-mips64el@0.17.19: + resolution: {integrity: sha512-LKJltc4LVdMKHsrFe4MGNPp0hqDFA1Wpt3jE1gEyM3nKUvOiO//9PheZZHfYRfYl6AwdTH4aTcXSqBerX0ml4A==} + engines: {node: '>=12'} + cpu: [mips64el] + os: [linux] + requiresBuild: true + optional: true + + /@esbuild/linux-ppc64@0.17.19: + resolution: {integrity: sha512-/c/DGybs95WXNS8y3Ti/ytqETiW7EU44MEKuCAcpPto3YjQbyK3IQVKfF6nbghD7EcLUGl0NbiL5Rt5DMhn5tg==} + engines: {node: '>=12'} + cpu: [ppc64] + os: [linux] + requiresBuild: true + optional: true + + /@esbuild/linux-riscv64@0.17.19: + resolution: {integrity: sha512-FC3nUAWhvFoutlhAkgHf8f5HwFWUL6bYdvLc/TTuxKlvLi3+pPzdZiFKSWz/PF30TB1K19SuCxDTI5KcqASJqA==} + engines: {node: '>=12'} + cpu: [riscv64] + os: [linux] + requiresBuild: true + optional: true + + /@esbuild/linux-s390x@0.17.19: + resolution: {integrity: sha512-IbFsFbxMWLuKEbH+7sTkKzL6NJmG2vRyy6K7JJo55w+8xDk7RElYn6xvXtDW8HCfoKBFK69f3pgBJSUSQPr+4Q==} + engines: {node: '>=12'} + cpu: [s390x] + os: [linux] + requiresBuild: true + optional: true + + /@esbuild/linux-x64@0.17.19: + resolution: {integrity: sha512-68ngA9lg2H6zkZcyp22tsVt38mlhWde8l3eJLWkyLrp4HwMUr3c1s/M2t7+kHIhvMjglIBrFpncX1SzMckomGw==} + engines: {node: '>=12'} + cpu: [x64] + os: [linux] + requiresBuild: true + optional: true + + /@esbuild/netbsd-x64@0.17.19: + resolution: {integrity: sha512-CwFq42rXCR8TYIjIfpXCbRX0rp1jo6cPIUPSaWwzbVI4aOfX96OXY8M6KNmtPcg7QjYeDmN+DD0Wp3LaBOLf4Q==} + engines: {node: '>=12'} + cpu: [x64] + os: [netbsd] + requiresBuild: true + optional: true + + /@esbuild/openbsd-x64@0.17.19: + resolution: {integrity: sha512-cnq5brJYrSZ2CF6c35eCmviIN3k3RczmHz8eYaVlNasVqsNY+JKohZU5MKmaOI+KkllCdzOKKdPs762VCPC20g==} + engines: {node: '>=12'} + cpu: [x64] + os: [openbsd] + requiresBuild: true + optional: true + + /@esbuild/sunos-x64@0.17.19: + resolution: {integrity: sha512-vCRT7yP3zX+bKWFeP/zdS6SqdWB8OIpaRq/mbXQxTGHnIxspRtigpkUcDMlSCOejlHowLqII7K2JKevwyRP2rg==} + engines: {node: '>=12'} + cpu: [x64] + os: [sunos] + requiresBuild: true + optional: true + + /@esbuild/win32-arm64@0.17.19: + resolution: {integrity: sha512-yYx+8jwowUstVdorcMdNlzklLYhPxjniHWFKgRqH7IFlUEa0Umu3KuYplf1HUZZ422e3NU9F4LGb+4O0Kdcaag==} + engines: {node: '>=12'} + cpu: [arm64] + os: [win32] + requiresBuild: true + optional: true + + /@esbuild/win32-ia32@0.17.19: + resolution: {integrity: sha512-eggDKanJszUtCdlVs0RB+h35wNlb5v4TWEkq4vZcmVt5u/HiDZrTXe2bWFQUez3RgNHwx/x4sk5++4NSSicKkw==} + engines: {node: '>=12'} + cpu: [ia32] + os: [win32] + requiresBuild: true + optional: true + + /@esbuild/win32-x64@0.17.19: + resolution: {integrity: sha512-lAhycmKnVOuRYNtRtatQR1LPQf2oYCkRGkSFnseDAKPl8lu5SOsK/e1sXe5a0Pc5kHIHe6P2I/ilntNv2xf3cA==} + engines: {node: '>=12'} + cpu: [x64] + os: [win32] + requiresBuild: true + optional: true + /@icon-park/vue-next@1.4.2(vue@3.2.45): resolution: {integrity: sha512-+QklF255wkfBOabY+xw6FAI0Bwln/RhdwCunNy/9sKdKuChtaU67QZqU67KGAvZUTeeBgsL+yaHHxqfQeGZXEQ==} engines: {node: '>= 8.0.0', npm: '>= 5.0.0'} @@ -1442,20 +1602,6 @@ packages: rollup: 2.79.1 dev: true - /@rollup/plugin-replace@5.0.2(rollup@3.10.0): - resolution: {integrity: sha512-M9YXNekv/C/iHHK+cvORzfRYfPbq0RDD8r0G+bMiTXjNGKulPnCT9O3Ss46WfhI6ZOCgApOP7xAdmCQJ+U2LAA==} - engines: {node: '>=14.0.0'} - peerDependencies: - rollup: ^1.20.0||^2.0.0||^3.0.0 - peerDependenciesMeta: - rollup: - optional: true - dependencies: - '@rollup/pluginutils': 5.0.2(rollup@3.10.0) - magic-string: 0.27.0 - rollup: 3.10.0 - dev: true - /@rollup/plugin-terser@0.4.0(rollup@2.79.1): resolution: {integrity: sha512-Ipcf3LPNerey1q9ZMjiaWHlNPEHNU/B5/uh9zXLltfEQ1lVSLLeZSgAtTPWGyw8Ip1guOeq+mDtdOlEj/wNxQw==} engines: {node: '>=14.0.0'} @@ -1506,21 +1652,6 @@ packages: rollup: 2.79.1 dev: true - /@rollup/pluginutils@5.0.2(rollup@3.10.0): - resolution: {integrity: sha512-pTd9rIsP92h+B6wWwFbW8RkZv4hiR/xKsqre4SIuAOaOEQRxi0lqLke9k2/7WegC85GgUs9pjmOjCUi3In4vwA==} - engines: {node: '>=14.0.0'} - peerDependencies: - rollup: ^1.20.0||^2.0.0||^3.0.0 - peerDependenciesMeta: - rollup: - optional: true - dependencies: - '@types/estree': 1.0.0 - estree-walker: 2.0.2 - picomatch: 2.3.1 - rollup: 3.10.0 - dev: true - /@surma/rollup-plugin-off-main-thread@2.2.3: resolution: {integrity: sha512-lR8q/9W7hZpMWweNiAKU7NQerBnzQQLvi8qnTDU/fxItPhtZVMbPV3lbCwjhIlNBe9Bbr5V+KHshvWmVSG9cxQ==} dependencies: @@ -1570,14 +1701,14 @@ packages: resolution: {integrity: sha512-chv1CYAl8P32P3Ycwgd5+vw/OFNc2mtkKdb1Rw4T5IJmKy6GVDsoUKV3N2l208HATn7CCQphZtuPDdsm7K2kmA==} dev: true - /@vitejs/plugin-vue@3.2.0(vite@3.2.4)(vue@3.2.45): - resolution: {integrity: sha512-E0tnaL4fr+qkdCNxJ+Xd0yM31UwMkQje76fsDVBBUCoGOUPexu2VDUYHL8P4CwV+zMvWw6nlRw19OnRKmYAJpw==} + /@vitejs/plugin-vue@4.2.3(vite@4.3.8)(vue@3.2.45): + resolution: {integrity: sha512-R6JDUfiZbJA9cMiguQ7jxALsgiprjBeHL5ikpXfJCH62pPHtI+JdJ5xWj6Ev73yXSlYl86+blXn1kZHQ7uElxw==} engines: {node: ^14.18.0 || >=16.0.0} peerDependencies: - vite: ^3.0.0 + vite: ^4.0.0 vue: ^3.2.25 dependencies: - vite: 3.2.4(sass@1.56.1) + vite: 4.3.8(sass@1.56.1) vue: 3.2.45 dev: true @@ -2209,194 +2340,34 @@ packages: is-symbol: 1.0.4 dev: true - /esbuild-android-64@0.15.16: - resolution: {integrity: sha512-Vwkv/sT0zMSgPSVO3Jlt1pUbnZuOgtOQJkJkyyJFAlLe7BiT8e9ESzo0zQSx4c3wW4T6kGChmKDPMbWTgtliQA==} - engines: {node: '>=12'} - cpu: [x64] - os: [android] - requiresBuild: true - optional: true - - /esbuild-android-arm64@0.15.16: - resolution: {integrity: sha512-lqfKuofMExL5niNV3gnhMUYacSXfsvzTa/58sDlBET/hCOG99Zmeh+lz6kvdgvGOsImeo6J9SW21rFCogNPLxg==} - engines: {node: '>=12'} - cpu: [arm64] - os: [android] - requiresBuild: true - optional: true - - /esbuild-darwin-64@0.15.16: - resolution: {integrity: sha512-wo2VWk/n/9V2TmqUZ/KpzRjCEcr00n7yahEdmtzlrfQ3lfMCf3Wa+0sqHAbjk3C6CKkR3WKK/whkMq5Gj4Da9g==} - engines: {node: '>=12'} - cpu: [x64] - os: [darwin] - requiresBuild: true - optional: true - - /esbuild-darwin-arm64@0.15.16: - resolution: {integrity: sha512-fMXaUr5ou0M4WnewBKsspMtX++C1yIa3nJ5R2LSbLCfJT3uFdcRoU/NZjoM4kOMKyOD9Sa/2vlgN8G07K3SJnw==} - engines: {node: '>=12'} - cpu: [arm64] - os: [darwin] - requiresBuild: true - optional: true - - /esbuild-freebsd-64@0.15.16: - resolution: {integrity: sha512-UzIc0xlRx5x9kRuMr+E3+hlSOxa/aRqfuMfiYBXu2jJ8Mzej4lGL7+o6F5hzhLqWfWm1GWHNakIdlqg1ayaTNQ==} - engines: {node: '>=12'} - cpu: [x64] - os: [freebsd] - requiresBuild: true - optional: true - - /esbuild-freebsd-arm64@0.15.16: - resolution: {integrity: sha512-8xyiYuGc0DLZphFQIiYaLHlfoP+hAN9RHbE+Ibh8EUcDNHAqbQgUrQg7pE7Bo00rXmQ5Ap6KFgcR0b4ALZls1g==} - engines: {node: '>=12'} - cpu: [arm64] - os: [freebsd] - requiresBuild: true - optional: true - - /esbuild-linux-32@0.15.16: - resolution: {integrity: sha512-iGijUTV+0kIMyUVoynK0v+32Oi8yyp0xwMzX69GX+5+AniNy/C/AL1MjFTsozRp/3xQPl7jVux/PLe2ds10/2w==} - engines: {node: '>=12'} - cpu: [ia32] - os: [linux] - requiresBuild: true - optional: true - - /esbuild-linux-64@0.15.16: - resolution: {integrity: sha512-tuSOjXdLw7VzaUj89fIdAaQT7zFGbKBcz4YxbWrOiXkwscYgE7HtTxUavreBbnRkGxKwr9iT/gmeJWNm4djy/g==} - engines: {node: '>=12'} - cpu: [x64] - os: [linux] - requiresBuild: true - optional: true - - /esbuild-linux-arm64@0.15.16: - resolution: {integrity: sha512-mPYksnfHnemNrvjrDhZyixL/AfbJN0Xn9S34ZOHYdh6/jJcNd8iTsv3JwJoEvTJqjMggjMhGUPJAdjnFBHoH8A==} - engines: {node: '>=12'} - cpu: [arm64] - os: [linux] - requiresBuild: true - optional: true - - /esbuild-linux-arm@0.15.16: - resolution: {integrity: sha512-XKcrxCEXDTOuoRj5l12tJnkvuxXBMKwEC5j0JISw3ziLf0j4zIwXbKbTmUrKFWbo6ZgvNpa7Y5dnbsjVvH39bQ==} - engines: {node: '>=12'} - cpu: [arm] - os: [linux] - requiresBuild: true - optional: true - - /esbuild-linux-mips64le@0.15.16: - resolution: {integrity: sha512-kSJO2PXaxfm0pWY39+YX+QtpFqyyrcp0ZeI8QPTrcFVQoWEPiPVtOfTZeS3ZKedfH+Ga38c4DSzmKMQJocQv6A==} - engines: {node: '>=12'} - cpu: [mips64el] - os: [linux] - requiresBuild: true - optional: true - - /esbuild-linux-ppc64le@0.15.16: - resolution: {integrity: sha512-NimPikwkBY0yGABw6SlhKrtT35sU4O23xkhlrTT/O6lSxv3Pm5iSc6OYaqVAHWkLdVf31bF4UDVFO+D990WpAA==} - engines: {node: '>=12'} - cpu: [ppc64] - os: [linux] - requiresBuild: true - optional: true - - /esbuild-linux-riscv64@0.15.16: - resolution: {integrity: sha512-ty2YUHZlwFOwp7pR+J87M4CVrXJIf5ZZtU/umpxgVJBXvWjhziSLEQxvl30SYfUPq0nzeWKBGw5i/DieiHeKfw==} - engines: {node: '>=12'} - cpu: [riscv64] - os: [linux] - requiresBuild: true - optional: true - - /esbuild-linux-s390x@0.15.16: - resolution: {integrity: sha512-VkZaGssvPDQtx4fvVdZ9czezmyWyzpQhEbSNsHZZN0BHvxRLOYAQ7sjay8nMQwYswP6O2KlZluRMNPYefFRs+w==} - engines: {node: '>=12'} - cpu: [s390x] - os: [linux] - requiresBuild: true - optional: true - - /esbuild-netbsd-64@0.15.16: - resolution: {integrity: sha512-ElQ9rhdY51et6MJTWrCPbqOd/YuPowD7Cxx3ee8wlmXQQVW7UvQI6nSprJ9uVFQISqSF5e5EWpwWqXZsECLvXg==} - engines: {node: '>=12'} - cpu: [x64] - os: [netbsd] - requiresBuild: true - optional: true - - /esbuild-openbsd-64@0.15.16: - resolution: {integrity: sha512-KgxMHyxMCT+NdLQE1zVJEsLSt2QQBAvJfmUGDmgEq8Fvjrf6vSKB00dVHUEDKcJwMID6CdgCpvYNt999tIYhqA==} - engines: {node: '>=12'} - cpu: [x64] - os: [openbsd] - requiresBuild: true - optional: true - - /esbuild-sunos-64@0.15.16: - resolution: {integrity: sha512-exSAx8Phj7QylXHlMfIyEfNrmqnLxFqLxdQF6MBHPdHAjT7fsKaX6XIJn+aQEFiOcE4X8e7VvdMCJ+WDZxjSRQ==} - engines: {node: '>=12'} - cpu: [x64] - os: [sunos] - requiresBuild: true - optional: true - - /esbuild-windows-32@0.15.16: - resolution: {integrity: sha512-zQgWpY5pUCSTOwqKQ6/vOCJfRssTvxFuEkpB4f2VUGPBpdddZfdj8hbZuFRdZRPIVHvN7juGcpgCA/XCF37mAQ==} - engines: {node: '>=12'} - cpu: [ia32] - os: [win32] - requiresBuild: true - optional: true - - /esbuild-windows-64@0.15.16: - resolution: {integrity: sha512-HjW1hHRLSncnM3MBCP7iquatHVJq9l0S2xxsHHj4yzf4nm9TU4Z7k4NkeMlD/dHQ4jPlQQhwcMvwbJiOefSuZw==} - engines: {node: '>=12'} - cpu: [x64] - os: [win32] - requiresBuild: true - optional: true - - /esbuild-windows-arm64@0.15.16: - resolution: {integrity: sha512-oCcUKrJaMn04Vxy9Ekd8x23O8LoU01+4NOkQ2iBToKgnGj5eo1vU9i27NQZ9qC8NFZgnQQZg5oZWAejmbsppNA==} - engines: {node: '>=12'} - cpu: [arm64] - os: [win32] - requiresBuild: true - optional: true - - /esbuild@0.15.16: - resolution: {integrity: sha512-o6iS9zxdHrrojjlj6pNGC2NAg86ECZqIETswTM5KmJitq+R1YmahhWtMumeQp9lHqJaROGnsBi2RLawGnfo5ZQ==} + /esbuild@0.17.19: + resolution: {integrity: sha512-XQ0jAPFkK/u3LcVRcvVHQcTIqD6E2H1fvZMA5dQPSOWb3suUbWbfbRf94pjc0bNzRYLfIrDRQXr7X+LHIm5oHw==} engines: {node: '>=12'} hasBin: true requiresBuild: true optionalDependencies: - '@esbuild/android-arm': 0.15.16 - '@esbuild/linux-loong64': 0.15.16 - esbuild-android-64: 0.15.16 - esbuild-android-arm64: 0.15.16 - esbuild-darwin-64: 0.15.16 - esbuild-darwin-arm64: 0.15.16 - esbuild-freebsd-64: 0.15.16 - esbuild-freebsd-arm64: 0.15.16 - esbuild-linux-32: 0.15.16 - esbuild-linux-64: 0.15.16 - esbuild-linux-arm: 0.15.16 - esbuild-linux-arm64: 0.15.16 - esbuild-linux-mips64le: 0.15.16 - esbuild-linux-ppc64le: 0.15.16 - esbuild-linux-riscv64: 0.15.16 - esbuild-linux-s390x: 0.15.16 - esbuild-netbsd-64: 0.15.16 - esbuild-openbsd-64: 0.15.16 - esbuild-sunos-64: 0.15.16 - esbuild-windows-32: 0.15.16 - esbuild-windows-64: 0.15.16 - esbuild-windows-arm64: 0.15.16 + '@esbuild/android-arm': 0.17.19 + '@esbuild/android-arm64': 0.17.19 + '@esbuild/android-x64': 0.17.19 + '@esbuild/darwin-arm64': 0.17.19 + '@esbuild/darwin-x64': 0.17.19 + '@esbuild/freebsd-arm64': 0.17.19 + '@esbuild/freebsd-x64': 0.17.19 + '@esbuild/linux-arm': 0.17.19 + '@esbuild/linux-arm64': 0.17.19 + '@esbuild/linux-ia32': 0.17.19 + '@esbuild/linux-loong64': 0.17.19 + '@esbuild/linux-mips64el': 0.17.19 + '@esbuild/linux-ppc64': 0.17.19 + '@esbuild/linux-riscv64': 0.17.19 + '@esbuild/linux-s390x': 0.17.19 + '@esbuild/linux-x64': 0.17.19 + '@esbuild/netbsd-x64': 0.17.19 + '@esbuild/openbsd-x64': 0.17.19 + '@esbuild/sunos-x64': 0.17.19 + '@esbuild/win32-arm64': 0.17.19 + '@esbuild/win32-ia32': 0.17.19 + '@esbuild/win32-x64': 0.17.19 /escalade@3.1.1: resolution: {integrity: sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==} @@ -2540,6 +2511,7 @@ packages: /function-bind@1.1.1: resolution: {integrity: sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==} + dev: true /function.prototype.name@1.1.5: resolution: {integrity: sha512-uN7m/BzVKQnCUF/iW8jYea67v++2u7m5UgENbHRtdDVclOUP+FMPlCNdmk0h/ysGyo2tavMJEDqJAkJdRa1vMA==} @@ -2695,6 +2667,7 @@ packages: engines: {node: '>= 0.4.0'} dependencies: function-bind: 1.1.1 + dev: true /he@1.2.0: resolution: {integrity: sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==} @@ -2805,6 +2778,7 @@ packages: resolution: {integrity: sha512-RRjxlvLDkD1YJwDbroBHMb+cukurkDWNyHx7D3oNB5x9rb5ogcksMC5wHCadcXoo67gVr/+3GFySh3134zi6rw==} dependencies: has: 1.0.3 + dev: true /is-date-object@1.0.5: resolution: {integrity: sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==} @@ -3059,13 +3033,6 @@ packages: sourcemap-codec: 1.4.8 dev: true - /magic-string@0.27.0: - resolution: {integrity: sha512-8UnnX2PeRAPZuN12svgR9j7M1uWMovg/CEnIwIG0LFkXSJJe4PdfUGiTGl8V9bsBHFUtfVINcSyYxd7q+kx9fA==} - engines: {node: '>=12'} - dependencies: - '@jridgewell/sourcemap-codec': 1.4.14 - dev: true - /merge-stream@2.0.0: resolution: {integrity: sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==} dev: true @@ -3117,8 +3084,8 @@ packages: resolution: {integrity: sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==} dev: true - /naive-ui@2.34.2(vue@3.2.45): - resolution: {integrity: sha512-JyvtVqHzS0O0DyPFFg95cJW0fp2WCEPsjXbeplkxFIfJHCgp5KC75PjnBycryegjPiZNLn9WlRDxXU5emEqRfg==} + /naive-ui@2.34.4(vue@3.2.45): + resolution: {integrity: sha512-aPG8PDfhSzIzn/jSC9y3Jb3Pe2wHJ7F0cFV1EWlbImSrZECeUmoc+fIcOSWbizoztkKfaUAeKwYdMl09MKkj1g==} peerDependencies: vue: ^3.0.0 dependencies: @@ -3140,7 +3107,7 @@ packages: vdirs: 0.1.8(vue@3.2.45) vooks: 0.2.12(vue@3.2.45) vue: 3.2.45 - vueuc: 0.4.49(vue@3.2.45) + vueuc: 0.4.51(vue@3.2.45) dev: true /nanoid@3.3.4: @@ -3148,6 +3115,11 @@ packages: engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} hasBin: true + /nanoid@3.3.6: + resolution: {integrity: sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==} + engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} + hasBin: true + /ndarray-pack@1.2.1: resolution: {integrity: sha512-51cECUJMT0rUZNQa09EoKsnFeDL4x2dHRT0VR5U2H5ZgEcm95ZDWcMA5JShroXjHOejmAD/fg8+H+OvUnVXz2g==} dependencies: @@ -3261,6 +3233,7 @@ packages: /path-parse@1.0.7: resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==} + dev: true /pathe@0.2.0: resolution: {integrity: sha512-sTitTPYnn23esFR3RlqYBWn4c45WGeLcsKzQiUpXJAyfcWkolvlYpV8FLo7JishK946oQwMFUCHXQ9AjGPKExw==} @@ -3337,6 +3310,14 @@ packages: picocolors: 1.0.0 source-map-js: 1.0.2 + /postcss@8.4.23: + resolution: {integrity: sha512-bQ3qMcpF6A/YjR55xtoTr0jGOlnPOKAIMdOWiv0EIT6HVPEaJiJB4NLljSbiHoC2RX7DN5Uvjtpbg1NPdwv1oA==} + engines: {node: ^10 || ^12 || >=14} + dependencies: + nanoid: 3.3.6 + picocolors: 1.0.0 + source-map-js: 1.0.2 + /pretty-bytes@5.6.0: resolution: {integrity: sha512-FFw039TmrBqFK8ma/7OL3sDz/VytdtJr044/QUJtH0wK9lb9jLq9tJyIxUwtQJHwar2BqtiA4iCWSwo9JLkzFg==} engines: {node: '>=6'} @@ -3488,6 +3469,7 @@ packages: is-core-module: 2.11.0 path-parse: 1.0.7 supports-preserve-symlinks-flag: 1.0.0 + dev: true /reusify@1.0.4: resolution: {integrity: sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==} @@ -3512,14 +3494,14 @@ packages: hasBin: true optionalDependencies: fsevents: 2.3.2 + dev: true - /rollup@3.10.0: - resolution: {integrity: sha512-JmRYz44NjC1MjVF2VKxc0M1a97vn+cDxeqWmnwyAF4FvpjK8YFdHpaqvQB+3IxCvX05vJxKZkoMDU8TShhmJVA==} + /rollup@3.23.0: + resolution: {integrity: sha512-h31UlwEi7FHihLe1zbk+3Q7z1k/84rb9BSwmBSr/XjOCEaBJ2YyedQDuM0t/kfOS0IxM+vk1/zI9XxYj9V+NJQ==} engines: {node: '>=14.18.0', npm: '>=8.0.0'} hasBin: true optionalDependencies: fsevents: 2.3.2 - dev: true /run-parallel@1.2.0: resolution: {integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==} @@ -3698,6 +3680,7 @@ packages: /supports-preserve-symlinks-flag@1.0.0: resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==} engines: {node: '>= 0.4'} + dev: true /temp-dir@2.0.0: resolution: {integrity: sha512-aoBAniQmmwtcKp/7BzsH8Cxzv8OL736p7v1ihGb5e9DJ9kTwGWHrQrVB5+lfVDzfGrdRzXch+ig7LHaY1JTOrg==} @@ -3960,7 +3943,7 @@ packages: extsprintf: 1.3.0 dev: false - /vite-plugin-html@3.2.0(vite@3.2.4): + /vite-plugin-html@3.2.0(vite@4.3.8): resolution: {integrity: sha512-2VLCeDiHmV/BqqNn5h2V+4280KRgQzCFN47cst3WiNK848klESPQnzuC3okH5XHtgwHH/6s1Ho/YV6yIO0pgoQ==} peerDependencies: vite: '>=2.0.0' @@ -3977,30 +3960,28 @@ packages: html-minifier-terser: 6.1.0 node-html-parser: 5.4.2 pathe: 0.2.0 - vite: 3.2.4(sass@1.56.1) + vite: 4.3.8(sass@1.56.1) dev: false - /vite-plugin-pwa@0.14.1(vite@3.2.4)(workbox-build@6.5.4)(workbox-window@6.5.4): - resolution: {integrity: sha512-5zx7yhQ8RTLwV71+GA9YsQQ63ALKG8XXIMqRJDdZkR8ZYftFcRgnzM7wOWmQZ/DATspyhPih5wCdcZnAIsM+mA==} + /vite-plugin-pwa@0.15.0(vite@4.3.8)(workbox-build@6.5.4)(workbox-window@6.5.4): + resolution: {integrity: sha512-gpmx3BeubsRIXRBkjPToOTJbo8fknNmZFQs24i0TPZyaNVa0n27YHDo0Y72amnO70WvHKGE3e1fn8SYUP7e8SA==} peerDependencies: vite: ^3.1.0 || ^4.0.0 workbox-build: ^6.5.4 workbox-window: ^6.5.4 dependencies: - '@rollup/plugin-replace': 5.0.2(rollup@3.10.0) debug: 4.3.4 fast-glob: 3.2.12 pretty-bytes: 6.0.0 - rollup: 3.10.0 - vite: 3.2.4(sass@1.56.1) + vite: 4.3.8(sass@1.56.1) workbox-build: 6.5.4 workbox-window: 6.5.4 transitivePeerDependencies: - supports-color dev: true - /vite@3.2.4(sass@1.56.1): - resolution: {integrity: sha512-Z2X6SRAffOUYTa+sLy3NQ7nlHFU100xwanq1WDwqaiFiCe+25zdxP1TfCS5ojPV2oDDcXudHIoPnI1Z/66B7Yw==} + /vite@4.3.8(sass@1.56.1): + resolution: {integrity: sha512-uYB8PwN7hbMrf4j1xzGDk/lqjsZvCDbt/JC5dyfxc19Pg8kRm14LinK/uq+HSLNswZEoKmweGdtpbnxRtrAXiQ==} engines: {node: ^14.18.0 || >=16.0.0} hasBin: true peerDependencies: @@ -4024,10 +4005,9 @@ packages: terser: optional: true dependencies: - esbuild: 0.15.16 - postcss: 8.4.19 - resolve: 1.22.1 - rollup: 2.79.1 + esbuild: 0.17.19 + postcss: 8.4.23 + rollup: 3.23.0 sass: 1.56.1 optionalDependencies: fsevents: 2.3.2 @@ -4091,8 +4071,8 @@ packages: '@vue/server-renderer': 3.2.45(vue@3.2.45) '@vue/shared': 3.2.45 - /vueuc@0.4.49(vue@3.2.45): - resolution: {integrity: sha512-WarAC44a/Yx78CxkAgROYLq+LkAeCGA/6wHidVoFmHLbzyF3SiP2nzRNGD/8zJeJInXv18EnWK6A//eGgMMq8w==} + /vueuc@0.4.51(vue@3.2.45): + resolution: {integrity: sha512-pLiMChM4f+W8czlIClGvGBYo656lc2Y0/mXFSCydcSmnCR1izlKPGMgiYBGjbY9FDkFG8a2HEVz7t0DNzBWbDw==} peerDependencies: vue: ^3.0.11 dependencies: diff --git a/src/App.vue b/src/App.vue index 426dffe..4730e13 100644 --- a/src/App.vue +++ b/src/App.vue @@ -42,11 +42,13 @@ import { musicStore, userStore, settingStore, siteStore } from "@/store"; import { useRouter } from "vue-router"; import { getLoginState, refreshLogin } from "@/api/login"; import { userDailySignin, userYunbeiSign } from "@/api/user"; +import { useI18n } from "vue-i18n"; import Provider from "@/components/Provider/index.vue"; import Nav from "@/components/Nav/index.vue"; import Player from "@/components/Player/index.vue"; import packageJson from "@/../package.json"; +const { t } = useI18n(); const music = musicStore(); const user = userStore(); const setting = settingStore(); @@ -122,27 +124,23 @@ const signIn = () => { Promise.all(signInPromises) .then((results) => { localStorage.setItem("lastSignInDate", today); - console.log("签到成功!"); - console.log("userDailySignin:", results[0]); - console.log("userYunbeiSign:", results[1]); + console.log(t("general.message.signInSuccess"), results[0], results[1]); $notification["success"]({ - content: "签到成功", - meta: "每日签到及云贝签到成功", + content: t("general.message.signInSuccess"), + meta: t("general.message.signInSuccessDesc"), duration: 3000, }); }) .catch((error) => { - console.error("签到失败:", error); - $message.error("每日签到失败"); + console.error(t("general.message.signInFailed"), error); + $message.error(t("general.message.signInFailed")); }); - } else { - console.log("今天已经签到过了!"); } }; // 系统重置 const cleanAll = () => { - $message ? $message.success("重置成功") : alert("重置成功"); + $message ? $message.success(t("other.cleanAll")) : alert(t("other.cleanAll")); localStorage.clear(); document.location.reload(); }; @@ -166,6 +164,10 @@ onMounted(() => { window.$signIn = signIn; window.$setSiteTitle = setSiteTitle; + // 更改页面语言 + const html = document.documentElement; + if (html) html.setAttribute("lang", setting.language); + // 公告 if (annShow) { $notification["info"]({ @@ -204,15 +206,15 @@ onMounted(() => { } else { user.userLogOut(); if (music.getPlayListMode === "cloud") { - $message.info("登录已失效,请重新登录"); + $message.info(t("other.loginExpired")); music.setPlaylists([]); music.setPlayListMode("list"); } } }) .catch((err) => { - $message.error("请求发生错误"); - console.error("请求发生错误" + err); + console.error(t("general.message.acquisitionFailed"), err); + $message.error(t("general.message.acquisitionFailed")); router.push("/500"); return false; }); diff --git a/src/api/song.js b/src/api/song.js index 9f88147..f089508 100644 --- a/src/api/song.js +++ b/src/api/song.js @@ -100,6 +100,7 @@ export const getMusicDetail = (ids) => { url: "/song/detail", params: { ids, + timestamp: new Date().getTime(), }, }); }; diff --git a/src/components/DataList/AllArtists.vue b/src/components/DataList/AllArtists.vue index b5c2a55..62fc963 100644 --- a/src/components/DataList/AllArtists.vue +++ b/src/components/DataList/AllArtists.vue @@ -7,7 +7,7 @@ > @@ -34,6 +34,11 @@ const props = defineProps({ type: Array, default: [], }, + // 是否变灰 + isDark: { + type: Boolean, + default: true, + }, }); // 跳转歌手页面 @@ -67,4 +72,4 @@ const jumpArtist = (id) => { opacity: 0.8; } } - \ No newline at end of file + diff --git a/src/components/DataList/CoverLists.vue b/src/components/DataList/CoverLists.vue index e2d7490..d3f9840 100644 --- a/src/components/DataList/CoverLists.vue +++ b/src/components/DataList/CoverLists.vue @@ -173,6 +173,7 @@ const renderIcon = (icon) => { // 封面图像地址 const getCoverUrl = (url) => { + if (!url) return "/images/pic/default.png"; const imageUrl = url.replace(/^http:/, "https:"); if (imageUrl.endsWith(".jpg")) { return imageUrl + "?param=300y300"; diff --git a/src/components/DataModal/PlayListDrawer.vue b/src/components/DataModal/PlayListDrawer.vue index b0145ba..91a7604 100644 --- a/src/components/DataModal/PlayListDrawer.vue +++ b/src/components/DataModal/PlayListDrawer.vue @@ -273,4 +273,4 @@ onBeforeUnmount(() => { } } } - + \ No newline at end of file diff --git a/src/components/Nav/index.vue b/src/components/Nav/index.vue index ed64255..783fe75 100644 --- a/src/components/Nav/index.vue +++ b/src/components/Nav/index.vue @@ -215,7 +215,7 @@ const changeUserOptions = (val) => { userOptions.value = val ? [ { - label: t("nav.userChildren.playlists"), + label: t("nav.userChildren.playlist"), key: "/user/playlists", }, { @@ -227,7 +227,7 @@ const changeUserOptions = (val) => { key: "/user/album", }, { - label: t("nav.userChildren.artists"), + label: t("nav.userChildren.artist"), key: "/user/artists", }, { diff --git a/src/components/Pagination/index.vue b/src/components/Pagination/index.vue index 5bddc33..9931b34 100644 --- a/src/components/Pagination/index.vue +++ b/src/components/Pagination/index.vue @@ -10,12 +10,17 @@ :show-size-picker="showSizePicker" :show-quick-jumper="showQuickJumper" > - - + + diff --git a/src/views/State/403.vue b/src/views/State/403.vue index d89de28..3be1e7a 100644 --- a/src/views/State/403.vue +++ b/src/views/State/403.vue @@ -2,11 +2,13 @@ diff --git a/src/views/State/404.vue b/src/views/State/404.vue index db51a63..4492d0b 100644 --- a/src/views/State/404.vue +++ b/src/views/State/404.vue @@ -2,11 +2,13 @@ diff --git a/src/views/State/500.vue b/src/views/State/500.vue index dcb435d..0781417 100644 --- a/src/views/State/500.vue +++ b/src/views/State/500.vue @@ -2,11 +2,13 @@ @@ -28,4 +30,4 @@ onMounted(() => { align-items: center; flex-direction: column; } - \ No newline at end of file + diff --git a/src/views/User/album.vue b/src/views/User/album.vue index f1663c3..ce27665 100644 --- a/src/views/User/album.vue +++ b/src/views/User/album.vue @@ -6,12 +6,14 @@ diff --git a/src/views/User/index.vue b/src/views/User/index.vue index 0600c97..6bae524 100644 --- a/src/views/User/index.vue +++ b/src/views/User/index.vue @@ -13,7 +13,7 @@ />
{{ user.getUserData.nickname }} - 的音乐库 +
- {{ $t("nav.userChildren.playlists") }} + {{ $t("nav.userChildren.playlist") }} {{ $t("nav.userChildren.like") }} {{ $t("nav.userChildren.album") }} - {{ $t("nav.userChildren.artists") }} + {{ $t("nav.userChildren.artist") }} {{ $t("nav.userChildren.cloud") }}
diff --git a/src/views/User/like.vue b/src/views/User/like.vue index 3b566b7..485fd64 100644 --- a/src/views/User/like.vue +++ b/src/views/User/like.vue @@ -6,12 +6,14 @@