Hide player for unauthorized users, ad place
This commit is contained in:
parent
c726d1ca44
commit
dffc5bf735
|
@ -35,3 +35,13 @@ class window.Session
|
||||||
_session.setUser ar.user
|
_session.setUser ar.user
|
||||||
false
|
false
|
||||||
false
|
false
|
||||||
|
|
||||||
|
displayAuthorizedContent: ->
|
||||||
|
$('.playlist, .player').show()
|
||||||
|
$('.ad_here, #login').hide()
|
||||||
|
$('#authorized').css display: 'block'
|
||||||
|
|
||||||
|
hideAuthorizedContent: ->
|
||||||
|
$('.playlist, .player, #authorized').hide()
|
||||||
|
$('.ad_here').show()
|
||||||
|
$('#login').css display: 'block'
|
||||||
|
|
|
@ -36,16 +36,14 @@ class window.Vkontakte
|
||||||
.html (if _session.getUser().name then _session.getUser().name else '%username%')
|
.html (if _session.getUser().name then _session.getUser().name else '%username%')
|
||||||
window._session = _session
|
window._session = _session
|
||||||
_ajax.detectPage()
|
_ajax.detectPage()
|
||||||
$('.fullscreen').hide();
|
_session.displayAuthorizedContent()
|
||||||
$('#login').hide()
|
|
||||||
$('#authorized').css display: 'block'
|
$('#authorized').css display: 'block'
|
||||||
else
|
else
|
||||||
_session.setUser ar.user
|
_session.setUser ar.user
|
||||||
|
|
||||||
$('#username')
|
$('#username')
|
||||||
.html (if _session.getUser().name then _session.getUser().name else '%username%')
|
.html (if _session.getUser().name then _session.getUser().name else '%username%')
|
||||||
$('#login').hide()
|
_session.displayAuthorizedContent()
|
||||||
$('#authorized').css display: 'block'
|
|
||||||
window._session = _session
|
window._session = _session
|
||||||
_ajax.detectPage()
|
_ajax.detectPage()
|
||||||
$('.fullscreen').hide();
|
$('.fullscreen').hide();
|
||||||
|
@ -58,8 +56,7 @@ class window.Vkontakte
|
||||||
else
|
else
|
||||||
_session = new Session({})
|
_session = new Session({})
|
||||||
_session.setUser {}
|
_session.setUser {}
|
||||||
$('#login').css display: 'block'
|
_session.hideAuthorizedContent()
|
||||||
$('#authorized').hide()
|
|
||||||
window._session = _session
|
window._session = _session
|
||||||
_ajax.detectPage()
|
_ajax.detectPage()
|
||||||
$('.fullscreen').hide();
|
$('.fullscreen').hide();
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
background-color: #ffffff;
|
background-color: #ffffff;
|
||||||
@include opacity(0.9);
|
//@include opacity(0.9);
|
||||||
.inner {
|
.inner {
|
||||||
position: relative;
|
position: relative;
|
||||||
top: 50%;
|
top: 50%;
|
||||||
|
|
|
@ -12,4 +12,16 @@
|
||||||
top: 45px;
|
top: 45px;
|
||||||
width: 210px;
|
width: 210px;
|
||||||
height: 200px;
|
height: 200px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.player, .playlist {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ad_here {
|
||||||
|
display: block;
|
||||||
|
border: #e0e0e0 1px solid;
|
||||||
|
padding: 200px 20px;
|
||||||
|
font-size: 20px;
|
||||||
|
text-align: center;
|
||||||
}
|
}
|
|
@ -50,6 +50,7 @@
|
||||||
|
|
||||||
|
|
||||||
.span5.columns
|
.span5.columns
|
||||||
|
.ad_here= (I18n.t 'global.your_ad_here').html_safe
|
||||||
.player
|
.player
|
||||||
%h5.now-playing= I18n.t 'global.do_add'
|
%h5.now-playing= I18n.t 'global.do_add'
|
||||||
.progress
|
.progress
|
||||||
|
|
|
@ -12,6 +12,7 @@ en:
|
||||||
do_empty: "Empty playlist"
|
do_empty: "Empty playlist"
|
||||||
hello: "Hi there"
|
hello: "Hi there"
|
||||||
settings: "Settings"
|
settings: "Settings"
|
||||||
|
your_ad_here: "Your ad couldn't<br/>be here"
|
||||||
|
|
||||||
search:
|
search:
|
||||||
fail: "Something very bad happened while we tried out to load some info about this artist. How about some other one?"
|
fail: "Something very bad happened while we tried out to load some info about this artist. How about some other one?"
|
||||||
|
|
|
@ -12,6 +12,7 @@ ru:
|
||||||
do_empty: "Очистить"
|
do_empty: "Очистить"
|
||||||
hello: "Привет"
|
hello: "Привет"
|
||||||
settings: "Настройки"
|
settings: "Настройки"
|
||||||
|
your_ad_here: "Здесь не могла бы<br/>быть Ваша реклама"
|
||||||
|
|
||||||
search:
|
search:
|
||||||
fail: "Что-то ужасное произошло пока мы собирали информацию об этом исполнителе. Может пока поищем другого?"
|
fail: "Что-то ужасное произошло пока мы собирали информацию об этом исполнителе. Может пока поищем другого?"
|
||||||
|
|
Loading…
Reference in New Issue