Implemente la notification de connection

Ok coté serveur, et interface web
manque le client mobile
This commit is contained in:
Paul Schneider 2016-10-27 17:23:48 +02:00
commit dfef2127e0
3 changed files with 58 additions and 42 deletions

View file

@ -19,6 +19,8 @@
</ul>
<ul id="private">
</ul>
<ul id="chatnotifs">
</ul>
</div>
@section scripts {
<!--Script references. -->
@ -43,6 +45,11 @@
$('#private').append('<li><strong>' + htmlEncode(name)
+ '</strong>: ' + htmlEncode(message) + '</li>');
};
chat.client.notify = function (tag, message) {
// Add the pv to the page.
$('#chatnotifs').append('<li><i>' + htmlEncode(tag)
+ '</i> ' + htmlEncode(message) + '</li>');
};
// Get the user name and store it to prepend to messages.
$('#displayname').val(prompt('Enter your name:', ''));
// Set initial focus to message input box.