forked from GitHub/dbot
do that thing what i said for [#577]
This commit is contained in:
parent
c09e9de9f9
commit
9e67c94074
@ -5,13 +5,7 @@ var _ = require('underscore')._,
|
||||
var pages = function(dbot) {
|
||||
var pages = {
|
||||
'/notify': function(req, res) {
|
||||
res.render('servers', {
|
||||
'servers': _.keys(dbot.config.servers)
|
||||
});
|
||||
},
|
||||
|
||||
'/notify/:server': function(req, res) {
|
||||
var server = req.params.server,
|
||||
var server = req.user.server,
|
||||
userCount = {},
|
||||
users = [],
|
||||
channelCount = {};
|
||||
@ -74,8 +68,8 @@ var pages = function(dbot) {
|
||||
}
|
||||
},
|
||||
|
||||
'/notify/:server/:item': function(req, res) {
|
||||
var server = req.params.server,
|
||||
'/notify/:item': function(req, res) {
|
||||
var server = req.user.server,
|
||||
notifies = [];
|
||||
|
||||
if(req.params.item.charAt(0) == '#') {
|
||||
|
@ -3,14 +3,14 @@ extends ../layout
|
||||
block content
|
||||
h3 Browse by Channel on #{server}
|
||||
div#backlink
|
||||
a(href='/notify') « Server List
|
||||
a(href='/') « Home
|
||||
ul#quotelist
|
||||
-each count, name in channels
|
||||
a(href='/notify/'+server+'/'+encodeURIComponent(name))
|
||||
a(href='/notify/'+encodeURIComponent(name))
|
||||
li.quotes #{name} (#{count})
|
||||
|
||||
h3 Browse by User on #{server}
|
||||
ul#quotelist
|
||||
-each nUser in users
|
||||
a(href='/notify/'+server+'/'+encodeURIComponent(nUser.name))
|
||||
a(href='/notify/'+encodeURIComponent(nUser.name))
|
||||
li.quotes #{nUser.name} (#{nUser.count})
|
||||
|
@ -2,7 +2,7 @@ extends ../layout
|
||||
|
||||
block content
|
||||
div#backlink
|
||||
a(href='/notify/'+server) « Server
|
||||
a(href='/notify') « Server
|
||||
p
|
||||
div#controls
|
||||
input(type="text", name="search", id="search-text", oninput="searchNotifies(this.value)")
|
||||
|
@ -1,12 +0,0 @@
|
||||
extends ../layout
|
||||
|
||||
block content
|
||||
h3 Servers
|
||||
div#backlink
|
||||
a(href='/') « Home
|
||||
div
|
||||
a(href='/notify/'+user.server+'/missing') My Missed Notifications
|
||||
ul#quotelist
|
||||
-each server in servers
|
||||
a(href='/notify/'+server)
|
||||
li.quotes #{server}
|
Loading…
Reference in New Issue
Block a user