mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-06-28 01:16:10 +02:00
Renames
This commit is contained in:
parent
0dc1b69305
commit
854331318e
@ -94,7 +94,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="px-1 sm:px-2 pb-1 sm:pb-2 space-y-1 relative" style="z-index: 1">
|
<div class="px-1 sm:px-2 pb-1 sm:pb-2 space-y-1 relative" style="z-index: 1">
|
||||||
<div v-for="episode in day.episodes" :key="episode.id" @click="clickEpisode(episode)" class="p-1 rounded text-xs cursor-pointer hover:bg-white/10 transition-colors" :class="getEpisodeColorClass(episode)">
|
<div v-for="episode in day.episodes" :key="episode.id" @click="clickEpisode(episode)" class="p-1 rounded text-xs cursor-pointer hover:bg-white/10 transition-colors" :class="getItemColorClass(episode)">
|
||||||
<div class="font-medium truncate text-xs">
|
<div class="font-medium truncate text-xs">
|
||||||
{{ episode.podcastTitle }}
|
{{ episode.podcastTitle }}
|
||||||
</div>
|
</div>
|
||||||
@ -346,12 +346,12 @@ export default {
|
|||||||
isSameDay(date1, date2) {
|
isSameDay(date1, date2) {
|
||||||
return this.formatDateKey(date1) === this.formatDateKey(date2)
|
return this.formatDateKey(date1) === this.formatDateKey(date2)
|
||||||
},
|
},
|
||||||
getEpisodeColorClass(episode) {
|
getItemColorClass(episode) {
|
||||||
const podcastId = episode.podcastId || episode.libraryItemId
|
const podcastId = episode.podcastId || episode.libraryItemId
|
||||||
const hash = this.simpleHash(podcastId)
|
const hash = this.itemGroupingHash(podcastId)
|
||||||
return this.itemColors[hash % this.itemColors.length]
|
return this.itemColors[hash % this.itemColors.length]
|
||||||
},
|
},
|
||||||
simpleHash(str) {
|
itemGroupingHash(str) {
|
||||||
let hash = 0
|
let hash = 0
|
||||||
if (!str) return hash
|
if (!str) return hash
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user