From 5482b30324d0639dc6b8a0708c153cb3af27bade Mon Sep 17 00:00:00 2001 From: advplyr Date: Thu, 12 Jan 2023 17:04:47 -0600 Subject: [PATCH] Update:Play button color and increase cover size on item page --- components/app/AudioPlayer.vue | 14 ++++++++------ pages/item/_id.vue | 23 +++++++++++++++++++---- 2 files changed, 27 insertions(+), 10 deletions(-) diff --git a/components/app/AudioPlayer.vue b/components/app/AudioPlayer.vue index ba6186ff..25db5f55 100644 --- a/components/app/AudioPlayer.vue +++ b/components/app/AudioPlayer.vue @@ -41,8 +41,8 @@
-

{{ title }}

-

by {{ authorName }}

+

{{ title }}

+

{{ authorName }}

@@ -69,8 +69,10 @@
first_page {{ jumpBackwardsIcon }} -
- {{ seekLoading ? 'autorenew' : !isPlaying ? 'play_arrow' : 'pause' }} +
+
+ + {{ seekLoading ? 'autorenew' : !isPlaying ? 'play_arrow' : 'pause' }}
{{ jumpForwardIcon }} @@ -959,10 +961,10 @@ export default { pointer-events: auto; } .fullscreen .title-author-texts .title-text { - font-size: clamp(0.8rem, calc(var(--cover-image-height) / 260 * 20), 1.2rem); + font-size: clamp(0.8rem, calc(var(--cover-image-height) / 260 * 20), 1.5rem); } .fullscreen .title-author-texts .author-text { - font-size: clamp(0.6rem, calc(var(--cover-image-height) / 260 * 16), 1rem); + font-size: clamp(0.6rem, calc(var(--cover-image-height) / 260 * 16), 1.1rem); } #playerControls { diff --git a/pages/item/_id.vue b/pages/item/_id.vue index 6b422129..32eef515 100644 --- a/pages/item/_id.vue +++ b/pages/item/_id.vue @@ -7,11 +7,11 @@
- -
+ +
-
@@ -183,7 +183,8 @@ export default { showDetailsModal: false, showFullscreenCover: false, coverRgb: 'rgb(55, 56, 56)', - coverBgIsLight: false + coverBgIsLight: false, + windowWidth: 0 } }, computed: { @@ -382,6 +383,14 @@ export default { } return items + }, + coverWidth() { + let width = this.windowWidth - 94 + if (width > 325) return 325 + else if (width < 0) return 175 + + if (width * this.bookCoverAspectRatio > 325) width = 325 / this.bookCoverAspectRatio + return width } }, methods: { @@ -641,14 +650,20 @@ export default { if (this.libraryItem.libraryId !== libraryId) { this.$router.replace('/bookshelf') } + }, + windowResized() { + this.windowWidth = window.innerWidth } }, mounted() { + this.windowWidth = window.innerWidth + window.addEventListener('resize', this.windowResized) this.$eventBus.$on('library-changed', this.libraryChanged) this.$eventBus.$on('new-local-library-item', this.newLocalLibraryItem) this.$socket.$on('item_updated', this.itemUpdated) }, beforeDestroy() { + window.removeEventListener('resize', this.windowResized) this.$eventBus.$off('library-changed', this.libraryChanged) this.$eventBus.$off('new-local-library-item', this.newLocalLibraryItem) this.$socket.$off('item_updated', this.itemUpdated)