mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-08-02 17:24:57 +02:00
Library stats page links to genres, authors, items #453, use overall days when hours > 10000
This commit is contained in:
parent
8be3bebee8
commit
f2d9de5a5f
3 changed files with 24 additions and 11 deletions
|
@ -6,15 +6,15 @@
|
|||
</svg>
|
||||
<div class="px-2">
|
||||
<p class="text-4xl md:text-5xl font-bold">{{ totalItems }}</p>
|
||||
<p class="font-book text-xs md:text-sm text-white text-opacity-80">Books in Library</p>
|
||||
<p class="font-book text-xs md:text-sm text-white text-opacity-80">Items in Library</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="flex px-4">
|
||||
<span class="material-icons text-7xl">show_chart</span>
|
||||
<div class="px-1">
|
||||
<p class="text-4xl md:text-5xl font-bold">{{ totalHours }}</p>
|
||||
<p class="font-book text-xs md:text-sm text-white text-opacity-80">Overall Hours</p>
|
||||
<p class="text-4xl md:text-5xl font-bold">{{ totalTime }}</p>
|
||||
<p class="font-book text-xs md:text-sm text-white text-opacity-80">Overall {{ useOverallHours ? 'Hours' : 'Days' }}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -74,8 +74,7 @@ export default {
|
|||
return this.libraryStats ? this.libraryStats.totalDuration : 0
|
||||
},
|
||||
totalHours() {
|
||||
var totalHours = Math.round(this.totalDuration / (60 * 60))
|
||||
return totalHours
|
||||
return Math.round(this.totalDuration / (60 * 60))
|
||||
},
|
||||
totalSizePretty() {
|
||||
var totalSize = this.libraryStats ? this.libraryStats.totalSize : 0
|
||||
|
@ -86,6 +85,13 @@ export default {
|
|||
},
|
||||
totalSizeMod() {
|
||||
return this.totalSizePretty.split(' ')[1]
|
||||
},
|
||||
useOverallHours() {
|
||||
return this.totalHours < 10000
|
||||
},
|
||||
totalTime() {
|
||||
if (this.useOverallHours) return this.totalHours
|
||||
return Math.round(this.totalHours / 24)
|
||||
}
|
||||
},
|
||||
methods: {},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue