mirror of
https://github.com/gotson/komga.git
synced 2026-05-09 05:10:19 +02:00
fix(webui): display series/books as unavailable if library is unavailable
closes #617
This commit is contained in:
parent
871ec60869
commit
82cf82df38
5 changed files with 20 additions and 6 deletions
|
|
@ -207,7 +207,10 @@ export default Vue.extend({
|
||||||
return this.onEdit !== undefined || this.onSelected !== undefined || this.bookReady || this.canReadPages || this.actionMenu
|
return this.onEdit !== undefined || this.onSelected !== undefined || this.bookReady || this.canReadPages || this.actionMenu
|
||||||
},
|
},
|
||||||
computedItem(): Item<BookDto | SeriesDto | CollectionDto | ReadListDto> {
|
computedItem(): Item<BookDto | SeriesDto | CollectionDto | ReadListDto> {
|
||||||
return createItem(this.item)
|
let item = this.item
|
||||||
|
if ('libraryId' in this.item && this.$store.getters.getLibraryById((this.item as any).libraryId).unavailable)
|
||||||
|
item = {...item, deleted: true}
|
||||||
|
return createItem(item)
|
||||||
},
|
},
|
||||||
disableHover(): boolean {
|
disableHover(): boolean {
|
||||||
return !this.overlay
|
return !this.overlay
|
||||||
|
|
|
||||||
|
|
@ -59,4 +59,5 @@ export interface LibraryDto {
|
||||||
convertToCbz: boolean,
|
convertToCbz: boolean,
|
||||||
emptyTrashAfterScan: boolean,
|
emptyTrashAfterScan: boolean,
|
||||||
seriesCover: SeriesCoverDto,
|
seriesCover: SeriesCoverDto,
|
||||||
|
unavailable: boolean,
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -136,7 +136,7 @@
|
||||||
</template>{{ $t('browse_book.outdated_tooltip') }}</v-tooltip>
|
</template>{{ $t('browse_book.outdated_tooltip') }}</v-tooltip>
|
||||||
</v-col>
|
</v-col>
|
||||||
|
|
||||||
<v-col :class="'py-1 ' + ($vuetify.rtl ? 'pl-0' : 'pr-0')" cols="auto" v-if="book.deleted">
|
<v-col :class="'py-1 ' + ($vuetify.rtl ? 'pl-0' : 'pr-0')" cols="auto" v-if="unavailable">
|
||||||
<v-chip label small color="error">
|
<v-chip label small color="error">
|
||||||
{{ $t('common.unavailable') }}
|
{{ $t('common.unavailable') }}
|
||||||
</v-chip>
|
</v-chip>
|
||||||
|
|
@ -418,11 +418,14 @@ export default Vue.extend({
|
||||||
isAdmin(): boolean {
|
isAdmin(): boolean {
|
||||||
return this.$store.getters.meAdmin
|
return this.$store.getters.meAdmin
|
||||||
},
|
},
|
||||||
|
unavailable(): boolean {
|
||||||
|
return this.book.deleted || this.$store.getters.getLibraryById(this.book.libraryId).unavailable
|
||||||
|
},
|
||||||
canRead(): boolean {
|
canRead(): boolean {
|
||||||
return this.book.media.status === 'READY' && this.$store.getters.mePageStreaming && !this.book.deleted
|
return this.book.media.status === 'READY' && this.$store.getters.mePageStreaming && !this.unavailable
|
||||||
},
|
},
|
||||||
canDownload(): boolean {
|
canDownload(): boolean {
|
||||||
return this.$store.getters.meFileDownload && !this.book.deleted
|
return this.$store.getters.meFileDownload && !this.unavailable
|
||||||
},
|
},
|
||||||
thumbnailUrl(): string {
|
thumbnailUrl(): string {
|
||||||
return bookThumbnailUrl(this.bookId)
|
return bookThumbnailUrl(this.bookId)
|
||||||
|
|
|
||||||
|
|
@ -139,7 +139,7 @@
|
||||||
{{ $t(`enums.reading_direction.${series.metadata.readingDirection}`) }}
|
{{ $t(`enums.reading_direction.${series.metadata.readingDirection}`) }}
|
||||||
</v-chip>
|
</v-chip>
|
||||||
</v-col>
|
</v-col>
|
||||||
<v-col :class="'py-1 ' + ($vuetify.rtl ? 'pl-0' : 'pr-0')" cols="auto" v-if="series.deleted">
|
<v-col :class="'py-1 ' + ($vuetify.rtl ? 'pl-0' : 'pr-0')" cols="auto" v-if="unavailable">
|
||||||
<v-chip label small color="error">
|
<v-chip label small color="error">
|
||||||
{{ $t('common.unavailable') }}
|
{{ $t('common.unavailable') }}
|
||||||
</v-chip>
|
</v-chip>
|
||||||
|
|
@ -527,8 +527,11 @@ export default Vue.extend({
|
||||||
isAdmin(): boolean {
|
isAdmin(): boolean {
|
||||||
return this.$store.getters.meAdmin
|
return this.$store.getters.meAdmin
|
||||||
},
|
},
|
||||||
|
unavailable(): boolean {
|
||||||
|
return this.series.deleted || this.$store.getters.getLibraryById(this.series.libraryId).unavailable
|
||||||
|
},
|
||||||
canDownload(): boolean {
|
canDownload(): boolean {
|
||||||
return this.$store.getters.meFileDownload && !this.series.deleted
|
return this.$store.getters.meFileDownload && !this.unavailable
|
||||||
},
|
},
|
||||||
fileUrl(): string {
|
fileUrl(): string {
|
||||||
return seriesFileUrl(this.series.id)
|
return seriesFileUrl(this.series.id)
|
||||||
|
|
|
||||||
|
|
@ -85,6 +85,10 @@
|
||||||
</v-list-item-icon>
|
</v-list-item-icon>
|
||||||
<v-list-item-content>
|
<v-list-item-content>
|
||||||
<v-list-item-title>{{ l.name }}</v-list-item-title>
|
<v-list-item-title>{{ l.name }}</v-list-item-title>
|
||||||
|
<v-list-item-subtitle
|
||||||
|
v-if="l.unavailable"
|
||||||
|
class="error--text caption"
|
||||||
|
>{{ $t('common.unavailable') }}</v-list-item-subtitle>
|
||||||
</v-list-item-content>
|
</v-list-item-content>
|
||||||
<v-list-item-action v-if="isAdmin">
|
<v-list-item-action v-if="isAdmin">
|
||||||
<library-actions-menu :library="l"/>
|
<library-actions-menu :library="l"/>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue