From 8a9f2a3cc22418b138c875dc8c9ab5d359566a7a Mon Sep 17 00:00:00 2001 From: Joshua Arts Date: Wed, 4 Jul 2018 15:22:59 -0400 Subject: [PATCH] multiple fixes and tweaks --- README.md | 4 +++- app/models/user.rb | 4 ++-- app/views/shared/_header.html.erb | 8 ++++---- app/views/shared/modals/_create_room_modal.html.erb | 2 +- app/views/shared/settings/_account.html.erb | 2 +- app/views/users/new.html.erb | 3 ++- 6 files changed, 13 insertions(+), 10 deletions(-) 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: + +[![GreenLight Overview](https://img.youtube.com/vi/Hso8yLzkqj8/0.jpg)](https://youtu.be/Hso8yLzkqj8) ## Installation on a BigBlueButton Server 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/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/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/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 %>