diff --git a/index.html b/index.html index 8bac86e..9890840 100644 --- a/index.html +++ b/index.html @@ -7,6 +7,7 @@ + diff --git a/scripts/communications.js b/scripts/communications.js index 2366b07..3d7ec1d 100644 --- a/scripts/communications.js +++ b/scripts/communications.js @@ -486,6 +486,9 @@ function connect(profile, connection_id) username: profile.username, password: profile.password }); + + // Save the details + g.username = profile.username; } }); diff --git a/scripts/profiles.js b/scripts/profiles.js index 304e2ca..de2ffef 100644 --- a/scripts/profiles.js +++ b/scripts/profiles.js @@ -161,9 +161,22 @@ function chat_switch_to(id) // Loop over the messages for(var i=0;i\ +

"+connections[active_profile].chats[id].messages[i].from+"

\

"+connections[active_profile].chats[id].messages[i].message+"

\ \ "; @@ -201,6 +214,13 @@ function chat_send() // Clear the textarea document.getElementById("chat-content-send-textarea").value = ""; + + // Focus the text area really soon + setTimeout(function() + { + // Focus the text area + document.getElementById("chat-content-send-textarea").focus(); + }, 10); } function add_chat_menu() diff --git a/style.css b/style.css index 804ab0d..2fb94d2 100644 --- a/style.css +++ b/style.css @@ -66,6 +66,10 @@ padding: 10px; } +#chat-area { + padding: 0 120px; +} + #chat-content-send { position: fixed; left: 360px; @@ -74,3 +78,18 @@ padding: 12px; background-color: #CCD; } + +.chat-content-message { + padding: 8px; + margin: 8px; + border-radius: 8px; + background-color: #CCD; + display: inline-block; + float: left; + width: 80%; +} + +.chat-content-message.sender { + background-color: #AAE; + float: right; +}