Skip to content

Commit

Permalink
Merge pull request #41 from LyticalApp/s24
Browse files Browse the repository at this point in the history
S24 Update
  • Loading branch information
downthecrop authored Jan 20, 2024
2 parents 6cd99f5 + 734b14c commit a5afb50
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 12 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
3 changes: 2 additions & 1 deletion src/HomeView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down Expand Up @@ -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);

Expand Down
10 changes: 5 additions & 5 deletions src/components/MatchDetailsItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,10 @@
{{formatLevelBulb(participant.stats.champLevel)}}
</span>
<div style="display:inline-block;width:75px;text-align:left;padding-top:4px;"
class="summonername" :title="matchDetails.participantIdentities[index].player.summonerName">
class="summonername" :title="matchDetails.participantIdentities[index].player.gameName">
<span style="font-size:12px;color:#f2ecff;"
@click="searchPlayer(matchDetails.participantIdentities[index].player.summonerName)">
{{matchDetails.participantIdentities[index].player.summonerName}}</span><br>
@click="searchPlayer(matchDetails.participantIdentities[index].player)">
{{matchDetails.participantIdentities[index].player.gameName}}</span><br>
<Transition>
<span v-if="summonerRanks[index] != 'N' && summonerRanks[index] != undefined"
class="inline-rank" :style="{ backgroundColor:
Expand Down Expand Up @@ -325,11 +325,11 @@ export default {
}
return isWin ? 'Victory' : 'Defeat';
},
searchPlayer(username) {
searchPlayer({ gameName, tagLine }) {
this.$router.push({
name: 'Home',
params: {
summonerSearch: username,
summonerSearch: `${gameName}#${tagLine}`,
},
});
},
Expand Down
2 changes: 1 addition & 1 deletion src/components/PlayerCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
class="clip-circle" style="height:80px;margin-right:10px;max-width:280px;">
</td>
<td style="vertical-align:middle; align:left;">
<span class="usernameText">{{data.username}}</span>
<span class="usernameText">{{data.username ? data.username : data.summonerData.gameName}}</span>
<br>
<span style="font-size:14px;">Level {{data.summonerData.summonerLevel}}</span>
<br>
Expand Down
5 changes: 4 additions & 1 deletion src/res/common.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
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/`;
export const PROFILEPICONURL = 'https://raw.communitydragon.org/latest/plugins/rcp-be-lol-game-data/global/default/v1/profile-icons/';
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',
Expand Down Expand Up @@ -171,6 +173,7 @@ export const championIds = {
895: 'Nilah',
897: 'KSante',
902: 'Milio',
910: 'Hwei',
950: 'Naafiri',
};

Expand Down
12 changes: 10 additions & 2 deletions tools/parse-championid-json.js
Original file line number Diff line number Diff line change
@@ -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 = {};

Expand All @@ -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();
2 changes: 1 addition & 1 deletion tools/parse-runes-json.js
Original file line number Diff line number Diff line change
@@ -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 = {};

Expand Down

0 comments on commit a5afb50

Please sign in to comment.