From 6f9cd73f5b8273ab659554e541e52af786789bac Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Wed, 23 Jan 2019 16:44:27 +0100 Subject: Many frontend improvements --- public/scripts/0_general.js | 4 ++++ public/scripts/main.js | 12 +++++++----- 2 files changed, 11 insertions(+), 5 deletions(-) create mode 100644 public/scripts/0_general.js (limited to 'public/scripts') diff --git a/public/scripts/0_general.js b/public/scripts/0_general.js new file mode 100644 index 0000000..ea259e7 --- /dev/null +++ b/public/scripts/0_general.js @@ -0,0 +1,4 @@ +/** + * General imports + */ +require('@fortawesome/fontawesome-free/js/all.min'); diff --git a/public/scripts/main.js b/public/scripts/main.js index 75fae1b..b2f2816 100644 --- a/public/scripts/main.js +++ b/public/scripts/main.js @@ -28,6 +28,7 @@ function connect(id) { // setup listener connectedUser.on('open', () => { // TODO: Activate chat or sth + // TODO: Send public key }); connectedUser.on('data', message => receivedMessage(message)) @@ -50,10 +51,9 @@ function sendMessage(message) { */ function receivedMessage(message, self = false) { if (self) { - $('#messages').append(`${message}