Signup page
This commit is contained in:
parent
6da553102d
commit
b9f63c5f8c
@ -1,6 +1,10 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class SessionsController < ApplicationController
|
||||
def create
|
||||
reset_session
|
||||
end
|
||||
|
||||
def new
|
||||
reset_session
|
||||
end
|
||||
|
@ -5,17 +5,16 @@
|
||||
<div class="container has-text-centered">
|
||||
<div class="box">
|
||||
<h3 class="title has-text-centered">
|
||||
Login
|
||||
Welcome back!
|
||||
</h3>
|
||||
<hr>
|
||||
<%= link_to auth_at_provider_url(provider: 'google'), class: 'button google' do %>
|
||||
<%= link_to auth_at_provider_url(provider: 'google'), class: 'button is-medium google' do %>
|
||||
<svg viewBox="0 0 15 15" class="googleLogo" style="width: 14px; height: 14px; display: block; fill: currentcolor; flex-shrink: 0; backface-visibility: hidden; margin-right: 6px;"><path d="M 7.28571 6.4125L 7.28571 9L 11.3929 9C 11.2143 10.0875 10.1429 12.225 7.28571 12.225C 4.78571 12.225 2.78571 10.0875 2.78571 7.5C 2.78571 4.9125 4.82143 2.775 7.28571 2.775C 8.71429 2.775 9.64286 3.4125 10.1786 3.9375L 12.1429 1.9875C 10.8929 0.75 9.25 0 7.28571 0C 3.25 0 0 3.3375 0 7.5C 0 11.6625 3.25 15 7.28571 15C 11.5 15 14.25 11.9625 14.25 7.6875C 14.25 7.2 14.2143 6.825 14.1429 6.45L 7.28571 6.45L 7.28571 6.4125Z"></path></svg>
|
||||
Login with Google
|
||||
<% end %>
|
||||
<hr>
|
||||
<p>
|
||||
Login with your existing Google account, no new credentials needed.
|
||||
<br>
|
||||
Do you need help? <%= link_to 'let us know', help_url %>.
|
||||
</p>
|
||||
</div>
|
||||
|
31
app/views/sessions/signup.html.erb
Normal file
31
app/views/sessions/signup.html.erb
Normal file
@ -0,0 +1,31 @@
|
||||
<div class="columns">
|
||||
<div class="column">
|
||||
</div>
|
||||
<div class="column">
|
||||
<div class="container has-text-centered">
|
||||
<div class="box">
|
||||
<h3 class="title has-text-centered">
|
||||
Welcome to tinyforms!
|
||||
</h3>
|
||||
<hr>
|
||||
<p>
|
||||
Use your existing Google account to get started.
|
||||
<br>
|
||||
No additional information required.
|
||||
</p>
|
||||
<p style="margin-top:1em">
|
||||
<%= link_to auth_at_provider_url(provider: 'google'), class: 'button is-medium google' do %>
|
||||
<svg viewBox="0 0 15 15" class="googleLogo" style="width: 14px; height: 14px; display: block; fill: currentcolor; flex-shrink: 0; backface-visibility: hidden; margin-right: 6px;"><path d="M 7.28571 6.4125L 7.28571 9L 11.3929 9C 11.2143 10.0875 10.1429 12.225 7.28571 12.225C 4.78571 12.225 2.78571 10.0875 2.78571 7.5C 2.78571 4.9125 4.82143 2.775 7.28571 2.775C 8.71429 2.775 9.64286 3.4125 10.1786 3.9375L 12.1429 1.9875C 10.8929 0.75 9.25 0 7.28571 0C 3.25 0 0 3.3375 0 7.5C 0 11.6625 3.25 15 7.28571 15C 11.5 15 14.25 11.9625 14.25 7.6875C 14.25 7.2 14.2143 6.825 14.1429 6.45L 7.28571 6.45L 7.28571 6.4125Z"></path></svg>
|
||||
Login with Google
|
||||
<% end %>
|
||||
</p>
|
||||
<hr>
|
||||
<p>
|
||||
Do you need help? <%= link_to 'let us know', help_url %>.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="column">
|
||||
</div>
|
||||
</div>
|
@ -23,7 +23,7 @@ Rails.application.routes.draw do
|
||||
get 'oauth/callback', to: 'oauths#callback'
|
||||
get 'oauth/:provider', to: 'oauths#oauth', as: :auth_at_provider
|
||||
|
||||
get '/signup' => 'sessions#new', :as => :signup # TODO: add proper signup page
|
||||
get '/signup' => 'sessions#signup', :as => :signup
|
||||
get '/login' => 'sessions#new', :as => :login
|
||||
get '/logout' => 'sessions#destroy', :as => :logout
|
||||
get '/auth' => 'sessions#auth', :as => :auth
|
||||
|
Loading…
x
Reference in New Issue
Block a user