From f6c36fbcac9771e6be0280e17b74971acee0bdb6 Mon Sep 17 00:00:00 2001 From: qier222 Date: Tue, 5 Jan 2021 22:17:47 +0800 Subject: [PATCH] refactor: player --- package.json | 1 + src/App.vue | 2 +- src/components/Cover.vue | 11 +- src/components/Player.vue | 118 +++------- src/components/TrackList.vue | 26 ++- src/electron/touchbar.js | 6 +- src/main.js | 3 - src/store/actions.js | 181 -------------- src/store/index.js | 38 ++- src/store/initLocalStorage.js | 16 +- src/store/mutations.js | 95 +------- src/store/plugins/localStorage.js | 1 - src/store/state.js | 9 + src/utils/Player.js | 377 ++++++++++++++++++++++++++++++ src/utils/play.js | 53 ----- src/utils/updateApp.js | 23 ++ src/views/album.vue | 3 +- src/views/artist.vue | 8 +- src/views/library.vue | 7 +- src/views/playlist.vue | 8 +- src/views/search.vue | 3 +- yarn.lock | 170 ++++++++++++-- 22 files changed, 659 insertions(+), 500 deletions(-) create mode 100644 src/utils/Player.js delete mode 100644 src/utils/play.js diff --git a/package.json b/package.json index 655c450..23864b9 100644 --- a/package.json +++ b/package.json @@ -47,6 +47,7 @@ "howler": "^2.2.0", "js-cookie": "^2.2.1", "localforage": "^1.9.0", + "lodash": "^4.17.20", "nprogress": "^0.2.0", "pac-proxy-agent": "^4.1.0", "plyr": "^3.6.2", diff --git a/src/App.vue b/src/App.vue index bdf777e..3c0c560 100644 --- a/src/App.vue +++ b/src/App.vue @@ -9,7 +9,7 @@ -