started re-organization of settings tab
This commit is contained in:
@@ -33,7 +33,8 @@ socket.on('logged_in', function (data) {
|
||||
'src',
|
||||
`https://e-cdns-images.dzcdn.net/images/user/${data.user.picture}/125x125-000000-80-0-0.jpg`
|
||||
)
|
||||
$('#logged_in_info').show()
|
||||
// $('#logged_in_info').show()
|
||||
document.getElementById('logged_in_info').classList.remove('hide')
|
||||
}
|
||||
break
|
||||
case 2:
|
||||
@@ -44,7 +45,8 @@ socket.on('logged_in', function (data) {
|
||||
'src',
|
||||
`https://e-cdns-images.dzcdn.net/images/user/${data.user.picture}/125x125-000000-80-0-0.jpg`
|
||||
)
|
||||
$('#logged_in_info').show()
|
||||
// $('#logged_in_info').show()
|
||||
document.getElementById('logged_in_info').classList.remove('hide')
|
||||
}
|
||||
break
|
||||
case 0:
|
||||
@@ -52,7 +54,8 @@ socket.on('logged_in', function (data) {
|
||||
localStorage.removeItem('arl')
|
||||
$('#login_input_arl').val('')
|
||||
$('#open_login_prompt').show()
|
||||
$('#logged_in_info').hide()
|
||||
document.getElementById('logged_in_info').classList.add('hide')
|
||||
// $('#logged_in_info').hide()
|
||||
$('#settings_username').text('Not Logged')
|
||||
$('#settings_picture').attr('src', `https://e-cdns-images.dzcdn.net/images/user/125x125-000000-80-0-0.jpg`)
|
||||
break
|
||||
@@ -64,7 +67,8 @@ socket.on('logged_out', function () {
|
||||
localStorage.removeItem('arl')
|
||||
$('#login_input_arl').val('')
|
||||
$('#open_login_prompt').show()
|
||||
$('#logged_in_info').hide()
|
||||
document.getElementById('logged_in_info').classList.add('hide')
|
||||
// $('#logged_in_info').hide()
|
||||
$('#settings_username').text('Not Logged')
|
||||
$('#settings_picture').attr('src', `https://e-cdns-images.dzcdn.net/images/user/125x125-000000-80-0-0.jpg`)
|
||||
})
|
||||
|
||||
@@ -8,33 +8,32 @@ import Utils from '../utils.js'
|
||||
const HomeTab = new Vue({
|
||||
data() {
|
||||
return {
|
||||
tracks: [],
|
||||
albums: [],
|
||||
artists: [],
|
||||
playlists: []
|
||||
tracks: [],
|
||||
albums: [],
|
||||
artists: [],
|
||||
playlists: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
artistView,
|
||||
artistView,
|
||||
albumView,
|
||||
playlistView,
|
||||
playPausePreview: TrackPreview.playPausePreview,
|
||||
previewMouseEnter: TrackPreview.previewMouseEnter,
|
||||
previewMouseLeave: TrackPreview.previewMouseLeave,
|
||||
numberWithDots: Utils.numberWithDots,
|
||||
numberWithDots: Utils.numberWithDots,
|
||||
convertDuration: Utils.convertDuration,
|
||||
addToQueue: function (e) {
|
||||
addToQueue(e) {
|
||||
e.stopPropagation()
|
||||
Downloads.sendAddToQueue(e.currentTarget.dataset.link)
|
||||
},
|
||||
openQualityModal: function (e) {
|
||||
e.preventDefault()
|
||||
openQualityModal(e) {
|
||||
QualityModal.open(e.currentTarget.dataset.link)
|
||||
},
|
||||
initHome(data) {
|
||||
this.tracks = data.tracks.data
|
||||
this.albums = data.albums.data
|
||||
this.artists = data.artists.data
|
||||
this.tracks = data.tracks.data
|
||||
this.albums = data.albums.data
|
||||
this.artists = data.artists.data
|
||||
this.playlists = data.playlists.data
|
||||
}
|
||||
},
|
||||
|
||||
@@ -15,6 +15,9 @@ window.windows_stack = []
|
||||
/* ===== Locals ===== */
|
||||
let currentStack = {}
|
||||
|
||||
// Exporting this function out of the default export
|
||||
// because it's used in components that are needed
|
||||
// in this file too
|
||||
export function artistView(ev) {
|
||||
let id = ev.currentTarget.dataset.id
|
||||
ArtistTab.reset()
|
||||
@@ -22,6 +25,9 @@ export function artistView(ev) {
|
||||
showTab('artist', id)
|
||||
}
|
||||
|
||||
// Exporting this function out of the default export
|
||||
// because it's used in components that are needed
|
||||
// in this file too
|
||||
export function albumView(ev) {
|
||||
let id = ev.currentTarget.dataset.id
|
||||
TracklistTab.reset()
|
||||
@@ -29,6 +35,9 @@ export function albumView(ev) {
|
||||
showTab('album', id)
|
||||
}
|
||||
|
||||
// Exporting this function out of the default export
|
||||
// because it's used in components that are needed
|
||||
// in this file too
|
||||
export function playlistView(ev) {
|
||||
let id = ev.currentTarget.dataset.id
|
||||
TracklistTab.reset()
|
||||
@@ -145,8 +154,6 @@ function changeTab(sidebarEl, section, tabName) {
|
||||
search_selected = tabName
|
||||
}
|
||||
|
||||
// window[section + '_selected'] = tabName
|
||||
|
||||
// Not choosing .currentTarget beacuse the event
|
||||
// is delegated
|
||||
sidebarEl.classList.add('active')
|
||||
|
||||
Reference in New Issue
Block a user