2019-03-30 22:55:48 +00:00
|
|
|
<template>
|
2019-11-03 17:49:58 +00:00
|
|
|
<li class="ml-4 relative">
|
2019-11-17 16:26:36 +00:00
|
|
|
<Ripple
|
|
|
|
|
@click.native="displayDetails"
|
|
|
|
|
color="rgba(43, 108, 176, 0.7)"
|
2020-02-01 16:14:03 +00:00
|
|
|
:class="[data.result, showDetails ? 'rounded-t-lg' : 'rounded-lg', {'mt-4': indexMatch !== 0 }]"
|
|
|
|
|
class="match relative bg-blue-800 text-white text-base cursor-pointer hover:shadow-xl"
|
2019-09-24 16:08:03 +00:00
|
|
|
>
|
2019-11-14 20:22:01 +00:00
|
|
|
<div class="relative flex flex-wrap px-5 py-3">
|
2019-10-25 21:09:33 +00:00
|
|
|
<div class="first w-4/12 text-left">
|
2019-09-16 19:20:48 +00:00
|
|
|
<div>
|
|
|
|
|
<div
|
|
|
|
|
class="h-6 text-lg text-teal-500 font-extrabold uppercase leading-none"
|
2019-09-20 21:32:28 +00:00
|
|
|
>{{ data.champion.name }}</div>
|
2019-09-16 19:20:48 +00:00
|
|
|
|
|
|
|
|
<div class="flex">
|
2019-09-19 17:26:44 +00:00
|
|
|
<div class="flex flex-col justify-end items-center">
|
2019-09-16 19:20:48 +00:00
|
|
|
<div
|
2019-09-19 17:26:44 +00:00
|
|
|
v-if="data.role !== 'NONE'"
|
|
|
|
|
:style="{backgroundImage: `url(${require('@/assets/img/roles/' + data.role + '.png')})`}"
|
2019-09-24 16:08:03 +00:00
|
|
|
class="w-10 h-10 bg-center bg-cover"
|
2019-09-16 19:20:48 +00:00
|
|
|
></div>
|
2019-09-20 21:32:28 +00:00
|
|
|
<div
|
|
|
|
|
class="w-10 text-center text-xs text-teal-500 font-extrabold"
|
|
|
|
|
>LVL {{ data.level }}</div>
|
2019-09-16 19:20:48 +00:00
|
|
|
</div>
|
|
|
|
|
<div
|
2019-11-25 20:15:52 +00:00
|
|
|
:style="{backgroundImage: `url('${data.champion.icon}')`}"
|
2019-10-12 14:34:05 +00:00
|
|
|
class="ml-2 w-16 h-16 crop-champion bg-blue-1000 rounded-lg"
|
2019-09-16 19:20:48 +00:00
|
|
|
></div>
|
2019-10-12 14:34:05 +00:00
|
|
|
<div class="ml-2 flex flex-col justify-around">
|
2019-09-16 19:20:48 +00:00
|
|
|
<div
|
2019-09-19 17:26:44 +00:00
|
|
|
:style="{backgroundImage: `url(${data.firstSum})`}"
|
2019-09-24 16:08:03 +00:00
|
|
|
class="w-6 h-6 bg-blue-1000 rounded-md bg-center bg-cover"
|
2019-09-16 19:20:48 +00:00
|
|
|
></div>
|
|
|
|
|
<div
|
2019-09-19 17:26:44 +00:00
|
|
|
:style="{backgroundImage: `url(${data.secondSum})`}"
|
2019-09-24 16:08:03 +00:00
|
|
|
class="w-6 h-6 bg-blue-1000 rounded-md bg-center bg-cover"
|
2019-09-16 19:20:48 +00:00
|
|
|
></div>
|
|
|
|
|
</div>
|
2019-10-12 14:34:05 +00:00
|
|
|
<div class="ml-1 flex flex-col justify-around">
|
2019-09-16 19:20:48 +00:00
|
|
|
<div
|
2019-10-05 22:01:58 +00:00
|
|
|
:style="[data.primaryRune ? {background: `url(${data.primaryRune}) center/cover`} : '']"
|
2019-09-24 16:08:03 +00:00
|
|
|
class="w-6 h-6 bg-blue-1000 rounded-md"
|
2019-09-16 19:20:48 +00:00
|
|
|
></div>
|
|
|
|
|
<div
|
2019-10-05 22:01:58 +00:00
|
|
|
:style="[data.secondaryRune ? {background: `url(${data.secondaryRune}) center/cover`} : '']"
|
2019-09-24 16:08:03 +00:00
|
|
|
class="w-6 h-6 bg-blue-1000 rounded-md"
|
2019-09-16 19:20:48 +00:00
|
|
|
></div>
|
|
|
|
|
</div>
|
2019-10-25 21:09:33 +00:00
|
|
|
<div class="mx-auto flex flex-col justify-center items-center leading-none">
|
|
|
|
|
<div class="text-xl font-extrabold text-teal-500">
|
2019-11-06 17:46:45 +00:00
|
|
|
<span class>{{ data.stats.kills }}</span>
|
2019-09-16 19:20:48 +00:00
|
|
|
<span class>/</span>
|
2019-11-06 17:46:45 +00:00
|
|
|
<span class>{{ data.stats.deaths }}</span>
|
2019-09-16 19:20:48 +00:00
|
|
|
<span class>/</span>
|
2019-11-06 17:46:45 +00:00
|
|
|
<span class>{{ data.stats.assists }}</span>
|
2019-09-16 19:20:48 +00:00
|
|
|
</div>
|
2019-11-25 20:15:52 +00:00
|
|
|
<div
|
|
|
|
|
class="relative z-30 mt-2 text-white text-xs font-extrabold"
|
|
|
|
|
>{{ data.stats.kda }} KDA</div>
|
2019-09-16 19:20:48 +00:00
|
|
|
</div>
|
2019-08-23 14:48:16 +00:00
|
|
|
</div>
|
2019-03-30 22:55:48 +00:00
|
|
|
|
2019-09-16 19:20:48 +00:00
|
|
|
<div
|
2019-11-18 16:30:28 +00:00
|
|
|
class="relative z-30 h-6 flex items-end text-sm text-white font-extrabold leading-none"
|
2019-11-08 14:39:56 +00:00
|
|
|
>{{ data.gamemode.name }}</div>
|
2019-09-16 19:20:48 +00:00
|
|
|
</div>
|
2019-08-23 14:48:16 +00:00
|
|
|
</div>
|
2019-03-30 22:55:48 +00:00
|
|
|
|
2019-10-25 21:09:33 +00:00
|
|
|
<div class="second w-3/12 py-6 flex items-center">
|
2019-11-14 20:22:01 +00:00
|
|
|
<MatchItems :items="data.items" />
|
2019-03-30 22:55:48 +00:00
|
|
|
|
2019-11-18 16:30:28 +00:00
|
|
|
<div class="relative z-30 ml-4 leading-none">
|
2019-09-16 19:20:48 +00:00
|
|
|
<div class="flex items-center">
|
2020-02-14 19:02:30 +00:00
|
|
|
<svg style="width: 15px; height: 15px;">
|
|
|
|
|
<use xlink:href="#creeps" />
|
|
|
|
|
</svg>
|
2019-10-25 21:09:33 +00:00
|
|
|
<div class="ml-1 text-teal-300 text-sm font-bold">
|
2019-11-03 19:59:21 +00:00
|
|
|
{{ data.stats.minions }}
|
2019-09-16 19:20:48 +00:00
|
|
|
<span class="font-normal">cs</span>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="flex items-center">
|
2020-02-14 19:02:30 +00:00
|
|
|
<svg style="width: 15px; height: 15px;">
|
|
|
|
|
<use xlink:href="#gold" />
|
|
|
|
|
</svg>
|
2019-12-16 20:15:10 +00:00
|
|
|
<div class="ml-1 gold text-sm font-bold">{{ data.stats.gold|kilo }}</div>
|
2019-08-23 14:48:16 +00:00
|
|
|
</div>
|
2019-09-16 19:20:48 +00:00
|
|
|
<div class="flex items-center">
|
2020-02-14 19:02:30 +00:00
|
|
|
<svg style="width: 15px; height: 15px;">
|
|
|
|
|
<use xlink:href="#damage" />
|
|
|
|
|
</svg>
|
2019-12-16 20:15:10 +00:00
|
|
|
<div class="ml-1 damage text-sm font-bold">{{ data.stats.dmgChamp|kilo }}</div>
|
2019-09-16 19:20:48 +00:00
|
|
|
</div>
|
|
|
|
|
<div class="flex items-center">
|
2020-02-14 19:02:30 +00:00
|
|
|
<svg style="width: 15px; height: 15px;">
|
|
|
|
|
<use xlink:href="#kill-participation" />
|
|
|
|
|
</svg>
|
2019-11-14 20:22:01 +00:00
|
|
|
<div class="ml-1 kp text-sm font-bold">{{ data.stats.kp|percent }}</div>
|
2019-04-04 20:29:37 +00:00
|
|
|
</div>
|
|
|
|
|
</div>
|
2019-09-16 19:20:48 +00:00
|
|
|
</div>
|
|
|
|
|
|
2019-11-18 16:30:28 +00:00
|
|
|
<div class="relative z-30 third w-5/12 py-1 flex items-center">
|
2019-10-05 22:01:58 +00:00
|
|
|
<div v-if="data.allyTeam.length > 1">
|
2019-09-20 21:32:28 +00:00
|
|
|
<div
|
|
|
|
|
v-for="(ally, index) in data.allyTeam"
|
|
|
|
|
:key="'player-' + index"
|
2019-10-25 21:09:33 +00:00
|
|
|
class="ml-4 flex items-center leading-none"
|
2019-09-20 21:32:28 +00:00
|
|
|
>
|
2019-11-03 17:49:58 +00:00
|
|
|
<div
|
2020-01-20 20:54:04 +00:00
|
|
|
:class="isSummonerProfile(ally.account_id)"
|
2019-11-03 17:49:58 +00:00
|
|
|
class="w-16 text-right overflow-hidden text-overflow whitespace-no-wrap text-xs text-blue-200 font-medium"
|
|
|
|
|
>{{ ally.name }}</div>
|
2019-09-20 21:32:28 +00:00
|
|
|
<div
|
|
|
|
|
:class="index !== 0 ? '-mt-1': ''"
|
2019-11-25 20:15:52 +00:00
|
|
|
:style="{backgroundImage: `url('${ally.champion.icon}')`}"
|
2019-09-24 16:08:03 +00:00
|
|
|
class="ml-1 w-6 h-6 bg-blue-1000 bg-center bg-cover rounded-full overflow-hidden"
|
2019-09-20 21:32:28 +00:00
|
|
|
></div>
|
|
|
|
|
<div
|
|
|
|
|
class="mx-3 w-4 h-4 bg-center bg-cover"
|
|
|
|
|
:style="{backgroundImage: `url(${require('@/assets/img/roles/' + roles[index] + '.png')})`}"
|
|
|
|
|
></div>
|
|
|
|
|
<div
|
|
|
|
|
:class="index !== 0 ? '-mt-1' : ''"
|
2019-11-25 20:15:52 +00:00
|
|
|
:style="{backgroundImage: `url('${data.enemyTeam[index].champion.icon}')`}"
|
2019-09-24 16:08:03 +00:00
|
|
|
class="w-6 h-6 bg-blue-1000 bg-center bg-cover rounded-full"
|
2019-09-20 21:32:28 +00:00
|
|
|
></div>
|
2019-11-03 17:49:58 +00:00
|
|
|
<div
|
2019-11-08 15:10:20 +00:00
|
|
|
class="ml-1 w-16 text-left overflow-hidden text-overflow whitespace-no-wrap text-xs text-blue-200 font-medium"
|
2019-11-03 17:49:58 +00:00
|
|
|
>{{ data.enemyTeam[index].name }}</div>
|
2019-09-20 21:32:28 +00:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="ml-auto flex flex-col items-center justify-center">
|
2020-02-14 19:02:30 +00:00
|
|
|
<svg class="w-5 h-5 text-blue-200">
|
|
|
|
|
<use xlink:href="#stopwatch" />
|
|
|
|
|
</svg>
|
2019-11-08 14:39:56 +00:00
|
|
|
<div class="text-lg text-teal-400 font-medium">{{ data.time|secToTime }}</div>
|
2020-02-13 19:16:13 +00:00
|
|
|
<Tooltip>
|
2019-11-28 09:06:27 +00:00
|
|
|
<template v-slot:trigger>
|
|
|
|
|
<div class="text-xs text-white font-medium">{{ data.date }}</div>
|
|
|
|
|
</template>
|
|
|
|
|
<template v-slot:default>
|
|
|
|
|
<div class="px-2 text-white text-center text-xs leading-tight select-none">
|
|
|
|
|
<svg class="w-4 h-4 mx-auto text-teal-400">
|
|
|
|
|
<use xlink:href="#time" />
|
|
|
|
|
</svg>
|
|
|
|
|
<div class="mt-1">{{ data.fullDate.date }}</div>
|
|
|
|
|
<div>{{ data.fullDate.time }}</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
2020-02-13 19:16:13 +00:00
|
|
|
</Tooltip>
|
2019-08-23 14:48:16 +00:00
|
|
|
</div>
|
2019-03-30 22:55:48 +00:00
|
|
|
</div>
|
|
|
|
|
</div>
|
2019-11-17 16:26:36 +00:00
|
|
|
</Ripple>
|
2019-11-03 17:49:58 +00:00
|
|
|
<DetailedMatch :data="getMatchDetails(data.gameId) || {}" :details-open="showDetails" />
|
2019-03-30 22:55:48 +00:00
|
|
|
</li>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
2019-11-03 17:49:58 +00:00
|
|
|
import { mapActions, mapState, mapGetters } from 'vuex'
|
2020-02-13 19:16:13 +00:00
|
|
|
import Tooltip from '@/components/Common/Tooltip.vue'
|
|
|
|
|
import DetailedMatch from '@/components/Match/DetailedMatch.vue'
|
|
|
|
|
import MatchItems from '@/components/Match/MatchItems.vue'
|
|
|
|
|
import Ripple from '@/components/Common/Ripple.vue'
|
2019-03-30 22:55:48 +00:00
|
|
|
|
|
|
|
|
export default {
|
2019-11-03 17:49:58 +00:00
|
|
|
components: {
|
2019-11-14 20:22:01 +00:00
|
|
|
DetailedMatch,
|
2020-02-13 19:16:13 +00:00
|
|
|
Tooltip,
|
2019-11-14 20:22:01 +00:00
|
|
|
MatchItems,
|
2019-11-17 16:26:36 +00:00
|
|
|
Ripple,
|
2019-11-03 17:49:58 +00:00
|
|
|
},
|
|
|
|
|
|
2019-03-30 22:55:48 +00:00
|
|
|
props: {
|
2019-08-23 14:48:16 +00:00
|
|
|
data: {
|
|
|
|
|
type: Object,
|
|
|
|
|
required: true
|
2019-09-16 19:20:48 +00:00
|
|
|
},
|
2020-02-01 16:14:03 +00:00
|
|
|
indexMatch: {
|
|
|
|
|
type: Number,
|
|
|
|
|
default: -1,
|
|
|
|
|
}
|
2019-09-16 19:20:48 +00:00
|
|
|
},
|
|
|
|
|
|
2019-11-03 17:49:58 +00:00
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
showDetails: false
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
|
2019-09-16 19:20:48 +00:00
|
|
|
computed: {
|
2019-09-20 21:32:28 +00:00
|
|
|
...mapState({
|
2020-01-20 20:54:04 +00:00
|
|
|
account: state => state.summoner.basic.account,
|
2019-09-20 21:32:28 +00:00
|
|
|
roles: state => state.roles
|
|
|
|
|
}),
|
2019-11-03 17:49:58 +00:00
|
|
|
...mapGetters('detailedMatch', ['getMatchDetails']),
|
2019-09-22 15:39:29 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
|
|
methods: {
|
2019-11-03 17:49:58 +00:00
|
|
|
displayDetails() {
|
|
|
|
|
this.showDetails = !this.showDetails
|
|
|
|
|
|
|
|
|
|
if (!this.getMatchDetails(this.data.gameId)) {
|
|
|
|
|
this.matchDetails(this.data.gameId)
|
|
|
|
|
}
|
|
|
|
|
},
|
2020-01-20 20:54:04 +00:00
|
|
|
isSummonerProfile(account_id) {
|
2019-09-22 15:39:29 +00:00
|
|
|
return {
|
2020-01-20 20:54:04 +00:00
|
|
|
'font-bold': this.account.accountId === account_id
|
2019-09-22 15:39:29 +00:00
|
|
|
}
|
2019-11-03 17:49:58 +00:00
|
|
|
},
|
|
|
|
|
...mapActions('detailedMatch', ['matchDetails']),
|
2019-03-30 22:55:48 +00:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style scoped>
|
2019-09-24 16:08:03 +00:00
|
|
|
.match {
|
2019-11-03 17:49:58 +00:00
|
|
|
transition-duration: 0.3s;
|
|
|
|
|
transition-timing-function: cubic-bezier(0, 1, 0.5, 1);
|
2019-09-24 16:08:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.game-status {
|
|
|
|
|
top: 50%;
|
2019-10-25 21:09:33 +00:00
|
|
|
left: 6px;
|
2019-09-24 16:08:03 +00:00
|
|
|
transform: translateY(-50%) rotate(-90deg);
|
2019-03-30 22:55:48 +00:00
|
|
|
}
|
|
|
|
|
|
2019-09-16 19:20:48 +00:00
|
|
|
.crop-champion {
|
|
|
|
|
background-size: 74px;
|
|
|
|
|
background-position: center;
|
2019-03-30 22:55:48 +00:00
|
|
|
}
|
|
|
|
|
|
2019-09-16 19:20:48 +00:00
|
|
|
.gold {
|
|
|
|
|
color: #f3a05a;
|
2019-03-30 22:55:48 +00:00
|
|
|
}
|
|
|
|
|
|
2019-09-16 19:20:48 +00:00
|
|
|
.damage {
|
|
|
|
|
color: #e25656;
|
2019-03-30 22:55:48 +00:00
|
|
|
}
|
|
|
|
|
|
2019-09-16 19:20:48 +00:00
|
|
|
.kp {
|
|
|
|
|
color: #b78787;
|
2019-03-30 22:55:48 +00:00
|
|
|
}
|
|
|
|
|
</style>
|