diff options
Diffstat (limited to 'lib/serve.js')
-rw-r--r-- | lib/serve.js | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/lib/serve.js b/lib/serve.js index 3c9334f..db99b49 100644 --- a/lib/serve.js +++ b/lib/serve.js @@ -352,6 +352,7 @@ Serve.prototype.path = function (url) { case '/peers': return this.peers(m[2]) case '/status': return this.status(m[2]) case '/channels': return this.channels(m[2]) + case '/tags': return this.tags(m[2]) case '/friends': return this.friends(m[2]) case '/live': return this.live(m[2]) case '/compose': return this.compose(m[2]) @@ -849,7 +850,22 @@ Serve.prototype.channels = function (ext) { ) } -function renderFriendsList(app) { +Serve.prototype.tags = function (path) { + var self = this + var seen = {} + pull( + ph('section', [ + ph('h3', 'Tags'), + pull( + self.app.streamTags(), + pull.map(function (msg) { + return [self.phIdLink(msg.key), ' '] + }) + ) + ]), + this.wrapPage('tags'), + this.respondSink(200) + ) } Serve.prototype.contacts = function (path) { @@ -1508,6 +1524,7 @@ Serve.prototype.wrapPage = function (title, searchQ) { self.app.sbot.status ? [h('a', {href: render.toUrl('/status')}, 'status'), ' '] : '', h('a', {href: render.toUrl('/channels')}, 'channels') , ' ', + h('a', {href: render.toUrl('/tags')}, 'tags') , ' ', h('a', {href: render.toUrl('/friends')}, 'friends'), ' ', h('a', {href: render.toUrl('/advsearch')}, 'search'), ' ', h('a', {href: render.toUrl('/live')}, 'live'), ' ', |