aboutsummaryrefslogtreecommitdiff
path: root/lib/render-msg.js
diff options
context:
space:
mode:
authorcel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519>2019-02-04 00:02:39 -1000
committercel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519>2019-02-04 00:12:55 -1000
commitbe9a1da05281cc6c1c3569d2822ba8ff6e611c7b (patch)
treed84ce14818e799383c29186ad5ff0f975ed68dd2 /lib/render-msg.js
parent54f2f24d48151bdcd501bcc58bb8934e9cef08a4 (diff)
downloadpatchfoo-be9a1da05281cc6c1c3569d2822ba8ff6e611c7b.tar.gz
patchfoo-be9a1da05281cc6c1c3569d2822ba8ff6e611c7b.zip
Show addresses more compactly
Handle missing port
Diffstat (limited to 'lib/render-msg.js')
-rw-r--r--lib/render-msg.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/render-msg.js b/lib/render-msg.js
index 357edbe..09c9e13 100644
--- a/lib/render-msg.js
+++ b/lib/render-msg.js
@@ -757,6 +757,8 @@ RenderMsg.prototype.pub = function (cb) {
RenderMsg.prototype.address = function (cb) {
var availability = this.c.availability * 100
+ var addr = u.extractHostPort(this.value.author, String(this.c.address))
+ addr = this.app.removeDefaultPort(addr)
this.wrapMini([
'has address',
!isNaN(availability) ? [
@@ -764,7 +766,7 @@ RenderMsg.prototype.address = function (cb) {
h('code', availability + '%')
] : '',
': ',
- h('input', {disabled: 'disabled', value: String(this.c.address), style: 'width:100%'}),
+ h('input', {disabled: 'disabled', value: addr, style: 'width:100%; font:monospace'}),
], cb)
}
@@ -779,12 +781,14 @@ RenderMsg.prototype.pubOwnerAnnounce = function (cb) {
RenderMsg.prototype.pubOwnerConfirm = function (cb) {
var self = this
var announcement = this.c.announcement
+ var addr = u.extractHostPort(this.value.author, String(this.c.address))
+ addr = this.app.removeDefaultPort(addr)
this.wrap([
'confirms pub ownership announcement ',
h('a', {href: this.toUrl(announcement)}, u.truncate(announcement, 10)),
this.c.address ? [
'. address: ',
- h('input', {disabled: 'disabled', value: String(this.c.address), style: 'width:100%'})
+ h('input', {disabled: 'disabled', value: addr, style: 'width:100%; font:monospace'})
] : ''
], cb)
}