Fixed streak bonus style (#9608)

This commit is contained in:
Keith Holliday
2017-11-30 12:37:53 -06:00
committed by GitHub
parent 4e73c8513e
commit d9e09a5f3d
3 changed files with 9 additions and 2 deletions

View File

@@ -247,7 +247,7 @@ export default {
// Append Bonus // Append Bonus
if (money > 0 && Boolean(bonus)) { if (money > 0 && Boolean(bonus)) {
if (bonus < 0.01) bonus = 0.01; if (bonus < 0.01) bonus = 0.01;
this.text(`+ ${this.coins(bonus)} ${this.$t('streakCoins')}`); this.streak(`+ ${this.coins(bonus)}`);
delete this.user._tmp.streakBonus; delete this.user._tmp.streakBonus;
} }
}, },

View File

@@ -4,6 +4,12 @@ transition(name="fade")
.row(v-if='notification.type === "error"') .row(v-if='notification.type === "error"')
.text.col-12 .text.col-12
div(v-html='notification.text') div(v-html='notification.text')
.row(v-if='notification.type === "streak"')
.text.col-7.offset-1
div {{message}}
.icon.col-4
div.svg-icon(v-html="icons.gold")
div(v-html='notification.text')
.row(v-if='["hp", "gp", "xp", "mp"].indexOf(notification.type) !== -1') .row(v-if='["hp", "gp", "xp", "mp"].indexOf(notification.type) !== -1')
.text.col-7.offset-1 .text.col-7.offset-1
div div
@@ -145,6 +151,7 @@ export default {
if (this.notification.type === 'mp') localeKey += 'Mana'; if (this.notification.type === 'mp') localeKey += 'Mana';
if (this.notification.type === 'xp') localeKey += 'Experience'; if (this.notification.type === 'xp') localeKey += 'Experience';
if (this.notification.type === 'gp') localeKey += 'Gold'; if (this.notification.type === 'gp') localeKey += 'Gold';
if (this.notification.type === 'streak') localeKey = 'streakCoins';
return this.$t(localeKey); return this.$t(localeKey);
// This requires eight translatable strings, but that gives the translators the most flexibility for matching gender/number and for using idioms for lost/spent/used/gained. // This requires eight translatable strings, but that gives the translators the most flexibility for matching gender/number and for using idioms for lost/spent/used/gained.
}, },

View File

@@ -52,7 +52,7 @@ export default {
})); }));
}, },
streak (val) { streak (val) {
this.notify(`${this.$t('streaks')}: ${val}`, 'streak', 'glyphicon glyphicon-repeat'); this.notify(`${val}`, 'streak');
}, },
text (val, onClick) { text (val, onClick) {
if (!val) return; if (!val) return;