feat: add preseason 11 timestamp

This commit is contained in:
Valentin Kaelin 2020-11-13 21:54:29 +01:00
parent acb496c93c
commit ec9930296d
2 changed files with 10 additions and 2 deletions

View file

@ -8,11 +8,15 @@
>
<option :value="null" class="bg-blue-800">All seasons</option>
<option
v-for="(s, index) in seasons"
v-for="(s, index) in sortedSeasons"
:key="index"
:value="s"
class="bg-blue-800"
>Season {{ s }}</option>
>
<template v-if="Number.isInteger(s)">Season {{ s }}</template>
<!-- Preseason numbers are stored in this format: 10.5 for Preseason 11 -->
<template v-else>Preseason {{ s + 0.5 }}</template>
</option>
</select>
<div
class="absolute inset-y-0 right-0 flex items-center px-2 text-gray-700 pointer-events-none"
@ -35,6 +39,9 @@ export default {
},
computed: {
sortedSeasons() {
return [...this.seasons].sort((a, b) => b - a)
},
...mapState({
currentseason: state => state.summoner.basic.currentSeason,
seasons: state => state.summoner.basic.seasons,

View file

@ -18,6 +18,7 @@ export const queuesWithRole = [
export const seasons = {
0: 9,
1578628800000: 10,
1604970061000: 10.5, // Preseason 11
}
/**