aboutsummaryrefslogtreecommitdiff
path: root/lib/render-msg.js
diff options
context:
space:
mode:
authorcel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519>2017-02-15 17:17:00 -0800
committercel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519>2017-02-16 21:22:34 -0500
commitff3840ae638b77832ccd9dede4052434334d82b1 (patch)
treeaabad2ecd0e18468fd0bbe1eea00a8adccd2849b /lib/render-msg.js
parentba5db45e7aba220aa9743d4f3fb4b41d5a698148 (diff)
downloadpatchfoo-ff3840ae638b77832ccd9dede4052434334d82b1.tar.gz
patchfoo-ff3840ae638b77832ccd9dede4052434334d82b1.zip
Render wifi-network messages
Diffstat (limited to 'lib/render-msg.js')
-rw-r--r--lib/render-msg.js15
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/render-msg.js b/lib/render-msg.js
index f51f936..444f1c0 100644
--- a/lib/render-msg.js
+++ b/lib/render-msg.js
@@ -186,6 +186,7 @@ RenderMsg.prototype.message = function (raw, cb) {
case 'ferment/update':
case 'robeson/update':
return this.update(cb)
+ case 'wifi-network': return this.wifiNetwork(cb)
default: return this.object(cb)
}
}
@@ -518,3 +519,17 @@ RenderMsg.prototype.musicRelease = function (cb) {
}))
], cb)
}
+
+RenderMsg.prototype.wifiNetwork = function (cb) {
+ var net = this.c.network || {}
+ this.wrap([
+ h('div', 'wifi network'),
+ h('table',
+ Object.keys(net).map(function (key) {
+ return h('tr',
+ h('td', key),
+ h('td', h('pre', JSON.stringify(net[key]))))
+ })
+ ),
+ ], cb)
+}