diff --git a/client/components/cards/LazyBookCard.vue b/client/components/cards/LazyBookCard.vue index 091f3b59..d4869df0 100644 --- a/client/components/cards/LazyBookCard.vue +++ b/client/components/cards/LazyBookCard.vue @@ -502,7 +502,21 @@ export default { } this.$emit('edit', this.libraryItem) }, - toggleFinished() { + toggleFinished(confirmed = false) { + if (!this.itemIsFinished && this.userProgressPercent > 0 && !confirmed) { + const payload = { + message: `Are you sure you want to mark "${this.displayTitle}" as finished?`, + callback: (confirmed) => { + if (confirmed) { + this.toggleFinished(true) + } + }, + type: 'yesNo' + } + this.store.commit('globals/setConfirmPrompt', payload) + return + } + var updatePayload = { isFinished: !this.itemIsFinished } diff --git a/client/components/prompt/Confirm.vue b/client/components/prompt/Confirm.vue index b5ef8296..9e15472e 100644 --- a/client/components/prompt/Confirm.vue +++ b/client/components/prompt/Confirm.vue @@ -1,7 +1,7 @@