Hide player on login pages
This commit is contained in:
parent
957a883ccf
commit
58a34fb3a8
|
@ -1,5 +1,6 @@
|
||||||
class UserController < ApplicationController
|
class UserController < ApplicationController
|
||||||
def login
|
def login
|
||||||
|
@hide_player = 1
|
||||||
unless params[:email].nil? or params[:password].nil?
|
unless params[:email].nil? or params[:password].nil?
|
||||||
user_data = User.collection.find({email: params[:email], password: Digest::SHA256.hexdigest(params[:password])}).first
|
user_data = User.collection.find({email: params[:email], password: Digest::SHA256.hexdigest(params[:password])}).first
|
||||||
unless user_data.nil?
|
unless user_data.nil?
|
||||||
|
@ -9,12 +10,11 @@ class UserController < ApplicationController
|
||||||
else
|
else
|
||||||
redirect_to '/login'
|
redirect_to '/login'
|
||||||
end
|
end
|
||||||
else
|
|
||||||
redirect_to '/login'
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def register
|
def register
|
||||||
|
@hide_player = 1
|
||||||
data = Invite.where(:email => params[:email], :code => params[:code]).first
|
data = Invite.where(:email => params[:email], :code => params[:code]).first
|
||||||
unless data.nil?
|
unless data.nil?
|
||||||
@code = data.code
|
@code = data.code
|
||||||
|
@ -25,6 +25,7 @@ class UserController < ApplicationController
|
||||||
end
|
end
|
||||||
|
|
||||||
def complete
|
def complete
|
||||||
|
@hide_player = 1
|
||||||
data = Invite.where(:email => params[:invite_email], :code => params[:invite_code]).first
|
data = Invite.where(:email => params[:invite_email], :code => params[:invite_code]).first
|
||||||
unless data.nil?
|
unless data.nil?
|
||||||
if params[:email].match(/\A[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4}\z/).nil? or
|
if params[:email].match(/\A[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4}\z/).nil? or
|
||||||
|
|
|
@ -9,10 +9,9 @@
|
||||||
<%= csrf_meta_tag %>
|
<%= csrf_meta_tag %>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<br/><br/><br/><br/>
|
|
||||||
<%= @params %>
|
|
||||||
<div id="contents">
|
<div id="contents">
|
||||||
<div class="inner-1">
|
<div class="inner-1">
|
||||||
|
<% if @hide_player.nil? -%>
|
||||||
<div id="player">
|
<div id="player">
|
||||||
<audio autoplay preload></audio>
|
<audio autoplay preload></audio>
|
||||||
<div class="prev" title="Play Previous Track"><img src="/images/player/prev.svg" alt="prv" /></div>
|
<div class="prev" title="Play Previous Track"><img src="/images/player/prev.svg" alt="prv" /></div>
|
||||||
|
@ -39,6 +38,7 @@
|
||||||
<div id="playlist">
|
<div id="playlist">
|
||||||
<ul class="list"></ul>
|
<ul class="list"></ul>
|
||||||
</div>
|
</div>
|
||||||
|
<%- end %>
|
||||||
<%= yield %>
|
<%= yield %>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue