diff --git a/README.md b/README.md index edbd4e26..ce64bb4d 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ Greenlight is a simple front-end interface for your BigBlueButton server. At it' * Invite others to your room using a simple URL. * View recordings and share them with others. -Furthermore, Greenlight is completely configurable. This means you can turn on/off features to make Greenlight fit your specific use case. For more information on Greenlight and it's features, see our [documentation](http://docs.bigbluebutton.org/install/green-light.html). +Furthermore, Greenlight is completely configurable. This means you can turn on/off features to make Greenlight fit your specific use case. For more information on Greenlight and it's 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). diff --git a/app/assets/javascripts/wait.js b/app/assets/javascripts/wait.js index b07588d5..2d5ad36d 100644 --- a/app/assets/javascripts/wait.js +++ b/app/assets/javascripts/wait.js @@ -10,7 +10,9 @@ $(document).on("turbolinks:load", function(){ uid: $(".background").attr("room") }, { received: function(data){ - if(data.action = "started"){ request_to_join_meeting(); } + if(data.action = "started"){ + request_to_join_meeting(); + } } }); } @@ -29,8 +31,8 @@ var request_to_join_meeting = function(){ 'Content-Type': 'application/x-www-form-urlencoded', 'X-CSRF-Token': $('meta[name="csrf-token"]').attr('content') }, - error: function(){ - // The meeting is still booting (going slowly), retry shortly. + success: function(){ + // Enqueue another trial just incase they didn't actually join. if(join_attempts < 4){ setTimeout(request_to_join_meeting, 10000); } join_attempts++; } diff --git a/app/assets/stylesheets/application.scss b/app/assets/stylesheets/application.scss index ff08b86a..dcce13e7 100644 --- a/app/assets/stylesheets/application.scss +++ b/app/assets/stylesheets/application.scss @@ -26,7 +26,7 @@ $background-color: #F5F7FB; $error-background-color: #EFE6E6; -$footer-height: 80px; +$footer-height: 65px; html, body { width: 100%; @@ -45,9 +45,11 @@ a { } .footer { + position: fixed; + height: $footer-height; width: 100%; - position: abolute; - bottom: 0px; + bottom: 0; + z-index: 5; } .table-responsive { diff --git a/app/controllers/sessions_controller.rb b/app/controllers/sessions_controller.rb index c19a5546..af6f531b 100644 --- a/app/controllers/sessions_controller.rb +++ b/app/controllers/sessions_controller.rb @@ -1,6 +1,8 @@ # frozen_string_literal: true class SessionsController < ApplicationController + LOGIN_FAILED = "Login failed due to invalid credentials. Are you sure you typed them correctly?" + # GET /users/logout def destroy logout @@ -10,8 +12,10 @@ class SessionsController < ApplicationController # POST /users/login def create user = User.find_by(email: session_params[:email]) - if user&.authenticate(session_params[:password]) + if user.try(:authenticate, session_params[:password]) login(user) + else + redirect_to root_path, notice: LOGIN_FAILED end end diff --git a/app/models/room.rb b/app/models/room.rb index 52bf5262..a83f4eed 100644 --- a/app/models/room.rb +++ b/app/models/room.rb @@ -74,7 +74,6 @@ class Room < ApplicationRecord # Generate the join URL. join_opts = {} join_opts[:userID] = uid if uid - join_opts[:joinViaHtml5] = true if Rails.configuration.html5_enabled bbb.join_meeting_url(bbb_id, name, password, join_opts) end diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index 0883f47a..b814347d 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -27,7 +27,7 @@
This deployment is using a pre-configured testing server, you should replace this with your own. - For details, see the <%= link_to "documentation", "http://docs.bigbluebutton.org/install/green-light.html#installing-greenlight", target: "_blank" %>. + For details, see the <%= link_to "documentation", "http://docs.bigbluebutton.org/install/greenlight.html#installing-greenlight", target: "_blank" %>. <% end %> <% end %> diff --git a/app/views/main/index.html.erb b/app/views/main/index.html.erb index 07e7646a..5ce4ab45 100644 --- a/app/views/main/index.html.erb +++ b/app/views/main/index.html.erb @@ -1,3 +1,11 @@ +<% unless flash.empty? %> + <%= render "shared/error_banner" do %> + <% flash.each do |key, value| %> + <%= content_tag :div, value, class: "flash #{key} d-inline" %> + <% end %> + <% end %> +<% end %> +