From 20151afcf5c0626a76c5773507cf71a3d6c0c890 Mon Sep 17 00:00:00 2001 From: geoffrey45 Date: Mon, 26 Sep 2022 18:49:53 +0300 Subject: [PATCH] fix app grid layout issues + fully move now playing to bottom bar + add hover state to playlist card + handle playing tracks from queue page --- src/App.vue | 5 +- src/assets/scss/Global/app-grid.scss | 121 ++++++----------- src/assets/scss/Global/index.scss | 5 +- src/components/LeftSidebar/NP/HotKeys.vue | 2 +- src/components/LeftSidebar/NP/SongCard.vue | 127 +++++------------- src/components/LeftSidebar/Navigation.vue | 22 ++- src/components/LeftSidebar/index.vue | 2 +- src/components/LeftSidebar/nowPlaying.vue | 50 ------- src/components/PlaylistsList/PlaylistCard.vue | 2 +- src/components/RightSideBar/Main.vue | 13 +- .../RightSideBar/NowPlayingRight.vue | 20 ++- src/components/shared/SongItem.vue | 2 +- src/layouts/HeaderAndVList.vue | 33 +++-- src/views/QueueView.vue | 13 +- 14 files changed, 156 insertions(+), 261 deletions(-) diff --git a/src/App.vue b/src/App.vue index a13aece1..d68754df 100644 --- a/src/App.vue +++ b/src/App.vue @@ -7,9 +7,8 @@ id="app-grid" :class="{ showAltNP: settings.use_sidebar && settings.use_alt_np, - disableSidebar: !settings.use_sidebar, + noSidebar: !settings.use_sidebar || !xl, extendWidth: settings.extend_width && settings.extend_width_enabled, - isSmall: !xl, addBorderRight: xxl && !settings.extend_width, }" > @@ -18,9 +17,9 @@
- + diff --git a/src/assets/scss/Global/app-grid.scss b/src/assets/scss/Global/app-grid.scss index 30996095..abaff4cc 100644 --- a/src/assets/scss/Global/app-grid.scss +++ b/src/assets/scss/Global/app-grid.scss @@ -1,99 +1,31 @@ #app-grid { display: grid; grid-template-columns: min-content 1fr 29rem; - grid-template-rows: 43px calc(100vh - (6.5rem + 13px)) max-content; + grid-template-rows: max-content 1fr 5rem; grid-template-areas: "l-sidebar nav r-sidebar" "l-sidebar content r-sidebar" "bottombar bottombar bottombar"; - height: 100%; + gap: 0 1.5rem; - padding: $small 0; - // margin: 0 auto; - margin-top: -$small; - padding-top: $small; -} - -#app-grid.extendWidth { - padding-right: 0; - border-right: none; - max-width: 100%; -} - -// #app-grid.addBorderRight { -// // border-right: solid 1px $gray4; -// // padding-right: $medium; -// } - -#app-grid.isSmall { - grid-template-columns: min-content 1fr; - grid-template-areas: - "l-sidebar nav" - "l-sidebar content" - "bottombar bottombar"; -} - -#app-grid.showAltNP { - @include tablet-landscape { - grid-template-areas: - "l-sidebar nav" - "l-sidebar content" - "bottombar bottombar"; - } -} - -#app-grid.disableSidebar { - grid-template-columns: min-content 1fr; - grid-template-areas: - "l-sidebar nav" - "l-sidebar content" - "bottombar bottombar"; + height: 100%; } #acontent { grid-area: content; - // margin-right: calc(0rem - ($medium + 2px)); - // padding-right: calc($medium); - // height: 100%; + margin-right: calc(0rem - ($medium + 2px)); + padding-right: calc($medium); - overflow: auto; - - - .nav { - margin: $small; - width: calc(100% - 1rem); - } -} - -#app-grid.isSmall, -#app-grid.disableSidebar { - #acontent { - margin-right: -$small; - padding-right: calc($small - 1px); - - .search-view { - margin-right: -0.8rem; - } - } -} - -#tabs { - grid-area: tabs; - height: 3.5rem; - margin-top: -$small; + overflow: hidden; } .r-sidebar { grid-area: r-sidebar; } -// #gsearch-input { -// // display: none !important; -// grid-area: search-input; -// } - .topnav { grid-area: nav; + margin: 1rem 0; } .l-sidebar { @@ -101,14 +33,41 @@ grid-area: l-sidebar; display: grid; grid-template-rows: 1fr max-content; - background-color: rgb(22, 22, 22); - height: 100vh; - margin-top: -$small; - // margin-left: -$small; + border-top: none !important; + border-bottom: none !important; } .b-bar { grid-area: bottombar; - width: 100%; - margin-bottom: -$small; +} + +// ====== MODIFIERS ======= + +#app-grid.extendWidth { + padding-right: 0; + border-right: none; + max-width: 100%; +} + +#app-grid.noSidebar { + grid-template-columns: min-content 1fr; + grid-template-areas: + "l-sidebar nav" + "l-sidebar content" + "bottombar bottombar"; + + #acontent { + margin-right: 0 !important; + padding-right: 1rem !important; + } + + .topnav { + //reduce width to match #acontent + width: calc(100% - 1rem); + } + + // show scrollbars on search page + .search-view { + margin-right: -1rem; + } } diff --git a/src/assets/scss/Global/index.scss b/src/assets/scss/Global/index.scss index 220bfb53..d9ce5501 100644 --- a/src/assets/scss/Global/index.scss +++ b/src/assets/scss/Global/index.scss @@ -28,9 +28,10 @@ body { "Segoe UI Symbol"; font-size: 1rem; image-rendering: -webkit-optimize-contrast; - height: calc(100vh - 1rem); - width: calc(100vw - 1.5rem); + height: 100vh; + width: 100vw; overflow: hidden; + margin: 0; #app { width: 100%; diff --git a/src/components/LeftSidebar/NP/HotKeys.vue b/src/components/LeftSidebar/NP/HotKeys.vue index 6382e0ab..7f633db2 100644 --- a/src/components/LeftSidebar/NP/HotKeys.vue +++ b/src/components/LeftSidebar/NP/HotKeys.vue @@ -27,7 +27,7 @@ const q = useQStore(); diff --git a/src/components/LeftSidebar/Navigation.vue b/src/components/LeftSidebar/Navigation.vue index eda883b0..138206f0 100644 --- a/src/components/LeftSidebar/Navigation.vue +++ b/src/components/LeftSidebar/Navigation.vue @@ -11,7 +11,12 @@ separator: menu.separator, }" > -