Merge branch 'master' into del
This commit is contained in:
commit
d27a53feea
Binary file not shown.
After Width: | Height: | Size: 26 KiB |
|
@ -16,10 +16,12 @@ let pcPeers = {}; // peer connection
|
|||
let localstream;
|
||||
|
||||
window.onload = () => {
|
||||
currentUser = document.getElementById("current-user").innerHTML;
|
||||
console.log(currentUser)
|
||||
localVideo = document.getElementById("local-video");
|
||||
remoteVideoContainer = document.getElementById("remote-video-container");
|
||||
// if (document.getElementById("current-user")) {
|
||||
currentUser = document.getElementById("current-user").innerHTML;
|
||||
console.log(currentUser)
|
||||
localVideo = document.getElementById("local-video");
|
||||
remoteVideoContainer = document.getElementById("remote-video-container");
|
||||
// }
|
||||
};
|
||||
|
||||
// Ice Credentials
|
||||
|
@ -35,8 +37,10 @@ document.onreadystatechange = async () => {
|
|||
})
|
||||
|
||||
localstream = stream;
|
||||
localVideo.srcObject = stream
|
||||
localVideo.muted = true
|
||||
// if (localVideo) {
|
||||
localVideo.srcObject = stream
|
||||
localVideo.muted = true
|
||||
// }
|
||||
} catch (e) { console.error(e); }
|
||||
}
|
||||
};
|
||||
|
@ -67,7 +71,11 @@ document.onreadystatechange = async () => {
|
|||
// }
|
||||
// });
|
||||
// };
|
||||
const chatroomId = document.getElementById('chatroom-hook').dataset["chatroomId"]
|
||||
|
||||
// if (document.getElementById('chatroom-hook')) {
|
||||
const chatroomId = document.getElementById('chatroom-hook').dataset["chatroomId"]
|
||||
|
||||
// }
|
||||
|
||||
const handleJoinSession = async () => {
|
||||
App['chatroom' + chatroomId] = await App.cable.subscriptions.create({
|
||||
|
|
|
@ -131,3 +131,31 @@ a:hover {
|
|||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.contact {
|
||||
color: white;
|
||||
}
|
||||
|
||||
.contacts {
|
||||
height: 570px;
|
||||
overflow: scroll;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
|
||||
const triggerModalEvent = () => {
|
||||
const btn = document.getElementById("modalTrigger");
|
||||
const modal = document.getElementById("myModal");
|
||||
|
||||
btn.addEventListener('click', function(event) {
|
||||
$('#myModal').modal('show');
|
||||
});
|
||||
}
|
||||
|
||||
export { triggerModalEvent }
|
|
@ -1,4 +1,9 @@
|
|||
import "bootstrap";
|
||||
|
||||
import { profilePageAnimation } from '../users/lesson';
|
||||
profilePageAnimation();
|
||||
import { triggerModalEvent } from "../components/modal.js";
|
||||
|
||||
triggerModalEvent();
|
||||
|
||||
// import { profilePageAnimation } from '../users/lesson';
|
||||
|
||||
// profilePageAnimation();
|
||||
|
|
|
@ -1,8 +0,0 @@
|
|||
import "bootstrap";
|
||||
|
||||
const btn = document.getElementById("modalTrigger");
|
||||
const modal = document.getElementById("myModal");
|
||||
|
||||
btn.addEventListener('click', function(event) {
|
||||
$('#myModal').modal('show');
|
||||
});
|
|
@ -3,6 +3,7 @@
|
|||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
<%= favicon_link_tag 'favicon.ico' %> <!-- Need a favicon to change picture in title bar -->
|
||||
<title>Polyglot</title>
|
||||
<%= csrf_meta_tags %>
|
||||
<%= action_cable_meta_tag %>
|
||||
|
@ -15,5 +16,6 @@
|
|||
<%= yield %>
|
||||
<%= javascript_include_tag 'application' %>
|
||||
<%= javascript_pack_tag 'application' %>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -65,4 +65,3 @@ end
|
|||
</div>
|
||||
|
||||
|
||||
<%= javascript_pack_tag 'modal' %>
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
<i class="fas fa-plus-square"></i>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<% current_user.contacts.each do |contact| %>
|
||||
<%= render "pages/contact", contact: contact %>
|
||||
<% end %>
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
<%= simple_form_for(@page) do |p| %>
|
||||
|
||||
<%= p.input :first_name, as: :text, input_html: { autocomplete: "off" } %>
|
||||
<%= p.input :last_name, as: :text, input_html: { autocomplete: "off" } %>
|
||||
<%= p.input :email, as: :text, input_html: { autocomplete: "off" } %>
|
||||
<%= p.input :photo %>
|
||||
<%= p.input :photo_cache, as: :hidden %>
|
||||
|
||||
<%= p.button :submit, class: "btn btn-primary" %>
|
||||
<% end %>
|
Loading…
Reference in New Issue