feat(records): display gamemode name

This commit is contained in:
Valentin Kaelin 2020-08-28 14:01:43 +02:00
parent 071a18596f
commit 676ad6f20d
2 changed files with 7 additions and 3 deletions

View file

@ -40,13 +40,15 @@
<span class="font-semibold text-white">{{ record.champion.name }}</span>
</div>
</div>
<div
class="mt-6 text-xs font-light text-right text-gray-200 opacity-25"
>match {{ record.gameId }}</div>
<div class="mt-6 text-xs font-light text-right text-gray-200 opacity-25">
<span v-if="hover">match {{ record.gameId }}</span>
<span v-else>{{ gameModes[record.gamemode].name }}</span>
</div>
</div>
</template>
<script>
import { gameModes } from '@/data/data.js'
import { timeDifference } from '@/helpers/functions.js'
export default {
@ -82,6 +84,7 @@ export default {
gradient: 'linear-gradient(180deg, rgba(42, 67, 101, 0.8) 0%, rgba(42, 67, 101, 0.95) 60%, rgba(42, 67, 101, 1) 100%)',
gradientHover: 'linear-gradient(rgba(42, 67, 101, 0.1) 0%, rgba(42, 67, 101, 0.3) 60%, rgba(42, 67, 101, 0.5) 100%)',
hover: false,
gameModes,
}
},

View file

@ -212,6 +212,7 @@ class MatchRepository {
'pentaKills': '$stats.pentaKills',
'result': '$result',
'date': '$date',
'gamemode': '$gamemode',
}
}
}