Rank top label adjustment

pull/1/head
Made Baruna 2022-07-01 23:29:59 +07:00
parent c31219ebb4
commit 0b3be13a76
2 changed files with 27 additions and 7 deletions

View File

@ -484,7 +484,9 @@
"moreTotal": "More pulls than {percentage}% of paimon.moe users", "moreTotal": "More pulls than {percentage}% of paimon.moe users",
"lessTotal": "Less pulls than {percentage}% of paimon.moe users", "lessTotal": "Less pulls than {percentage}% of paimon.moe users",
"moreLuck": "Luckier than {percentage}% of paimon.moe users", "moreLuck": "Luckier than {percentage}% of paimon.moe users",
"lessLuck": "Less lucky than {percentage}% of paimon.moe users" "lessLuck": "Less lucky than {percentage}% of paimon.moe users",
"top": "TOP",
"bottom": "BOTTOM"
} }
}, },
"calculator": { "calculator": {

View File

@ -170,9 +170,15 @@
</p> </p>
</div> </div>
<div class="pl-1"> <div class="pl-1">
<span class="text-sm font-black text-white opacity-75 block leading-none">TOP</span> <span class="text-sm font-black text-white opacity-75 block leading-none">
{$t(`wish.rank.${percentage < 50 ? 'top' : 'bottom'}`)}
</span>
<span class="text-white font-black text-3xl leading-none block" style="line-height: 0.75;"> <span class="text-white font-black text-3xl leading-none block" style="line-height: 0.75;">
{loading.total ? '...' : percentage.toFixed(fixedPoint)}% {loading.total
? '...'
: percentage < 50
? percentage.toFixed(fixedPoint)
: (100 - percentage).toFixed(fixedPoint)}%
</span> </span>
</div> </div>
</div> </div>
@ -198,9 +204,15 @@
</p> </p>
</div> </div>
<div class="pl-1"> <div class="pl-1">
<span class="text-sm font-black text-legendary-from opacity-75 block leading-none">TOP</span> <span class="text-sm font-black text-legendary-from opacity-75 block leading-none">
{loading.legendary ? $t('wish.rank.top') : $t(`wish.rank.${percentageLuck.legendary < 50 ? 'top' : 'bottom'}`)}
</span>
<span class="text-legendary-from font-black text-3xl leading-none block" style="line-height: 0.75;"> <span class="text-legendary-from font-black text-3xl leading-none block" style="line-height: 0.75;">
{loading.legendary ? '...' : percentageLuck.legendary.toFixed(fixedPointLegendary)}% {loading.legendary
? '...'
: percentageLuck.legendary < 50
? percentageLuck.legendary.toFixed(fixedPointLegendary)
: (100 - percentageLuck.legendary).toFixed(fixedPointLegendary)}%
</span> </span>
</div> </div>
</div> </div>
@ -224,9 +236,15 @@
</p> </p>
</div> </div>
<div class="pl-1"> <div class="pl-1">
<span class="text-sm font-black text-rare-from opacity-75 block leading-none">TOP</span> <span class="text-sm font-black text-rare-from opacity-75 block leading-none">
{loading.rare ? $t('wish.rank.top') : $t(`wish.rank.${percentageLuck.rare < 50 ? 'top' : 'bottom'}`)}
</span>
<span class="text-rare-from font-black text-3xl leading-none block" style="line-height: 0.75;"> <span class="text-rare-from font-black text-3xl leading-none block" style="line-height: 0.75;">
{loading.rare ? '...' : percentageLuck.rare.toFixed(fixedPointRare)}% {loading.rare
? '...'
: percentageLuck.rare < 50
? percentageLuck.rare.toFixed(fixedPointRare)
: (100 - percentageLuck.rare).toFixed(fixedPointRare)}%
</span> </span>
</div> </div>
</div> </div>