diff --git a/app/imports/client/ui/components/global/SmartBtn.vue b/app/imports/client/ui/components/global/SmartBtn.vue index 30e82c52..e423e22d 100644 --- a/app/imports/client/ui/components/global/SmartBtn.vue +++ b/app/imports/client/ui/components/global/SmartBtn.vue @@ -3,7 +3,7 @@ v-bind="$attrs" :disabled="isDisabled" :loading="loading" - @click="click" + @click.stop="click" > @@ -41,7 +41,7 @@ export default { } else if (Number.isFinite(this.context.debounceTime)){ return this.context.debounceTime; } else { - return 750; + return 400; } }, }, @@ -62,11 +62,12 @@ export default { this.$emit('click', this.acknowledgeChange); }, clicks() { + if (!this.$listeners?.clicks) return; this.loading = true; this.$emit('clicks', this.timesClicked, this.acknowledgeChange); this.timesClicked = 0; }, - acknowledgeChange(error){ + acknowledgeChange(error) { this.loading = false; if (error) { console.error(error) diff --git a/app/imports/client/ui/creature/character/characterSheetTabs/StatsTab.vue b/app/imports/client/ui/creature/character/characterSheetTabs/StatsTab.vue index 535a7fdd..73f46cb2 100644 --- a/app/imports/client/ui/creature/character/characterSheetTabs/StatsTab.vue +++ b/app/imports/client/ui/creature/character/characterSheetTabs/StatsTab.vue @@ -600,13 +600,15 @@ export default { data: { _id }, }); }, - incrementChange(_id, { type, value }) { + incrementChange(_id, { type, value, ack }) { damageProperty.call({ _id, operation: type, value: -value }, error => { - if (error) { + if (ack) { + ack(error); + } else if (error) { snackbar({ text: error.reason || error.message || error.toString() }); console.error(error); } diff --git a/app/imports/client/ui/properties/components/attributes/ResourceCardContent.vue b/app/imports/client/ui/properties/components/attributes/ResourceCardContent.vue index 1f9de91f..325651be 100644 --- a/app/imports/client/ui/properties/components/attributes/ResourceCardContent.vue +++ b/app/imports/client/ui/properties/components/attributes/ResourceCardContent.vue @@ -1,26 +1,28 @@ - increment(times, ack)" + @click="optimisticIncrement += 1" > mdi-chevron-up - - + increment(-1 * times, ack)" + @click="optimisticIncrement -= 1" > mdi-chevron-down - + - {{ model.value }} + {{ optimisticValue }}