a few small fixes

This commit is contained in:
Gene S
2016-01-27 10:39:24 -08:00
parent 156f1f50bc
commit d331367223
2 changed files with 16 additions and 15 deletions
+10 -10
View File
@@ -219,7 +219,7 @@ form {
} }
#self-avatar { #self-avatar {
width: 30pt; width: 3rem;
height: auto; height: auto;
flex: none; flex: none;
} }
@@ -247,8 +247,8 @@ form {
#contact-box li { #contact-box li {
display: flex; display: flex;
padding: 0.5em; padding: 0.35rem 0.25rem 0.5rem 0.35rem;
min-height: 3.5em; min-height: 3.5rem;
overflow: hidden; overflow: hidden;
} }
#contact-box li:hover { #contact-box li:hover {
@@ -264,15 +264,15 @@ form {
/* Avatar and online-offline indicator */ /* Avatar and online-offline indicator */
#contact-box .avatar-box { #contact-box .avatar-box {
margin-right: 1rem; margin-right: 0.5rem;
position: relative; position: relative;
width: 30pt; width: 3rem;
height: 30pt; height: 3rem;
overflow: hidden; overflow: hidden;
padding: 0; padding: 0;
} }
#contact-box .avatar { #contact-box .avatar {
width: 30pt; width: 3rem;
height: auto; height: auto;
} }
@@ -288,7 +288,7 @@ form {
color: #4caf50; color: #4caf50;
} }
#contact-box .offline { #contact-box .offline {
color: #9e9e9e; color: #888;
} }
#add-topic { #add-topic {
@@ -537,10 +537,10 @@ form {
} }
#self-avatar.material-icons, .avatar-box .material-icons { #self-avatar.material-icons, .avatar-box .material-icons {
font-size: 30pt; font-size: 2.8rem;
} }
.avatar-box .material-icons { .avatar-box .material-icons {
color: #fafafa; color: rgba(250, 250, 250, 0.8); /* #fafafa, gray 50 */
background-color: #bdbdbd; background-color: #bdbdbd;
border-radius: 2pt; border-radius: 2pt;
} }
+6 -5
View File
@@ -402,7 +402,8 @@
me.onSubsUpdated = this.tnMeSubsUpdated; me.onSubsUpdated = this.tnMeSubsUpdated;
}, },
tnMeContactUpdate: function(what, cont) { tnMeContactUpdate: function(what, cont) {
console.log("changed: " + what + " in " + cont.topic); console.log("changed: " + what + " in :");
console.log(cont);
this.forceUpdate(); this.forceUpdate();
}, },
tnInvite: function(invite) { tnInvite: function(invite) {
@@ -684,18 +685,18 @@ dignissim a diam a hendrerit. Nulla vel est ut quam rhoncus pulvinar. In hac hab
keypressTimestamp: new Date().getTime() - KEYPRESS_DELAY - 1 keypressTimestamp: new Date().getTime() - KEYPRESS_DELAY - 1
}; };
}, },
handleSend: function(e) { handleSend: function() {
var message = this.state.message.trim(); var message = this.state.message.trim();
if (message) { if (message) {
this.props.sendMessage(this.state.message.trim()); this.props.sendMessage(this.state.message.trim());
this.setState({message: ''}); this.setState({message: ''});
} }
}, },
/* Send on Enter key */
handleKeyPress: function(e) { handleKeyPress: function(e) {
/* Remove this if you don't want Enter to trigger send */
if (e.key === 'Enter') { if (e.key === 'Enter') {
console.log('do validate'); this.handleSend();
} else {
console.log(e.key);
} }
}, },
handleMessageTyping: function(e) { handleMessageTyping: function(e) {