2019-11-03 17:49:58 +00:00
|
|
|
<template>
|
2019-11-23 12:38:35 +00:00
|
|
|
<table :class="{'rounded-b-lg overflow-hidden': !allyTeam}" class="w-full table-fixed">
|
2019-11-03 17:49:58 +00:00
|
|
|
<thead class="leading-none">
|
2019-11-23 12:38:35 +00:00
|
|
|
<tr :class="`heading-${data.result}`" class="heading-detailed text-blue-200 font-semibold">
|
|
|
|
|
<th class="w-players py-5 border-r border-blue-700">
|
2019-11-03 17:49:58 +00:00
|
|
|
<div class="flex justify-between">
|
|
|
|
|
<span
|
2019-11-04 16:47:05 +00:00
|
|
|
:class="allyTeam ? 'text-teal-400' : 'text-red-400'"
|
2019-11-03 17:49:58 +00:00
|
|
|
class="pl-2"
|
2019-11-04 16:47:05 +00:00
|
|
|
>{{ allyTeam ? 'Ally' : 'Enemy' }} Team</span>
|
2019-11-04 21:08:40 +00:00
|
|
|
<div
|
|
|
|
|
v-if="data.result === 'Win'"
|
|
|
|
|
:class="allyTeam ? 'text-teal-400' : 'text-red-400'"
|
|
|
|
|
class="flex pr-2"
|
|
|
|
|
>
|
2019-11-03 17:49:58 +00:00
|
|
|
<svg class="w-4 h-4 items-center">
|
2019-11-04 21:08:40 +00:00
|
|
|
<use xlink:href="#award" />
|
2019-11-03 17:49:58 +00:00
|
|
|
</svg>
|
2019-11-04 21:08:40 +00:00
|
|
|
<span class="ml-2px">VICTORY</span>
|
2019-11-03 17:49:58 +00:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</th>
|
2019-11-23 12:38:35 +00:00
|
|
|
<th class="w-kda px-2 py-5 text-sm">K</th>
|
|
|
|
|
<th class="w-kda px-2 py-5 text-sm">D</th>
|
|
|
|
|
<th class="w-kda px-2 py-5 text-sm">A</th>
|
|
|
|
|
<th class="w-minions px-2 py-5 text-sm">{{ statsFormat === 'stats' ? 'cs' : 'cs/m' }}</th>
|
|
|
|
|
<th class="w-vision px-2 py-5 text-sm">{{ statsFormat === 'stats' ? 'vs' : 'vs/m' }}</th>
|
|
|
|
|
<th class="w-gold-dmg-kp px-2 py-5 text-sm">gold</th>
|
|
|
|
|
<th class="w-gold-dmg-kp px-2 py-5 text-sm">
|
2019-11-03 17:49:58 +00:00
|
|
|
dmg
|
|
|
|
|
<br />champ
|
|
|
|
|
</th>
|
2019-11-23 12:38:35 +00:00
|
|
|
<th class="w-gold-dmg-kp px-2 py-5 text-sm">
|
2019-11-03 17:49:58 +00:00
|
|
|
dmg
|
|
|
|
|
<br />obj
|
|
|
|
|
</th>
|
2019-11-23 12:38:35 +00:00
|
|
|
<th class="w-gold-dmg-kp px-2 py-5 text-sm">
|
2019-11-03 17:49:58 +00:00
|
|
|
dmg
|
|
|
|
|
<br />taken
|
|
|
|
|
</th>
|
2019-11-23 12:38:35 +00:00
|
|
|
<th class="w-gold-dmg-kp px-2 py-5 text-sm">kp</th>
|
2019-11-03 17:49:58 +00:00
|
|
|
</tr>
|
|
|
|
|
</thead>
|
2019-11-03 20:19:17 +00:00
|
|
|
<tbody :class="[{'border-b border-blue-700': allyTeam}, data.result]" class="leading-none">
|
2019-11-03 17:49:58 +00:00
|
|
|
<tr v-for="(player, index) in data.players" :key="player.name + index">
|
|
|
|
|
<td class="py-2 border-r border-blue-700">
|
2019-11-23 12:38:35 +00:00
|
|
|
<div class="px-1 flex justify-between">
|
2019-11-03 17:49:58 +00:00
|
|
|
<div class="flex">
|
|
|
|
|
<div class="flex items-center">
|
|
|
|
|
<div
|
|
|
|
|
v-if="player.role !== 'NONE'"
|
|
|
|
|
:style="{backgroundImage: `url(${require('@/assets/img/roles/' + player.role + '.png')})`}"
|
|
|
|
|
class="w-4 h-4 bg-center bg-cover"
|
|
|
|
|
></div>
|
|
|
|
|
</div>
|
|
|
|
|
<div
|
2019-11-25 20:15:52 +00:00
|
|
|
:style="{backgroundImage: `url('${player.champion.icon}')`}"
|
2019-11-23 12:38:35 +00:00
|
|
|
class="ml-2 relative w-8 h-8 bg-cover bg-center bg-blue-1000 rounded-full"
|
2019-11-03 17:49:58 +00:00
|
|
|
>
|
|
|
|
|
<div
|
2019-11-04 16:47:05 +00:00
|
|
|
:class="allyTeam ? 'bg-teal-500 text-teal-100' : 'bg-red-500 text-red-100'"
|
|
|
|
|
class="absolute level-position bottom-0 flex items-center justify-center w-4 h-4 rounded-full text-xxs"
|
2019-11-03 17:49:58 +00:00
|
|
|
>
|
2019-11-04 16:47:05 +00:00
|
|
|
<span>{{ player.level }}</span>
|
2019-11-03 17:49:58 +00:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="ml-1 flex flex-col justify-around">
|
|
|
|
|
<div
|
2019-12-01 19:44:41 +00:00
|
|
|
:style="{backgroundImage: `url(${player.firstSum.icon})`}"
|
2019-11-03 17:49:58 +00:00
|
|
|
class="w-4 h-4 bg-blue-1000 rounded-md bg-center bg-cover"
|
|
|
|
|
></div>
|
|
|
|
|
<div
|
2019-12-01 19:44:41 +00:00
|
|
|
:style="{backgroundImage: `url(${player.secondSum.icon})`}"
|
2019-11-03 17:49:58 +00:00
|
|
|
class="w-4 h-4 bg-blue-1000 rounded-md bg-center bg-cover"
|
|
|
|
|
></div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="ml-2px flex flex-col justify-around">
|
|
|
|
|
<div
|
|
|
|
|
:style="[player.primaryRune ? {background: `url(${player.primaryRune}) center/cover`} : '']"
|
|
|
|
|
class="w-4 h-4 bg-blue-1000 rounded-md"
|
|
|
|
|
></div>
|
|
|
|
|
<div
|
|
|
|
|
:style="[player.secondaryRune ? {background: `url(${player.secondaryRune}) center/cover`} : '']"
|
|
|
|
|
class="w-4 h-4 bg-blue-1000 rounded-md"
|
|
|
|
|
></div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="ml-1 flex flex-col items-start justify-center leading-none">
|
|
|
|
|
<router-link
|
|
|
|
|
v-if="player.firstSum"
|
|
|
|
|
:to="{ name: 'summoner', params: { region: $route.params.region, name: player.name }}"
|
2019-11-29 17:18:13 +00:00
|
|
|
:class="{'font-semibold text-yellow-400': compareSummonernames($route.params.name, player.name)}"
|
2019-11-03 17:49:58 +00:00
|
|
|
class="w-24 text-sm text-white text-left overflow-hidden text-overflow whitespace-no-wrap hover:text-blue-200"
|
|
|
|
|
>{{ player.name }}</router-link>
|
|
|
|
|
<div
|
|
|
|
|
v-else
|
|
|
|
|
class="w-24 text-sm text-white text-left overflow-hidden text-overflow whitespace-no-wrap"
|
|
|
|
|
>{{ player.name }}</div>
|
|
|
|
|
<div class="text-xs text-teal-500">{{ player.champion.name }}</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2019-12-01 18:17:30 +00:00
|
|
|
<div class="ml-1 flex items-center">
|
|
|
|
|
<div v-if="player.rank">
|
|
|
|
|
<svg class="w-5 h-5">
|
|
|
|
|
<use :xlink:href="`#rank-${player.rank.tier.toLowerCase()}`" />
|
2019-11-03 17:49:58 +00:00
|
|
|
</svg>
|
2019-12-01 18:17:30 +00:00
|
|
|
<div class="text-blue-300 text-xs">{{ player.rank.shortName }}</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div v-else class="w-5 h-5">
|
|
|
|
|
<div class="-mt-1 text-blue-300 text-2xl">-</div>
|
2019-11-03 17:49:58 +00:00
|
|
|
</div>
|
2019-11-14 20:22:01 +00:00
|
|
|
<MatchItems :items="player.items" :one-row="true" />
|
2019-11-03 17:49:58 +00:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</td>
|
|
|
|
|
<td
|
2019-11-06 17:46:45 +00:00
|
|
|
:style="bgColor(player, '71, 132, 116', 'kills')"
|
|
|
|
|
class="p-2 text-white text-sm"
|
|
|
|
|
>{{ player.stats.kills }}</td>
|
2019-11-03 17:49:58 +00:00
|
|
|
<td
|
2019-11-06 17:46:45 +00:00
|
|
|
:style="bgColor(player, '156, 71, 109', 'deaths')"
|
|
|
|
|
class="p-2 text-white text-sm"
|
|
|
|
|
>{{ player.stats.deaths }}</td>
|
2019-11-03 17:49:58 +00:00
|
|
|
<td
|
2019-11-06 17:46:45 +00:00
|
|
|
:style="bgColor(player, '146, 100, 79', 'assists')"
|
|
|
|
|
class="p-2 text-white text-sm"
|
|
|
|
|
>{{ player.stats.assists }}</td>
|
2019-11-03 17:49:58 +00:00
|
|
|
<td
|
2019-11-06 17:46:45 +00:00
|
|
|
class="p-2 text-white text-sm"
|
|
|
|
|
:style="bgColor(player, '140, 101, 182', 'minions')"
|
2019-11-23 12:38:35 +00:00
|
|
|
>{{ player[statsFormat].minions }}</td>
|
2019-11-03 17:49:58 +00:00
|
|
|
<td
|
2019-11-06 17:46:45 +00:00
|
|
|
class="p-2 text-white text-sm"
|
|
|
|
|
:style="bgColor(player, '55, 118, 179', 'vision')"
|
2019-11-23 12:38:35 +00:00
|
|
|
>{{ player[statsFormat].vision }}</td>
|
2019-11-03 17:49:58 +00:00
|
|
|
<td
|
2019-11-06 17:46:45 +00:00
|
|
|
class="p-2 text-white text-sm"
|
|
|
|
|
:style="bgColor(player, '146, 100, 79', 'gold')"
|
2019-11-23 12:38:35 +00:00
|
|
|
>{{ player[statsFormat].gold }}</td>
|
2019-11-03 17:49:58 +00:00
|
|
|
<td
|
2019-11-06 17:46:45 +00:00
|
|
|
:style="bgColor(player, '156, 71, 109', 'dmgChamp')"
|
|
|
|
|
class="p-2 text-white text-sm"
|
2019-11-23 12:38:35 +00:00
|
|
|
>{{ player[statsFormat].dmgChamp }}</td>
|
2019-11-03 17:49:58 +00:00
|
|
|
<td
|
2019-11-06 17:46:45 +00:00
|
|
|
:style="bgColor(player, '156, 71, 109', 'dmgObj')"
|
|
|
|
|
class="p-2 text-white text-sm text-red"
|
2019-11-23 12:38:35 +00:00
|
|
|
>{{ player[statsFormat].dmgObj }}</td>
|
2019-11-03 17:49:58 +00:00
|
|
|
<td
|
2019-11-06 17:46:45 +00:00
|
|
|
:style="bgColor(player, '146, 145, 106', 'dmgTaken')"
|
|
|
|
|
class="p-2 text-white text-sm"
|
2019-11-23 12:38:35 +00:00
|
|
|
>{{ player[statsFormat].dmgTaken }}</td>
|
2019-11-03 17:49:58 +00:00
|
|
|
<td
|
2019-11-06 17:46:45 +00:00
|
|
|
:style="bgColor(player, '71, 132, 116', 'kp')"
|
|
|
|
|
class="p-2 text-white text-sm"
|
|
|
|
|
>{{ player.stats.kp }}</td>
|
2019-11-03 17:49:58 +00:00
|
|
|
</tr>
|
|
|
|
|
</tbody>
|
|
|
|
|
</table>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
2019-11-25 20:15:52 +00:00
|
|
|
import { mapState } from 'vuex'
|
2019-11-29 17:18:13 +00:00
|
|
|
import { compareSummonernames } from '@/helpers/functions.js'
|
2019-11-14 20:22:01 +00:00
|
|
|
import MatchItems from '@/components/Match/MatchItems'
|
2019-11-03 17:49:58 +00:00
|
|
|
|
|
|
|
|
export default {
|
2019-11-14 20:22:01 +00:00
|
|
|
components: {
|
|
|
|
|
MatchItems,
|
|
|
|
|
},
|
|
|
|
|
|
2019-11-03 17:49:58 +00:00
|
|
|
props: {
|
2019-11-06 17:46:45 +00:00
|
|
|
allPlayers: {
|
|
|
|
|
type: Array,
|
|
|
|
|
required: true
|
|
|
|
|
},
|
2019-11-29 17:18:13 +00:00
|
|
|
allyTeam: {
|
|
|
|
|
type: Boolean,
|
|
|
|
|
required: true
|
|
|
|
|
},
|
2019-11-03 17:49:58 +00:00
|
|
|
data: {
|
|
|
|
|
type: Object,
|
|
|
|
|
required: true
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
computed: {
|
2019-11-23 12:38:35 +00:00
|
|
|
statsFormat() {
|
2019-11-30 20:59:27 +00:00
|
|
|
return this.percentSettings ? 'percentStats' : 'stats'
|
2019-11-23 12:38:35 +00:00
|
|
|
},
|
|
|
|
|
...mapState({
|
|
|
|
|
percentSettings: state => state.settings.percent
|
|
|
|
|
}),
|
2019-11-03 17:49:58 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
|
|
methods: {
|
2019-11-06 17:46:45 +00:00
|
|
|
bgColor(player, rgb, stats) {
|
|
|
|
|
const value = parseFloat(player.stats[stats])
|
|
|
|
|
const biggestValue = Math.max(...this.allPlayers.map(p => parseFloat(p.stats[stats])), 0)
|
|
|
|
|
const opacity = (value / biggestValue).toFixed(2)
|
|
|
|
|
|
|
|
|
|
return {
|
|
|
|
|
backgroundColor: `rgba(${rgb}, ${opacity})`,
|
2019-11-25 18:14:53 +00:00
|
|
|
boxShadow: value === biggestValue && value !== 0 ? '#abb4d0 0px 0px 0px 2px inset' : ''
|
2019-11-06 17:46:45 +00:00
|
|
|
}
|
|
|
|
|
},
|
2019-11-03 17:49:58 +00:00
|
|
|
displayBorderbottom(index) {
|
2019-11-03 20:19:17 +00:00
|
|
|
return this.allyTeam || index !== this.data.players.length - 1
|
2019-11-29 17:18:13 +00:00
|
|
|
},
|
|
|
|
|
compareSummonernames,
|
2019-11-03 17:49:58 +00:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style scoped>
|
2019-11-23 12:38:35 +00:00
|
|
|
.heading-detailed {
|
2019-11-03 17:49:58 +00:00
|
|
|
box-shadow: #2b6cb0 0px -1px inset;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.heading-Win {
|
|
|
|
|
background-image: linear-gradient(
|
|
|
|
|
90deg,
|
|
|
|
|
rgba(1, 97, 28, 0.3) 0%,
|
|
|
|
|
rgba(44, 82, 130, 0) 45%
|
|
|
|
|
),
|
|
|
|
|
linear-gradient(#2a4365 0%, #2b4c77 55%, #235a93 100%);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.heading-Fail {
|
|
|
|
|
background-image: linear-gradient(
|
|
|
|
|
90deg,
|
|
|
|
|
rgba(140, 0, 0, 0.3) 0%,
|
|
|
|
|
rgba(44, 82, 130, 0) 45%
|
|
|
|
|
),
|
|
|
|
|
linear-gradient(#2a4365 0%, #2b4c77 55%, #235a93 100%);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.heading-Remake {
|
|
|
|
|
background-image: linear-gradient(
|
|
|
|
|
90deg,
|
|
|
|
|
rgba(233, 169, 75, 0.3) 0%,
|
|
|
|
|
rgba(44, 82, 130, 0) 45%
|
|
|
|
|
),
|
|
|
|
|
linear-gradient(#2a4365 0%, #2b4c77 55%, #235a93 100%);
|
|
|
|
|
}
|
|
|
|
|
|
2019-11-23 12:38:35 +00:00
|
|
|
.level-position {
|
|
|
|
|
left: -5px;
|
2019-11-03 17:49:58 +00:00
|
|
|
}
|
|
|
|
|
|
2019-11-23 12:38:35 +00:00
|
|
|
.w-players {
|
|
|
|
|
width: 392px;
|
2019-11-03 17:49:58 +00:00
|
|
|
}
|
|
|
|
|
|
2019-11-23 12:38:35 +00:00
|
|
|
.w-kda {
|
|
|
|
|
width: 36px;
|
2019-11-03 17:49:58 +00:00
|
|
|
}
|
|
|
|
|
|
2019-11-23 12:38:35 +00:00
|
|
|
.w-minions {
|
|
|
|
|
width: 45px;
|
2019-11-03 17:49:58 +00:00
|
|
|
}
|
|
|
|
|
|
2019-11-23 12:38:35 +00:00
|
|
|
.w-vision {
|
|
|
|
|
width: 45px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.w-gold-dmg-kp {
|
|
|
|
|
width: 58px;
|
2019-11-03 17:49:58 +00:00
|
|
|
}
|
|
|
|
|
</style>
|