From 8d9a4e97a81923cea3588ba7eb784282aaf458d7 Mon Sep 17 00:00:00 2001 From: Keith Holliday Date: Thu, 19 Jul 2018 22:03:43 -0500 Subject: [PATCH] Fixed display points for the stat save button (#10522) --- website/client/components/userMenu/profileStats.vue | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/website/client/components/userMenu/profileStats.vue b/website/client/components/userMenu/profileStats.vue index 24f9959151..7a94d226a9 100644 --- a/website/client/components/userMenu/profileStats.vue +++ b/website/client/components/userMenu/profileStats.vue @@ -144,7 +144,7 @@ .up(v-if='user.stats.points', @click='allocate(stat)') div .down(@click='deallocate(stat)', v-if='user.stats.points') - .row.save-row + .row.save-row(v-if='showStatsSave') .col-12.col-md-6.offset-md-3.text-center button.btn.btn-primary(@click='saveAttributes()', :disabled='loading') {{ this.loading ? $t('loading') : $t('save') }} @@ -238,6 +238,10 @@ userLevel100Plus () { return this.user.stats.lvl >= 100; }, + showStatsSave () { + const statsAreBeingUpdated = Object.values(this.statUpdates).find(stat => stat > 0); + return Boolean(this.user.stats.points) || statsAreBeingUpdated; + }, }, methods: { getGearTitle (key) {