mirror of
https://github.com/Dvorinka/swingmusic-extended.git
synced 2026-06-05 04:53:01 +00:00
client: fix sending multiple requests
on songlist click
This commit is contained in:
@@ -1,11 +1,20 @@
|
||||
<template>
|
||||
<div class="now-playing">
|
||||
<div class="art-tags">
|
||||
<div class="album-art image"></div>
|
||||
<div
|
||||
class="album-art image"
|
||||
:style="{
|
||||
backgroundImage: `url("${current.image}")`,
|
||||
}"
|
||||
></div>
|
||||
<div>
|
||||
<p id="title" class="ellipsis">I love this bar (remix)</p>
|
||||
<p id="title" class="ellipsis">{{ current.title }}</p>
|
||||
<hr />
|
||||
<span id="artist">Toby Keith, Morgan Wallen</span>
|
||||
<div id="artist">
|
||||
<span v-for="artist in putCommas(current.artists)" :key="artist">{{
|
||||
artist
|
||||
}}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="controls">
|
||||
@@ -17,7 +26,17 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {};
|
||||
import { ref } from "@vue/reactivity";
|
||||
import perks from "../../composables/perks.js";
|
||||
|
||||
export default {
|
||||
setup() {
|
||||
const current = ref(perks.current);
|
||||
const putCommas = perks.putCommas;
|
||||
|
||||
return { current, putCommas };
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
@@ -43,7 +62,7 @@ export default {};
|
||||
border-radius: 0.5rem;
|
||||
margin-right: 0.5rem;
|
||||
background-color: #ad1717a8;
|
||||
background-image: url(../../assets/images/tk.jpg);
|
||||
background-image: url(../../assets/images/null.webp);
|
||||
}
|
||||
|
||||
.now-playing .art-tags hr {
|
||||
|
||||
@@ -4,11 +4,20 @@
|
||||
COMING UP NEXT <span class="more" @click="collapse">SEE ALL</span>
|
||||
</p>
|
||||
<div class="main-item h-1">
|
||||
<div class="album-art image"></div>
|
||||
<div
|
||||
class="album-art image"
|
||||
:style="{
|
||||
backgroundImage: `url("${next.image}")`,
|
||||
}"
|
||||
></div>
|
||||
<div class="tags">
|
||||
<p class="title">Hard to forget</p>
|
||||
<p class="title">{{ next.title }}</p>
|
||||
<hr />
|
||||
<p class="artist">Sam hunt</p>
|
||||
<p class="artist">
|
||||
<span v-for="artist in putCommas(next.artists)" :key="artist">{{
|
||||
artist
|
||||
}}</span>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
@@ -38,19 +47,25 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { toRefs } from "@vue/reactivity";
|
||||
import putCommas from "@/composables/perks.js";
|
||||
import { ref, toRefs } from "@vue/reactivity";
|
||||
import perks from "@/composables/perks.js";
|
||||
|
||||
export default {
|
||||
props: ["up_next", "queue"],
|
||||
props: ["up_next"],
|
||||
setup(props, { emit }) {
|
||||
const is_expanded = toRefs(props).up_next;
|
||||
|
||||
const queue = ref(perks.queue);
|
||||
|
||||
const next = ref(perks.next);
|
||||
|
||||
let collapse = () => {
|
||||
emit("expandQueue");
|
||||
};
|
||||
|
||||
return { collapse, is_expanded, putCommas };
|
||||
|
||||
const putCommas = perks.putCommas;
|
||||
|
||||
return { collapse, is_expanded, putCommas, queue, next };
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user