diff --git a/README.md b/README.md
index 8ad4d658..be58538d 100644
--- a/README.md
+++ b/README.md
@@ -12,7 +12,9 @@ Interested? Try Greenlight out on our [demo server](https://demo.bigbluebutton.o
Greenlight is also completely configurable. This means you can turn on/off features to make Greenlight fit your specific use case. For more information on Greenlight and its features, see our [documentation](http://docs.bigbluebutton.org/install/greenlight.html).
-For a overview of how Greenlight works, checkout our [Introduction to Greenlight Video](https://youtu.be/yGX3JCv7OVM).
+For a overview of how Greenlight works, checkout our Introduction to Greenlight Video:
+
+[](https://youtu.be/Hso8yLzkqj8)
## Installation on a BigBlueButton Server
diff --git a/app/assets/stylesheets/rooms.scss b/app/assets/stylesheets/rooms.scss
index 42daca51..6066d2db 100644
--- a/app/assets/stylesheets/rooms.scss
+++ b/app/assets/stylesheets/rooms.scss
@@ -7,7 +7,7 @@
}
.thumbnail {
- height: 40% !important;
+ height: 60px !important;
width: auto;
}
@@ -22,3 +22,7 @@
.home-indicator {
font-size: 22px !important;
}
+
+.btn-del-room {
+ width: 70% !important;
+}
diff --git a/app/controllers/rooms_controller.rb b/app/controllers/rooms_controller.rb
index e922f36b..57569b3a 100644
--- a/app/controllers/rooms_controller.rb
+++ b/app/controllers/rooms_controller.rb
@@ -65,8 +65,9 @@ class RoomsController < ApplicationController
# DELETE /:room_uid
def destroy
+ p @room
# Don't delete the users home room.
- @room.destroy if @room != current_user.main_room
+ @room.destroy if @room.owned_by?(current_user) && @room != current_user.main_room
redirect_to current_user.main_room
end
diff --git a/app/models/user.rb b/app/models/user.rb
index a89becb2..f5c086cd 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -23,8 +23,8 @@ class User < ApplicationRecord
# Generates a user from omniauth.
def from_omniauth(auth)
find_or_initialize_by(social_uid: auth['uid'], provider: auth['provider']).tap do |u|
- u.name = send("#{auth['provider']}_name", auth)
- u.username = send("#{auth['provider']}_username", auth)
+ u.name = send("#{auth['provider']}_name", auth) unless u.name
+ u.username = send("#{auth['provider']}_username", auth) unless u.username
u.email = send("#{auth['provider']}_email", auth)
u.image = send("#{auth['provider']}_image", auth)
u.save!
diff --git a/app/views/main/index.html.erb b/app/views/main/index.html.erb
index 5ce4ab45..57ca2794 100644
--- a/app/views/main/index.html.erb
+++ b/app/views/main/index.html.erb
@@ -12,7 +12,7 @@
Welcome to Greenlight.
A simple front end for your BigBlueButton Open Source Web Conferencing Server.
- <%= link_to "https://www.youtube.com/watch?v=yGX3JCv7OVM&feature=youtu.be", class: "p-3", target: "_blank" do %>
+ <%= link_to "https://youtu.be/Hso8yLzkqj8", class: "p-3", target: "_blank" do %>
Watch a tutorial on using Greenlight
<% end %>
diff --git a/app/views/rooms/show.html.erb b/app/views/rooms/show.html.erb
index 79500e11..f48df08c 100644
--- a/app/views/rooms/show.html.erb
+++ b/app/views/rooms/show.html.erb
@@ -48,6 +48,7 @@
<%= render "shared/components/room_block", room: room %>
<% end %>
+ <%= render "shared/modals/delete_room_modal", room: room %>
<% end %>
<% end %>
diff --git a/app/views/shared/_header.html.erb b/app/views/shared/_header.html.erb
index 61cef386..78e5217c 100644
--- a/app/views/shared/_header.html.erb
+++ b/app/views/shared/_header.html.erb
@@ -10,7 +10,7 @@
<%= image_tag("logo_with_text.png", class: "header-brand-img") %>
<% end %>
<% end %>
-
+
<% if current_user %>
@@ -29,13 +29,13 @@
diff --git a/app/views/shared/components/_room_block.html.erb b/app/views/shared/components/_room_block.html.erb
index 528329b6..0a796d84 100644
--- a/app/views/shared/components/_room_block.html.erb
+++ b/app/views/shared/components/_room_block.html.erb
@@ -25,15 +25,15 @@
<% if room != current_user.main_room %>
-
<% end %>
diff --git a/app/views/shared/modals/_create_room_modal.html.erb b/app/views/shared/modals/_create_room_modal.html.erb
index 43bd825a..bcf9e7c5 100644
--- a/app/views/shared/modals/_create_room_modal.html.erb
+++ b/app/views/shared/modals/_create_room_modal.html.erb
@@ -16,7 +16,7 @@
Room name cannot be blank.
diff --git a/app/views/shared/modals/_delete_room_modal.html.erb b/app/views/shared/modals/_delete_room_modal.html.erb
new file mode 100644
index 00000000..5ce6854f
--- /dev/null
+++ b/app/views/shared/modals/_delete_room_modal.html.erb
@@ -0,0 +1,25 @@
+
+
+
+
+
+
+
Are you sure you want to delete <%= room.name %>?
+
+
+
+
+ <%= button_to room, method: :delete, id: "delete-confirm", class: "btn btn-pill btn-danger my-1 btn-del-room" do %>
+ I'm sure, delete this room.
+ <% end %>
+
+
+
+
+
+
+
diff --git a/app/views/shared/settings/_account.html.erb b/app/views/shared/settings/_account.html.erb
index 26504eb8..cc9669a5 100644
--- a/app/views/shared/settings/_account.html.erb
+++ b/app/views/shared/settings/_account.html.erb
@@ -18,7 +18,7 @@
<%= f.label "Provider", class: "form-label" %>
- <%= f.text_field :provider, class: "form-control", value: @user.provider.capitalize, readonly: "" %>
+ <%= f.text_field :provider, class: "form-control", readonly: "" %>
<%= f.label "Image", class: "form-label mt-5" %>
diff --git a/app/views/users/new.html.erb b/app/views/users/new.html.erb
index 56620103..06b3168d 100644
--- a/app/views/users/new.html.erb
+++ b/app/views/users/new.html.erb
@@ -28,7 +28,8 @@
<%= @user.errors.full_messages_for(:password_confirmation).first %>
<% end %>