var Tr = require('./translations') module.exports = function (sbot) { return function (use) { //view (and filtered views) on the raw log use('public', require('./public')(sbot)) use('public/menu', function (opts, apply, req) { var tr = require('./translations')(req.cookies.lang) return ['a', {href: '/patch/public'}, tr('Public')] }) use('messages/post', require('./messages/post')(sbot)) use('messages/vote', require('./messages/vote')(sbot)) use.map('messages', 'post', 'messages/post') use.map('messages', 'vote', 'messages/vote') use('names/post', require('./post-name')(sbot)) use.list('menu', 'public/menu') use('thread', require('./thread')(sbot)) use('private', require('./private')(sbot)) use('private/menu', function (opts, apply, req) { return ['a', {href: '/patch/private'}, Tr(req.cookies.lang)('Private')] }) use.list('menu', 'private/menu') use('likes', require('./likes')(sbot)), use.list('extra', 'likes') use('backlinks', require('./backlinks')(sbot)), use.list('extra', 'backlinks') use('friends', require('./friends')(sbot)) use('messageLink', require('./message-link')(sbot)) use('channelLink', require('./channel-link')(sbot)) } }