Better userlist sorting, started work on default theme

This commit is contained in:
khlieng 2015-01-28 02:54:47 +01:00
parent 721971cbb3
commit 5c6c43e017
2 changed files with 28 additions and 13 deletions

View File

@ -52,10 +52,25 @@ function updateRenderName(user) {
function sortUsers(server, channel) {
channels[server][channel].users.sort(function(a, b) {
if (a.renderName < b.renderName) {
a = a.renderName.toLowerCase();
b = b.renderName.toLowerCase();
if (a[0] === '@' && b[0] !== '@') {
return -1;
}
if (a.renderName > b.renderName) {
if (b[0] === '@' && a[0] !== '@') {
return 1;
}
if (a[0] === '+' && b[0] !== '+') {
return -1;
}
if (b[0] === '+' && a[0] !== '+') {
return 1;
}
if (a < b) {
return -1;
}
if (a > b) {
return 1;
}
return 0;

View File

@ -6,16 +6,14 @@
body {
font-family: Inconsolata, sans-serif;
background: #111;
color: #FFF;
background: #f0f0f0;
}
input {
font: 16px Inconsolata, sans-serif;
background: rgba(0,0,0,0.25);
color: #FFF;
outline: none;
border: none;
border-top: 1px solid #DDD;
outline: none;
}
p {
@ -27,9 +25,11 @@ p {
left: 0;
top: 0;
bottom: 0;
right: 200px;
width: 200px;
padding: 15px;
overflow: auto;
background: #272626;
color: #FFF;
}
.tablist p {
@ -37,25 +37,24 @@ p {
}
.tablist p:hover {
color: #AAA;
}
.chat-title-bar {
position: fixed;
left: 200px;
top: 0;
right: 200px;
right: 0;
height: 50px;
padding: 0 15px;
line-height: 50px;
background: rgba(0,0,0,0.25);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
border-bottom: 1px solid #DDD;
}
.chat-title {
font-size: 24px;
}
.messagebox {
@ -94,10 +93,11 @@ p {
.userlist {
position: fixed;
top: 0;
top: 50px;
bottom: 50px;
right: 0;
width: 200px;
padding: 15px;
overflow: auto;
border-left: 1px solid #DDD;
}