diff --git a/client/components/app/BookShelfToolbar.vue b/client/components/app/BookShelfToolbar.vue index 04354c80a..488962dc9 100644 --- a/client/components/app/BookShelfToolbar.vue +++ b/client/components/app/BookShelfToolbar.vue @@ -157,6 +157,7 @@ export default { } this.addSubtitlesMenuItem(items) + this.addDetailsOnHoverMenuItem(items) this.addCollapseSubSeriesMenuItem(items) return items @@ -329,6 +330,7 @@ export default { this.addSubtitlesMenuItem(items) this.addCollapseSeriesMenuItem(items) + this.addDetailsOnHoverMenuItem(items) return items }, @@ -367,6 +369,21 @@ export default { } } }, + addDetailsOnHoverMenuItem(items) { + if (this.isBookLibrary && (!this.page || this.page === 'search')) { + if (this.settings.showDetailsOnHover) { + items.push({ + text: this.$strings.LabelHideDetailsOnHover, + action: 'hide-details-on-hover' + }) + } else { + items.push({ + text: this.$strings.LabelShowDetailsOnHover, + action: 'show-details-on-hover' + }) + } + } + }, addCollapseSubSeriesMenuItem(items) { if (this.selectedSeries && this.isBookLibrary && !this.isBatchSelecting) { if (this.settings.collapseBookSeries) { @@ -408,6 +425,19 @@ export default { } return false }, + handleDetailsOnHoverAction(action) { + if (action === 'show-details-on-hover') { + this.settings.showDetailsOnHover = true + this.updateShowDetailsOnHover() + return true + } + if (action === 'hide-details-on-hover') { + this.settings.showDetailsOnHover = false + this.updateShowDetailsOnHover() + return true + } + return false + }, handleCollapseSubSeriesAction(action) { if (action === 'collapse-sub-series') { this.settings.collapseBookSeries = true @@ -429,6 +459,8 @@ export default { return } else if (this.handleCollapseSeriesAction(action)) { return + } else if (this.handleDetailsOnHoverAction(action)) { + return } }, exportOPML() { @@ -451,6 +483,8 @@ export default { this.markSeriesFinished() } else if (this.handleSubtitlesAction(action)) { return + } else if (this.handleDetailsOnHoverAction(action)) { + return } else if (this.handleCollapseSubSeriesAction(action)) { return } @@ -597,6 +631,9 @@ export default { updateShowSubtitles() { this.saveSettings() }, + updateShowDetailsOnHover() { + this.saveSettings() + }, updateAuthorSort() { this.saveSettings() }, diff --git a/client/components/cards/LazyBookCard.vue b/client/components/cards/LazyBookCard.vue index 09424b3c6..65d826d55 100644 --- a/client/components/cards/LazyBookCard.vue +++ b/client/components/cards/LazyBookCard.vue @@ -1,128 +1,130 @@