From 3c098f45cd347ea76f0821de7acda1d1d0db8955 Mon Sep 17 00:00:00 2001 From: TurtIeSocks <58572875+TurtIeSocks@users.noreply.github.com> Date: Mon, 12 Apr 2021 11:57:25 -0400 Subject: [PATCH] Minor Popup Adjustments - Users were complaining that despawn timers felt less visible since they're on the left when all of the other "important" info is on the right, so this swaps the despawn timer with the first/last seen timers. - Fix IVs from incorrectly calculating/displaying null values for users without IV perms --- static/css/popups.css | 4 ++-- static/js/index.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/static/css/popups.css b/static/css/popups.css index eda4d706..ff514ff3 100644 --- a/static/css/popups.css +++ b/static/css/popups.css @@ -66,7 +66,7 @@ } .pokemon-despawn-timers { - grid-column: 1; + grid-column: 2; grid-row: 5; margin: auto; padding: 5px; @@ -89,7 +89,7 @@ } .pokemon-other-timers { - grid-column: 2; + grid-column: 1; grid-row: 5; margin: auto; padding: 5px; diff --git a/static/js/index.js b/static/js/index.js index 5a3c52af..a685ff2c 100644 --- a/static/js/index.js +++ b/static/js/index.js @@ -3077,7 +3077,7 @@ const getPokemonPopupContent = (pokemon) => { } const getIV = (pokemon) => { - if (pokemon.atk_iv !== null && popupDetails.pokemon.iv) { + if (pokemon.atk_iv !== null && pokemon.atk_iv !== undefined && popupDetails.pokemon.iv) { const ivColors = { 0: 'red', 66: 'orange', 82: 'yellow', 100: 'green' } const ivPercent = ((pokemon.atk_iv + pokemon.def_iv + pokemon.sta_iv) / .45).toFixed(2); let selectedColor