mirror of
https://github.com/reality/dbot.git
synced 2025-01-23 18:44:14 +01:00
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 = function(dbot) {
|
||||||
var pages = {
|
var pages = {
|
||||||
'/notify': function(req, res) {
|
'/notify': function(req, res) {
|
||||||
res.render('servers', {
|
var server = req.user.server,
|
||||||
'servers': _.keys(dbot.config.servers)
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
'/notify/:server': function(req, res) {
|
|
||||||
var server = req.params.server,
|
|
||||||
userCount = {},
|
userCount = {},
|
||||||
users = [],
|
users = [],
|
||||||
channelCount = {};
|
channelCount = {};
|
||||||
@ -74,8 +68,8 @@ var pages = function(dbot) {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
'/notify/:server/:item': function(req, res) {
|
'/notify/:item': function(req, res) {
|
||||||
var server = req.params.server,
|
var server = req.user.server,
|
||||||
notifies = [];
|
notifies = [];
|
||||||
|
|
||||||
if(req.params.item.charAt(0) == '#') {
|
if(req.params.item.charAt(0) == '#') {
|
||||||
|
@ -3,14 +3,14 @@ extends ../layout
|
|||||||
block content
|
block content
|
||||||
h3 Browse by Channel on #{server}
|
h3 Browse by Channel on #{server}
|
||||||
div#backlink
|
div#backlink
|
||||||
a(href='/notify') « Server List
|
a(href='/') « Home
|
||||||
ul#quotelist
|
ul#quotelist
|
||||||
-each count, name in channels
|
-each count, name in channels
|
||||||
a(href='/notify/'+server+'/'+encodeURIComponent(name))
|
a(href='/notify/'+encodeURIComponent(name))
|
||||||
li.quotes #{name} (#{count})
|
li.quotes #{name} (#{count})
|
||||||
|
|
||||||
h3 Browse by User on #{server}
|
h3 Browse by User on #{server}
|
||||||
ul#quotelist
|
ul#quotelist
|
||||||
-each nUser in users
|
-each nUser in users
|
||||||
a(href='/notify/'+server+'/'+encodeURIComponent(nUser.name))
|
a(href='/notify/'+encodeURIComponent(nUser.name))
|
||||||
li.quotes #{nUser.name} (#{nUser.count})
|
li.quotes #{nUser.name} (#{nUser.count})
|
||||||
|
@ -2,7 +2,7 @@ extends ../layout
|
|||||||
|
|
||||||
block content
|
block content
|
||||||
div#backlink
|
div#backlink
|
||||||
a(href='/notify/'+server) « Server
|
a(href='/notify') « Server
|
||||||
p
|
p
|
||||||
div#controls
|
div#controls
|
||||||
input(type="text", name="search", id="search-text", oninput="searchNotifies(this.value)")
|
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