mirror of
https://github.com/beatriceo/polyglot.git
synced 2025-10-25 10:42:11 +00:00
Merge branch 'master' into page
This commit is contained in:
21
app/views/chat_rooms/show.html.erb
Normal file
21
app/views/chat_rooms/show.html.erb
Normal file
@@ -0,0 +1,21 @@
|
||||
<button onclick="handleJoinSession()" data-room="<%= @chat_room.id %>">Join Room</button>
|
||||
|
||||
<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>
|
||||
<div class="call-container">
|
||||
<div id="remote-video-container">
|
||||
<div id="video_overlays">
|
||||
<video id="local-video" autoplay></video>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<span class="text-color" style="display:none">Random User ID:</span>
|
||||
<span id="current-user" class="text-color" style="display:none"><%= current_user.id %></span>
|
||||
</div>
|
||||
|
||||
|
||||
<%= javascript_pack_tag 'chatrooms' %>
|
||||
@@ -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>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
|
||||
|
||||
<!--
|
||||
<div class="call-container">
|
||||
<div id="remote-video-container">
|
||||
<div id="video_overlays">
|
||||
@@ -7,7 +7,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
-->
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -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,13 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="my-user-id" data-user-id="<%= current_user.id %>"></div>
|
||||
|
||||
<form action="/accept_call" method="post">
|
||||
<input type="hidden" id="chat-room-id" name="chat_room_id" value=""/>
|
||||
<input type="submit" id="accept-button" class="btn btn-primary" id="accept-button" style="display: none;" value="ACCEPT CALL"/>
|
||||
</form>
|
||||
|
||||
<%= javascript_pack_tag 'notifications' %>
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user