client: implement queuing

This commit is contained in:
geoffrey45
2021-12-21 13:42:06 +03:00
parent 8a744ce0be
commit 36999d8061
17 changed files with 240 additions and 179 deletions
+7 -2
View File
@@ -5,7 +5,7 @@
</div>
<div id="scrollable" ref="scrollable">
<FolderList :folders="folders" />
<SongList :songs="songs" />
<SongList :songs="songs" @updateQueue="updateQueue" />
</div>
</div>
</template>
@@ -27,7 +27,7 @@ export default {
FolderList,
SearchBox,
},
setup() {
setup(props, context) {
const route = useRoute();
const path = ref(route.params.path);
@@ -39,6 +39,10 @@ export default {
const scrollable = ref(null);
const loading = ref(false);
const updateQueue = (queue) => {
context.emit("sendQueue", queue);
};
onMounted(() => {
const getPathFolders = (path, last_id) => {
loading.value = true;
@@ -92,6 +96,7 @@ export default {
path,
scrollable,
loading,
updateQueue,
};
},
};