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

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" /> <q-icon name="la la-copy" size="20px" />
</div> </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> </div>
@@ -82,6 +82,7 @@ class BookView {
book: Object, book: Object,
genreTree: Array, genreTree: Array,
showAuthor: Boolean, showAuthor: Boolean,
showReadLink: Boolean,
titleColor: { type: String, default: 'text-blue-10'}, titleColor: { type: String, default: 'text-blue-10'},
}; };
@@ -101,10 +102,6 @@ class BookView {
this.showDeleted = settings.showDeleted; this.showDeleted = settings.showDeleted;
} }
get config() {
return this.$store.state.config;
}
get settings() { get settings() {
return this.$store.state.settings; return this.$store.state.settings;
} }

View File

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