diff --git a/package.json b/package.json index 3989a5a..fc7406f 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "Lytical", "author": "downthecrop", "description": "Lytical is an open source League of Legends statistics and profile analytics tool for all regions including Garena and WeGame", - "version": "1.3.1", + "version": "1.4.1", "repository": "https://github.com/LyticalApp/Lytical/", "private": true, "scripts": { diff --git a/src/HomeView.vue b/src/HomeView.vue index b0978af..223ab93 100644 --- a/src/HomeView.vue +++ b/src/HomeView.vue @@ -36,6 +36,7 @@ import LoadingDots from './components/LoadingDots.vue'; import MostPlayedChampions from './components/MostPlayedChampions.vue'; import { filterGameModes, + CURRENT_SEASON, } from './res/common'; const { ipcRenderer } = require('electron'); @@ -186,7 +187,7 @@ export default { const { games } = data.games; // substring 12 meaning patch beginning with a 12.. // there is no official "current season" - const season = '13'; + const season = CURRENT_SEASON; const thisSeason = (games) .filter((game) => game.queueId === 420 && game.gameVersion.substring(0, 2) === season); diff --git a/src/components/MatchDetailsItem.vue b/src/components/MatchDetailsItem.vue index 0bb91d7..5db1530 100644 --- a/src/components/MatchDetailsItem.vue +++ b/src/components/MatchDetailsItem.vue @@ -115,10 +115,10 @@ {{formatLevelBulb(participant.stats.champLevel)}}
+ class="summonername" :title="matchDetails.participantIdentities[index].player.gameName"> - {{matchDetails.participantIdentities[index].player.summonerName}}
+ @click="searchPlayer(matchDetails.participantIdentities[index].player)"> + {{matchDetails.participantIdentities[index].player.gameName}}
- {{data.username}} + {{data.username ? data.username : data.summonerData.gameName}}
Level {{data.summonerData.summonerLevel}}
diff --git a/src/res/common.js b/src/res/common.js index 129b27d..117317c 100644 --- a/src/res/common.js +++ b/src/res/common.js @@ -1,4 +1,4 @@ -const patch = '13.20.1'; +const patch = '14.1.1'; /* eslint-disable max-len */ export const ITEMICONURL = `http://ddragon.leagueoflegends.com/cdn/${patch}/img/item/`; @@ -6,6 +6,8 @@ export const PROFILEPICONURL = 'https://raw.communitydragon.org/latest/plugins/r export const CHAMPIONICONURL = 'https://raw.communitydragon.org/latest/plugins/rcp-be-lol-game-data/global/default/v1/champion-icons/'; export const RUNEICONURL = 'https://raw.communitydragon.org/latest/plugins/rcp-be-lol-game-data/global/default/v1/'; +export const CURRENT_SEASON = '14'; + export const championIds = { 1: 'Annie', 2: 'Olaf', @@ -171,6 +173,7 @@ export const championIds = { 895: 'Nilah', 897: 'KSante', 902: 'Milio', + 910: 'Hwei', 950: 'Naafiri', }; diff --git a/tools/parse-championid-json.js b/tools/parse-championid-json.js index 93bb305..173138a 100644 --- a/tools/parse-championid-json.js +++ b/tools/parse-championid-json.js @@ -1,7 +1,7 @@ /* eslint-disable import/no-extraneous-dependencies */ const request = require('request'); -const champions = 'http://ddragon.leagueoflegends.com/cdn/12.21.1/data/en_US/champion.json'; +const champions = 'http://ddragon.leagueoflegends.com/cdn/14.1.1/data/en_US/champion.json'; const j = {}; @@ -12,8 +12,16 @@ function getChampName() { for (const i in championList) { j[championList[i].key] = championList[i].id; } - console.log(j); + console.log(stringifyObject(j)); }); } + +function stringifyObject(obj) { + const keyValuePairs = Object.entries(obj).map(([key, value]) => `${key}: '${value}'`); + return `{ ${keyValuePairs.join(', ')} }`; +} + + + getChampName(); diff --git a/tools/parse-runes-json.js b/tools/parse-runes-json.js index bf5c51f..0d1c7c3 100644 --- a/tools/parse-runes-json.js +++ b/tools/parse-runes-json.js @@ -1,7 +1,7 @@ /* eslint-disable import/no-extraneous-dependencies */ const request = require('request'); -const runesURL = 'https://ddragon.leagueoflegends.com/cdn/12.11.1/data/en_US/runesReforged.json'; +const runesURL = 'https://ddragon.leagueoflegends.com/cdn/13.21.1/data/en_US/runesReforged.json'; const j = {};