continue front-end work

This commit is contained in:
Josh 2018-05-25 11:55:48 -04:00
parent a1a41bfa43
commit 0dce8d2bf5
16 changed files with 238 additions and 18 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

View File

@ -68,6 +68,19 @@ html, body {
background-color: $rule-color;
}
.thumbnail {
height: 60%;
width: auto;
}
.client-icon {
height: 100px;
width: 100px;
display: flex;
align-items: center;
justify-content: center;
}
.container-fluid {
height: 100%;
}

View File

@ -17,9 +17,14 @@ class UsersController < ApplicationController
end
end
# GET /settings
def settings
redirect_to root_path unless current_user
end
private
def user_params
params.require(:user).permit(:name, :email, :username, :password, :password_confirmation)
end
end
end

View File

@ -26,7 +26,7 @@ class User < ApplicationRecord
user.name = send("#{auth['provider']}_name", auth)
user.username = send("#{auth['provider']}_username", auth)
user.email = send("#{auth['provider']}_email", auth)
user.image = send("#{auth['provider']}_image", auth)
user.save!
user
end
@ -51,6 +51,10 @@ class User < ApplicationRecord
auth['info']['email']
end
def twitter_image(auth)
auth['info']['image']
end
def google_name(auth)
auth['info']['name']
end
@ -62,6 +66,19 @@ class User < ApplicationRecord
def google_email(auth)
auth['info']['email']
end
def google_image(auth)
auth['info']['picture']
end
end
def subtitle
case provider
when "greenlight", "google", "twitter"
"User"
else
"Unknown"
end
end
private

View File

@ -9,7 +9,7 @@
<%= render "shared/features" %>
</div>
<%= render "shared/video_modal" %>
<%= render "shared/modals/video_modal" %>
<script>
$(window).on('load',function(){

View File

@ -1,3 +1,43 @@
<div class="container">
<div class="col-lg-10">
<div class="card">
<table class="table card-table table-vcenter">
<tbody>
<% 3.times do %>
<tr>
<td>
<!--<i class="fas fa-users fa-2x"></i>-->
<img class="thumbnail" src="http://test-install.blindsidenetworks.com/presentation/b622495d927cd99e9898b0601c2b18a5424a0627-1527259102285/presentation/d2d9a672040fbde2a47a10bf6c37b6a4b5ae187f-1527259102298/thumbnails/thumb-1.png">
</td>
<td class="text-left">
<h4>Introduction to Dinosaurs</h4>
<p><i>June 21, 2017 (about 3 hours ago)</i></p>
</td>
<td class="text-center d-none d-md-table-cell text-nowrap">
<h6 class="text-uppercase"><strong>Users</strong></h6>
<h5>3</h5>
</td>
<td class="text-center d-none d-md-table-cell text-nowrap">
<h6 class="text-uppercase"><strong>Length</strong></h6>
<h5>2 hours</h5>
</td>
<td class="text-center d-none d-md-table-cell text-nowrap">
<h6 class="text-uppercase"><strong>Visbility</strong></h6>
<h5>Unlisted</h5>
</td>
<td>
<button type="button" class="btn btn-icon btn-success"><i class="fas fa-video"></i></button>
<button type="button" class="btn btn-icon btn-primary"><i class="fas fa-chart-bar"></i></button>
<button type="button" class="btn btn-icon btn-warning"><i class="fas fa-podcast"></i></button>
</td>
</tr>
<% end %>
</tbody>
</table>
</div>
</div>
</div>
Sessions
<br><br>
<%= @meeting.recordings %>

View File

@ -1,3 +1,3 @@
<div class="footer">
<h5 class="text-center">Powered by BigBlueButton.</h5>
<h5 class="text-center">Powered by <a target="_blank" href="http://bigbluebutton.org/">BigBlueButton</a>.</h5>
</div>

View File

@ -9,17 +9,20 @@
<% if current_user %>
<div class="dropdown">
<a href="#" class="nav-link pr-0 leading-none" data-toggle="dropdown">
<span class="avatar" style="background-image: url({{ site.base }}/{{ user.photo }})"></span>
<% if current_user.image.nil? %>
<span class="avatar"><%= current_user.name.first %></span>
<% else %>
<span class="avatar" style="background-image: url(<%= current_user.image %>)"></span>
<% end %>
<span class="ml-2 d-none d-lg-block">
<span class="text-default">{{ user.name }} {{ user.surname }}</span>
<small class="text-muted d-block mt-1">Administrator</small>
<span class="text-default"><%= current_user.name %></span>
<small class="text-muted d-block mt-1"><%= current_user.subtitle %></small>
</span>
</a>
</div>
<% else %>
<button type="submit" class="btn btn-pill btn-outline-primary ml-auto" data-toggle="modal" data-target="#loginModal">Login</button>
<%= render "shared/login_modal" %>
<%= render "shared/modals/login_modal" %>
<% end %>
</div>
</div>

View File

@ -1,12 +1,14 @@
<div class="card text-center">
<div class="card-body">
<div class="col-8 offset-2 form-group">
<div class="input-group">
<input type="text" class="form-control" placeholder="Enter a meeting name to start!">
<span class="input-group-append">
<button class="btn btn-primary" type="button">Start Meeting</button>
</span>
</div>
<%= form_for(:meeting, url: create_meeting_path) do |f| %>
<div class="input-group">
<%= f.text_field :name, class: "form-control", placeholder: "Enter a meeting name to start!" %>
<span class="input-group-append">
<%= f.submit "Start Meeting", class: "btn btn-primary" %>
</span>
</div>
<% end %>
</div>
</div>
<div class="card-footer">

View File

@ -16,10 +16,20 @@
<hr>
<div class="form-group">
<input type="email" class="form-control" id="exampleInputEmail1" aria-describedby="emailHelp" placeholder="Email">
<div class="input-icon">
<span class="input-icon-addon">
<i class="fas fa-at"></i>
</span>
<input type="email" class="form-control" placeholder="Email">
</div>
</div>
<div class="form-group">
<input type="password" class="form-control" id="exampleInputPassword1" placeholder="Password">
<div class="input-icon">
<span class="input-icon-addon">
<i class="fas fa-key"></i>
</span>
<input type="password" class="form-control" placeholder="Password">
</div>
</div>
<div class="form-footer">
<button type="submit" class="btn btn-outline-primary btn-block btn-pill">Login</button>

View File

@ -0,0 +1,32 @@
<div class="modal fade" id="selectClientModal" 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 text-primary">
<h3>Which client would you like to use?</h3>
</div>
<hr class="small-rule">
<div class="form-group">
<div class="selectgroup selectgroup-pills">
<label class="selectgroup-item">
<input type="radio" name="icon-input" value="1" class="selectgroup-input" checked="">
<span class="selectgroup-button selectgroup-button-icon client-icon p-2"><i class="fab fa-html5 fa-3x"></i></span>
<p>HTML5</p>
</label>
<label class="selectgroup-item">
<input type="radio" name="icon-input" value="2" class="selectgroup-input">
<span class="selectgroup-button selectgroup-button-icon client-icon"><i class="fas fa-bolt fa-3x"></i></span>
<p>Flash</p>
</label>
</div>
</div>
<div class="card-footer">
<p>We recommend you use the HTML5 client for the best experience.</p>
</div>
</div>
</div>
</div>
</div>
</div>

View File

@ -4,7 +4,7 @@
<div class="modal-body">
<div class="card-body p-6">
<div class="card-title text-primary">
<h3>Welcome</h3>
<h3>Welcome to Greenlight</h3>
</div>
<hr class="small-rule">

View File

@ -0,0 +1,93 @@
<div class="container">
<div class="form-group">
<div class="selectgroup selectgroup-pills">
<label class="selectgroup-item">
<input type="radio" name="icon-input" value="1" class="selectgroup-input" checked="">
<span class="selectgroup-button selectgroup-button-icon"><i class="fas fa-user"></i> Account</span>
</label>
<label class="selectgroup-item">
<input type="radio" name="icon-input" value="2" class="selectgroup-input">
<span class="selectgroup-button selectgroup-button-icon"><i class="fas fa-pencil-alt"></i> Design </span>
</label>
</div>
</div>
<div class="form-group">
<label class="form-label">Background</label>
<div class="row gutters-xs">
<div class="col-auto">
<label class="colorinput">
<input name="color" type="radio" value="azure" class="colorinput-input">
<span class="colorinput-color bg-azure"></span>
</label>
</div>
<div class="col-auto">
<label class="colorinput">
<input name="color" type="radio" value="indigo" class="colorinput-input" checked="">
<span class="colorinput-color bg-indigo"></span>
</label>
</div>
<div class="col-auto">
<label class="colorinput">
<input name="color" type="radio" value="purple" class="colorinput-input">
<span class="colorinput-color bg-purple"></span>
</label>
</div>
<div class="col-auto">
<label class="colorinput">
<input name="color" type="radio" value="pink" class="colorinput-input">
<span class="colorinput-color bg-pink"></span>
</label>
</div>
<div class="col-auto">
<label class="colorinput">
<input name="color" type="radio" value="red" class="colorinput-input">
<span class="colorinput-color bg-red"></span>
</label>
</div>
<div class="col-auto">
<label class="colorinput">
<input name="color" type="radio" value="orange" class="colorinput-input">
<span class="colorinput-color bg-orange"></span>
</label>
</div>
<div class="col-auto">
<label class="colorinput">
<input name="color" type="radio" value="yellow" class="colorinput-input">
<span class="colorinput-color bg-yellow"></span>
</label>
</div>
<div class="col-auto">
<label class="colorinput">
<input name="color" type="radio" value="lime" class="colorinput-input">
<span class="colorinput-color bg-lime"></span>
</label>
</div>
<div class="col-auto">
<label class="colorinput">
<input name="color" type="radio" value="green" class="colorinput-input">
<span class="colorinput-color bg-green"></span>
</label>
</div>
<div class="col-auto">
<label class="colorinput">
<input name="color" type="radio" value="teal" class="colorinput-input">
<span class="colorinput-color bg-teal"></span>
</label>
</div>
</div>
</div>
<div class="form-group">
<label class="form-label">Name</label>
<input type="text" class="form-control" value="<%= current_user.name %>" readonly="">
<label class="form-label">Email</label>
<input type="text" class="form-control" value="<%= current_user.email %>" readonly="">
<label class="form-label">Account Provider</label>
<input type="text" class="form-control" value="<%= current_user.provider.capitalize %>" readonly="">
</div>
</div>

View File

@ -21,6 +21,9 @@ Rails.application.routes.draw do
get '/signup', to: 'users#new'
post '/signup', to: 'users#create'
# User settings.
get '/settings', to: 'users#settings'
# Handles login of greenlight provider accounts.
post '/login', to: 'sessions#create', as: :create_session

View File

@ -6,6 +6,7 @@ class CreateUsers < ActiveRecord::Migration[5.0]
t.string :name
t.string :username
t.string :email
t.string :image
t.string :password_digest, index: { unique: true }
t.timestamps

View File

@ -38,6 +38,7 @@ ActiveRecord::Schema.define(version: 20180504131713) do
t.string "name"
t.string "username"
t.string "email"
t.string "image"
t.string "password_digest"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false