Add:Local setting for autoplay next item in queue #603

This commit is contained in:
advplyr 2022-08-28 14:21:28 -05:00
parent 772c7b3217
commit dee4ca3559
7 changed files with 44 additions and 11 deletions

View file

@ -7,6 +7,12 @@
</template>
<div ref="container" class="w-full rounded-lg bg-bg box-shadow-md overflow-y-auto overflow-x-hidden py-4" style="max-height: 80vh">
<div v-if="show" class="w-full h-full">
<div class="pb-4 px-4 flex items-center">
<p class="text-base text-gray-200">Player Queue</p>
<p class="text-base text-gray-400 px-4">{{ playerQueueItems.length }} Items</p>
<div class="flex-grow" />
<ui-checkbox v-model="playerQueueAutoPlay" label="Auto Play" medium checkbox-bg="primary" border-color="gray-600" label-class="pl-2 mb-px" />
</div>
<modals-player-queue-item-row v-for="(item, index) in playerQueueItems" :key="index" :item="item" :index="index" @play="playItem" @remove="removeItem" />
</div>
</div>
@ -31,6 +37,14 @@ export default {
this.$emit('input', val)
}
},
playerQueueAutoPlay: {
get() {
return this.$store.state.playerQueueAutoPlay
},
set(val) {
this.$store.commit('setPlayerQueueAutoPlay', val)
}
},
playerQueueItems() {
return this.$store.state.playerQueueItems || []
}