mirror of
https://github.com/Dvorinka/swingmusic-extended.git
synced 2026-06-04 12:33:03 +00:00
feat: separate discs in album page
+ remove tooltip markup + refactor css classnames
This commit is contained in:
committed by
Mungai Njoroge
parent
278439eee8
commit
977d9282cb
@@ -12,10 +12,28 @@
|
||||
<script setup lang="ts">
|
||||
import useQStore from "@/stores/queue";
|
||||
import Layout from "@/layouts/HeaderAndVList.vue";
|
||||
import { onBeforeMount, onMounted } from "vue";
|
||||
|
||||
const queue = useQStore();
|
||||
|
||||
function playFromQueue(index: number) {
|
||||
queue.play(index);
|
||||
}
|
||||
|
||||
function scrollToCurrent() {
|
||||
const scrollable = document.getElementById("v-page-scrollable");
|
||||
const itemHeight = 64;
|
||||
const top = queue.currentindex * itemHeight - 290;
|
||||
|
||||
scrollable?.scrollTo({
|
||||
top,
|
||||
behavior: "smooth",
|
||||
});
|
||||
}
|
||||
|
||||
onBeforeMount(() => {
|
||||
setTimeout(() => {
|
||||
scrollToCurrent();
|
||||
}, 1000);
|
||||
});
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user