windhamdavid 3 years ago
parent
commit
5ef661c2e6
6 changed files with 45 additions and 43 deletions
  1. 1 1
      app.js
  2. 0 1
      src/css/main.css
  3. BIN
      src/img/pirate.jpg
  4. 39 36
      src/index.html
  5. 3 3
      src/js/chat.js
  6. 2 2
      src/js/templates/room.handlebars

+ 1 - 1
app.js

@@ -100,7 +100,7 @@ io.sockets.on('connection', function(socket) {
     // Confirm subscription to user
     socket.emit('subscriptionConfirmed', {'room':conf.mainroom});
     // Notify subscription to all users in room
-    var data = {'room':conf.mainroom, 'username':'anonymous', 'msg':'----- Joined the room -----', 'id':socket.id};
+    var data = {'room':conf.mainroom, 'username':'anonymous', 'msg':'----- Joined -----', 'id':socket.id};
     io.to(conf.mainroom).emit('userJoinsRoom', data);
 
     // User wants to subscribe to [data.rooms]

+ 0 - 1
src/css/main.css

@@ -40,7 +40,6 @@ header {
 
 #auth-modal {
   background: #000;
-  background-image: url(img/pirate.jpg) no-repeat #000;
   color: #fff;
 }
 #auth-modal .modal-content{

BIN
src/img/pirate.jpg


+ 39 - 36
src/index.html

@@ -130,11 +130,12 @@
                            
                         </div>
                         <p><span id="error-reconnecting-again"class="label label-danger">ERROR</span></p>
-                        <p>Unable to connect with <a href="http://stream.davidawindham.com/"><i>stream.davidawindham.com</i></a>. I only play music when I'm listening to it live and the rest of the time the stream is offline. There is no reason to be here unless I am. Try again some other time or <a href="https://davidawindham.com/contact">contact me</a>.</p>
+                        <p>Unable to connect with <i>stream.davidawindham.com</i>. 
+                           <br />This could be a temporary network issue or I may have gone offline.</p>
                         </div>
                      </div>
                      <div class="modal-footer">
-                        <button type="button" id="connection-error-retry" class="btn btn-danger">Retry</button>
+                        <button type="button" id="connection-error-retry" class="btn btn-danger">Retry Connection</button>
                      </div>
                    </div>
                  </div>
@@ -176,12 +177,12 @@
                       <div class="well">
                            <div class="row-fluid">
                                <div id="room_messages" style="min-height:220px; max-height:220px; overflow:auto;">
-                                   <span class="label label-danger">Radio-bot</span>&nbsp;&nbsp;Welcome to the Daveo Radio!<br/>
+                                   <span class="label label-danger">Daveo-bot</span>&nbsp;&nbsp;Welcome to the Daveo Radio!<br/>
                                </div>
                            </div>  
                            <div class="row-fluid">
                               <div id="room_users">
-                                  <span class="label label-success">online:</span> <span class="label label-danger">Radio-bot</span>
+                                  <span class="label label-success">online:</span> <span class="label label-danger">Daveo-bot</span>
                               </div>
                            </div>
                        </div>              
@@ -268,7 +269,7 @@
                
             </div>
          
-            <!-- START Modal -->      
+            <!-- START Room Modal -->      
             <div id="modal_joinroom" class="modal fade">
                <div class="vertical-alignment-helper">
                   <div class="modal-dialog modal-sm vertical-align-center">
@@ -288,41 +289,43 @@
                   </div>
                </div>
             </div>
+            <!-- END Room Modal --> 
             
-<div id="modal_setnick" class="modal fade" data-keyboard="false" data-backdrop="static" >
-   <div class="vertical-alignment-helper">
-      <div class="modal-dialog modal-sm">
-         <div class="modal-content">
-            <form id="nick" role="form">
-               <div class="modal-body">
-                  <div class="form-group has-feedback">
-                     <label class="control-label" for="nickname">Nickname:</label>
-                     <div class="input-group">
-                        <span class="input-group-addon">@</span>
-                        <input id="nickname" type="text" class="form-control" pattern="^[a-zA-Z]+$" minlength="3" maxlength="25" placeholder="letters only (min 3)" required>
-                        <span class="glyphicon form-control-feedback" aria-hidden="true"></span>               
-                     </div>
-                     <div class="help-block with-errors"></div>
-                  </div>
-                  <div class="form-group has-feedback">
-                     <label class="control-label" for="password">Password:</label>
-                     <div class="input-group">                  
-                        <span class="input-group-addon"><span class="glyphicon glyphicon-cog" aria-hidden="true"></span></span>
-                        <input id="other" name="other" type="text" class="form-control" data-remote="/other" placeholder="" required>
-                        <span class="glyphicon form-control-feedback" aria-hidden="true"></span>
+            <!-- START Nick Modal --> 
+               <div id="modal_setnick" class="modal fade" data-keyboard="false" data-backdrop="static" >
+                  <div class="vertical-alignment-helper">
+                     <div class="modal-dialog modal-sm">
+                        <div class="modal-content">
+                           <form id="nick" role="form">
+                              <div class="modal-body">
+                                 <div class="form-group has-feedback">
+                                    <label class="control-label" for="nickname">Nickname:</label>
+                                    <div class="input-group">
+                                       <span class="input-group-addon">@</span>
+                                       <input id="nickname" type="text" class="form-control" pattern="^[a-zA-Z]+$" minlength="3" maxlength="25" placeholder="letters only (min 3)" required>
+                                       <span class="glyphicon form-control-feedback" aria-hidden="true"></span>               
+                                    </div>
+                                    <div class="help-block with-errors"></div>
+                                 </div>
+                                 <div class="form-group has-feedback">
+                                    <label class="control-label" for="password">Password:</label>
+                                    <div class="input-group">                  
+                                       <span class="input-group-addon"><span class="glyphicon glyphicon-cog" aria-hidden="true"></span></span>
+                                       <input id="other" name="other" type="text" class="form-control" data-remote="/other" placeholder="" required>
+                                       <span class="glyphicon form-control-feedback" aria-hidden="true"></span>
+                                    </div>
+                                    <div class="help-block with-errors"></div>
+                                 </div>
+                              </div>
+                              <div class="modal-footer">
+                                 <button id="b_set_nickname" type="submit" class="btn btn-success">Submit</button>
+                              </div>
+                           </form>
+                        </div>
                      </div>
-                     <div class="help-block with-errors"></div>
                   </div>
                </div>
-               <div class="modal-footer">
-                  <button id="b_set_nickname" type="submit" class="btn btn-success">Submit</button>
-               </div>
-            </form>
-         </div>
-      </div>
-   </div>
-</div>
-            <!-- End Modal -->
+            <!-- END Nick Modal -->
             
             <!-- START Auth Modal -->
             <div class="modal fade" id="auth-modal" data-keyboard="false" data-backdrop="static" tabindex="-1" role="dialog" aria-labelledby="support" aria-hidden="true">

+ 3 - 3
src/js/chat.js

@@ -32,13 +32,13 @@
 
     // Disconnected from server
     socket.on('disconnect', function (data) {
-        var info = {'room':'Lobby', 'username':'Radio-bot', 'msg':'---- Lost connection ----'};
+        var info = {'room':'Lobby', 'username':'Daveo-bot', 'msg':'---- Lost connection ----'};
         addBotMessage(info);
     });
     
     // Reconnected to server
     socket.on('reconnect', function (data) {
-        var info = {'room':'Lobby', 'username':'Radio-bot', 'msg':'---- Reconnected ----'};
+        var info = {'room':'Lobby', 'username':'Daveo-bot', 'msg':'---- Reconnected ----'};
         addBotMessage(info);
     });
 
@@ -109,7 +109,7 @@
         updateNickname(data);
 
         msg = '----- ' + data.oldUsername + ' is now ' + data.newUsername + ' -----';
-        var info = {'room':data.room, 'username':'Radio-bot', 'msg':msg};
+        var info = {'room':data.room, 'username':'Daveo-bot', 'msg':msg};
         addBotMessage(info);
     });
 

+ 2 - 2
src/js/templates/room.handlebars

@@ -3,12 +3,12 @@
    <div class="well">
       <div class="row-fluid">
          <div id="room_messages" style="min-height:220px; max-height:220px; overflow:auto;">
-            <span class="label label-danger">Radio-bot</span>&nbsp;&nbsp;New Room Created<br/>
+            <span class="label label-danger">Daveo-bot</span>&nbsp;&nbsp;New Room Created<br/>
          </div>
       </div>
       <div class="row-fluid">
          <div id="room_users">
-            <span class="label label-success">online:</span> <span class="label label-danger">Radio-bot</span>
+            <span class="label label-success">online:</span> <span class="label label-danger">Daveo-bot</span>
          </div>
       </div>
    </div>