From 08838020a18cc5ef4e6d7b1d3241fe6afd0dafc8 Mon Sep 17 00:00:00 2001 From: fkloft Date: Fri, 12 Jul 2013 17:13:34 +0200 Subject: [PATCH 1/6] show portal load level by color --- code/request_handling.js | 4 ++-- style.css | 11 +++++++++++ 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/code/request_handling.js b/code/request_handling.js index 3919bcdb..16ec02e2 100644 --- a/code/request_handling.js +++ b/code/request_handling.js @@ -48,9 +48,9 @@ window.renderUpdateStatus = function() { var t = 'portals: '; var minlvl = getMinPortalLevel(); if(minlvl === 0) - t += 'all'; + t+= 'all'; else - t+= 'L'+minlvl+(minlvl<8?'+':''); + t+= 'L'+minlvl+(minlvl<8?'+':'') + ''; t +=''; t += ' map: '; diff --git a/style.css b/style.css index 43a4d398..1d48f101 100644 --- a/style.css +++ b/style.css @@ -717,6 +717,17 @@ h3 { box-sizing: border-box; } +#updatestatus .loadlevel { + background: #FFF; + color: #000000; + display: inline-block; + min-width: 1.5em; + border: 1px solid #20A8B1; + border-width: 0 1px; + margin: -4px 0; + padding: 4px 0.2em; +} + #updatestatus .map { margin-left: 8px; } From ccc387247690221f6bdbf5301fb9c974295474e9 Mon Sep 17 00:00:00 2001 From: fkloft Date: Fri, 12 Jul 2013 17:36:24 +0200 Subject: [PATCH 2/6] Tweak for mobile status bar --- mobile/smartphone.css | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/mobile/smartphone.css b/mobile/smartphone.css index 0e88ed7c..bcbb8bef 100644 --- a/mobile/smartphone.css +++ b/mobile/smartphone.css @@ -10,6 +10,12 @@ body { border: 0; } +#updatestatus .loadlevel { + border-width: 0; + background: transparent; + color: #FFF; +} + #innerstatus { float: right; max-width: 50%; From 4162a5bbaf056cf76168d05d3f6ea4db3ffdff85 Mon Sep 17 00:00:00 2001 From: fkloft Date: Fri, 12 Jul 2013 17:42:27 +0200 Subject: [PATCH 3/6] show selected portal's color in mobile status bar --- code/smartphone.js | 6 +++++- mobile/smartphone.css | 5 +++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/code/smartphone.js b/code/smartphone.js index 9d913c22..bc7371f7 100644 --- a/code/smartphone.js +++ b/code/smartphone.js @@ -70,7 +70,11 @@ window.runOnSmartphonesBeforeBoot = function() { window.smartphoneInfo = function(data) { var d = data.portalDetails; - var t = 'L' + Math.floor(getPortalLevel(d)); + var lvl = Math.floor(getPortalLevel(d)); + if(lvl == 0) + var t = 'L' + lvl + ''; + else + var t = 'L' + lvl + ''; var percentage = '0%'; var totalEnergy = getTotalPortalEnergy(d); if(getTotalPortalEnergy(d) > 0) { diff --git a/mobile/smartphone.css b/mobile/smartphone.css index bcbb8bef..6e7b6a9f 100644 --- a/mobile/smartphone.css +++ b/mobile/smartphone.css @@ -32,6 +32,11 @@ body { overflow: hidden; } +#mobileinfo .portallevel { + padding: 0 0.2em; + color: #FFF; +} + #sidebar, #chatcontrols, #chat, #chatinput { background: #0B3351 !important; } From 5bf8eb73331cfa8ecdbe137720133a98da1062eb Mon Sep 17 00:00:00 2001 From: fkloft Date: Sat, 13 Jul 2013 00:12:49 +0200 Subject: [PATCH 4/6] Visual tweaks (mostly CSS, don't show "Portals:" in statusbar on smartphones --- code/request_handling.js | 8 +++++--- mobile/smartphone.css | 36 +++++++++++++++++++++++++----------- style.css | 12 ++++++------ 3 files changed, 36 insertions(+), 20 deletions(-) diff --git a/code/request_handling.js b/code/request_handling.js index 16ec02e2..90368909 100644 --- a/code/request_handling.js +++ b/code/request_handling.js @@ -45,12 +45,14 @@ window.requests.abort = function() { // to website. Updates info in layer chooser. window.renderUpdateStatus = function() { - var t = 'portals: '; + var t = ''; + if(!window.isSmartphone()) // space is valueable + t += 'portals: '; var minlvl = getMinPortalLevel(); if(minlvl === 0) - t+= 'all'; + t+= 'all'; else - t+= 'L'+minlvl+(minlvl<8?'+':'') + ''; + t+= 'L'+minlvl+(minlvl<8?'+':'') + ''; t +=''; t += ' map: '; diff --git a/mobile/smartphone.css b/mobile/smartphone.css index 6e7b6a9f..060661ab 100644 --- a/mobile/smartphone.css +++ b/mobile/smartphone.css @@ -8,32 +8,46 @@ body { width: 100%; color: #d4d5d6; border: 0; + padding: 0; } -#updatestatus .loadlevel { +#updatestatus .map { + margin-left: 4px; +} + +#innerstatus { + padding: 4px; + float: right; + width: 50%; + text-overflow: ellipsis; + white-space: nowrap; + overflow: hidden; + -moz-box-sizing: border-box; + -webkit-box-sizing: border-box; + box-sizing: border-box; +} + +#loadlevel { border-width: 0; background: transparent; color: #FFF; } -#innerstatus { - float: right; - max-width: 50%; - text-overflow: ellipsis; - white-space: nowrap; - overflow: hidden; -} - #mobileinfo { float: left; - max-width: 50%; + width: 50%; text-overflow: ellipsis; white-space: nowrap; overflow: hidden; + position:relative; + padding: 4px 0; + -moz-box-sizing: border-box; + -webkit-box-sizing: border-box; + box-sizing: border-box; } #mobileinfo .portallevel { - padding: 0 0.2em; + padding: 0 0.25em; color: #FFF; } diff --git a/style.css b/style.css index 1d48f101..5d3441f3 100644 --- a/style.css +++ b/style.css @@ -717,21 +717,21 @@ h3 { box-sizing: border-box; } -#updatestatus .loadlevel { +#updatestatus .map { + margin-left: 8px; +} + +#loadlevel { background: #FFF; color: #000000; display: inline-block; - min-width: 1.5em; + min-width: 1.8em; border: 1px solid #20A8B1; border-width: 0 1px; margin: -4px 0; padding: 4px 0.2em; } -#updatestatus .map { - margin-left: 8px; -} - /* Dialogs */ .ui-tooltip, .ui-dialog { From 39ce9102e8cfd9cabe9dd962bdc8200142766ced Mon Sep 17 00:00:00 2001 From: fkloft Date: Sat, 13 Jul 2013 00:14:02 +0200 Subject: [PATCH 5/6] Show resonator status (level/energy) of selected portal in status bar on smartphones --- code/smartphone.js | 22 ++++++++++++++++++++++ mobile/smartphone.css | 25 +++++++++++++++++++++++++ 2 files changed, 47 insertions(+) diff --git a/code/smartphone.js b/code/smartphone.js index bc7371f7..b97d4dc4 100644 --- a/code/smartphone.js +++ b/code/smartphone.js @@ -83,6 +83,28 @@ window.smartphoneInfo = function(data) { t += ' ' + percentage + ' '; t += d.portalV2.descriptiveText.TITLE; + var l,v,max,perc; + for(var i=0;i<8;i++) + { + var reso = d.resonatorArray.resonators[i]; + if(reso) { + l = parseInt(reso.level); + v = parseInt(reso.energyTotal); + max = RESO_NRG[l]; + perc = v/max*100; + } + else { + l = 0; + v = 0; + max = 0; + perc = 0; + } + + t += '
'; + t += '
'; + t += '
' + } + $('#mobileinfo').html(t); } diff --git a/mobile/smartphone.css b/mobile/smartphone.css index 060661ab..efcbbfbe 100644 --- a/mobile/smartphone.css +++ b/mobile/smartphone.css @@ -51,6 +51,31 @@ body { color: #FFF; } +#mobileinfo .resonator { + position: absolute; + width: 12%; /* a little less that 1/8 to have a small distance */ + height: 100%; + top: 0; + border-top: 3px solid red; + box-sizing: border-box; + -moz-box-sizing: border-box; + -webkit-box-sizing: border-box; +} + +#mobileinfo .filllevel { + position: absolute; + bottom: 0; + height: 3px; +} + +#mobileinfo .enl .filllevel { + background-color: #03fe03 !important; +} + +#mobileinfo .res .filllevel { + background-color: #00c5ff !important; +} + #sidebar, #chatcontrols, #chat, #chatinput { background: #0B3351 !important; } From 1038fb142ac977129e379f86dfbc421a25ae5702 Mon Sep 17 00:00:00 2001 From: Philipp Schaefer Date: Sat, 13 Jul 2013 14:02:55 +0200 Subject: [PATCH 6/6] removed trailing whitespace --- code/smartphone.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/smartphone.js b/code/smartphone.js index b97d4dc4..f8cf7d4b 100644 --- a/code/smartphone.js +++ b/code/smartphone.js @@ -104,7 +104,7 @@ window.smartphoneInfo = function(data) { t += '
'; t += '' } - + $('#mobileinfo').html(t); }