diff --git a/lib/infobox/main.js b/lib/infobox/main.js index 564c794..bf81540 100644 --- a/lib/infobox/main.js +++ b/lib/infobox/main.js @@ -55,7 +55,7 @@ define(['infobox/link', 'infobox/node', 'infobox/location'], function (Link, Nod location(config, el, router, d); }; - self.setData = function setData(d) { + self.setData = function setData(d) { if (typeof node === 'object') { node.setData(d); } @@ -64,7 +64,6 @@ define(['infobox/link', 'infobox/node', 'infobox/location'], function (Link, Nod } }; - return self; }; }); diff --git a/lib/infobox/node.js b/lib/infobox/node.js index edddd68..9c8a17a 100644 --- a/lib/infobox/node.js +++ b/lib/infobox/node.js @@ -69,14 +69,29 @@ define(['sorttable', 'snabbdom', 'd3-interpolate', 'moment', 'helper'], } var clients = [ - d.clients > 0 ? d.clients : _.t('none'), - V.h('br') + V.h('span', [ + d.clients > 0 ? d.clients : _.t('none'), + V.h('br'), + V.h('i', { props: { className: 'ion-people', title: _.t('node.clients') } }) + ]), + V.h('span', [ + d.clients_wifi24, + V.h('br'), + '2,4 Ghz' + ]), + V.h('span', [ + d.clients_wifi5, + V.h('br'), + '5 Ghz' + ]), + V.h('span', [ + d.clients_other, + V.h('br'), + _.t('other') + ]) ]; - for (var i = 0; i < d.clients; i++) { - clients.push(V.h('i', { props: { className: 'ion-person' } })); - } - return V.h('td', clients); + return V.h('td', { props: { className: 'clients' } }, clients); } function showIPs(d) { diff --git a/locale/en.json b/locale/en.json index 6745724..02444e6 100644 --- a/locale/en.json +++ b/locale/en.json @@ -86,5 +86,6 @@ "yes": "yes", "no": "no", "unknown": "unknown", + "others": "others", "none": "none" } diff --git a/scss/modules/_infobox.scss b/scss/modules/_infobox.scss index 3a66c45..5bf25e3 100644 --- a/scss/modules/_infobox.scss +++ b/scss/modules/_infobox.scss @@ -1,7 +1,15 @@ .infobox { .clients { - color: $color-online; - font-family: $font-family-icons; + display: flex; + + span { + flex-grow: 1; + text-align: center; + } + + .ion-people { + font-size: 1.5em; + } } input,