merge upstream

This commit is contained in:
David Leimroth 2022-02-28 18:18:25 +01:00
commit 61bf30e08a
89 changed files with 2963 additions and 1805 deletions

View file

@ -16,6 +16,8 @@
<modals-edit-library-modal v-model="showLibraryModal" :library="selectedLibrary" />
<p class="text-xs mt-4 text-gray-200">*<strong>Force Re-Scan</strong> will scan all files again like a fresh scan. Audio file ID3 tags, OPF files, and text files will be probed/parsed and used for book details.</p>
<p class="text-xs mt-4 text-gray-200">**<strong>Match Books</strong> will attempt to match books in library with a book from the selected search provider and fill in empty details and cover art. Does not overwrite details.</p>
</div>
</template>

View file

@ -0,0 +1,60 @@
<template>
<div class="w-full my-4" @mousedown.prevent @mouseup.prevent>
<div class="w-full bg-primary px-6 py-1 flex items-center cursor-pointer" @click.stop="clickBar">
<p class="pr-4">{{ title }}</p>
<span class="bg-black-400 rounded-xl py-0.5 px-2 text-sm font-mono">{{ files.length }}</span>
<div class="flex-grow" />
<div class="cursor-pointer h-9 w-9 rounded-full hover:bg-black-400 flex justify-center items-center duration-500" :class="expand ? 'transform rotate-180' : ''">
<span class="material-icons text-3xl">expand_more</span>
</div>
</div>
<transition name="slide">
<div class="w-full" v-show="expand">
<table class="text-sm tracksTable">
<tr class="font-book">
<th class="text-left">Filename</th>
<th class="text-left">Size</th>
<th class="text-left">Type</th>
</tr>
<template v-for="file in files">
<tr :key="file.path">
<td class="font-book pl-2">
{{ file.name }}
</td>
<td class="font-mono">
{{ $bytesPretty(file.size) }}
</td>
<td class="font-book">
{{ file.filetype }}
</td>
</tr>
</template>
</table>
</div>
</transition>
</div>
</template>
<script>
export default {
props: {
title: String,
files: {
type: Array,
default: () => []
}
},
data() {
return {
expand: false
}
},
computed: {},
methods: {
clickBar() {
this.expand = !this.expand
}
},
mounted() {}
}
</script>

View file

@ -133,8 +133,7 @@ export default {
this.isHovering = false
},
playClick() {
this.$store.commit('setStreamAudiobook', this.book)
this.$root.socket.emit('open_stream', this.book.id)
this.$eventBus.$emit('play-audiobook', this.book.id)
},
clickEdit() {
this.$emit('edit', this.book)