added chatroom channel with room ids and notifications channel

This commit is contained in:
Beatrice Olivera
2018-08-30 03:00:09 +01:00
parent f0bca74f89
commit 405d2cd5df
17 changed files with 699 additions and 25 deletions

View File

@@ -0,0 +1,6 @@
<h1 style="color: white;">This is chatroom #<%= @chat_room.id %></h1>
<div id="chatroom-hook" data-chatroom-id='<%= @chat_room.id %>'></div>
<button id="test-btn">Test Connection</button>
<%= javascript_pack_tag 'chatrooms' %>

View File

@@ -1,18 +1,30 @@
<%
def hello_world
puts "Hello World"
end
%>
<div class="card">
<div class="info">
<img src="https://kitt.lewagon.com/placeholder/users/ssaunier" alt="" class="profile img-circle" width=65>
<div class="text text-color">
<p>FirstName LastName</p>
<% if contact.nil? || contact.nil? %> <!-- REPLACE WITH FIRST NAME AND LAST NAME -->
<p><%= contact.email %></p>
<% else %>
<p><%= contact.email %></p>
<!-- <p><%#= contact.first_name %> <%#= contact.last_name %></p> -->
<% end %>
<p class="darker">Last call: <%= Time.now %></p>
</div>
</div>
<div class="call">
<%= link_to "#", 'data-toggle':"modal", 'data-target':"#myModal" do %>
<div class="call" data-user-id="<%= contact.id %>">
<%= link_to establish_call_path(contact.id), 'data-toggle':"modal", 'data-target':"#myModal" do %>
<i class="fas fa-phone"></i>
<% end %>
</div>
</div>
<!-- Modal -->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="vertical-alignment-helper">
@@ -27,7 +39,17 @@
<img src="https://kitt.lewagon.com/placeholder/users/ssaunier" alt="" class="profile img-circle" width=150>
<div class="modal-text">
<h4 class="modal-title" id="myModalLabel">Calling</h4>
<h4><strong>FirstName LastName</strong></h4>
<h4>
<strong>
<!-- REPLACE WITH FIRST NAME AND LAST NAME -->
<% if contact.nil? || contact.nil? %>
<p><%= contact.email %></p>
<% else %>
<p><%= contact.email %></p>
<!-- <p><%#= contact.first_name %> <%#= contact.last_name %></p> -->
<% end %>
</strong>
</h4>
</div>
</div>
</div>

View File

@@ -2,8 +2,8 @@
<div class="contacts-container text-color">
<div class="contacts half">
<h2>Contacts</h2>
<% 5.times do %>
<%= render "pages/contact" %>
<% current_user.contacts.each do |contact| %>
<%= render "pages/contact", contact: contact %>
<% end %>
</div>
<div class="video-feed half">
@@ -14,6 +14,7 @@
</div>
</div>
<div id="my-user-id" data-user-id="<%= current_user.id %>"></div>
<%= javascript_pack_tag 'notifications' %>
<button class="btn btn-primary" id="accept-button" style="display: none;">ACCEPT CALL</button>