Улучшение работы ссылки "читать"

This commit is contained in:
Book Pauk
2022-10-14 20:05:14 +07:00
parent bc5b895cf1
commit 911ee3f2d7
2 changed files with 9 additions and 7 deletions

View File

@@ -49,7 +49,7 @@
<q-icon name="la la-copy" size="20px" />
</div>
<div v-if="config.bookReadLink" class="q-ml-sm clickable" @click="readBook">
<div v-if="showReadLink" class="q-ml-sm clickable" @click="readBook">
(читать)
</div>
@@ -82,6 +82,7 @@ class BookView {
book: Object,
genreTree: Array,
showAuthor: Boolean,
showReadLink: Boolean,
titleColor: { type: String, default: 'text-blue-10'},
};
@@ -101,10 +102,6 @@ class BookView {
this.showDeleted = settings.showDeleted;
}
get config() {
return this.$store.state.config;
}
get settings() {
return this.$store.state.settings;
}

View File

@@ -185,12 +185,13 @@
v-for="subbook in book.allBooks" :key="subbook.key"
:book="subbook" :genre-tree="genreTree"
show-author
:show-read-link="showReadLink"
:title-color="isFoundSeriesBook(book, subbook) ? 'text-blue-10' : 'text-red'"
@book-event="bookEvent"
/>
</div>
<div v-else class="book-row column">
<BookView v-for="subbook in book.books" :key="subbook.key" :book="subbook" :genre-tree="genreTree" @book-event="bookEvent" />
<BookView v-for="subbook in book.books" :key="subbook.key" :book="subbook" :genre-tree="genreTree" :show-read-link="showReadLink" @book-event="bookEvent" />
</div>
<div
@@ -211,7 +212,7 @@
</div>
</div>
<!-- книга без серии -->
<BookView v-else :book="book" :genre-tree="genreTree" @book-event="bookEvent" />
<BookView v-else :book="book" :genre-tree="genreTree" :show-read-link="showReadLink" @book-event="bookEvent" />
</div>
</div>
@@ -527,6 +528,10 @@ class Search {
return result.join(', ');
}
get showReadLink() {
return this.config.bookReadLink != '' || this.liberamaReady;
}
openReleasePage() {
window.open('https://github.com/bookpauk/inpx-web', '_blank');
}