diff --git a/client/src/components/Match/LiveMatch.vue b/client/src/components/Match/LiveMatch.vue new file mode 100644 index 0000000..70d2fab --- /dev/null +++ b/client/src/components/Match/LiveMatch.vue @@ -0,0 +1,134 @@ + + + + + diff --git a/client/src/helpers/summoner.js b/client/src/helpers/summoner.js index a66e207..a09a945 100644 --- a/client/src/helpers/summoner.js +++ b/client/src/helpers/summoner.js @@ -55,12 +55,7 @@ export function createBasicSummonerData(RiotData) { } } - return { - account: RiotData.account, - matchList: RiotData.allMatches, - ranked: RiotData.ranked, - playing: RiotData.playing, - } + return RiotData } function getLeagueData(leagueData, leagueName) { diff --git a/client/src/main.js b/client/src/main.js index 98b8fe9..280ac5b 100644 --- a/client/src/main.js +++ b/client/src/main.js @@ -18,10 +18,12 @@ Vue.filter('kilo', (value) => { return `${+(value / 1000).toFixed(1)}k` }) -Vue.filter('secToTime', (sec) => { +Vue.filter('secToTime', (sec, dotNotation = false) => { const min = Math.floor(sec / 60) - const newSec = Math.floor(sec - min * 60) - return min + 'm' + (newSec < 10 ? '0' + newSec : newSec) + 's' + let newSec = Math.floor(sec - min * 60) + newSec = newSec < 10 ? '0' + newSec : newSec + + return dotNotation ? `${min}:${newSec}` : `${min}m${newSec}s` }) Vue.filter('percent', (value) => { diff --git a/client/src/store/modules/summoner.js b/client/src/store/modules/summoner.js index f343ed4..39f329a 100644 --- a/client/src/store/modules/summoner.js +++ b/client/src/store/modules/summoner.js @@ -6,6 +6,7 @@ export const namespaced = true export const state = { basic: { account: {}, + current: {}, matchList: [], ranked: {}, playing: false, @@ -52,6 +53,7 @@ export const mutations = { }, SUMMONER_FOUND(state, infos) { state.basic.account = infos.account + state.basic.current = infos.current state.basic.matchList = infos.matchList state.basic.ranked = infos.ranked state.basic.playing = infos.playing diff --git a/client/src/views/Summoner.vue b/client/src/views/Summoner.vue index c33180d..fecc966 100644 --- a/client/src/views/Summoner.vue +++ b/client/src/views/Summoner.vue @@ -5,20 +5,25 @@ -
-
    - -
- More matches +
+
+ +
+
+
    + +
+ More matches +
@@ -29,6 +34,7 @@