mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-18 07:07:35 +01:00
Fixed display points for the stat save button (#10522)
This commit is contained in:
@@ -144,7 +144,7 @@
|
|||||||
.up(v-if='user.stats.points', @click='allocate(stat)')
|
.up(v-if='user.stats.points', @click='allocate(stat)')
|
||||||
div
|
div
|
||||||
.down(@click='deallocate(stat)', v-if='user.stats.points')
|
.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
|
.col-12.col-md-6.offset-md-3.text-center
|
||||||
button.btn.btn-primary(@click='saveAttributes()', :disabled='loading') {{ this.loading ? $t('loading') : $t('save') }}
|
button.btn.btn-primary(@click='saveAttributes()', :disabled='loading') {{ this.loading ? $t('loading') : $t('save') }}
|
||||||
</template>
|
</template>
|
||||||
@@ -238,6 +238,10 @@
|
|||||||
userLevel100Plus () {
|
userLevel100Plus () {
|
||||||
return this.user.stats.lvl >= 100;
|
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: {
|
methods: {
|
||||||
getGearTitle (key) {
|
getGearTitle (key) {
|
||||||
|
|||||||
Reference in New Issue
Block a user