mirror of
https://github.com/Dvorinka/swingmusic-extended.git
synced 2026-06-04 12:33:03 +00:00
misc
This commit is contained in:
@@ -82,23 +82,16 @@ export default {
|
||||
const current = ref(perks.current);
|
||||
const search_query = ref(state.search_query);
|
||||
|
||||
const updateQueue = async (song) => {
|
||||
if (state.queue.value[0]._id.$oid !== song_list.value[0]._id.$oid) {
|
||||
const new_queue = song_list.value;
|
||||
localStorage.setItem("queue", JSON.stringify(new_queue));
|
||||
state.queue.value = new_queue;
|
||||
}
|
||||
|
||||
state.current.value = song;
|
||||
localStorage.setItem("current", JSON.stringify(song));
|
||||
};
|
||||
function updateQueue(song){
|
||||
perks.updateQueue(song)
|
||||
}
|
||||
|
||||
const searchSongs = computed(() => {
|
||||
const songs = [];
|
||||
|
||||
if (search_query.value.length > 2) {
|
||||
state.loading.value = true;
|
||||
|
||||
|
||||
for (let i = 0; i < song_list.value.length; i++) {
|
||||
if (
|
||||
song_list.value[i].title
|
||||
@@ -162,7 +155,7 @@ export default {
|
||||
width: 3rem;
|
||||
height: 3rem;
|
||||
margin-right: 1rem;
|
||||
background-image: url(../../assets/icons/file.svg);
|
||||
background-image: url(../../assets/images/null.webp);
|
||||
display: grid;
|
||||
place-items: center;
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<td
|
||||
:style="{ width: songTitleWidth + 'px' }"
|
||||
class="flex"
|
||||
@click="emitUpdate(song), playAudio(song.filepath)"
|
||||
@click="emitUpdate(song)"
|
||||
>
|
||||
<div
|
||||
class="album-art rounded image"
|
||||
@@ -56,7 +56,6 @@
|
||||
<script>
|
||||
import perks from "@/composables/perks.js";
|
||||
import state from "@/composables/state.js";
|
||||
import audio from "@/composables/playAudio.js"
|
||||
|
||||
export default {
|
||||
props: ["song", "current", "songTitleWidth", "minWidth"],
|
||||
@@ -69,7 +68,6 @@ export default {
|
||||
putCommas: perks.putCommas,
|
||||
emitUpdate,
|
||||
is_playing: state.is_playing,
|
||||
playAudio: audio.playAudio
|
||||
};
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user