mirror of
https://github.com/Dvorinka/swingmusic-extended.git
synced 2026-06-05 04:53:01 +00:00
fix app grid layout issues
+ fully move now playing to bottom bar + add hover state to playlist card + handle playing tracks from queue page
This commit is contained in:
committed by
Mungai Njoroge
parent
0dbc45e20b
commit
20151afcf5
+2
-3
@@ -7,9 +7,8 @@
|
|||||||
id="app-grid"
|
id="app-grid"
|
||||||
:class="{
|
:class="{
|
||||||
showAltNP: settings.use_sidebar && settings.use_alt_np,
|
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,
|
extendWidth: settings.extend_width && settings.extend_width_enabled,
|
||||||
isSmall: !xl,
|
|
||||||
addBorderRight: xxl && !settings.extend_width,
|
addBorderRight: xxl && !settings.extend_width,
|
||||||
}"
|
}"
|
||||||
>
|
>
|
||||||
@@ -18,9 +17,9 @@
|
|||||||
<div id="acontent" v-element-size="updateContentElemSize">
|
<div id="acontent" v-element-size="updateContentElemSize">
|
||||||
<router-view />
|
<router-view />
|
||||||
</div>
|
</div>
|
||||||
<NowPlayingRight />
|
|
||||||
<!-- <SearchInput v-if="settings.use_sidebar && xl" /> -->
|
<!-- <SearchInput v-if="settings.use_sidebar && xl" /> -->
|
||||||
<RightSideBar v-if="settings.use_sidebar && xl" />
|
<RightSideBar v-if="settings.use_sidebar && xl" />
|
||||||
|
<NowPlayingRight />
|
||||||
</section>
|
</section>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|||||||
@@ -1,99 +1,31 @@
|
|||||||
#app-grid {
|
#app-grid {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: min-content 1fr 29rem;
|
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:
|
grid-template-areas:
|
||||||
"l-sidebar nav r-sidebar"
|
"l-sidebar nav r-sidebar"
|
||||||
"l-sidebar content r-sidebar"
|
"l-sidebar content r-sidebar"
|
||||||
"bottombar bottombar bottombar";
|
"bottombar bottombar bottombar";
|
||||||
height: 100%;
|
|
||||||
gap: 0 1.5rem;
|
gap: 0 1.5rem;
|
||||||
padding: $small 0;
|
height: 100%;
|
||||||
// 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";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#acontent {
|
#acontent {
|
||||||
grid-area: content;
|
grid-area: content;
|
||||||
// margin-right: calc(0rem - ($medium + 2px));
|
margin-right: calc(0rem - ($medium + 2px));
|
||||||
// padding-right: calc($medium);
|
padding-right: calc($medium);
|
||||||
// height: 100%;
|
|
||||||
|
|
||||||
overflow: auto;
|
overflow: hidden;
|
||||||
|
|
||||||
|
|
||||||
.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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.r-sidebar {
|
.r-sidebar {
|
||||||
grid-area: r-sidebar;
|
grid-area: r-sidebar;
|
||||||
}
|
}
|
||||||
|
|
||||||
// #gsearch-input {
|
|
||||||
// // display: none !important;
|
|
||||||
// grid-area: search-input;
|
|
||||||
// }
|
|
||||||
|
|
||||||
.topnav {
|
.topnav {
|
||||||
grid-area: nav;
|
grid-area: nav;
|
||||||
|
margin: 1rem 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.l-sidebar {
|
.l-sidebar {
|
||||||
@@ -101,14 +33,41 @@
|
|||||||
grid-area: l-sidebar;
|
grid-area: l-sidebar;
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-rows: 1fr max-content;
|
grid-template-rows: 1fr max-content;
|
||||||
background-color: rgb(22, 22, 22);
|
border-top: none !important;
|
||||||
height: 100vh;
|
border-bottom: none !important;
|
||||||
margin-top: -$small;
|
|
||||||
// margin-left: -$small;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.b-bar {
|
.b-bar {
|
||||||
grid-area: bottombar;
|
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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -28,9 +28,10 @@ body {
|
|||||||
"Segoe UI Symbol";
|
"Segoe UI Symbol";
|
||||||
font-size: 1rem;
|
font-size: 1rem;
|
||||||
image-rendering: -webkit-optimize-contrast;
|
image-rendering: -webkit-optimize-contrast;
|
||||||
height: calc(100vh - 1rem);
|
height: 100vh;
|
||||||
width: calc(100vw - 1.5rem);
|
width: 100vw;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
margin: 0;
|
||||||
|
|
||||||
#app {
|
#app {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ const q = useQStore();
|
|||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.hotkeys {
|
.hotkeys {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: repeat(3, 2rem);
|
grid-template-columns: 2rem 4rem 2rem;
|
||||||
gap: 1rem;
|
gap: 1rem;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|
||||||
|
|||||||
@@ -1,39 +1,21 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="sidebar-songcard">
|
<div class="sidebar-songcard">
|
||||||
<div class="art">
|
<router-link
|
||||||
<router-link
|
:to="{
|
||||||
:to="{
|
name: 'AlbumView',
|
||||||
name: 'AlbumView',
|
params: {
|
||||||
params: {
|
hash: track?.albumhash ? track.albumhash : ' ',
|
||||||
hash: track?.albumhash ? track.albumhash : ' ',
|
},
|
||||||
},
|
}"
|
||||||
}"
|
>
|
||||||
>
|
<img
|
||||||
<img
|
:src="imguri + track?.image"
|
||||||
:src="imguri + track?.image"
|
alt=""
|
||||||
alt=""
|
class="l-image rounded force-lm"
|
||||||
class="l-image rounded force-lm"
|
|
||||||
/>
|
|
||||||
</router-link>
|
|
||||||
<div id="bitrate" v-if="track?.bitrate">
|
|
||||||
{{ track.filetype }}• {{ track.bitrate }}
|
|
||||||
</div>
|
|
||||||
<div class="heart rounded-sm" @click="heartClicked = !heartClicked">
|
|
||||||
<HeartSvg v-if="!heartClicked" />
|
|
||||||
<HeartFilledSvg v-else />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="bottom">
|
|
||||||
<div class="title ellip t-center" v-tooltip>
|
|
||||||
{{ track?.title || "♥ Hello ♥" }}
|
|
||||||
</div>
|
|
||||||
<ArtistName
|
|
||||||
:artists="track?.artist || []"
|
|
||||||
:albumartist="track?.albumartist || 'Play something'"
|
|
||||||
:small="true"
|
|
||||||
class="artists"
|
|
||||||
/>
|
/>
|
||||||
|
</router-link>
|
||||||
|
<div id="bitrate" v-if="track?.bitrate" title="file type • bitrate">
|
||||||
|
{{ track.filetype }} • {{ track.bitrate }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -43,78 +25,37 @@ import { ref } from "vue";
|
|||||||
|
|
||||||
import { paths } from "@/config";
|
import { paths } from "@/config";
|
||||||
import { Track } from "@/interfaces";
|
import { Track } from "@/interfaces";
|
||||||
import ArtistName from "@/components/shared/ArtistName.vue";
|
|
||||||
|
|
||||||
import HeartSvg from "@/assets/icons/heart.svg";
|
|
||||||
import HeartFilledSvg from "@/assets/icons/heart.fill.svg";
|
|
||||||
|
|
||||||
defineProps<{
|
defineProps<{
|
||||||
track: Track | null;
|
track: Track | null;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
const heartClicked = ref<boolean>(false);
|
|
||||||
|
|
||||||
const imguri = paths.images.thumb.large;
|
const imguri = paths.images.thumb.large;
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.sidebar-songcard {
|
.sidebar-songcard {
|
||||||
.art {
|
width: 100%;
|
||||||
|
position: relative;
|
||||||
|
|
||||||
|
img {
|
||||||
|
cursor: pointer;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
height: auto;
|
||||||
aspect-ratio: 1;
|
aspect-ratio: 1;
|
||||||
place-items: center;
|
object-fit: cover;
|
||||||
margin-bottom: $small;
|
|
||||||
position: relative;
|
|
||||||
|
|
||||||
.heart {
|
|
||||||
position: absolute;
|
|
||||||
bottom: -$smaller;
|
|
||||||
right: 0;
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
border-radius: $smaller;
|
|
||||||
}
|
|
||||||
|
|
||||||
img {
|
|
||||||
width: 100%;
|
|
||||||
height: auto;
|
|
||||||
aspect-ratio: 1;
|
|
||||||
object-fit: cover;
|
|
||||||
cursor: pointer;
|
|
||||||
margin-bottom: 2rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
#bitrate {
|
|
||||||
position: absolute;
|
|
||||||
font-size: 0.75rem;
|
|
||||||
width: max-content;
|
|
||||||
padding: 0.2rem 0.35rem;
|
|
||||||
bottom: $smaller;
|
|
||||||
left: 0;
|
|
||||||
background-color: $gray4;
|
|
||||||
border-radius: $smaller;
|
|
||||||
text-transform: uppercase;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.bottom {
|
#bitrate {
|
||||||
display: grid;
|
position: absolute;
|
||||||
gap: $smaller;
|
font-size: 0.75rem;
|
||||||
}
|
width: max-content;
|
||||||
|
padding: 0.2rem 0.35rem;
|
||||||
.title {
|
bottom: $medium;
|
||||||
font-weight: 900;
|
left: $small;
|
||||||
margin: 0 auto;
|
background-color: $gray4;
|
||||||
}
|
border-radius: $smaller;
|
||||||
|
text-transform: uppercase;
|
||||||
.artists {
|
|
||||||
opacity: 0.5;
|
|
||||||
margin: 0 auto;
|
|
||||||
|
|
||||||
&:hover {
|
|
||||||
text-decoration: underline 1px !important;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -11,7 +11,12 @@
|
|||||||
separator: menu.separator,
|
separator: menu.separator,
|
||||||
}"
|
}"
|
||||||
></div>
|
></div>
|
||||||
<div class="nav-button" id="home-button" v-else>
|
<div
|
||||||
|
class="nav-button"
|
||||||
|
:class="{ active: $route.name === menu.route_name }"
|
||||||
|
id="home-button"
|
||||||
|
v-else
|
||||||
|
>
|
||||||
<div class="in">
|
<div class="in">
|
||||||
<component :is="menu.icon"></component>
|
<component :is="menu.icon"></component>
|
||||||
<span>{{ menu.name }}</span>
|
<span>{{ menu.name }}</span>
|
||||||
@@ -69,16 +74,27 @@ const menus = [
|
|||||||
.side-nav-container {
|
.side-nav-container {
|
||||||
text-transform: capitalize;
|
text-transform: capitalize;
|
||||||
margin-top: 1rem;
|
margin-top: 1rem;
|
||||||
|
// background-color: rgba(255, 255, 255, 0.075);
|
||||||
|
// padding: $small;
|
||||||
|
|
||||||
.nav-button {
|
.nav-button {
|
||||||
border-radius: $small;
|
border-radius: $medium;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: flex-start;
|
align-items: flex-start;
|
||||||
justify-content: flex-start;
|
justify-content: flex-start;
|
||||||
padding: $small 0;
|
padding: $small 0;
|
||||||
|
position: relative;
|
||||||
|
|
||||||
|
&.active::before {
|
||||||
|
content: "•";
|
||||||
|
position: absolute;
|
||||||
|
left: -$small;
|
||||||
|
top: $medium;
|
||||||
|
opacity: 0.75;
|
||||||
|
}
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
background-color: $gray3;
|
background-color: $darkestblue;
|
||||||
}
|
}
|
||||||
|
|
||||||
.in {
|
.in {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="l-sidebar noscroll">
|
<div class="l-sidebar noscroll border">
|
||||||
<div class="withlogo">
|
<div class="withlogo">
|
||||||
<Logo />
|
<Logo />
|
||||||
<Navigation />
|
<Navigation />
|
||||||
|
|||||||
@@ -1,67 +1,17 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="now-playing-card t-center rounded">
|
<div class="now-playing-card t-center rounded">
|
||||||
<SongCard :track="queue.currenttrack" />
|
<SongCard :track="queue.currenttrack" />
|
||||||
<div class="l-track-time">
|
|
||||||
<span class="rounded">{{ formatSeconds(duration.current) }}</span>
|
|
||||||
<!-- <HeartSvg /> -->
|
|
||||||
<span class="rounded">{{ formatSeconds(duration.full) }}</span>
|
|
||||||
</div>
|
|
||||||
<Progress />
|
|
||||||
<HotKeys />
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import useQStore from "../../stores/queue";
|
import useQStore from "../../stores/queue";
|
||||||
import { formatSeconds } from "@/utils";
|
|
||||||
|
|
||||||
import HotKeys from "./NP/HotKeys.vue";
|
|
||||||
import Progress from "./NP/Progress.vue";
|
|
||||||
import SongCard from "./NP/SongCard.vue";
|
import SongCard from "./NP/SongCard.vue";
|
||||||
|
|
||||||
const queue = useQStore();
|
const queue = useQStore();
|
||||||
const { duration } = queue;
|
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.now-playing-card {
|
.now-playing-card {
|
||||||
padding: 1rem;
|
padding: 1rem;
|
||||||
width: 100%;
|
|
||||||
display: grid;
|
|
||||||
grid-template-rows: 1fr max-content max-content max-content;
|
|
||||||
gap: 1rem;
|
|
||||||
|
|
||||||
.l-track-time {
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
|
||||||
opacity: 0.8;
|
|
||||||
|
|
||||||
span {
|
|
||||||
font-size: small;
|
|
||||||
padding: $smaller;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
&:hover {
|
|
||||||
::-moz-range-thumb {
|
|
||||||
height: 0.8rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
::-webkit-slider-thumb {
|
|
||||||
height: 0.8rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
::-ms-thumb {
|
|
||||||
height: 0.8rem;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.context_on {
|
|
||||||
background-color: $accent;
|
|
||||||
}
|
|
||||||
|
|
||||||
.menu {
|
|
||||||
right: $small;
|
|
||||||
transform: rotate(90deg);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ const props = defineProps<{
|
|||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
transition: all .25s ease;
|
transition: all .25s ease;
|
||||||
background-color: $darkestblue;
|
background-color: $gray3;
|
||||||
background-blend-mode: screen;
|
background-blend-mode: screen;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -35,21 +35,16 @@ const settings = useSettingsStore();
|
|||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.r-sidebar {
|
.r-sidebar {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
overflow: hidden;
|
|
||||||
// padding: $small;
|
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-rows: max-content 1fr;
|
grid-template-rows: max-content 1fr;
|
||||||
// gap: 1rem;
|
|
||||||
margin-top: -$small;
|
|
||||||
border-top: none;
|
|
||||||
border-bottom: none;
|
|
||||||
background-color: rgb(22, 22, 22);
|
background-color: rgb(22, 22, 22);
|
||||||
padding-bottom: 1rem;
|
padding-bottom: 1rem;
|
||||||
|
border-top: none;
|
||||||
|
border-bottom: none;
|
||||||
|
|
||||||
.gsearch-input {
|
.gsearch-input {
|
||||||
height: 42px;
|
height: 2.5rem;
|
||||||
margin: $small;
|
margin: 1rem;
|
||||||
margin-bottom: 1rem;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.r-content {
|
.r-content {
|
||||||
|
|||||||
@@ -74,7 +74,7 @@ import HotKeys from "../LeftSidebar/NP/HotKeys.vue";
|
|||||||
import Progress from "../LeftSidebar/NP/Progress.vue";
|
import Progress from "../LeftSidebar/NP/Progress.vue";
|
||||||
|
|
||||||
import HeartSvg from "../../assets/icons/heart.svg";
|
import HeartSvg from "../../assets/icons/heart.svg";
|
||||||
import PlusSvg from "../../assets/icons/plus.svg";
|
// import PlusSvg from "../../assets/icons/plus.svg";
|
||||||
|
|
||||||
const queue = useQStore();
|
const queue = useQStore();
|
||||||
const settings = useSettingsStore();
|
const settings = useSettingsStore();
|
||||||
@@ -82,13 +82,28 @@ const settings = useSettingsStore();
|
|||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.b-bar {
|
.b-bar {
|
||||||
height: 65px;
|
// height: 100%;
|
||||||
background-color: rgb(22, 22, 22);
|
background-color: rgb(22, 22, 22);
|
||||||
display: grid;
|
display: grid;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
border-top: solid 1px $gray3;
|
border-top: solid 1px $gray3;
|
||||||
|
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
::-moz-range-thumb {
|
||||||
|
height: 0.8rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
::-webkit-slider-thumb {
|
||||||
|
height: 0.8rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
::-ms-thumb {
|
||||||
|
height: 0.8rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.centered {
|
.centered {
|
||||||
width: 50rem;
|
width: 50rem;
|
||||||
display: grid;
|
display: grid;
|
||||||
@@ -181,7 +196,6 @@ const settings = useSettingsStore();
|
|||||||
}
|
}
|
||||||
|
|
||||||
.buttons {
|
.buttons {
|
||||||
// width: 10rem;
|
|
||||||
height: 3.25rem;
|
height: 3.25rem;
|
||||||
margin-top: -$smaller;
|
margin-top: -$smaller;
|
||||||
background-color: rgba(255, 255, 255, 0.048);
|
background-color: rgba(255, 255, 255, 0.048);
|
||||||
|
|||||||
@@ -124,7 +124,7 @@ function showMenu(e: Event) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
background-color: $gray4;
|
background-color: $gray5;
|
||||||
|
|
||||||
.index {
|
.index {
|
||||||
.text {
|
.text {
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
<template>
|
<template>
|
||||||
<!-- JCOMMENT: 64 is single item height, 24 is gap height -->
|
<!-- JUST A COMMENT: 64 is single item height, 24 is gap height -->
|
||||||
<div class="header-list-layout">
|
<div class="header-list-layout">
|
||||||
<div
|
<div
|
||||||
v-bind="containerProps"
|
v-bind="containerProps"
|
||||||
style="height: calc(100vh - 8.5rem); margin-top: 1rem"
|
style="height: 100%;"
|
||||||
:style="{ paddingTop: !no_header ? headerHeight - 64 + 24 + 'px' : 0 }"
|
:style="{ paddingTop: !no_header ? headerHeight - 64 + 24 + 'px' : 0 }"
|
||||||
@scroll="handleScroll"
|
@scroll="handleScroll"
|
||||||
>
|
>
|
||||||
@@ -61,6 +61,7 @@ import useQStore from "@/stores/queue";
|
|||||||
|
|
||||||
import SongItem from "@/components/shared/SongItem.vue";
|
import SongItem from "@/components/shared/SongItem.vue";
|
||||||
|
|
||||||
|
// EMITS & PROPS
|
||||||
const emit = defineEmits<{
|
const emit = defineEmits<{
|
||||||
(e: "playFromPage", index: number): void;
|
(e: "playFromPage", index: number): void;
|
||||||
}>();
|
}>();
|
||||||
@@ -71,14 +72,14 @@ const props = defineProps<{
|
|||||||
no_header?: boolean;
|
no_header?: boolean;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
|
// QUEUE
|
||||||
const queue = useQStore();
|
const queue = useQStore();
|
||||||
const source = computed(() => props.tracks);
|
function updateQueue(index: number) {
|
||||||
|
emit("playFromPage", index);
|
||||||
|
}
|
||||||
|
|
||||||
// element refs + sizes
|
// SCROLLABLE AREA
|
||||||
const header = ref<HTMLElement>();
|
|
||||||
const scrollable = ref<HTMLElement>();
|
const scrollable = ref<HTMLElement>();
|
||||||
|
|
||||||
const { height: headerHeight } = useElementSize(header);
|
|
||||||
const { width } = useElementSize(scrollable);
|
const { width } = useElementSize(scrollable);
|
||||||
|
|
||||||
const brk = {
|
const brk = {
|
||||||
@@ -88,8 +89,9 @@ const brk = {
|
|||||||
|
|
||||||
const isSmall = computed(() => width.value < brk.sm);
|
const isSmall = computed(() => width.value < brk.sm);
|
||||||
const isMedium = computed(() => width.value > brk.sm && width.value < brk.md);
|
const isMedium = computed(() => width.value > brk.sm && width.value < brk.md);
|
||||||
// ---
|
|
||||||
|
|
||||||
|
// VIRTUAL LIST
|
||||||
|
const source = computed(() => props.tracks);
|
||||||
const {
|
const {
|
||||||
list: tracks,
|
list: tracks,
|
||||||
containerProps,
|
containerProps,
|
||||||
@@ -99,9 +101,9 @@ const {
|
|||||||
overscan: 15,
|
overscan: 15,
|
||||||
});
|
});
|
||||||
|
|
||||||
function updateQueue(index: number) {
|
// HEADER
|
||||||
emit("playFromPage", index);
|
const header = ref<HTMLElement>();
|
||||||
}
|
const { height: headerHeight } = useElementSize(header);
|
||||||
|
|
||||||
function handleScroll(e: Event) {
|
function handleScroll(e: Event) {
|
||||||
const scrollTop = (e.target as HTMLElement).scrollTop;
|
const scrollTop = (e.target as HTMLElement).scrollTop;
|
||||||
@@ -117,10 +119,19 @@ function handleScroll(e: Event) {
|
|||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.header-list-layout {
|
.header-list-layout {
|
||||||
margin-right: calc(0rem - ($medium));
|
margin-right: calc(0rem - ($medium));
|
||||||
|
height: 100%;
|
||||||
|
|
||||||
.scrollable {
|
.scrollable {
|
||||||
padding-right: calc(1rem - $small + 2px);
|
padding-right: calc(1rem - $small + 2px);
|
||||||
scrollbar-width: thin;
|
scrollbar-width: thin;
|
||||||
|
|
||||||
|
.current {
|
||||||
|
background-color: $gray5;
|
||||||
|
|
||||||
|
a {
|
||||||
|
color: inherit;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.scrollable.isSmall {
|
.scrollable.isSmall {
|
||||||
|
|||||||
+11
-2
@@ -1,6 +1,11 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="queue-view">
|
<div class="queue-view" style="height: 100%">
|
||||||
<Layout :tracks="queue.tracklist" :no_header="true"> </Layout>
|
<Layout
|
||||||
|
:tracks="queue.tracklist"
|
||||||
|
:no_header="true"
|
||||||
|
@playFromPage="playFromQueue"
|
||||||
|
>
|
||||||
|
</Layout>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -9,4 +14,8 @@ import useQStore from "@/stores/queue";
|
|||||||
import Layout from "@/layouts/HeaderAndVList.vue";
|
import Layout from "@/layouts/HeaderAndVList.vue";
|
||||||
|
|
||||||
const queue = useQStore();
|
const queue = useQStore();
|
||||||
|
|
||||||
|
function playFromQueue(index: number) {
|
||||||
|
queue.play(index);
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user