From 03219166c57590b6d3d38b01fab815459fee385f Mon Sep 17 00:00:00 2001 From: geoffrey45 Date: Fri, 19 Aug 2022 15:58:32 +0300 Subject: [PATCH] use third-party module to auto-persist queue store + more redesign + convert js files to ts --- index.html | 2 +- src/App.vue | 16 ++- src/assets/scss/Global/app-grid.scss | 6 +- src/assets/scss/Global/basic.scss | 2 +- src/components/BottomBar/BottomBar.vue | 45 +++++++- src/components/LeftSidebar/NP/HotKeys.vue | 4 +- src/components/LeftSidebar/NP/SongCard.vue | 121 ++++++++++++++------- src/components/LeftSidebar/Playlists.vue | 54 +++++++++ src/components/LeftSidebar/nowPlaying.vue | 70 +----------- src/components/Logo.vue | 1 - src/components/RightSideBar/Queue.vue | 13 +-- src/{main.js => main.ts} | 5 +- src/router/{index.js => index.ts} | 0 src/stores/queue.ts | 107 ++++++++---------- src/views/FolderView.vue | 3 +- src/views/Playlists.vue | 2 +- src/vite-env.d.ts | 7 ++ tsconfig.json | 33 +++++- tsconfig.node.json | 9 ++ vite.config.js => vite.config.ts | 2 +- 20 files changed, 305 insertions(+), 197 deletions(-) create mode 100644 src/components/LeftSidebar/Playlists.vue rename src/{main.js => main.ts} (60%) rename src/router/{index.js => index.ts} (100%) create mode 100644 src/vite-env.d.ts create mode 100644 tsconfig.node.json rename vite.config.js => vite.config.ts (100%) diff --git a/index.html b/index.html index 7e44637..91414af 100644 --- a/index.html +++ b/index.html @@ -16,6 +16,6 @@
- + diff --git a/src/App.vue b/src/App.vue index 84f9065..6952747 100644 --- a/src/App.vue +++ b/src/App.vue @@ -4,11 +4,13 @@
@@ -36,10 +51,28 @@ const queue = useQStore(); .b-bar { display: grid; grid-template-rows: 1fr max-content; - border-radius: 1rem; gap: 1rem; padding: 1rem; - padding-bottom: 2rem; + padding-bottom: 1rem; + position: relative; + + .time { + display: grid; + grid-template-columns: repeat(3, 1fr); + align-items: center; + + .full { + text-align: end; + } + } + + .ex-hotkeys { + position: absolute; + width: 10rem; + right: 1rem; + top: 1rem; + border-radius: $small; + } .info { display: grid; @@ -55,11 +88,11 @@ const queue = useQStore(); display: flex; flex-direction: column; justify-content: flex-end; + gap: $smaller; .np-title { font-size: 1.15rem; font-weight: bold; - margin-bottom: $small; } .np-artist { diff --git a/src/components/LeftSidebar/NP/HotKeys.vue b/src/components/LeftSidebar/NP/HotKeys.vue index cfad16d..e5a94c2 100644 --- a/src/components/LeftSidebar/NP/HotKeys.vue +++ b/src/components/LeftSidebar/NP/HotKeys.vue @@ -1,6 +1,6 @@