2019-03-30 22:55:48 +00:00
|
|
|
<template>
|
2019-12-27 17:38:43 +00:00
|
|
|
<div v-if="overviewLoaded" class="mt-3 flex text-center">
|
2019-12-03 20:57:52 +00:00
|
|
|
<div class="mt-4 w-3/12">
|
|
|
|
|
<SummonerChampions />
|
|
|
|
|
<SummonerStats />
|
|
|
|
|
<SummonerMates />
|
|
|
|
|
</div>
|
|
|
|
|
<div class="w-9/12">
|
|
|
|
|
<ul>
|
|
|
|
|
<Match
|
2019-12-27 17:38:43 +00:00
|
|
|
v-for="(match, index) in overview.matches"
|
2019-12-03 20:57:52 +00:00
|
|
|
:key="index"
|
2019-12-27 17:38:43 +00:00
|
|
|
:data="overview.matches[index]"
|
2019-12-03 20:57:52 +00:00
|
|
|
/>
|
|
|
|
|
</ul>
|
|
|
|
|
<LoadingButton
|
|
|
|
|
v-if="moreMatchesToFetch"
|
|
|
|
|
@clicked="moreMatches"
|
|
|
|
|
:loading="matchesLoading"
|
|
|
|
|
btn-class="mt-4 block mx-auto bg-blue-800 px-4 py-2 rounded-md font-semibold hover:bg-blue-1000 shadow-lg"
|
|
|
|
|
>More matches</LoadingButton>
|
2019-09-14 21:19:10 +00:00
|
|
|
</div>
|
2019-03-30 22:55:48 +00:00
|
|
|
</div>
|
2019-12-27 21:09:24 +00:00
|
|
|
<div v-else class="" style="margin-top: 1.75rem">
|
|
|
|
|
<div class="mt-4 text-center">
|
|
|
|
|
<div
|
|
|
|
|
v-for="index in 10"
|
|
|
|
|
:key="index"
|
|
|
|
|
class="ml-10 mt-4 rounded-lg w-full bg-blue-800"
|
|
|
|
|
style="width: 1160px; height: 144px;"
|
|
|
|
|
>
|
|
|
|
|
<content-loader
|
|
|
|
|
:height="144"
|
|
|
|
|
:width="1160"
|
|
|
|
|
:speed="2"
|
|
|
|
|
primary-color="#17314f"
|
|
|
|
|
secondary-color="#2b6cb0"
|
|
|
|
|
>
|
|
|
|
|
<rect x="241" y="46" rx="3" ry="3" width="94.35" height="26.5" />
|
|
|
|
|
<rect x="309" y="91.67" rx="0" ry="0" width="3" height="0" />
|
|
|
|
|
<rect x="330" y="105.67" rx="0" ry="0" width="0" height="0" />
|
|
|
|
|
<rect x="312" y="94.67" rx="0" ry="0" width="0" height="0" />
|
|
|
|
|
<rect x="305" y="65.67" rx="0" ry="0" width="0" height="0" />
|
|
|
|
|
<rect x="258" y="80.34" rx="3" ry="3" width="59.5" height="16.7" />
|
|
|
|
|
<rect x="68" y="36" rx="8" ry="8" width="64" height="64" />
|
|
|
|
|
<rect x="142" y="40" rx="6" ry="6" width="24" height="24" />
|
|
|
|
|
<rect x="142" y="72" rx="6" ry="6" width="24" height="24" />
|
|
|
|
|
<rect x="396" y="36" rx="6" ry="6" width="32" height="32" />
|
|
|
|
|
<rect x="432" y="36" rx="6" ry="6" width="32" height="32" />
|
|
|
|
|
<rect x="468" y="36" rx="6" ry="6" width="32" height="32" />
|
|
|
|
|
<rect x="396" y="72" rx="6" ry="6" width="32" height="32" />
|
|
|
|
|
<rect x="432" y="72" rx="6" ry="6" width="32" height="32" />
|
|
|
|
|
<rect x="468" y="72" rx="6" ry="6" width="32" height="32" />
|
|
|
|
|
<rect x="555" y="38" rx="3" ry="3" width="72" height="13" />
|
|
|
|
|
<rect x="555" y="57" rx="3" ry="3" width="103" height="13" />
|
|
|
|
|
<rect x="555" y="76" rx="3" ry="3" width="131" height="13" />
|
|
|
|
|
<rect x="555" y="95" rx="3" ry="3" width="131" height="13" />
|
|
|
|
|
<circle cx="862" cy="32" r="12" />
|
|
|
|
|
<circle cx="862" cy="52" r="12" />
|
|
|
|
|
<circle cx="862" cy="72" r="12" />
|
|
|
|
|
<circle cx="862" cy="92" r="12" />
|
|
|
|
|
<circle cx="862" cy="112" r="12" />
|
|
|
|
|
<circle cx="926" cy="32" r="12" />
|
|
|
|
|
<circle cx="926" cy="52" r="12" />
|
|
|
|
|
<circle cx="926" cy="72" r="12" />
|
|
|
|
|
<circle cx="926" cy="92" r="12" />
|
|
|
|
|
<circle cx="926" cy="112" r="12" />
|
|
|
|
|
<rect x="770" y="29" rx="3" ry="3" width="72" height="9" />
|
|
|
|
|
<rect x="770" y="49" rx="3" ry="3" width="72" height="9" />
|
|
|
|
|
<rect x="770" y="69" rx="3" ry="3" width="72" height="9" />
|
|
|
|
|
<rect x="770" y="89" rx="3" ry="3" width="72" height="9" />
|
|
|
|
|
<rect x="770" y="109" rx="3" ry="3" width="72" height="9" />
|
|
|
|
|
<rect x="945" y="29" rx="3" ry="3" width="72" height="9" />
|
|
|
|
|
<rect x="945" y="49" rx="3" ry="3" width="72" height="9" />
|
|
|
|
|
<rect x="945" y="69" rx="3" ry="3" width="72" height="9" />
|
|
|
|
|
<rect x="945" y="89" rx="3" ry="3" width="72" height="9" />
|
|
|
|
|
<rect x="945" y="109" rx="3" ry="3" width="72" height="9" />
|
|
|
|
|
<circle cx="1106" cy="50.55" r="11.88" />
|
|
|
|
|
<rect x="1074" y="66" rx="3" ry="3" width="64" height="17" />
|
|
|
|
|
<rect x="1077" y="90" rx="3" ry="3" width="59" height="14" />
|
|
|
|
|
</content-loader>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="mt-4 mx-auto" style="width: 135px; height: 40px;">
|
|
|
|
|
<content-loader
|
|
|
|
|
:height="40"
|
|
|
|
|
:width="135"
|
|
|
|
|
:speed="2"
|
|
|
|
|
primary-color="#17314f"
|
|
|
|
|
secondary-color="#2b6cb0"
|
|
|
|
|
>
|
|
|
|
|
<rect x="0" y="0" rx="6" ry="6" width="135" height="40" />
|
|
|
|
|
</content-loader>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2019-03-30 22:55:48 +00:00
|
|
|
</template>
|
|
|
|
|
|
2019-12-03 20:57:52 +00:00
|
|
|
|
2019-03-30 22:55:48 +00:00
|
|
|
<script>
|
2019-12-27 21:09:24 +00:00
|
|
|
import { ContentLoader } from 'vue-content-loader'
|
2019-09-11 20:02:05 +00:00
|
|
|
import { mapState, mapActions, mapGetters } from 'vuex'
|
2019-10-06 13:08:24 +00:00
|
|
|
import LoadingButton from '@/components/LoadingButton.vue'
|
2019-11-03 17:49:58 +00:00
|
|
|
import Match from '@/components/Match/Match.vue'
|
2019-12-03 20:57:52 +00:00
|
|
|
import SummonerChampions from '@/components/Summoner/Overview/SummonerChampions.vue'
|
|
|
|
|
import SummonerMates from '@/components/Summoner/Overview/SummonerMates.vue'
|
|
|
|
|
import SummonerStats from '@/components/Summoner/Overview/SummonerStats.vue'
|
2019-03-30 22:55:48 +00:00
|
|
|
|
|
|
|
|
export default {
|
|
|
|
|
components: {
|
2019-12-27 21:09:24 +00:00
|
|
|
ContentLoader,
|
2019-10-06 13:08:24 +00:00
|
|
|
LoadingButton,
|
2019-04-08 20:06:22 +00:00
|
|
|
Match,
|
2019-11-24 13:26:27 +00:00
|
|
|
SummonerChampions,
|
2019-10-25 21:09:33 +00:00
|
|
|
SummonerMates,
|
2019-11-08 14:39:56 +00:00
|
|
|
SummonerStats,
|
2019-03-30 22:55:48 +00:00
|
|
|
},
|
2019-08-23 14:48:16 +00:00
|
|
|
|
2019-04-07 17:44:01 +00:00
|
|
|
computed: {
|
2019-09-08 20:08:49 +00:00
|
|
|
...mapState({
|
2019-12-27 17:38:43 +00:00
|
|
|
overview: state => state.summoner.overview
|
2019-09-11 20:02:05 +00:00
|
|
|
}),
|
2019-12-27 21:09:24 +00:00
|
|
|
...mapGetters('summoner', ['matchesLoading', 'moreMatchesToFetch', 'overviewLoaded', 'summonerFound'])
|
2019-12-27 17:38:43 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
|
|
created() {
|
2019-12-27 21:09:24 +00:00
|
|
|
if(this.summonerFound)
|
|
|
|
|
this.overviewRequest()
|
2019-08-23 14:48:16 +00:00
|
|
|
},
|
|
|
|
|
|
2019-03-30 22:55:48 +00:00
|
|
|
methods: {
|
2019-12-27 17:38:43 +00:00
|
|
|
...mapActions('summoner', ['moreMatches', 'overviewRequest']),
|
2019-03-30 22:55:48 +00:00
|
|
|
}
|
2019-08-23 14:48:16 +00:00
|
|
|
}
|
2019-03-30 22:55:48 +00:00
|
|
|
</script>
|