mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-03-01 05:29:41 +00:00
Add consolidate badge
This commit is contained in:
parent
5f599a9980
commit
b3cdd880e1
5 changed files with 72 additions and 9 deletions
|
|
@ -115,6 +115,13 @@
|
|||
<div cy-id="numEpisodesIncomplete" v-else-if="numEpisodesIncomplete && !isHovering && !isSelectionMode" class="absolute rounded-full bg-yellow-400 text-black font-semibold box-shadow-md z-10 flex items-center justify-center" :style="{ top: 0.375 + 'em', right: 0.375 + 'em', width: 1.25 + 'em', height: 1.25 + 'em' }">
|
||||
<p :style="{ fontSize: 0.8 + 'em' }">{{ numEpisodesIncomplete }}</p>
|
||||
</div>
|
||||
|
||||
<!-- Not Consolidated Badge -->
|
||||
<ui-tooltip v-if="isNotConsolidated && !isSelectionMode && !isHovering" text="Not Consolidated" direction="top" class="absolute left-0 z-10" :style="{ padding: 0.375 + 'em', bottom: 0.375 + 'em' }">
|
||||
<div class="rounded-full bg-warning flex items-center justify-center border border-black/20 shadow-sm" :style="{ width: 1.25 + 'em', height: 1.25 + 'em' }">
|
||||
<span class="material-symbols text-black" :style="{ fontSize: 0.9 + 'em' }">folder_open</span>
|
||||
</div>
|
||||
</ui-tooltip>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
@ -447,6 +454,9 @@ export default {
|
|||
isInvalid() {
|
||||
return this._libraryItem.isInvalid
|
||||
},
|
||||
isNotConsolidated() {
|
||||
return !!this._libraryItem.isNotConsolidated
|
||||
},
|
||||
errorText() {
|
||||
if (this.isMissing) return 'Item directory is missing!'
|
||||
else if (this.isInvalid) {
|
||||
|
|
|
|||
|
|
@ -29,6 +29,11 @@
|
|||
{{ title }}
|
||||
<widgets-explicit-indicator v-if="isExplicit" />
|
||||
<widgets-abridged-indicator v-if="isAbridged" />
|
||||
<ui-tooltip v-if="isNotConsolidated" text="Not Consolidated" direction="bottom" class="ml-2">
|
||||
<div class="rounded-full bg-warning flex items-center justify-center border border-black/20 shadow-sm w-6 h-6">
|
||||
<span class="material-symbols text-black text-sm">folder_open</span>
|
||||
</div>
|
||||
</ui-tooltip>
|
||||
</div>
|
||||
</h1>
|
||||
|
||||
|
|
@ -108,6 +113,10 @@
|
|||
<ui-read-icon-btn :disabled="isProcessingReadUpdate" :is-read="userIsFinished" class="mx-0.5" @click="toggleFinished" />
|
||||
</ui-tooltip>
|
||||
|
||||
<ui-tooltip v-if="userCanUpdate && !isFile && !isPodcast" :text="isNotConsolidated ? 'Consolidate' : 'Already Consolidated'" direction="top">
|
||||
<ui-icon-btn icon="folder_open" class="mx-0.5" :class="isNotConsolidated ? 'text-warning' : 'opacity-50'" :disabled="!isNotConsolidated" @click="consolidate" />
|
||||
</ui-tooltip>
|
||||
|
||||
<!-- Only admin or root user can download new episodes -->
|
||||
<ui-tooltip v-if="isPodcast && userIsAdminOrUp" :text="$strings.LabelFindEpisodes" direction="top">
|
||||
<ui-icon-btn icon="search" class="mx-0.5" :aria-label="$strings.LabelFindEpisodes" :loading="fetchingRSSFeed" outlined @click="findEpisodesClick" />
|
||||
|
|
@ -222,6 +231,9 @@ export default {
|
|||
isInvalid() {
|
||||
return this.libraryItem.isInvalid
|
||||
},
|
||||
isNotConsolidated() {
|
||||
return !!this.libraryItem.isNotConsolidated
|
||||
},
|
||||
isExplicit() {
|
||||
return !!this.mediaMetadata.explicit
|
||||
},
|
||||
|
|
@ -428,12 +440,6 @@ export default {
|
|||
text: this.$strings.ButtonReScan,
|
||||
action: 'rescan'
|
||||
})
|
||||
if (!this.isFile && !this.isPodcast) {
|
||||
items.push({
|
||||
text: 'Consolidate',
|
||||
action: 'consolidate'
|
||||
})
|
||||
}
|
||||
items.push({
|
||||
text: this.$strings.ButtonMoveToLibrary,
|
||||
action: 'move'
|
||||
|
|
@ -837,8 +843,6 @@ export default {
|
|||
} else if (action === 'move') {
|
||||
this.$store.commit('setSelectedLibraryItem', this.libraryItem)
|
||||
this.$store.commit('globals/setShowMoveToLibraryModal', true)
|
||||
} else if (action === 'consolidate') {
|
||||
this.consolidate()
|
||||
} else if (action === 'sendToDevice') {
|
||||
this.sendToDevice(data)
|
||||
} else if (action === 'share') {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue