diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/render-msg.js | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/lib/render-msg.js b/lib/render-msg.js index 684ea40..4db7429 100644 --- a/lib/render-msg.js +++ b/lib/render-msg.js @@ -296,6 +296,8 @@ RenderMsg.prototype.message = function (cb) { case 'talenet-idea-comment_reply': return this.ideaComment(cb) case 'about-resource': return this.aboutResource(cb) case 'line-comment': return this.lineComment(cb) + case 'web-init': return this.webInit(cb) + case 'web-root': return this.webRoot(cb) default: return this.object(cb) } } @@ -1690,3 +1692,27 @@ RenderMsg.prototype.lineComment = function (cb) { h('div', {innerHTML: self.markdown()}) : ''), cb) }) } + +RenderMsg.prototype.webInit = function (cb) { + var self = this + var url = '/web/' + encodeURIComponent(this.msg.key) + self.wrapMini(h('a', + {href: this.toUrl(url)}, + 'website' + ), cb) +} + +RenderMsg.prototype.webRoot = function (cb) { + var self = this + var site = u.isRef(this.c.site) && this.c.site + var root = u.isRef(this.c.root) && this.c.root + self.wrapMini(h('span', + 'updated website ', + site ? [ + h('a', {href: this.toUrl('/web/' + encodeURIComponent(site))}, site.substr(0, 8) + '…'), ' ' + ] : '', + root ? [ + 'to ', h('a', {href: this.toUrl(root)}, root.substr(0, 8) + '…') + ] : '' + ), cb) +} |