From 4136bc48cbf5aa329dd1d403c0b2c47f94b6a4d0 Mon Sep 17 00:00:00 2001 From: Mark Friedrich Date: Sat, 16 Nov 2019 22:25:58 +0100 Subject: [PATCH] - Fixed broken "faction" logo imgage urls on new image server, closed #872 --- js/app/ui/module/system_info.js | 4 ++-- js/app/ui/module/system_intel.js | 2 +- js/app/util.js | 1 + public/js/v1.5.5/app/ui/module/system_info.js | 4 ++-- public/js/v1.5.5/app/ui/module/system_intel.js | 2 +- public/js/v1.5.5/app/util.js | 1 + 6 files changed, 8 insertions(+), 6 deletions(-) diff --git a/js/app/ui/module/system_info.js b/js/app/ui/module/system_info.js index 9bb58b85..f1fa9ec3 100644 --- a/js/app/ui/module/system_info.js +++ b/js/app/ui/module/system_info.js @@ -166,7 +166,7 @@ define([ fwContestedRow.find('.' + config.systemSovFwPercentageClass).text(percentage); fwContestedRow.show(); - let occupierFactionImage = Util.eveImageUrl('alliances', (occupierFaction ? occupierFaction.id : 0), 64); + let occupierFactionImage = Util.eveImageUrl('factions', (occupierFaction ? occupierFaction.id : 0), 64); let occupierFactionName = occupierFaction ? occupierFaction.name : ''; fwOccupationRow.find('.' + config.systemSovFwOccupationImageClass)[0].style.setProperty('--bg-image', 'url(\'' + occupierFactionImage + '\')'); @@ -310,7 +310,7 @@ define([ if(sovDataFact){ sovereigntyPrimary = { row1Val: 'Faction', - row1Img: Util.eveImageUrl('alliances', sovDataFact.id, 64), + row1Img: Util.eveImageUrl('factions', sovDataFact.id, 64), row1ImgTitle: sovDataFact.name, row2Val: sovDataFact.name }; diff --git a/js/app/ui/module/system_intel.js b/js/app/ui/module/system_intel.js index 74234f6a..985eb653 100644 --- a/js/app/ui/module/system_intel.js +++ b/js/app/ui/module/system_intel.js @@ -552,7 +552,7 @@ define([ if (!last || last.id !== group.id) { // "stations" are grouped by "raceId" with its "factionId" // "structures" are grouped by "corporationId" that ADDED it (not the ingame "owner" of it) - let imgType = 'stations' === group.groupedDataKey ? 'alliances' : 'corporations'; + let imgType = 'stations' === group.groupedDataKey ? 'factions' : 'corporations'; $(rows).eq(i).before( '' + diff --git a/js/app/util.js b/js/app/util.js index c1a927da..3007ae82 100644 --- a/js/app/util.js +++ b/js/app/util.js @@ -873,6 +873,7 @@ define([ if(!resourceVariant){ switch(resourceType){ + case 'factions': resourceType = 'corporations'; // faction icons are on 'corporations' endpoint.. CCP fail?! case 'alliances': case 'corporations': resourceVariant = 'logo'; break; case 'characters': resourceVariant = 'portrait'; break; diff --git a/public/js/v1.5.5/app/ui/module/system_info.js b/public/js/v1.5.5/app/ui/module/system_info.js index 9bb58b85..f1fa9ec3 100644 --- a/public/js/v1.5.5/app/ui/module/system_info.js +++ b/public/js/v1.5.5/app/ui/module/system_info.js @@ -166,7 +166,7 @@ define([ fwContestedRow.find('.' + config.systemSovFwPercentageClass).text(percentage); fwContestedRow.show(); - let occupierFactionImage = Util.eveImageUrl('alliances', (occupierFaction ? occupierFaction.id : 0), 64); + let occupierFactionImage = Util.eveImageUrl('factions', (occupierFaction ? occupierFaction.id : 0), 64); let occupierFactionName = occupierFaction ? occupierFaction.name : ''; fwOccupationRow.find('.' + config.systemSovFwOccupationImageClass)[0].style.setProperty('--bg-image', 'url(\'' + occupierFactionImage + '\')'); @@ -310,7 +310,7 @@ define([ if(sovDataFact){ sovereigntyPrimary = { row1Val: 'Faction', - row1Img: Util.eveImageUrl('alliances', sovDataFact.id, 64), + row1Img: Util.eveImageUrl('factions', sovDataFact.id, 64), row1ImgTitle: sovDataFact.name, row2Val: sovDataFact.name }; diff --git a/public/js/v1.5.5/app/ui/module/system_intel.js b/public/js/v1.5.5/app/ui/module/system_intel.js index 74234f6a..985eb653 100644 --- a/public/js/v1.5.5/app/ui/module/system_intel.js +++ b/public/js/v1.5.5/app/ui/module/system_intel.js @@ -552,7 +552,7 @@ define([ if (!last || last.id !== group.id) { // "stations" are grouped by "raceId" with its "factionId" // "structures" are grouped by "corporationId" that ADDED it (not the ingame "owner" of it) - let imgType = 'stations' === group.groupedDataKey ? 'alliances' : 'corporations'; + let imgType = 'stations' === group.groupedDataKey ? 'factions' : 'corporations'; $(rows).eq(i).before( '' + diff --git a/public/js/v1.5.5/app/util.js b/public/js/v1.5.5/app/util.js index c1a927da..3007ae82 100644 --- a/public/js/v1.5.5/app/util.js +++ b/public/js/v1.5.5/app/util.js @@ -873,6 +873,7 @@ define([ if(!resourceVariant){ switch(resourceType){ + case 'factions': resourceType = 'corporations'; // faction icons are on 'corporations' endpoint.. CCP fail?! case 'alliances': case 'corporations': resourceVariant = 'logo'; break; case 'characters': resourceVariant = 'portrait'; break;