mirror of
https://github.com/sudoxnym/habitica-self-host.git
synced 2026-07-17 19:42:15 +00:00
fix(stats): floor HP/MP/XP values (#8947)
This commit is contained in:
parent
51739a4dfe
commit
6e89197b3f
1 changed files with 8 additions and 3 deletions
|
|
@ -17,17 +17,17 @@ div
|
|||
.svg-icon(v-html="icons.health")
|
||||
.progress
|
||||
.progress-bar.bg-health(:style="{width: `${percent(member.stats.hp, MAX_HEALTH)}%`}")
|
||||
span.small-text {{member.stats.hp | round}} / {{MAX_HEALTH}}
|
||||
span.small-text {{member.stats.hp | floor}} / {{MAX_HEALTH}}
|
||||
.progress-container.d-flex
|
||||
.svg-icon(v-html="icons.experience")
|
||||
.progress
|
||||
.progress-bar.bg-experience(:style="{width: `${percent(member.stats.exp, toNextLevel)}%`}")
|
||||
span.small-text {{member.stats.exp | round}} / {{toNextLevel}}
|
||||
span.small-text {{member.stats.exp | floor}} / {{toNextLevel}}
|
||||
.progress-container.d-flex(v-if="hasClass")
|
||||
.svg-icon(v-html="icons.mana")
|
||||
.progress
|
||||
.progress-bar.bg-mana(:style="{width: `${percent(member.stats.mp, maxMP)}%`}")
|
||||
span.small-text {{member.stats.mp | round}} / {{maxMP}}
|
||||
span.small-text {{member.stats.mp | floor}} / {{maxMP}}
|
||||
</template>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
|
@ -211,6 +211,11 @@ export default {
|
|||
}),
|
||||
};
|
||||
},
|
||||
filters: {
|
||||
floor (value) {
|
||||
return Math.floor(value);
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
percent,
|
||||
showMemberModal () {
|
||||
|
|
|
|||
Loading…
Reference in a new issue