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