Update:Show prompt before marking item as finished that has progress #805

This commit is contained in:
advplyr 2022-07-30 12:40:43 -05:00
parent 92bedeac15
commit 53cf6edd6a
5 changed files with 47 additions and 5 deletions

View file

@ -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
}