aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/render-msg.js13
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/render-msg.js b/lib/render-msg.js
index 9308495..6501d7d 100644
--- a/lib/render-msg.js
+++ b/lib/render-msg.js
@@ -330,6 +330,7 @@ RenderMsg.prototype.message = function (cb) {
case 'dark-crystal/shard': return this.shard(cb)
case 'invite': return this.invite(cb)
case 'ssb-igo': return this.igo(cb)
+ case 'address': return this.address(cb)
default: return this.object(cb)
}
}
@@ -727,6 +728,18 @@ RenderMsg.prototype.pub = function (cb) {
})
}
+RenderMsg.prototype.address = function (cb) {
+ var availability = this.c.availability * 100
+ this.wrapMini([
+ 'has address',
+ !isNaN(availability) ? [
+ ' with availability ', h('code', String(availability + '%'))
+ ] : '',
+ ': ',
+ h('input', {disabled: 'disabled', value: String(this.c.address), style: 'width:100%'}),
+ ], cb)
+}
+
RenderMsg.prototype.channel = function (cb) {
var chan = '#' + this.c.channel
this.wrapMini([