]> git.0d.be Git - panikweb.git/commitdiff
chat: add nick to prompt
authorFrédéric Péters <fpeters@0d.be>
Thu, 20 Apr 2017 07:33:41 +0000 (09:33 +0200)
committerFrédéric Péters <fpeters@0d.be>
Thu, 20 Apr 2017 07:33:41 +0000 (09:33 +0200)
panikweb_templates/static/js/specifics.js
panikweb_templates/templates/chat.html

index c3b60e2f7e533a6c1bfd7f9f33268c1f680123aa..4bce603357b92cb1d08e53bf59692bc7b1eb2045 100644 (file)
@@ -575,6 +575,7 @@ $(function() {
                     $('.nick button').on('click', function() {
                       window.localStorage['pa-nick'] = $('.nick input').val();
                       var nick = window.localStorage['pa-nick'];
+                      $('.commands .prompt').text(nick + '>');
 
                       connection = new Strophe.Connection("/http-bind");
                       connection.connect('im.panik', null, function(status, error) {
index b4b3deaf37892a678565ed539de8eb4f4c483d19..c0a08a878482ba5e5883a4cb6e0f1fe277ec83f1 100644 (file)
@@ -43,7 +43,7 @@
 <div class="nick">Pseudo ? <input name="nick"> <button>Se connecter</button></div>
 
 <div class="commands" style="display: none;">
-&gt;&nbsp;&nbsp;<input id="msg" name="msg"> <button id="send">ok</button>
+  <span class="prompt">&gt;</span>&nbsp;&nbsp;<input id="msg" name="msg"> <button id="send">ok</button>
 </div>
 
 <div id="chat" data-chatroom="{{emission.slug}}">