forked from External/greenlight
Merge branch 'bn_launcher_integration' of https://github.com/bigbluebutton/greenlight2 into bn_launcher_integration
This commit is contained in:
commit
adeb844918
|
@ -0,0 +1 @@
|
||||||
|
2.5.1
|
10
README.md
10
README.md
|
@ -8,9 +8,13 @@ Greenlight is a simple front-end interface for your BigBlueButton server. At it'
|
||||||
* Invite others to your room using a simple URL.
|
* Invite others to your room using a simple URL.
|
||||||
* View recordings and share them with others.
|
* 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/greenlight.html).
|
Interested? Try Greenlight out on our [demo server](https://demo.bigbluebutton.org/gl)!
|
||||||
|
|
||||||
For a overview of how GreenLight works, checkout our [Introduction to Greenlight Video](https://youtu.be/yGX3JCv7OVM).
|
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/Hso8yLzkqj8)
|
||||||
|
|
||||||
## Installation on a BigBlueButton Server
|
## Installation on a BigBlueButton Server
|
||||||
|
|
||||||
|
@ -20,7 +24,7 @@ For information on installing Greenlight, checkout our [Installing Greenlight on
|
||||||
|
|
||||||
## Source Code & Contributing
|
## Source Code & Contributing
|
||||||
|
|
||||||
GreenLight is built using Ruby on Rails. Many developers already know Rails well, and we wanted to create both a full front-end to BigBlueButton but also a reference implementation of how to fully leverage the [BigBlueButton API](http://docs.bigbluebutton.org/dev/api.html).
|
Greenlight is built using Ruby on Rails. Many developers already know Rails well, and we wanted to create both a full front-end to BigBlueButton but also a reference implementation of how to fully leverage the [BigBlueButton API](http://docs.bigbluebutton.org/dev/api.html).
|
||||||
|
|
||||||
We invite you to build upon GreenLight and help make it better. See [Contributing to BigBlueButton](http://docs.bigbluebutton.org/support/faq.html#contributing-to-bigbluebutton).
|
We invite you to build upon GreenLight and help make it better. See [Contributing to BigBlueButton](http://docs.bigbluebutton.org/support/faq.html#contributing-to-bigbluebutton).
|
||||||
|
|
||||||
|
|
|
@ -21,3 +21,18 @@
|
||||||
transform: translateY(-50%);
|
transform: translateY(-50%);
|
||||||
margin-top: 50%;
|
margin-top: 50%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.or-line {
|
||||||
|
div {
|
||||||
|
width: 100%;
|
||||||
|
height: 16px;
|
||||||
|
border-bottom: 1px solid #d3d3d3;
|
||||||
|
text-align: center;
|
||||||
|
span {
|
||||||
|
font-size: 120%;
|
||||||
|
background-color: #ffffff;
|
||||||
|
padding: 0 10px;
|
||||||
|
color: #d3d3d3
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.thumbnail {
|
.thumbnail {
|
||||||
height: 40% !important;
|
height: 60px !important;
|
||||||
width: auto;
|
width: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -22,3 +22,7 @@
|
||||||
.home-indicator {
|
.home-indicator {
|
||||||
font-size: 22px !important;
|
font-size: 22px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.btn-del-room {
|
||||||
|
width: 70% !important;
|
||||||
|
}
|
||||||
|
|
|
@ -56,7 +56,7 @@ class ApplicationController < ActionController::Base
|
||||||
user_is_moderator: false,
|
user_is_moderator: false,
|
||||||
meeting_logout_url: request.base_url + logout_room_path(@room),
|
meeting_logout_url: request.base_url + logout_room_path(@room),
|
||||||
meeting_recorded: true,
|
meeting_recorded: true,
|
||||||
moderator_message: "#{invite_msg}\n\n #{request.base_url + relative_root + room_path(@room)}",
|
moderator_message: "#{invite_msg}\n\n #{request.base_url + room_path(@room)}",
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -65,8 +65,9 @@ class RoomsController < ApplicationController
|
||||||
|
|
||||||
# DELETE /:room_uid
|
# DELETE /:room_uid
|
||||||
def destroy
|
def destroy
|
||||||
|
p @room
|
||||||
# Don't delete the users home 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
|
redirect_to current_user.main_room
|
||||||
end
|
end
|
||||||
|
@ -90,14 +91,6 @@ class RoomsController < ApplicationController
|
||||||
redirect_to @room
|
redirect_to @room
|
||||||
end
|
end
|
||||||
|
|
||||||
# POST /:room_uid/home
|
|
||||||
def home
|
|
||||||
current_user.main_room = @room
|
|
||||||
current_user.save
|
|
||||||
|
|
||||||
redirect_to @room
|
|
||||||
end
|
|
||||||
|
|
||||||
# POST /:room_uid/:record_id
|
# POST /:room_uid/:record_id
|
||||||
def update_recording
|
def update_recording
|
||||||
meta = {
|
meta = {
|
||||||
|
|
|
@ -19,18 +19,6 @@ class SessionsController < ApplicationController
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
# POST /launch
|
|
||||||
def launch
|
|
||||||
# This will recieve a encoded POST from a launcher that
|
|
||||||
# contains the provider, and all user information. The
|
|
||||||
# launcher is what does the authentication, so we know
|
|
||||||
# that the user is who they say they are. We just need
|
|
||||||
# to use our secret to decode it and then log them in
|
|
||||||
# to GreenLight (or sign them up).
|
|
||||||
|
|
||||||
# User.from_launch()
|
|
||||||
end
|
|
||||||
|
|
||||||
# GET/POST /auth/:provider/callback
|
# GET/POST /auth/:provider/callback
|
||||||
def omniauth
|
def omniauth
|
||||||
user = User.from_omniauth(request.env['omniauth.auth'])
|
user = User.from_omniauth(request.env['omniauth.auth'])
|
||||||
|
|
|
@ -23,8 +23,8 @@ class User < ApplicationRecord
|
||||||
# Generates a user from omniauth.
|
# Generates a user from omniauth.
|
||||||
def from_omniauth(auth)
|
def from_omniauth(auth)
|
||||||
find_or_initialize_by(social_uid: auth['uid'], provider: auth['provider']).tap do |u|
|
find_or_initialize_by(social_uid: auth['uid'], provider: auth['provider']).tap do |u|
|
||||||
u.name = send("#{auth['provider']}_name", auth)
|
u.name = send("#{auth['provider']}_name", auth) unless u.name
|
||||||
u.username = send("#{auth['provider']}_username", auth)
|
u.username = send("#{auth['provider']}_username", auth) unless u.username
|
||||||
u.email = send("#{auth['provider']}_email", auth)
|
u.email = send("#{auth['provider']}_email", auth)
|
||||||
u.image = send("#{auth['provider']}_image", auth)
|
u.image = send("#{auth['provider']}_image", auth)
|
||||||
u.save!
|
u.save!
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
<h1 id="main-text" class="font-weight-400 responsive-header">Welcome to Greenlight.</h1>
|
<h1 id="main-text" class="font-weight-400 responsive-header">Welcome to Greenlight.</h1>
|
||||||
<h4 class="text-muted">A simple front end for your BigBlueButton Open Source Web Conferencing Server.</h4>
|
<h4 class="text-muted">A simple front end for your BigBlueButton Open Source Web Conferencing Server.</h4>
|
||||||
|
|
||||||
<%= 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 %>
|
||||||
<h4>Watch a tutorial on using Greenlight <i class="far fa-play-circle"></i></h4>
|
<h4>Watch a tutorial on using Greenlight <i class="far fa-play-circle"></i></h4>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -48,6 +48,7 @@
|
||||||
<%= render "shared/components/room_block", room: room %>
|
<%= render "shared/components/room_block", room: room %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
|
<%= render "shared/modals/delete_room_modal", room: room %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
<%= image_tag("logo_with_text.png", class: "header-brand-img") %>
|
<%= image_tag("logo_with_text.png", class: "header-brand-img") %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<div class="d-flex ml-auto">
|
<div class="d-flex ml-auto">
|
||||||
<% if current_user %>
|
<% if current_user %>
|
||||||
<a class="px-5 ml-2 mt-1" href="" data-toggle="modal" data-target="#createRoomModal">
|
<a class="px-5 ml-2 mt-1" href="" data-toggle="modal" data-target="#createRoomModal">
|
||||||
|
@ -29,13 +29,13 @@
|
||||||
</a>
|
</a>
|
||||||
<div class="dropdown-menu dropdown-menu-right dropdown-menu-arrow" x-placement="bottom-end">
|
<div class="dropdown-menu dropdown-menu-right dropdown-menu-arrow" x-placement="bottom-end">
|
||||||
<%= link_to current_user.main_room, class: "dropdown-item" do %>
|
<%= link_to current_user.main_room, class: "dropdown-item" do %>
|
||||||
<i class="dropdown-icon fas fa-home"></i> Home Room
|
<i class="dropdown-icon fas fa-home"></i> Home Room
|
||||||
<% end %>
|
<% end %>
|
||||||
<%= link_to edit_user_path(current_user), class: "dropdown-item" do %>
|
<%= link_to edit_user_path(current_user), class: "dropdown-item" do %>
|
||||||
<i class="dropdown-icon fas fa-cog"></i> Settings
|
<i class="dropdown-icon fas fa-cog"></i> Settings
|
||||||
<% end %>
|
<% end %>
|
||||||
<div class="dropdown-divider"></div>
|
<div class="dropdown-divider"></div>
|
||||||
<a class="dropdown-item" href="http://docs.bigbluebutton.org/support/faq.html">
|
<a class="dropdown-item" href="http://docs.bigbluebutton.org/install/greenlight.html" target="_blank">
|
||||||
<i class="dropdown-icon far fa-question-circle"></i> Need help?
|
<i class="dropdown-icon far fa-question-circle"></i> Need help?
|
||||||
</a>
|
</a>
|
||||||
<%= link_to logout_path, class: "dropdown-item" do %>
|
<%= link_to logout_path, class: "dropdown-item" do %>
|
||||||
|
@ -49,7 +49,7 @@
|
||||||
<% if allow_user_signup? %>
|
<% if allow_user_signup? %>
|
||||||
<%= link_to "Signup", signup_path, :class => "btn btn-pill btn-outline-primary mx-2" %>
|
<%= link_to "Signup", signup_path, :class => "btn btn-pill btn-outline-primary mx-2" %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<%= render "shared/modals/login_modal" %>
|
<%= render "shared/modals/login_modal" %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -22,22 +22,21 @@
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
<td class="text-right">
|
<td class="text-right">
|
||||||
<div class="item-action dropdown">
|
<% if room != current_user.main_room %>
|
||||||
<a href="javascript:void(0)" data-toggle="dropdown" class="icon"><i class="fas fa-ellipsis-v"></i></a>
|
<div class="item-action dropdown">
|
||||||
<div class="dropdown-menu dropdown-menu-right">
|
<a href="javascript:void(0)" data-toggle="dropdown" class="icon"><i class="fas fa-ellipsis-v"></i></a>
|
||||||
<%= link_to room, class: "dropdown-item" do %>
|
<div class="dropdown-menu">
|
||||||
<i class="dropdown-icon fas fa-cog"></i> Room Settings
|
<!--
|
||||||
<% end %>
|
<%= link_to room, class: "dropdown-item" do %>
|
||||||
<% if room != current_user.main_room %>
|
<i class="dropdown-icon fas fa-cog"></i> Room Settings
|
||||||
<%= button_to make_home_path(room), class: "dropdown-item" do %>
|
|
||||||
<i class="dropdown-icon fas fa-home"></i> Make Home Room
|
|
||||||
<% end %>
|
<% end %>
|
||||||
<%= button_to room, method: :delete, data: { confirm: 'Are you sure?' }, class: "dropdown-item" do %>
|
-->
|
||||||
|
<a href="" data-toggle="modal" data-target="#deleteRoomModal_<%= room.uid %>"class="dropdown-item">
|
||||||
<i class="dropdown-icon far fa-trash-alt"></i> Delete
|
<i class="dropdown-icon far fa-trash-alt"></i> Delete
|
||||||
<% end %>
|
</a>
|
||||||
<% end %>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<% end %>
|
||||||
</td>
|
</td>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
<div class="invalid-feedback text-left">Room name cannot be blank.</div>
|
<div class="invalid-feedback text-left">Room name cannot be blank.</div>
|
||||||
</div>
|
</div>
|
||||||
<label class="custom-switch mt-5 mb-5 float-left">
|
<label class="custom-switch mt-5 mb-5 float-left">
|
||||||
<%= f.check_box :auto_join, class: "custom-switch-input", checked: true %>
|
<%= f.check_box :auto_join, class: "custom-switch-input", checked: false %>
|
||||||
<span class="custom-switch-indicator"></span>
|
<span class="custom-switch-indicator"></span>
|
||||||
<span class="custom-switch-description">Automatically join me into the room.</span>
|
<span class="custom-switch-description">Automatically join me into the room.</span>
|
||||||
</label>
|
</label>
|
||||||
|
|
|
@ -0,0 +1,25 @@
|
||||||
|
<div class="modal fade" id="deleteRoomModal_<%= room.uid %>" tabindex="-1" role="dialog">
|
||||||
|
<div class="modal-dialog modal-dialog-centered" role="document">
|
||||||
|
<div class="modal-content text-center">
|
||||||
|
<div class="modal-body">
|
||||||
|
<div class="card-body p-6">
|
||||||
|
<div class="card-title">
|
||||||
|
<h3>Are you sure you want to delete <%= room.name %>?</h3>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<button type="button" class="btn btn-pill btn-info my-1 btn-del-room" data-dismiss="modal">
|
||||||
|
On second thought, I'll keep it.
|
||||||
|
</button>
|
||||||
|
|
||||||
|
<%= 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 %>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="card-footer">
|
||||||
|
<p>You will <b>not</b> be able to recover this room or any of its associated recordings.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
|
@ -6,15 +6,19 @@
|
||||||
<div class="card-title">
|
<div class="card-title">
|
||||||
<h3>Login</h3>
|
<h3>Login</h3>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<% configured_providers.each do |provider| %>
|
<% unless configured_providers.length.zero? %>
|
||||||
<%= link_to omniauth_login_url(provider), class: "btn btn-pill btn-#{provider} btn-block" do %>
|
<% configured_providers.each do |provider| %>
|
||||||
<i class="fab fa-<%= provider %>"></i> <%= "Login with #{provider.capitalize}" %>
|
<%= link_to omniauth_login_url(provider), class: "btn btn-pill btn-#{provider} btn-block" do %>
|
||||||
|
<i class="fab fa-<%= provider %>"></i> <%= "Login with #{provider.capitalize}" %>
|
||||||
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
|
<div class="or-line my-6">
|
||||||
|
<div><span class="text-uppercase">or</span></div>
|
||||||
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<hr>
|
|
||||||
|
|
||||||
<%= form_for(:session, url: create_session_path) do |f| %>
|
<%= form_for(:session, url: create_session_path) do |f| %>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<div class="input-icon">
|
<div class="input-icon">
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
</div>
|
</div>
|
||||||
<br>
|
<br>
|
||||||
<%= f.label "Provider", class: "form-label" %>
|
<%= 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" %>
|
<%= f.label "Image", class: "form-label mt-5" %>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
|
|
@ -28,7 +28,8 @@
|
||||||
<div class="invalid-feedback d-block"><%= @user.errors.full_messages_for(:password_confirmation).first %></div>
|
<div class="invalid-feedback d-block"><%= @user.errors.full_messages_for(:password_confirmation).first %></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-footer">
|
<div class="card-footer">
|
||||||
<%= f.submit "Sign up", class: "btn btn-primary float-right" %>
|
<%= f.submit "Sign up", class: "btn btn-primary float-right ml-2" %>
|
||||||
|
<%= link_to "Cancel", root_path, class: "btn btn-danger float-right ml-2" %>
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -24,9 +24,6 @@ Rails.application.routes.draw do
|
||||||
patch '/:user_uid/edit', to: 'users#update', as: :update_user
|
patch '/:user_uid/edit', to: 'users#update', as: :update_user
|
||||||
end
|
end
|
||||||
|
|
||||||
# Handles launches from a trusted launcher.
|
|
||||||
post '/launch', to: 'sessions#launch'
|
|
||||||
|
|
||||||
# Handles Omniauth authentication.
|
# Handles Omniauth authentication.
|
||||||
match '/auth/:provider/callback', to: 'sessions#omniauth', via: [:get, :post], as: :omniauth_session
|
match '/auth/:provider/callback', to: 'sessions#omniauth', via: [:get, :post], as: :omniauth_session
|
||||||
get '/auth/failure', to: 'sessions#fail'
|
get '/auth/failure', to: 'sessions#fail'
|
||||||
|
@ -39,7 +36,6 @@ Rails.application.routes.draw do
|
||||||
post '/', to: 'rooms#join'
|
post '/', to: 'rooms#join'
|
||||||
post '/start', to: 'rooms#start', as: :start_room
|
post '/start', to: 'rooms#start', as: :start_room
|
||||||
get '/logout', to: 'rooms#logout', as: :logout_room
|
get '/logout', to: 'rooms#logout', as: :logout_room
|
||||||
post '/home', to: 'rooms#home', as: :make_home
|
|
||||||
|
|
||||||
# Mange recordings.
|
# Mange recordings.
|
||||||
scope '/:record_id' do
|
scope '/:record_id' do
|
||||||
|
|
Loading…
Reference in New Issue