minor updates to clean up code
This commit is contained in:
parent
157d056708
commit
9970c384c6
|
@ -13,8 +13,6 @@ class PagesController < ApplicationController
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def cable_testing
|
def cable_testing
|
||||||
chatroom = 'chat_room_' + params[:chat_room_id]
|
chatroom = 'chat_room_' + params[:chat_room_id]
|
||||||
puts params
|
puts params
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
const triggerModalEvent = () => {
|
const triggerModalEvent = () => {
|
||||||
const btn = document.getElementById("modalTrigger");
|
const btn = document.getElementById("modalTrigger");
|
||||||
const modal = document.getElementById("myModal");
|
const modal = document.getElementById("myModal");
|
||||||
|
|
|
@ -12,7 +12,6 @@ import ActionCable from 'actioncable'
|
||||||
const userId = parseInt(document.getElementById("my-user-id").dataset["userId"])
|
const userId = parseInt(document.getElementById("my-user-id").dataset["userId"])
|
||||||
let chatRoomId = null
|
let chatRoomId = null
|
||||||
|
|
||||||
|
|
||||||
App.cable.subscriptions.create({
|
App.cable.subscriptions.create({
|
||||||
channel: 'NotificationsChannel'
|
channel: 'NotificationsChannel'
|
||||||
}, {
|
}, {
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
<div id="join-btn" data-room="<%= @chat_room.id %>"></div>
|
<div id="join-btn" data-room="<%= @chat_room.id %>"></div>
|
||||||
<!-- <div id="join-session" onclick="handleJoinSession()" data-room="<%= @chat_room.id %>"> -->
|
|
||||||
|
|
||||||
<div id="chatroom-hook" data-chatroom-id='<%= @chat_room.id %>'></div>
|
<div id="chatroom-hook" data-chatroom-id='<%= @chat_room.id %>'></div>
|
||||||
|
|
||||||
|
@ -11,16 +10,10 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div><span id="current-user" class="text-color" style="display:none"><%= current_user.id %></span></div>
|
||||||
<span id="current-user" class="text-color" style="display:none"><%= current_user.id %></span>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<%= javascript_pack_tag 'chatrooms' %>
|
<%= javascript_pack_tag 'chatrooms' %>
|
||||||
<%= javascript_pack_tag 'webrtc' %>
|
<%= javascript_pack_tag 'webrtc' %>
|
||||||
|
|
||||||
<script>
|
|
||||||
|
|
||||||
</script>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -15,14 +15,13 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="call" data-user-id="<%= contact.id %>">
|
<div class="call" data-user-id="<%= contact.id %>">
|
||||||
|
<!-- Calls establish_call in pages_controller -->
|
||||||
<%= link_to establish_call_path(contact.id), remote: true, id: "modalTrigger" do %>
|
<%= link_to establish_call_path(contact.id), remote: true, id: "modalTrigger" do %>
|
||||||
<i class="fas fa-phone"></i>
|
<i class="fas fa-phone"></i>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- Modal -->
|
<!-- Modal -->
|
||||||
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
|
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
|
||||||
<div class="vertical-alignment-helper">
|
<div class="vertical-alignment-helper">
|
||||||
|
|
Loading…
Reference in New Issue