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){
|
"~test_setprop": function(event){
|
||||||
if(event.params[1] && event.params[2]){
|
if(event.params[1] && event.params[2]){
|
||||||
dbot.db.profiles[event.server][event.user.toLowerCase()].profile[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,
|
"primary": null,
|
||||||
"name": null,
|
"name": null,
|
||||||
"tagline": null,
|
"tagline": null,
|
||||||
|
"avatar": null,
|
||||||
|
"bio": null,
|
||||||
"favourites": {
|
"favourites": {
|
||||||
"colour": null
|
"colour": null
|
||||||
}
|
}
|
||||||
|
@ -31,7 +31,6 @@ p {
|
|||||||
}
|
}
|
||||||
|
|
||||||
div#page {
|
div#page {
|
||||||
width: 90%;
|
|
||||||
margin: 0 auto 0 auto;
|
margin: 0 auto 0 auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -55,9 +54,8 @@ div#title a {
|
|||||||
}
|
}
|
||||||
|
|
||||||
div#main {
|
div#main {
|
||||||
position: relative;
|
position: relative;
|
||||||
padding: 15px 5px;
|
padding: 10px 5px;
|
||||||
margin: 0px;
|
|
||||||
font-size: 21px;
|
font-size: 21px;
|
||||||
text-align:center;
|
text-align:center;
|
||||||
background: #FFF;
|
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_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; }
|
.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#page
|
||||||
div#title
|
div#title
|
||||||
a(href='/') #{name} web interface
|
a(href='/') #{name} web interface
|
||||||
div#main
|
div.container#main
|
||||||
block content
|
block content
|
||||||
script(type="text/javascript", src="/bootstrap/js/bootstrap.min.js")
|
script(type="text/javascript", src="/bootstrap/js/bootstrap.min.js")
|
||||||
script(type="text/javascript", src="/d3/d3.v3.min.js")
|
script(type="text/javascript", src="/d3/d3.v3.min.js")
|
||||||
|
@ -21,6 +21,7 @@ block content
|
|||||||
}
|
}
|
||||||
} );
|
} );
|
||||||
|
|
||||||
|
$('.tip').tooltip();
|
||||||
$('.data').dataTable({
|
$('.data').dataTable({
|
||||||
"aoColumnDefs": [
|
"aoColumnDefs": [
|
||||||
{ "sType": "forcenum",
|
{ "sType": "forcenum",
|
||||||
@ -38,11 +39,25 @@ block content
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
div.page-header
|
div.page-header.profile_page-header
|
||||||
h1
|
h1
|
||||||
#{primary}
|
#{primary}
|
||||||
|
small
|
||||||
div#row
|
"#{profile.tagline}"
|
||||||
|
|
||||||
|
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
|
table.table.table-hover.data
|
||||||
thead
|
thead
|
||||||
tr
|
tr
|
||||||
@ -61,12 +76,12 @@ block content
|
|||||||
#{key}
|
#{key}
|
||||||
span
|
span
|
||||||
if chan.online
|
if chan.online
|
||||||
if chan.active
|
if chan.active.active
|
||||||
span.label.label-success Active
|
span.label.label-success.tip(data-original-title="#{chan.active.ago}", data-placement="right") Active
|
||||||
else
|
else
|
||||||
span.label.label-important Inactive
|
span.label.label-important.tip(data-original-title="#{chan.active.ago}", data-placement="right") Inactive
|
||||||
else
|
else
|
||||||
span.label Offline
|
span.label.tip(data-original-title="#{chan.active.ago}", data-placement="right") Offline
|
||||||
td
|
td
|
||||||
#{chan.fields.lines.data}
|
#{chan.fields.lines.data}
|
||||||
td
|
td
|
||||||
|
@ -21,6 +21,7 @@ block content
|
|||||||
}
|
}
|
||||||
} );
|
} );
|
||||||
|
|
||||||
|
$('.tip').tooltip();
|
||||||
$('.data').dataTable({
|
$('.data').dataTable({
|
||||||
"aoColumnDefs": [
|
"aoColumnDefs": [
|
||||||
{ "aDataSort": [ 1, 0 ], "asSorting": [ "asc" ], "aTargets": [ 0 ] },
|
{ "aDataSort": [ 1, 0 ], "asSorting": [ "asc" ], "aTargets": [ 0 ] },
|
||||||
@ -61,15 +62,15 @@ block content
|
|||||||
#{nick.display}
|
#{nick.display}
|
||||||
span
|
span
|
||||||
if nick.online
|
if nick.online
|
||||||
if nick.active
|
if nick.active.active
|
||||||
span.label.label-success Active
|
span.label.label-success.tip(data-original-title="#{nick.active.ago}", data-placement="right") Active
|
||||||
else
|
else
|
||||||
span.label.label-important Inactive
|
span.label.label-important.tip(data-original-title="#{nick.active.ago}", data-placement="right") Inactive
|
||||||
else
|
else
|
||||||
span.label Offline
|
span.label.tip(data-original-title="#{nick.active.ago}", data-placement="right") Offline
|
||||||
td
|
td
|
||||||
if nick.online
|
if nick.online
|
||||||
if nick.active
|
if nick.active.active
|
||||||
-1
|
-1
|
||||||
else
|
else
|
||||||
0
|
0
|
||||||
|
Loading…
Reference in New Issue
Block a user