diff --git a/htdocs/css/openwebrx.css b/htdocs/css/openwebrx.css index 3195997..dc8cf61 100644 --- a/htdocs/css/openwebrx.css +++ b/htdocs/css/openwebrx.css @@ -990,6 +990,18 @@ img.openwebrx-mirror-img cursor: pointer; } +.openwebrx-ysf-mode:not(:empty):before { + content: "Mode: "; +} + +.openwebrx-ysf-up:not(:empty):before { + content: "Up: "; +} + +.openwebrx-ysf-down:not(:empty):before { + content: "Down: "; +} + .openwebrx-maps-pin { background-image: url("../gfx/google_maps_pin.svg"); background-position: center; diff --git a/htdocs/lib/MetaPanel.js b/htdocs/lib/MetaPanel.js index 8a7c85c..86c5523 100644 --- a/htdocs/lib/MetaPanel.js +++ b/htdocs/lib/MetaPanel.js @@ -143,11 +143,7 @@ YsfMetaPanel.prototype.clear = function() { YsfMetaPanel.prototype.setMode = function(mode) { if (this.mode === mode) return; this.mode = mode; - var text = ''; - if (mode && mode != '') { - text = 'Mode: ' + mode; - } - this.el.find('.openwebrx-ysf-mode').text(text); + this.el.find('.openwebrx-ysf-mode').text(mode || ''); }; YsfMetaPanel.prototype.setSource = function(source) { @@ -170,21 +166,13 @@ YsfMetaPanel.prototype.setLocation = function(lat, lon, callsign) { YsfMetaPanel.prototype.setUp = function(up) { if (this.up === up) return; this.up = up; - var text = ''; - if (up && up != '') { - text = 'Up: ' + up; - } - this.el.find('.openwebrx-ysf-up').text(text); + this.el.find('.openwebrx-ysf-up').text(up || ''); }; YsfMetaPanel.prototype.setDown = function(down) { if (this.down === down) return; this.down = down; - var text = ''; - if (down && down != '') { - text = 'Down: ' + down; - } - this.el.find('.openwebrx-ysf-down').text(text); + this.el.find('.openwebrx-ysf-down').text(down || ''); } MetaPanel.types = {