mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-18 07:07:35 +01:00
Fixed streak bonus style (#9608)
This commit is contained in:
@@ -247,7 +247,7 @@ export default {
|
||||
// Append Bonus
|
||||
if (money > 0 && Boolean(bonus)) {
|
||||
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;
|
||||
}
|
||||
},
|
||||
|
||||
@@ -4,6 +4,12 @@ transition(name="fade")
|
||||
.row(v-if='notification.type === "error"')
|
||||
.text.col-12
|
||||
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')
|
||||
.text.col-7.offset-1
|
||||
div
|
||||
@@ -145,6 +151,7 @@ export default {
|
||||
if (this.notification.type === 'mp') localeKey += 'Mana';
|
||||
if (this.notification.type === 'xp') localeKey += 'Experience';
|
||||
if (this.notification.type === 'gp') localeKey += 'Gold';
|
||||
if (this.notification.type === 'streak') localeKey = 'streakCoins';
|
||||
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.
|
||||
},
|
||||
|
||||
@@ -52,7 +52,7 @@ export default {
|
||||
}));
|
||||
},
|
||||
streak (val) {
|
||||
this.notify(`${this.$t('streaks')}: ${val}`, 'streak', 'glyphicon glyphicon-repeat');
|
||||
this.notify(`${val}`, 'streak');
|
||||
},
|
||||
text (val, onClick) {
|
||||
if (!val) return;
|
||||
|
||||
Reference in New Issue
Block a user