mirror of
https://github.com/darkwire/darkwire.io.git
synced 2025-07-18 18:54:52 +00:00
Merge branch 'master' of https://github.com/seripap/fattychat
This commit is contained in:
commit
2ca7a2bd56
@ -292,6 +292,10 @@ $(function() {
|
|||||||
removeChatTyping(data);
|
removeChatTyping(data);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
socket.on('first', function() {
|
||||||
|
$('.modal').modal('show');
|
||||||
|
});
|
||||||
|
|
||||||
setUsername();
|
setUsername();
|
||||||
|
|
||||||
$('span.key-btn').click(function() {
|
$('span.key-btn').click(function() {
|
||||||
|
@ -24,6 +24,10 @@ class Room {
|
|||||||
socket.on('add user', (username) => {
|
socket.on('add user', (username) => {
|
||||||
if (addedUser) return;
|
if (addedUser) return;
|
||||||
|
|
||||||
|
if (this.numUsers === 0) {
|
||||||
|
socket.emit('first');
|
||||||
|
}
|
||||||
|
|
||||||
// we store the username in the socket session for this client
|
// we store the username in the socket session for this client
|
||||||
socket.username = username;
|
socket.username = username;
|
||||||
++this.numUsers;
|
++this.numUsers;
|
||||||
|
@ -30,7 +30,7 @@
|
|||||||
<h4 class="modal-title">Key</h4>
|
<h4 class="modal-title">Key</h4>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<p>Enter your key below</p>
|
<p>This is your chat encryption key. Anyone who is in this chat room must use the same key to decrypt chat messages. This key is <strong>NOT</strong> stored nor transmitted to the server. If the key does not match, other clients will see encrypted messages. You may change the key as many times as you want.</p>
|
||||||
<input id="key" placeholder="Enter key here">
|
<input id="key" placeholder="Enter key here">
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user