mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-18 23:27:26 +01:00
fix(admin): don't auto calculate Gem cap
also fixes .eslintrc to stop down prop mutations from error level
This commit is contained in:
@@ -14,6 +14,10 @@ module.exports = {
|
||||
// TODO find a way to let eslint understand webpack aliases
|
||||
'import/no-unresolved': 'off',
|
||||
'import/extensions': 'off',
|
||||
'vue/component-tags-order': ['warn', {
|
||||
order: [ 'template', 'style', 'script' ],
|
||||
}],
|
||||
'vue/no-mutating-props': 'warn',
|
||||
'vue/no-v-html': 'off',
|
||||
'vue/html-self-closing': ['error', {
|
||||
html: {
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
</label>
|
||||
</div>
|
||||
<div>
|
||||
Months until renewal:
|
||||
Perk offset months:
|
||||
<strong>{{ hero.purchased.plan.consecutive.offset }}</strong>
|
||||
</div>
|
||||
<div>
|
||||
@@ -62,9 +62,22 @@
|
||||
>
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-inline">
|
||||
<label>
|
||||
Gem cap increase:
|
||||
<input
|
||||
v-model="hero.purchased.plan.consecutive.gemCapExtra"
|
||||
class="form-control"
|
||||
type="number"
|
||||
min="0"
|
||||
max="25"
|
||||
step="5"
|
||||
>
|
||||
</label>
|
||||
</div>
|
||||
<div>
|
||||
Gem cap:
|
||||
<strong>{{ hero.purchased.plan.consecutive.gemCapExtra + 25 }}</strong>
|
||||
Total Gem cap:
|
||||
<strong>{{ Number(hero.purchased.plan.consecutive.gemCapExtra) + 25 }}</strong>
|
||||
</div>
|
||||
<div class="form-inline">
|
||||
<label>
|
||||
@@ -139,13 +152,6 @@ export default {
|
||||
return currentPlanContext.nextHourglassDate.format('MMMM');
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
'hero.purchased.plan.consecutive.count' () { // eslint-disable-line object-shorthand
|
||||
this.hero.purchased.plan.consecutive.gemCapExtra = Math.min(
|
||||
Math.floor(this.hero.purchased.plan.consecutive.count / 3) * 5, 25,
|
||||
);
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
dateFormat (date) {
|
||||
return moment(date).format('YYYY/MM/DD');
|
||||
|
||||
Reference in New Issue
Block a user