add a buggy method to clear queue

This commit is contained in:
geoffrey45
2022-08-02 18:27:23 +03:00
parent 44df8b47cb
commit b618490676
2 changed files with 14 additions and 1 deletions
@@ -1,7 +1,7 @@
<template>
<div class="queue-actions">
<div class="left">
<button class="clear-queue action">
<button class="clear-queue action" @click="queue.clearQueue">
<ClearSvg />
<span>Clear</span>
</button>
@@ -19,9 +19,13 @@
</template>
<script setup lang="ts">
import useQueueStore from "../../../stores/queue";
import ClearSvg from "@/assets/icons/delete.svg";
import SaveAsPlaylistSvg from "@/assets/icons/sdcard.svg";
import MoreSvg from "@/assets/icons/more.svg";
const queue = useQueueStore();
</script>
<style lang="scss">
+9
View File
@@ -239,5 +239,14 @@ export default defineStore("Queue", {
);
writeQueue(this.from, this.tracks);
},
clearQueue() {
this.tracks = [defaultTrack] as Track[];
this.current = 0;
this.currentid = "";
this.next = 0;
this.prev = 0;
this.from = <From>{};
console.log(this.current);
},
},
});