started re-organization of settings tab
This commit is contained in:
@@ -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