mirror of
https://github.com/citizenfx/cfx-server-data.git
synced 2025-12-12 06:14:09 +01:00
Fixed some chat stuff
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user