mirror of
https://github.com/vkaelin/LeagueStats.git
synced 2026-03-25 21:07:27 +00:00
feat: add series score if the summoner is in BO
This commit is contained in:
parent
1d1e27e31c
commit
cb3997529d
1 changed files with 21 additions and 0 deletions
|
|
@ -18,6 +18,14 @@
|
||||||
class="ml-2 text-teal-500 text-3xl uppercase font-extrabold"
|
class="ml-2 text-teal-500 text-3xl uppercase font-extrabold"
|
||||||
>{{ selectedLeague.fullRank }}</div>
|
>{{ selectedLeague.fullRank }}</div>
|
||||||
<div class="ml-4 text-2xl font-extrabold">{{ selectedLeague.leaguePoints }} LP</div>
|
<div class="ml-4 text-2xl font-extrabold">{{ selectedLeague.leaguePoints }} LP</div>
|
||||||
|
<div v-if="selectedLeague.miniSeries" class="ml-2 flex items-center p-2 bg-blue-800 rounded ">
|
||||||
|
<div
|
||||||
|
v-for="(result, index) in bo"
|
||||||
|
:key="index + result"
|
||||||
|
:class="[{'ml-1': index !== 0}, boGame(result)]"
|
||||||
|
class="w-3 h-3 rounded-full"
|
||||||
|
></div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex mt-2 items-center">
|
<div class="flex mt-2 items-center">
|
||||||
<div class="relative inline-block text-white">
|
<div class="relative inline-block text-white">
|
||||||
|
|
@ -85,6 +93,9 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
computed: {
|
computed: {
|
||||||
|
bo() {
|
||||||
|
return this.selectedLeague.miniSeries.progress.split('')
|
||||||
|
},
|
||||||
colorBorder() {
|
colorBorder() {
|
||||||
if (!this.selectedLeague.tier || this.selectedLeague.leaguePoints === 0) {
|
if (!this.selectedLeague.tier || this.selectedLeague.leaguePoints === 0) {
|
||||||
return '#2c5282'
|
return '#2c5282'
|
||||||
|
|
@ -122,6 +133,16 @@ export default {
|
||||||
|
|
||||||
this.triggerAnimation()
|
this.triggerAnimation()
|
||||||
},
|
},
|
||||||
|
boGame(result) {
|
||||||
|
switch (result) {
|
||||||
|
case 'W':
|
||||||
|
return 'bg-green-400'
|
||||||
|
case 'L':
|
||||||
|
return 'bg-red-400'
|
||||||
|
default:
|
||||||
|
return 'bg-blue-200'
|
||||||
|
}
|
||||||
|
},
|
||||||
triggerAnimation() {
|
triggerAnimation() {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
if (this.currentDegree < 360 && this.currentDegree < this.leagueDegrees)
|
if (this.currentDegree < 360 && this.currentDegree < this.leagueDegrees)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue