mirror of
https://github.com/misenhower/splatoon2.ink.git
synced 2026-03-21 17:24:37 -05:00
Fix Splatfest result display with new precision
Splatfest result values are now reported with two decimal points. A value of "5427" means 54.27%.
This commit is contained in:
parent
c8710b2baa
commit
cef292c424
|
|
@ -3,8 +3,8 @@
|
|||
<div class="column">
|
||||
<div class="winner-mark-shadow" v-if="winner == 'alpha'"></div>
|
||||
<div class="winner-mark" :style="{ background: festival.colors.alpha.css_rgb }" v-if="winner == 'alpha'"></div>
|
||||
<div class="font-splatoon1 title is-4" :title="alphaTitle | numberFormat">
|
||||
<div>{{ results.rates[type].alpha }}<span class="percent">{{ $t('splatfest.results.%') }}</span></div>
|
||||
<div class="font-splatoon2 title is-4" :title="alphaTitle | numberFormat">
|
||||
<div>{{ results.rates[type].alpha | wholePercent }}<span class="percent">.{{ results.rates[type].alpha | partialPercent }}{{ $t('splatfest.results.%') }}</span></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
@ -15,8 +15,8 @@
|
|||
<div class="column">
|
||||
<div class="winner-mark-shadow" v-if="winner == 'bravo'"></div>
|
||||
<div class="winner-mark" :style="{ background: festival.colors.bravo.css_rgb }" v-if="winner == 'bravo'"></div>
|
||||
<div class="font-splatoon1 title is-4" :title="bravoTitle | numberFormat">
|
||||
<div>{{ results.rates[type].bravo }}<span class="percent">{{ $t('splatfest.results.%') }}</span></div>
|
||||
<div class="font-splatoon2 title is-4" :title="bravoTitle | numberFormat">
|
||||
<div>{{ results.rates[type].bravo | wholePercent }}<span class="percent">.{{ results.rates[type].bravo | partialPercent }}{{ $t('splatfest.results.%') }}</span></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -36,6 +36,14 @@ export default {
|
|||
return this.resultTitle('bravo');
|
||||
},
|
||||
},
|
||||
filters: {
|
||||
wholePercent(value) {
|
||||
return value.toString().slice(0, -2);
|
||||
},
|
||||
partialPercent(value) {
|
||||
return value.toString().slice(-2);
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
resultTitle(team) {
|
||||
if (this.type == 'vote')
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user