added global alias for js folders, removed modules folder in js
This commit is contained in:
parent
e32b7b7959
commit
2cb0986928
1
.gitignore
vendored
1
.gitignore
vendored
@ -3,6 +3,7 @@ __pycache__
|
|||||||
|
|
||||||
.DS_Store
|
.DS_Store
|
||||||
node_modules
|
node_modules
|
||||||
|
jsconfig.json
|
||||||
|
|
||||||
# pyinstaller build dirs
|
# pyinstaller build dirs
|
||||||
/dist
|
/dist
|
||||||
|
File diff suppressed because one or more lines are too long
@ -25,6 +25,14 @@ export default {
|
|||||||
{
|
{
|
||||||
find: 'vue',
|
find: 'vue',
|
||||||
replacement: 'vue/dist/vue.esm'
|
replacement: 'vue/dist/vue.esm'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
find: '@',
|
||||||
|
replacement: __dirname + '/src'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
find: '@components',
|
||||||
|
replacement: __dirname + '/src/js/components'
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}),
|
}),
|
||||||
|
@ -1,25 +1,27 @@
|
|||||||
// Global Vue components
|
// Global Vue components
|
||||||
import './modules/components/LoadingPlaceholder.js'
|
import '@components/LoadingPlaceholder.js'
|
||||||
|
|
||||||
// Vue views components
|
// Vue views components
|
||||||
import './modules/components/artist-tab.js'
|
import '@components/artist-tab.js'
|
||||||
import './modules/components/charts-tab.js'
|
import '@components/charts-tab.js'
|
||||||
import './modules/components/errors-tab.js'
|
import '@components/errors-tab.js'
|
||||||
import './modules/components/favorites-tab.js'
|
import '@components/favorites-tab.js'
|
||||||
import './modules/components/home-tab.js'
|
import '@components/home-tab.js'
|
||||||
import './modules/components/link-analyzer-tab.js'
|
import '@components/link-analyzer-tab.js'
|
||||||
import './modules/components/main-search.js'
|
import '@components/main-search.js'
|
||||||
import './modules/components/settings-tab.js'
|
import '@components/settings-tab.js'
|
||||||
import './modules/components/tracklist-tab.js'
|
import '@components/tracklist-tab.js'
|
||||||
|
|
||||||
|
import '@components/TestComponent.vue'
|
||||||
|
|
||||||
import $ from 'jquery'
|
import $ from 'jquery'
|
||||||
import { socket } from './modules/socket.js'
|
import { socket } from '@/js/socket.js'
|
||||||
import { toast } from './modules/toasts.js'
|
import { toast } from '@/js/toasts.js'
|
||||||
import Downloads from './modules/downloads.js'
|
import Downloads from '@/js/downloads.js'
|
||||||
import QualityModal from './modules/quality-modal.js'
|
import QualityModal from '@/js/quality-modal.js'
|
||||||
import Tabs from './modules/tabs.js'
|
import Tabs from '@/js/tabs.js'
|
||||||
import Search from './modules/search.js'
|
import Search from '@/js/search.js'
|
||||||
import TrackPreview from './modules/track-preview.js'
|
import TrackPreview from '@/js/track-preview.js'
|
||||||
|
|
||||||
/* ===== App initialization ===== */
|
/* ===== App initialization ===== */
|
||||||
|
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
import { isEmpty, orderBy } from 'lodash-es'
|
import { isEmpty, orderBy } from 'lodash-es'
|
||||||
import Vue from 'vue'
|
import Vue from 'vue'
|
||||||
import { socket } from '../socket.js'
|
import { socket } from '@/js/socket.js'
|
||||||
import Downloads from '../downloads.js'
|
import Downloads from '@/js/downloads.js'
|
||||||
import QualityModal from '../quality-modal.js'
|
import QualityModal from '@/js/quality-modal.js'
|
||||||
import { showView } from '../tabs.js'
|
import { showView } from '@/js/tabs.js'
|
||||||
|
|
||||||
const ArtistTab = new Vue({
|
const ArtistTab = new Vue({
|
||||||
data() {
|
data() {
|
@ -1,10 +1,10 @@
|
|||||||
import Vue from 'vue'
|
import Vue from 'vue'
|
||||||
import { socket } from '../socket.js'
|
import { socket } from '@/js/socket.js'
|
||||||
import { showView } from '../tabs.js'
|
import { showView } from '@/js/tabs.js'
|
||||||
import Downloads from '../downloads.js'
|
import Downloads from '@/js/downloads.js'
|
||||||
import QualityModal from '../quality-modal.js'
|
import QualityModal from '@/js/quality-modal.js'
|
||||||
import TrackPreview from '../track-preview.js'
|
import TrackPreview from '@/js/track-preview.js'
|
||||||
import Utils from '../utils.js'
|
import Utils from '@/js/utils.js'
|
||||||
|
|
||||||
const ChartsTab = new Vue({
|
const ChartsTab = new Vue({
|
||||||
data() {
|
data() {
|
@ -1,11 +1,11 @@
|
|||||||
import Vue from 'vue'
|
import Vue from 'vue'
|
||||||
import { socket } from '../socket.js'
|
import { socket } from '@/js/socket.js'
|
||||||
import { showView } from '../tabs.js'
|
import { showView } from '@/js/tabs.js'
|
||||||
import Downloads from '../downloads.js'
|
import Downloads from '@/js/downloads.js'
|
||||||
import QualityModal from '../quality-modal.js'
|
import QualityModal from '@/js/quality-modal.js'
|
||||||
import TrackPreview from '../track-preview.js'
|
import TrackPreview from '@/js/track-preview.js'
|
||||||
import Utils from '../utils.js'
|
import Utils from '@/js/utils.js'
|
||||||
import { toast } from '../toasts'
|
import { toast } from '@/js/toasts'
|
||||||
|
|
||||||
const FavoritesTab = new Vue({
|
const FavoritesTab = new Vue({
|
||||||
data() {
|
data() {
|
@ -1,10 +1,8 @@
|
|||||||
import Vue from 'vue'
|
import Vue from 'vue'
|
||||||
import { socket } from '../socket.js'
|
import { socket } from '@/js/socket.js'
|
||||||
import { showView } from '../tabs.js'
|
import { showView } from '@/js/tabs.js'
|
||||||
import Downloads from '../downloads.js'
|
import Downloads from '@/js/downloads.js'
|
||||||
import QualityModal from '../quality-modal.js'
|
import QualityModal from '@/js/quality-modal.js'
|
||||||
// import TrackPreview from '../track-preview.js'
|
|
||||||
// import Utils from '../utils.js'
|
|
||||||
|
|
||||||
const HomeTab = new Vue({
|
const HomeTab = new Vue({
|
||||||
data() {
|
data() {
|
@ -1,7 +1,7 @@
|
|||||||
import Vue from 'vue'
|
import Vue from 'vue'
|
||||||
import { socket } from '../socket.js'
|
import { socket } from '@/js/socket.js'
|
||||||
import { showView } from '../tabs.js'
|
import { showView } from '@/js/tabs.js'
|
||||||
import Utils from '../utils.js'
|
import Utils from '@/js/utils.js'
|
||||||
|
|
||||||
const LinkAnalyzerTab = new Vue({
|
const LinkAnalyzerTab = new Vue({
|
||||||
data() {
|
data() {
|
@ -1,10 +1,10 @@
|
|||||||
import Vue from 'vue'
|
import Vue from 'vue'
|
||||||
import { socket } from '../socket.js'
|
import { socket } from '@/js/socket.js'
|
||||||
import { showView } from '../tabs.js'
|
import { showView } from '@/js/tabs.js'
|
||||||
import Downloads from '../downloads.js'
|
import Downloads from '@/js/downloads.js'
|
||||||
import QualityModal from '../quality-modal.js'
|
import QualityModal from '@/js/quality-modal.js'
|
||||||
import TrackPreview from '../track-preview.js'
|
import TrackPreview from '@/js/track-preview.js'
|
||||||
import Utils from '../utils.js'
|
import Utils from '@/js/utils.js'
|
||||||
|
|
||||||
const MainSearch = new Vue({
|
const MainSearch = new Vue({
|
||||||
data: {
|
data: {
|
@ -1,7 +1,7 @@
|
|||||||
import Vue from 'vue'
|
import Vue from 'vue'
|
||||||
import { toast } from '../toasts.js'
|
import { toast } from '@/js/toasts.js'
|
||||||
import { socket } from '../socket.js'
|
import { socket } from '@/js/socket.js'
|
||||||
import TestComponent from './TestComponent.vue'
|
import TestComponent from '@components/TestComponent.vue'
|
||||||
|
|
||||||
const SettingsTab = new Vue({
|
const SettingsTab = new Vue({
|
||||||
components: {
|
components: {
|
||||||
@ -81,7 +81,9 @@ const SettingsTab = new Vue({
|
|||||||
},
|
},
|
||||||
accountChanged(user, accountNum) {
|
accountChanged(user, accountNum) {
|
||||||
this.$refs.username.innerText = user.name
|
this.$refs.username.innerText = user.name
|
||||||
this.$refs.userpicture.src = `https://e-cdns-images.dzcdn.net/images/user/${user.picture}/125x125-000000-80-0-0.jpg`
|
this.$refs.userpicture.src = `https://e-cdns-images.dzcdn.net/images/user/${
|
||||||
|
user.picture
|
||||||
|
}/125x125-000000-80-0-0.jpg`
|
||||||
this.accountNum = accountNum
|
this.accountNum = accountNum
|
||||||
localStorage.setItem('accountNum', this.accountNum)
|
localStorage.setItem('accountNum', this.accountNum)
|
||||||
},
|
},
|
@ -1,11 +1,11 @@
|
|||||||
import { isEmpty } from 'lodash-es'
|
import { isEmpty } from 'lodash-es'
|
||||||
import Vue from 'vue'
|
import Vue from 'vue'
|
||||||
import { socket } from '../socket.js'
|
import { socket } from '@/js/socket.js'
|
||||||
import { showView } from '../tabs.js'
|
import { showView } from '@/js/tabs.js'
|
||||||
import Downloads from '../downloads.js'
|
import Downloads from '@/js/downloads.js'
|
||||||
import QualityModal from '../quality-modal.js'
|
import QualityModal from '@/js/quality-modal.js'
|
||||||
import TrackPreview from '../track-preview.js'
|
import TrackPreview from '@/js/track-preview.js'
|
||||||
import Utils from '../utils.js'
|
import Utils from '@/js/utils.js'
|
||||||
|
|
||||||
const TracklistTab = new Vue({
|
const TracklistTab = new Vue({
|
||||||
data: () => ({
|
data: () => ({
|
@ -1,7 +1,7 @@
|
|||||||
import $ from 'jquery'
|
import $ from 'jquery'
|
||||||
import { socket } from './socket.js'
|
import { socket } from '@/js/socket.js'
|
||||||
import { toast } from './toasts.js'
|
import { toast } from '@/js/toasts.js'
|
||||||
import { showErrors } from './tabs.js'
|
import { showErrors } from '@/js/tabs.js'
|
||||||
|
|
||||||
/* ===== Locals ===== */
|
/* ===== Locals ===== */
|
||||||
const tabMinWidth = 250
|
const tabMinWidth = 250
|
||||||
@ -141,7 +141,9 @@ function addToQueue(queueItem, current = false) {
|
|||||||
$('#bar_' + queueItem.uuid).css('width', queueItem.progress + '%')
|
$('#bar_' + queueItem.uuid).css('width', queueItem.progress + '%')
|
||||||
if (queueItem.failed >= 1 && $('#download_' + queueItem.uuid + ' .queue_failed').length == 0) {
|
if (queueItem.failed >= 1 && $('#download_' + queueItem.uuid + ' .queue_failed').length == 0) {
|
||||||
$('#download_' + queueItem.uuid + ' .download_info_status').append(
|
$('#download_' + queueItem.uuid + ' .download_info_status').append(
|
||||||
`<span class="secondary-text inline-flex"><span class="download_slim_separator">(</span><span class="queue_failed_button inline-flex"><span class="queue_failed">${queueItem.failed}</span><i class="material-icons">error_outline</i></span><span class="download_slim_separator">)</span></span>`
|
`<span class="secondary-text inline-flex"><span class="download_slim_separator">(</span><span class="queue_failed_button inline-flex"><span class="queue_failed">${
|
||||||
|
queueItem.failed
|
||||||
|
}</span><i class="material-icons">error_outline</i></span><span class="download_slim_separator">)</span></span>`
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
if (queueItem.downloaded + queueItem.failed == queueItem.size) {
|
if (queueItem.downloaded + queueItem.failed == queueItem.size) {
|
@ -1,4 +1,4 @@
|
|||||||
import Downloads from './downloads.js'
|
import Downloads from '@/js/downloads.js'
|
||||||
|
|
||||||
const QualityModal = {
|
const QualityModal = {
|
||||||
// Defaults
|
// Defaults
|
@ -1,9 +1,9 @@
|
|||||||
import MainSearch from './components/main-search.js'
|
import MainSearch from '@components/main-search.js'
|
||||||
import Utils from './utils.js'
|
import Utils from '@/js/utils.js'
|
||||||
import QualityModal from './quality-modal.js'
|
import QualityModal from '@/js/quality-modal.js'
|
||||||
import Downloads from './downloads.js'
|
import Downloads from '@/js/downloads.js'
|
||||||
import { socket } from './socket.js'
|
import { socket } from '@/js/socket.js'
|
||||||
import Tabs from './tabs.js'
|
import Tabs from '@/js/tabs.js'
|
||||||
|
|
||||||
function linkListeners() {
|
function linkListeners() {
|
||||||
document.getElementById('content').addEventListener('scroll', Utils.debounce(handleContentScroll, 100))
|
document.getElementById('content').addEventListener('scroll', Utils.debounce(handleContentScroll, 100))
|
@ -1,11 +1,11 @@
|
|||||||
import ArtistTab from './components/artist-tab.js'
|
import ArtistTab from '@components/artist-tab.js'
|
||||||
import TracklistTab from './components/tracklist-tab.js'
|
import TracklistTab from '@components/tracklist-tab.js'
|
||||||
import LinkAnalyzerTab from './components/link-analyzer-tab.js'
|
import LinkAnalyzerTab from '@components/link-analyzer-tab.js'
|
||||||
import ErrorsTab from './components/errors-tab.js'
|
import ErrorsTab from '@components/errors-tab.js'
|
||||||
import { socket } from './socket.js'
|
import SettingsTab from '@components/settings-tab.js'
|
||||||
import SettingsTab from './components/settings-tab.js'
|
import MainSearch from '@components/main-search.js'
|
||||||
import MainSearch from './components/main-search.js'
|
import { socket } from '@/js/socket.js'
|
||||||
import TrackPreview from './track-preview.js'
|
import TrackPreview from '@/js/track-preview.js'
|
||||||
|
|
||||||
/* ===== Globals ====== */
|
/* ===== Globals ====== */
|
||||||
window.search_selected = ''
|
window.search_selected = ''
|
||||||
@ -242,7 +242,10 @@ function showTab(type, id, back = false) {
|
|||||||
if (windows_stack.length == 0) {
|
if (windows_stack.length == 0) {
|
||||||
windows_stack.push({ tab: main_selected })
|
windows_stack.push({ tab: main_selected })
|
||||||
} else if (!back) {
|
} else if (!back) {
|
||||||
if (currentStack.type === 'artist') currentStack.selected = ArtistTab.getCurrentTab()
|
if (currentStack.type === 'artist') {
|
||||||
|
currentStack.selected = ArtistTab.getCurrentTab()
|
||||||
|
}
|
||||||
|
|
||||||
windows_stack.push(currentStack)
|
windows_stack.push(currentStack)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -254,6 +257,7 @@ function showTab(type, id, back = false) {
|
|||||||
for (let i = 0; i < tabcontent.length; i++) {
|
for (let i = 0; i < tabcontent.length; i++) {
|
||||||
tabcontent[i].style.display = 'none'
|
tabcontent[i].style.display = 'none'
|
||||||
}
|
}
|
||||||
|
|
||||||
document.getElementById(tab).style.display = 'block'
|
document.getElementById(tab).style.display = 'block'
|
||||||
TrackPreview.stopStackedTabsPreview()
|
TrackPreview.stopStackedTabsPreview()
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user