feat: separate discs in album page

+ remove tooltip markup
+ refactor css classnames
This commit is contained in:
geoffrey45
2022-10-01 21:35:02 +03:00
committed by Mungai Njoroge
parent 278439eee8
commit 977d9282cb
23 changed files with 187 additions and 193 deletions
+18
View File
@@ -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>