From d7be01935f0cf8009dd65e46f85db0c2d337cc25 Mon Sep 17 00:00:00 2001 From: Lars Kiesow Date: Tue, 7 Feb 2023 22:21:35 +0100 Subject: [PATCH] Move Discard Progress to Menu This patch moves the discard progress functionality from the tiny icon at the top right corner of the progress display to the options menu. The reasoning for this is that resetting progress is an option which is unlikely to be used very often and therefor does not need to be on the main screen. In addition to that, the menu already holds the related options to mark the book as finished and to discard the progress of a finished book. Finally, this removes the tiny icon which does not really match the rest of the user interface of the app. --- pages/item/_id/index.vue | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/pages/item/_id/index.vue b/pages/item/_id/index.vue index 4eefa7c3..af539857 100644 --- a/pages/item/_id/index.vue +++ b/pages/item/_id/index.vue @@ -43,9 +43,6 @@

Your Progress: {{ Math.round(progressPercent * 100) }}%

{{ $elapsedPretty(userTimeRemaining) }} remaining

Finished {{ $formatDate(userProgressFinishedAt) }}

-
- close -
@@ -378,6 +375,13 @@ export default { text: this.userIsFinished ? 'Mark as Not Finished' : 'Mark as Finished', value: 'markFinished' }) + + if (this.progressPercent > 0 && !this.userIsFinished) { + items.push({ + text: 'Discard Progress', + value: 'discardProgress' + }) + } } if (this.localLibraryItemId) { @@ -445,6 +449,8 @@ export default { this.toggleFinished() } else if (action === 'history') { this.$router.push(`/media/${this.mediaId}/history?title=${this.title}`) + } else if (action === 'discardProgress') { + this.clearProgressClick() } }, moreButtonPress() {