mirror of
https://github.com/reality/dbot.git
synced 2025-01-11 20:42:37 +01:00
Merge pull request #196 from SamStudio8/master
Basic Profiles, show "ago" string in userlists
This commit is contained in:
commit
b7af2d02fe
@ -17,7 +17,13 @@ var commands = function(dbot){
|
||||
|
||||
"~test_setprop": function(event){
|
||||
if(event.params[1] && event.params[2]){
|
||||
if(_.has(this.config.schema.profile, event.params[1])){
|
||||
dbot.db.profiles[event.server][event.user.toLowerCase()].profile[event.params[1]] = event.params[2];
|
||||
event.reply("Property set, maybe?");
|
||||
}
|
||||
else{
|
||||
event.reply("Invalid property. Go home.");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -7,6 +7,8 @@
|
||||
"primary": null,
|
||||
"name": null,
|
||||
"tagline": null,
|
||||
"avatar": null,
|
||||
"bio": null,
|
||||
"favourites": {
|
||||
"colour": null
|
||||
}
|
||||
|
@ -31,7 +31,6 @@ p {
|
||||
}
|
||||
|
||||
div#page {
|
||||
width: 90%;
|
||||
margin: 0 auto 0 auto;
|
||||
}
|
||||
|
||||
@ -56,8 +55,7 @@ div#title a {
|
||||
|
||||
div#main {
|
||||
position: relative;
|
||||
padding: 15px 5px;
|
||||
margin: 0px;
|
||||
padding: 10px 5px;
|
||||
font-size: 21px;
|
||||
text-align:center;
|
||||
background: #FFF;
|
||||
@ -183,3 +181,15 @@ li.option-votes {
|
||||
|
||||
.sorting_asc_disabled { background: url('http://ajax.aspnetcdn.com/ajax/jquery.dataTables/1.9.4/images/sort_asc_disabled.png') no-repeat center right; }
|
||||
.sorting_desc_disabled { background: url('http://ajax.aspnetcdn.com/ajax/jquery.dataTables/1.9.4/images/sort_desc_disabled.png') no-repeat center right; }
|
||||
|
||||
/**
|
||||
* Bootstrap Overrides
|
||||
*/
|
||||
.profile_page-header{
|
||||
margin: 5px 0 10px 0;
|
||||
}
|
||||
|
||||
.profile_row{
|
||||
text-align: left;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
@ -12,7 +12,7 @@ html(lang='en')
|
||||
div#page
|
||||
div#title
|
||||
a(href='/') #{name} web interface
|
||||
div#main
|
||||
div.container#main
|
||||
block content
|
||||
script(type="text/javascript", src="/bootstrap/js/bootstrap.min.js")
|
||||
script(type="text/javascript", src="/d3/d3.v3.min.js")
|
||||
|
@ -21,6 +21,7 @@ block content
|
||||
}
|
||||
} );
|
||||
|
||||
$('.tip').tooltip();
|
||||
$('.data').dataTable({
|
||||
"aoColumnDefs": [
|
||||
{ "sType": "forcenum",
|
||||
@ -38,11 +39,25 @@ block content
|
||||
});
|
||||
});
|
||||
|
||||
div.page-header
|
||||
div.page-header.profile_page-header
|
||||
h1
|
||||
#{primary}
|
||||
small
|
||||
"#{profile.tagline}"
|
||||
|
||||
div#row
|
||||
div.row.profile_row#profile_data
|
||||
div.span3
|
||||
if profile.avatar
|
||||
img.profile_avatar(src="#{profile.avatar}")
|
||||
else
|
||||
img.profile_avatar(src="http://placehold.it/270x180&text=Hello,%20World")
|
||||
div.span9
|
||||
h4 Bio
|
||||
p #{profile.bio}
|
||||
|
||||
hr
|
||||
h3 Channel Statistics
|
||||
div#profile_datatable
|
||||
table.table.table-hover.data
|
||||
thead
|
||||
tr
|
||||
@ -61,12 +76,12 @@ block content
|
||||
#{key}
|
||||
span
|
||||
if chan.online
|
||||
if chan.active
|
||||
span.label.label-success Active
|
||||
if chan.active.active
|
||||
span.label.label-success.tip(data-original-title="#{chan.active.ago}", data-placement="right") Active
|
||||
else
|
||||
span.label.label-important Inactive
|
||||
span.label.label-important.tip(data-original-title="#{chan.active.ago}", data-placement="right") Inactive
|
||||
else
|
||||
span.label Offline
|
||||
span.label.tip(data-original-title="#{chan.active.ago}", data-placement="right") Offline
|
||||
td
|
||||
#{chan.fields.lines.data}
|
||||
td
|
||||
|
@ -21,6 +21,7 @@ block content
|
||||
}
|
||||
} );
|
||||
|
||||
$('.tip').tooltip();
|
||||
$('.data').dataTable({
|
||||
"aoColumnDefs": [
|
||||
{ "aDataSort": [ 1, 0 ], "asSorting": [ "asc" ], "aTargets": [ 0 ] },
|
||||
@ -61,15 +62,15 @@ block content
|
||||
#{nick.display}
|
||||
span
|
||||
if nick.online
|
||||
if nick.active
|
||||
span.label.label-success Active
|
||||
if nick.active.active
|
||||
span.label.label-success.tip(data-original-title="#{nick.active.ago}", data-placement="right") Active
|
||||
else
|
||||
span.label.label-important Inactive
|
||||
span.label.label-important.tip(data-original-title="#{nick.active.ago}", data-placement="right") Inactive
|
||||
else
|
||||
span.label Offline
|
||||
span.label.tip(data-original-title="#{nick.active.ago}", data-placement="right") Offline
|
||||
td
|
||||
if nick.online
|
||||
if nick.active
|
||||
if nick.active.active
|
||||
-1
|
||||
else
|
||||
0
|
||||
|
Loading…
Reference in New Issue
Block a user