diff --git a/app/javascript/packs/application.js b/app/javascript/packs/application.js index 72512a0..948618c 100644 --- a/app/javascript/packs/application.js +++ b/app/javascript/packs/application.js @@ -100,3 +100,4 @@ if (acceptButton) { document.getElementById('chat-room-id').value = chatRoomId }) } + diff --git a/app/javascript/packs/webrtc.js b/app/javascript/packs/webrtc.js index fd787df..e1d83e3 100644 --- a/app/javascript/packs/webrtc.js +++ b/app/javascript/packs/webrtc.js @@ -220,3 +220,18 @@ setTimeout(function() { window.__proto__.reload = () => { window.location = window.location } })(); + +// // have enter with JS +// const form = document.getElementById("chat-form") +// document.getElementById("chat-input").addEventListener("keyup", event => { +// if(event == "Enter"){ +// form.submit(); +// } +// }); + + +document.getElementById("chat-form").addEventListener("click", function(event){ + event.preventDefault() +}); + + diff --git a/app/uploaders/photo_uploader.rb b/app/uploaders/photo_uploader.rb index a700b37..a9dc606 100644 --- a/app/uploaders/photo_uploader.rb +++ b/app/uploaders/photo_uploader.rb @@ -1,3 +1,6 @@ class PhotoUploader < CarrierWave::Uploader::Base include Cloudinary::CarrierWave + + process convert: "jpg" + process tags: ["profile_picture"] end diff --git a/app/views/chat_rooms/show.html.erb b/app/views/chat_rooms/show.html.erb index 4e7974b..d4b1216 100644 --- a/app/views/chat_rooms/show.html.erb +++ b/app/views/chat_rooms/show.html.erb @@ -31,16 +31,17 @@ <% end %> - - - - - - + +
+ + + + + +
+ diff --git a/app/views/pages/_contact.html.erb b/app/views/pages/_contact.html.erb index e95836c..86f0f0d 100644 --- a/app/views/pages/_contact.html.erb +++ b/app/views/pages/_contact.html.erb @@ -3,7 +3,9 @@ <% if contact.photo.url.nil? %> <% else %> - <%= cl_image_tag contact.photo, class: "profile avatar dropdown-toggle img-circle", width:65%> + <%= cl_image_tag(contact.photo, class: "profile avatar dropdown-toggle img-circle", width:65, transformation: [ + { gravity: "face:auto", width: 100, height: 100, radius: "max", crop: "crop" } + ])%> <% end %>
<% if contact.first_name.nil? || contact.last_name.nil? %> @@ -39,7 +41,8 @@ <% if contact.photo.url.nil? %> <% else %> - <%= cl_image_tag contact.photo, class: "profile avatar dropdown-toggle img-circle modal-picture", width:150%> + <%= cl_image_tag(contact.photo, class: "profile avatar dropdown-toggle img-circle modal-picture", width:150, transformation: [ + { gravity: "face:auto", width: 100, height: 100, radius: "max", crop: "crop" }])%> <% end %>