2019-03-30 22:55:48 +00:00
|
|
|
<template>
|
2020-06-11 18:55:39 +00:00
|
|
|
<li class="relative ml-4">
|
2019-11-17 16:26:36 +00:00
|
|
|
<Ripple
|
|
|
|
|
@click.native="displayDetails"
|
|
|
|
|
color="rgba(43, 108, 176, 0.7)"
|
2023-09-20 20:01:43 +00:00
|
|
|
:class="[
|
|
|
|
|
data.result,
|
|
|
|
|
showDetails ? 'rounded-t-lg' : 'rounded-lg',
|
|
|
|
|
{ 'mt-4': indexMatch !== 0 },
|
|
|
|
|
]"
|
2020-06-11 18:55:39 +00:00
|
|
|
class="relative text-base text-white bg-blue-800 cursor-pointer match 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">
|
2020-04-01 12:14:03 +00:00
|
|
|
<div
|
|
|
|
|
v-if="data.newMatch"
|
2020-06-11 18:55:39 +00:00
|
|
|
class="absolute top-0 right-0 px-2 rounded-full new-match text-xxs"
|
2023-09-20 20:01:43 +00:00
|
|
|
style="margin: 0.35rem 0.35rem 0 0; background-color: rgba(99, 179, 237, 0.2)"
|
|
|
|
|
>
|
|
|
|
|
New
|
|
|
|
|
</div>
|
2020-06-11 18:55:39 +00:00
|
|
|
<div class="w-4/12 text-left first">
|
2019-09-16 19:20:48 +00:00
|
|
|
<div>
|
2023-09-20 20:01:43 +00:00
|
|
|
<div class="h-6 text-lg font-extrabold leading-none text-teal-500 uppercase">
|
|
|
|
|
{{ data.champion.name }}
|
|
|
|
|
</div>
|
2019-09-16 19:20:48 +00:00
|
|
|
|
|
|
|
|
<div class="flex">
|
2020-06-11 18:55:39 +00:00
|
|
|
<div class="flex flex-col items-center justify-end">
|
2019-09-16 19:20:48 +00:00
|
|
|
<div
|
2019-09-19 17:26:44 +00:00
|
|
|
v-if="data.role !== 'NONE'"
|
2023-09-20 20:01:43 +00:00
|
|
|
:style="{ backgroundImage: `url(${'/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>
|
2023-09-20 20:01:43 +00:00
|
|
|
<div class="w-10 text-xs font-extrabold text-center text-teal-500">
|
|
|
|
|
LVL {{ data.level }}
|
|
|
|
|
</div>
|
2019-09-16 19:20:48 +00:00
|
|
|
</div>
|
|
|
|
|
<div
|
2023-09-20 20:01:43 +00:00
|
|
|
:style="{ backgroundImage: `url('${data.champion.icon}')` }"
|
2020-06-11 18:55:39 +00:00
|
|
|
class="w-16 h-16 ml-2 rounded-lg crop-champion bg-blue-1000"
|
2019-09-16 19:20:48 +00:00
|
|
|
></div>
|
2020-06-11 18:55:39 +00:00
|
|
|
<div class="flex flex-col justify-around ml-2">
|
2019-09-16 19:20:48 +00:00
|
|
|
<div
|
2021-09-17 22:01:06 +00:00
|
|
|
v-if="data.summonerSpell1"
|
2023-09-20 20:01:43 +00:00
|
|
|
:style="{ backgroundImage: `url(${data.summonerSpell1.icon})` }"
|
2020-06-11 18:55:39 +00:00
|
|
|
class="w-6 h-6 bg-center bg-cover rounded-md bg-blue-1000"
|
2019-09-16 19:20:48 +00:00
|
|
|
></div>
|
2023-09-20 20:01:43 +00:00
|
|
|
<div v-else class="w-6 h-6 rounded-md bg-blue-1000"></div>
|
2021-09-17 22:01:06 +00:00
|
|
|
<div
|
|
|
|
|
v-if="data.summonerSpell2"
|
2023-09-20 20:01:43 +00:00
|
|
|
:style="{ backgroundImage: `url(${data.summonerSpell2.icon})` }"
|
2020-06-11 18:55:39 +00:00
|
|
|
class="w-6 h-6 bg-center bg-cover rounded-md bg-blue-1000"
|
2019-09-16 19:20:48 +00:00
|
|
|
></div>
|
2023-09-20 20:01:43 +00:00
|
|
|
<div v-else class="w-6 h-6 rounded-md bg-blue-1000"></div>
|
2019-09-16 19:20:48 +00:00
|
|
|
</div>
|
2020-06-11 18:55:39 +00:00
|
|
|
<div class="flex flex-col justify-around ml-1">
|
2019-09-16 19:20:48 +00:00
|
|
|
<div
|
2023-09-20 20:01:43 +00:00
|
|
|
:style="[
|
|
|
|
|
data.primaryRune ? { background: `url(${data.primaryRune}) center/cover` } : '',
|
|
|
|
|
]"
|
2020-06-11 18:55:39 +00:00
|
|
|
class="w-6 h-6 rounded-md bg-blue-1000"
|
2019-09-16 19:20:48 +00:00
|
|
|
></div>
|
|
|
|
|
<div
|
2023-09-20 20:01:43 +00:00
|
|
|
:style="[
|
|
|
|
|
data.secondaryRune
|
|
|
|
|
? { background: `url(${data.secondaryRune}) center/cover` }
|
|
|
|
|
: '',
|
|
|
|
|
]"
|
2020-06-11 18:55:39 +00:00
|
|
|
class="w-6 h-6 rounded-md bg-blue-1000"
|
2019-09-16 19:20:48 +00:00
|
|
|
></div>
|
|
|
|
|
</div>
|
2020-06-11 18:55:39 +00:00
|
|
|
<div class="flex flex-col items-center justify-center mx-auto leading-none">
|
2019-10-25 21:09:33 +00:00
|
|
|
<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>
|
2023-09-20 20:01:43 +00:00
|
|
|
<div class="relative z-30 mt-2 text-xs font-extrabold text-white">
|
|
|
|
|
{{ 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
|
2020-06-11 18:55:39 +00:00
|
|
|
class="relative z-30 flex items-end h-6 text-sm font-extrabold leading-none text-white"
|
2023-09-20 20:01:43 +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
|
|
|
|
2020-06-11 18:55:39 +00:00
|
|
|
<div class="flex items-center w-3/12 py-6 second">
|
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">
|
2023-09-20 20:01:43 +00:00
|
|
|
<svg style="width: 15px; height: 15px">
|
2020-02-14 19:02:30 +00:00
|
|
|
<use xlink:href="#creeps" />
|
|
|
|
|
</svg>
|
2020-06-11 18:55:39 +00:00
|
|
|
<div class="ml-1 text-sm font-bold text-teal-300">
|
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">
|
2023-09-20 20:01:43 +00:00
|
|
|
<svg style="width: 15px; height: 15px">
|
2020-02-14 19:02:30 +00:00
|
|
|
<use xlink:href="#gold" />
|
|
|
|
|
</svg>
|
2023-09-20 20:01:43 +00:00
|
|
|
<div class="ml-1 text-sm font-bold gold">{{ 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">
|
2023-09-20 20:01:43 +00:00
|
|
|
<svg style="width: 15px; height: 15px">
|
2020-02-14 19:02:30 +00:00
|
|
|
<use xlink:href="#damage" />
|
|
|
|
|
</svg>
|
2023-09-20 20:01:43 +00:00
|
|
|
<div class="ml-1 text-sm font-bold damage">{{ data.stats.dmgChamp | kilo }}</div>
|
2019-09-16 19:20:48 +00:00
|
|
|
</div>
|
|
|
|
|
<div class="flex items-center">
|
2023-09-20 20:01:43 +00:00
|
|
|
<svg style="width: 15px; height: 15px">
|
2020-02-14 19:02:30 +00:00
|
|
|
<use xlink:href="#kill-participation" />
|
|
|
|
|
</svg>
|
2023-09-20 20:01:43 +00:00
|
|
|
<div class="ml-1 text-sm font-bold kp">{{ data.stats.kp | percent }}</div>
|
2019-04-04 20:29:37 +00:00
|
|
|
</div>
|
|
|
|
|
</div>
|
2019-09-16 19:20:48 +00:00
|
|
|
</div>
|
|
|
|
|
|
2020-06-21 11:21:48 +00:00
|
|
|
<div class="flex items-center w-5/12 py-1 third">
|
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"
|
2020-06-11 18:55:39 +00:00
|
|
|
class="flex items-center ml-4 leading-none"
|
2019-09-20 21:32:28 +00:00
|
|
|
>
|
2020-06-21 11:21:48 +00:00
|
|
|
<router-link
|
2020-06-21 19:23:09 +00:00
|
|
|
v-if="ally.account_id !== '0' && account.accountId !== ally.account_id"
|
2020-06-21 11:21:48 +00:00
|
|
|
@click.native="$event.stopImmediatePropagation()"
|
2023-09-20 20:01:43 +00:00
|
|
|
:to="{
|
|
|
|
|
name: 'summoner',
|
|
|
|
|
params: { region: $route.params.region, name: ally.name },
|
|
|
|
|
}"
|
2020-06-21 11:21:48 +00:00
|
|
|
:class="isSummonerProfile(ally.account_id)"
|
2023-09-20 21:43:14 +00:00
|
|
|
class="w-16 overflow-hidden text-xs font-medium text-right whitespace-nowrap hover:text-white text-overflow"
|
2023-09-20 20:01:43 +00:00
|
|
|
>{{ ally.name }}</router-link
|
|
|
|
|
>
|
2019-11-03 17:49:58 +00:00
|
|
|
<div
|
2020-06-21 11:21:48 +00:00
|
|
|
v-else
|
2020-01-20 20:54:04 +00:00
|
|
|
:class="isSummonerProfile(ally.account_id)"
|
2023-09-20 21:43:14 +00:00
|
|
|
class="w-16 overflow-hidden text-xs font-medium text-right whitespace-nowrap text-overflow"
|
2023-09-20 20:01:43 +00:00
|
|
|
>
|
|
|
|
|
{{ ally.name }}
|
|
|
|
|
</div>
|
2019-09-20 21:32:28 +00:00
|
|
|
<div
|
2023-09-20 20:01:43 +00:00
|
|
|
:class="index !== 0 ? '-mt-1' : ''"
|
|
|
|
|
:style="{ backgroundImage: `url('${ally.champion.icon}')` }"
|
2020-06-11 18:55:39 +00:00
|
|
|
class="w-6 h-6 ml-1 overflow-hidden bg-center bg-cover rounded-full bg-blue-1000"
|
2019-09-20 21:32:28 +00:00
|
|
|
></div>
|
|
|
|
|
<div
|
2023-09-20 20:01:43 +00:00
|
|
|
:style="{
|
|
|
|
|
backgroundImage:
|
|
|
|
|
data.role !== 'NONE' ? `url(${'/img/roles/' + roles[index] + '.png'})` : null,
|
|
|
|
|
}"
|
2020-06-20 14:52:50 +00:00
|
|
|
class="w-4 h-4 mx-2 bg-center bg-cover"
|
2019-09-20 21:32:28 +00:00
|
|
|
></div>
|
|
|
|
|
<div
|
|
|
|
|
:class="index !== 0 ? '-mt-1' : ''"
|
2023-09-20 20:01:43 +00:00
|
|
|
:style="{ backgroundImage: `url('${data.enemyTeam[index].champion.icon}')` }"
|
2020-06-11 18:55:39 +00:00
|
|
|
class="w-6 h-6 bg-center bg-cover rounded-full bg-blue-1000"
|
2019-09-20 21:32:28 +00:00
|
|
|
></div>
|
2020-06-21 11:21:48 +00:00
|
|
|
<router-link
|
|
|
|
|
v-if="data.enemyTeam[index].account_id !== '0'"
|
|
|
|
|
@click.native="$event.stopImmediatePropagation()"
|
2023-09-20 20:01:43 +00:00
|
|
|
:to="{
|
|
|
|
|
name: 'summoner',
|
|
|
|
|
params: { region: $route.params.region, name: data.enemyTeam[index].name },
|
|
|
|
|
}"
|
2023-09-20 21:43:14 +00:00
|
|
|
class="w-16 ml-1 overflow-hidden text-xs font-medium text-left text-blue-200 whitespace-nowrap hover:text-white text-overflow"
|
2023-09-20 20:01:43 +00:00
|
|
|
>{{ data.enemyTeam[index].name }}</router-link
|
|
|
|
|
>
|
2019-11-03 17:49:58 +00:00
|
|
|
<div
|
2020-06-21 11:21:48 +00:00
|
|
|
v-else
|
2023-09-20 21:43:14 +00:00
|
|
|
class="w-16 ml-1 overflow-hidden text-xs font-medium text-left text-blue-200 whitespace-nowrap text-overflow"
|
2023-09-20 20:01:43 +00:00
|
|
|
>
|
|
|
|
|
{{ data.enemyTeam[index].name }}
|
|
|
|
|
</div>
|
2019-09-20 21:32:28 +00:00
|
|
|
</div>
|
|
|
|
|
</div>
|
2020-06-11 18:55:39 +00:00
|
|
|
<div class="flex flex-col items-center justify-center ml-auto">
|
2020-02-14 19:02:30 +00:00
|
|
|
<svg class="w-5 h-5 text-blue-200">
|
|
|
|
|
<use xlink:href="#stopwatch" />
|
|
|
|
|
</svg>
|
2023-09-20 20:01:43 +00:00
|
|
|
<div class="text-lg font-medium text-teal-400">{{ data.time | secToTime }}</div>
|
2020-02-13 19:16:13 +00:00
|
|
|
<Tooltip>
|
2021-04-03 15:18:24 +00:00
|
|
|
<template #trigger>
|
2020-06-11 18:55:39 +00:00
|
|
|
<div class="text-xs font-medium text-white">{{ data.date }}</div>
|
2019-11-28 09:06:27 +00:00
|
|
|
</template>
|
2021-04-03 15:18:24 +00:00
|
|
|
<template #default>
|
2020-06-11 18:55:39 +00:00
|
|
|
<div class="px-2 text-xs leading-tight text-center text-white select-none">
|
2019-11-28 09:06:27 +00:00
|
|
|
<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>
|
2021-09-16 15:10:09 +00:00
|
|
|
<DetailedMatch :data="getMatchDetails(data.matchId) || {}" :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,
|
2023-09-20 20:01:43 +00:00
|
|
|
required: true,
|
2019-09-16 19:20:48 +00:00
|
|
|
},
|
2020-02-01 16:14:03 +00:00
|
|
|
indexMatch: {
|
|
|
|
|
type: Number,
|
|
|
|
|
default: -1,
|
2023-09-20 20:01:43 +00:00
|
|
|
},
|
2019-09-16 19:20:48 +00:00
|
|
|
},
|
|
|
|
|
|
2019-11-03 17:49:58 +00:00
|
|
|
data() {
|
|
|
|
|
return {
|
2023-09-20 20:01:43 +00:00
|
|
|
showDetails: false,
|
2019-11-03 17:49:58 +00:00
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
|
2019-09-16 19:20:48 +00:00
|
|
|
computed: {
|
2019-09-20 21:32:28 +00:00
|
|
|
...mapState({
|
2023-09-20 20:01:43 +00:00
|
|
|
account: (state) => state.summoner.basic.account,
|
|
|
|
|
roles: (state) => state.roles,
|
2019-09-20 21:32:28 +00:00
|
|
|
}),
|
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
|
|
|
|
|
|
2021-09-16 15:10:09 +00:00
|
|
|
if (!this.getMatchDetails(this.data.matchId)) {
|
|
|
|
|
this.matchDetails(this.data.matchId)
|
2019-11-03 17:49:58 +00:00
|
|
|
}
|
|
|
|
|
},
|
2020-01-20 20:54:04 +00:00
|
|
|
isSummonerProfile(account_id) {
|
2019-09-22 15:39:29 +00:00
|
|
|
return {
|
2020-06-21 19:23:09 +00:00
|
|
|
'font-bold text-white': this.account.accountId === account_id,
|
2023-09-20 20:01:43 +00:00
|
|
|
'text-blue-200': this.account.accountId !== account_id,
|
2019-09-22 15:39:29 +00:00
|
|
|
}
|
2019-11-03 17:49:58 +00:00
|
|
|
},
|
|
|
|
|
...mapActions('detailedMatch', ['matchDetails']),
|
2023-09-20 20:01:43 +00:00
|
|
|
},
|
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>
|