Added login warning in home tab if user is not logged in
This commit is contained in:
parent
3c395e95a4
commit
77ea938bfe
@ -306,3 +306,7 @@ th.sort-desc:after {
|
|||||||
.with_checkbox .checkbox_text::selection {
|
.with_checkbox .checkbox_text::selection {
|
||||||
background: none;
|
background: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.hide {
|
||||||
|
display: none !important;
|
||||||
|
}
|
||||||
|
@ -16,10 +16,6 @@
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
#logged_in_info.hide {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
#log_info {
|
#log_info {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
@ -264,8 +264,12 @@ <h1>No Playlists found</h1>
|
|||||||
|
|
||||||
<div id="home_tab" class="main_tabcontent">
|
<div id="home_tab" class="main_tabcontent">
|
||||||
<h1>Welcome to deemix</h1>
|
<h1>Welcome to deemix</h1>
|
||||||
|
<div id="home_not_logged_in">
|
||||||
|
<p>You need to log into your deezer account before starting downloading.</p>
|
||||||
|
<button type="button" name="button" @click="openSettings">Open Settings</button>
|
||||||
|
</div>
|
||||||
<div v-if="playlists.length">
|
<div v-if="playlists.length">
|
||||||
<h2>Recommended playlists</h2>
|
<h2>Popular playlists</h2>
|
||||||
<div class="release_grid">
|
<div class="release_grid">
|
||||||
<div v-for="release in playlists" class="release clickable" @click="playlistView"
|
<div v-for="release in playlists" class="release clickable" @click="playlistView"
|
||||||
:data-id="release.id">
|
:data-id="release.id">
|
||||||
|
@ -41373,6 +41373,9 @@ const HomeTab = new Vue({
|
|||||||
artistView,
|
artistView,
|
||||||
albumView,
|
albumView,
|
||||||
playlistView,
|
playlistView,
|
||||||
|
openSettings(e){
|
||||||
|
document.getElementById("main_settings_tablink").click();
|
||||||
|
},
|
||||||
addToQueue(e) {
|
addToQueue(e) {
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
Downloads.sendAddToQueue(e.currentTarget.dataset.link);
|
Downloads.sendAddToQueue(e.currentTarget.dataset.link);
|
||||||
@ -42056,6 +42059,7 @@ socket.on('logged_in', function (data) {
|
|||||||
// $('#logged_in_info').show()
|
// $('#logged_in_info').show()
|
||||||
document.getElementById('logged_in_info').classList.remove('hide');
|
document.getElementById('logged_in_info').classList.remove('hide');
|
||||||
}
|
}
|
||||||
|
document.getElementById('home_not_logged_in').classList.add('hide');
|
||||||
break
|
break
|
||||||
case 2:
|
case 2:
|
||||||
toast('Already logged in', 'done', true, 'login-toast');
|
toast('Already logged in', 'done', true, 'login-toast');
|
||||||
@ -42068,6 +42072,7 @@ socket.on('logged_in', function (data) {
|
|||||||
// $('#logged_in_info').show()
|
// $('#logged_in_info').show()
|
||||||
document.getElementById('logged_in_info').classList.remove('hide');
|
document.getElementById('logged_in_info').classList.remove('hide');
|
||||||
}
|
}
|
||||||
|
document.getElementById('home_not_logged_in').classList.add('hide');
|
||||||
break
|
break
|
||||||
case 0:
|
case 0:
|
||||||
toast("Couldn't log in", 'close', true, 'login-toast');
|
toast("Couldn't log in", 'close', true, 'login-toast');
|
||||||
@ -42078,6 +42083,7 @@ socket.on('logged_in', function (data) {
|
|||||||
// $('#logged_in_info').hide()
|
// $('#logged_in_info').hide()
|
||||||
jquery('#settings_username').text('Not Logged');
|
jquery('#settings_username').text('Not Logged');
|
||||||
jquery('#settings_picture').attr('src', `https://e-cdns-images.dzcdn.net/images/user/125x125-000000-80-0-0.jpg`);
|
jquery('#settings_picture').attr('src', `https://e-cdns-images.dzcdn.net/images/user/125x125-000000-80-0-0.jpg`);
|
||||||
|
document.getElementById('home_not_logged_in').classList.remove('hide');
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -42091,6 +42097,7 @@ socket.on('logged_out', function () {
|
|||||||
// $('#logged_in_info').hide()
|
// $('#logged_in_info').hide()
|
||||||
jquery('#settings_username').text('Not Logged');
|
jquery('#settings_username').text('Not Logged');
|
||||||
jquery('#settings_picture').attr('src', `https://e-cdns-images.dzcdn.net/images/user/125x125-000000-80-0-0.jpg`);
|
jquery('#settings_picture').attr('src', `https://e-cdns-images.dzcdn.net/images/user/125x125-000000-80-0-0.jpg`);
|
||||||
|
document.getElementById('home_not_logged_in').classList.remove('hide');
|
||||||
});
|
});
|
||||||
|
|
||||||
/* ===== App initialization ===== */
|
/* ===== App initialization ===== */
|
||||||
@ -42108,6 +42115,7 @@ function startApp() {
|
|||||||
|
|
||||||
socket.emit('login', arl);
|
socket.emit('login', arl);
|
||||||
jquery('#login_input_arl').val(arl);
|
jquery('#login_input_arl').val(arl);
|
||||||
|
document.getElementById('home_not_logged_in').classList.add('hide');
|
||||||
}
|
}
|
||||||
if ('true' === localStorage.getItem('slimDownloads')) {
|
if ('true' === localStorage.getItem('slimDownloads')) {
|
||||||
document.getElementById('download_list').classList.add('slim');
|
document.getElementById('download_list').classList.add('slim');
|
||||||
|
File diff suppressed because one or more lines are too long
@ -37,6 +37,7 @@ socket.on('logged_in', function (data) {
|
|||||||
// $('#logged_in_info').show()
|
// $('#logged_in_info').show()
|
||||||
document.getElementById('logged_in_info').classList.remove('hide')
|
document.getElementById('logged_in_info').classList.remove('hide')
|
||||||
}
|
}
|
||||||
|
document.getElementById('home_not_logged_in').classList.add('hide')
|
||||||
break
|
break
|
||||||
case 2:
|
case 2:
|
||||||
toast('Already logged in', 'done', true, 'login-toast')
|
toast('Already logged in', 'done', true, 'login-toast')
|
||||||
@ -49,6 +50,7 @@ socket.on('logged_in', function (data) {
|
|||||||
// $('#logged_in_info').show()
|
// $('#logged_in_info').show()
|
||||||
document.getElementById('logged_in_info').classList.remove('hide')
|
document.getElementById('logged_in_info').classList.remove('hide')
|
||||||
}
|
}
|
||||||
|
document.getElementById('home_not_logged_in').classList.add('hide')
|
||||||
break
|
break
|
||||||
case 0:
|
case 0:
|
||||||
toast("Couldn't log in", 'close', true, 'login-toast')
|
toast("Couldn't log in", 'close', true, 'login-toast')
|
||||||
@ -59,6 +61,7 @@ socket.on('logged_in', function (data) {
|
|||||||
// $('#logged_in_info').hide()
|
// $('#logged_in_info').hide()
|
||||||
$('#settings_username').text('Not Logged')
|
$('#settings_username').text('Not Logged')
|
||||||
$('#settings_picture').attr('src', `https://e-cdns-images.dzcdn.net/images/user/125x125-000000-80-0-0.jpg`)
|
$('#settings_picture').attr('src', `https://e-cdns-images.dzcdn.net/images/user/125x125-000000-80-0-0.jpg`)
|
||||||
|
document.getElementById('home_not_logged_in').classList.remove('hide')
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@ -72,6 +75,7 @@ socket.on('logged_out', function () {
|
|||||||
// $('#logged_in_info').hide()
|
// $('#logged_in_info').hide()
|
||||||
$('#settings_username').text('Not Logged')
|
$('#settings_username').text('Not Logged')
|
||||||
$('#settings_picture').attr('src', `https://e-cdns-images.dzcdn.net/images/user/125x125-000000-80-0-0.jpg`)
|
$('#settings_picture').attr('src', `https://e-cdns-images.dzcdn.net/images/user/125x125-000000-80-0-0.jpg`)
|
||||||
|
document.getElementById('home_not_logged_in').classList.remove('hide')
|
||||||
})
|
})
|
||||||
|
|
||||||
/* ===== App initialization ===== */
|
/* ===== App initialization ===== */
|
||||||
@ -89,6 +93,7 @@ function startApp() {
|
|||||||
|
|
||||||
socket.emit('login', arl)
|
socket.emit('login', arl)
|
||||||
$('#login_input_arl').val(arl)
|
$('#login_input_arl').val(arl)
|
||||||
|
document.getElementById('home_not_logged_in').classList.add('hide')
|
||||||
}
|
}
|
||||||
if ('true' === localStorage.getItem('slimDownloads')) {
|
if ('true' === localStorage.getItem('slimDownloads')) {
|
||||||
document.getElementById('download_list').classList.add('slim')
|
document.getElementById('download_list').classList.add('slim')
|
||||||
|
@ -16,6 +16,9 @@ const HomeTab = new Vue({
|
|||||||
artistView,
|
artistView,
|
||||||
albumView,
|
albumView,
|
||||||
playlistView,
|
playlistView,
|
||||||
|
openSettings(e){
|
||||||
|
document.getElementById("main_settings_tablink").click()
|
||||||
|
},
|
||||||
addToQueue(e) {
|
addToQueue(e) {
|
||||||
e.stopPropagation()
|
e.stopPropagation()
|
||||||
Downloads.sendAddToQueue(e.currentTarget.dataset.link)
|
Downloads.sendAddToQueue(e.currentTarget.dataset.link)
|
||||||
|
Loading…
Reference in New Issue
Block a user