use third-party module to auto-persist queue store

+ more redesign
+ convert js files to ts
This commit is contained in:
geoffrey45
2022-08-19 15:58:32 +03:00
parent 5476575d10
commit 03219166c5
20 changed files with 305 additions and 197 deletions
+54
View File
@@ -0,0 +1,54 @@
<template>
<div class="sidebar-playlists">
<div class="header">your playlists</div>
<div class="list rounded">
<div v-for="p in pStore.playlists" class="ellip">
<router-link
:to="{
name: 'PlaylistView',
params: {
pid: p.playlistid,
},
}"
>
{{ p.name }}
</router-link>
</div>
</div>
</div>
</template>
<script setup lang="ts">
import usePStore from "@/stores/pages/playlists";
import { onMounted } from "vue";
const pStore = usePStore();
onMounted(() => {
if (pStore.playlists.length == 0) {
pStore.fetchAll();
}
});
</script>
<style lang="scss">
.sidebar-playlists {
// outline: solid 1px;
display: grid;
grid-template-rows: max-content 1fr;
.header {
opacity: 0.5;
margin-bottom: $small;
margin-left: 1rem;
font-size: small;
}
.list {
padding: $small;
& > * {
padding: $small;
}
}
}
</style>