1
0
mirror of https://github.com/citizenfx/cfx-server-data.git synced 2025-03-12 14:57:21 +08:00

Fixed some chat stuff

This commit is contained in:
Jonas Dellinger 2017-06-26 16:23:57 +02:00
parent 74e6ffd6c3
commit 68ba12414f
3 changed files with 13 additions and 13 deletions

View File

@ -130,20 +130,15 @@ window.APP = {
input.style.height = `${input.scrollHeight + 2}px`;
},
send(e) {
if (e.shiftKey) {
this.message += '\n';
this.resize();
if(this.message !== '') {
post('http://chat/chatResult', JSON.stringify({
message: this.message,
}));
this.oldMessages.unshift(this.message);
this.oldMessagesIndex = -1;
this.hideInput();
} else {
if(this.message !== '') {
post('http://chat/chatResult', JSON.stringify({
message: this.message,
}));
this.oldMessages.unshift(this.message);
this.oldMessagesIndex = -1;
this.hideInput();
} else {
this.hideInput(true);
}
this.hideInput(true);
}
},
hideInput(canceled = false) {

View File

@ -83,6 +83,10 @@ textarea {
overflow: hidden;
}
textarea:focus, input:focus {
outline: none;
}
.msg {
margin-bottom: 3px;
}

View File

@ -37,6 +37,7 @@
ref="input"
type="text"
autofocus
spellcheck="false"
@keyup.esc="hideInput"
@keyup="keyUp"
@keydown="keyDown"