Start migration to vite

This commit is contained in:
Georg Krause 2022-02-21 15:07:07 +01:00
parent 593cff4316
commit e9c4bfe947
No known key found for this signature in database
GPG Key ID: FD479B9A4D48E632
36 changed files with 601 additions and 5643 deletions

View File

@ -14,7 +14,6 @@ module.exports = {
parserOptions: { parserOptions: {
ecmaVersion: 2018, ecmaVersion: 2018,
sourceType: 'module', sourceType: 'module',
parser: '@babel/eslint-parser'
}, },
plugins: [ plugins: [
'vue' 'vue'

View File

@ -6,8 +6,9 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0"> <meta name="viewport" content="width=device-width,initial-scale=1.0">
<meta name="generator" content="Funkwhale"> <meta name="generator" content="Funkwhale">
<link rel="icon" href="<%= BASE_URL %>favicon.png"> <link rel="icon" href="/favicon.png">
<title>Funkwhale</title> <title>Funkwhale</title>
<script type="module" src="/src/main.js"></script>
<style> <style>
#fake-app { #fake-app {
width: 100vw; width: 100vw;

View File

@ -5,8 +5,9 @@
"description": "Funkwhale front-end", "description": "Funkwhale front-end",
"author": "Funkwhale Collective <contact@funkwhale.audio>", "author": "Funkwhale Collective <contact@funkwhale.audio>",
"scripts": { "scripts": {
"serve": "[ ! -d src/translations ] && npm run i18n-compile; vue-cli-service serve --port ${VUE_PORT:-8080} --host ${VUE_HOST:-0.0.0.0}", "dev": "vite",
"build": "scripts/i18n-compile.sh && vue-cli-service build", "build": "vite build",
"serve": "vite preview",
"test:unit": "vue-cli-service test:unit --reporter mocha-junit-reporter", "test:unit": "vue-cli-service test:unit --reporter mocha-junit-reporter",
"lint": "eslint --ext .js,.vue src", "lint": "eslint --ext .js,.vue src",
"fix-fomantic-css": "scripts/fix-fomantic-css.sh", "fix-fomantic-css": "scripts/fix-fomantic-css.sh",
@ -17,7 +18,6 @@
"dependencies": { "dependencies": {
"axios": "0.26.0", "axios": "0.26.0",
"axios-auth-refresh": "2.2.8", "axios-auth-refresh": "2.2.8",
"core-js": "3.21.1",
"diff": "5.0.0", "diff": "5.0.0",
"django-channels": "2.1.3", "django-channels": "2.1.3",
"focus-trap": "6.7.3", "focus-trap": "6.7.3",
@ -44,12 +44,9 @@
"vuex-router-sync": "5.0.0" "vuex-router-sync": "5.0.0"
}, },
"devDependencies": { "devDependencies": {
"@babel/eslint-parser": "7.17.0", "@vitejs/plugin-vue": "^2.2.2",
"@vue/cli-plugin-babel": "~5.0.1",
"@vue/cli-plugin-pwa": "~5.0.1",
"@vue/cli-plugin-unit-mocha": "~5.0.1",
"@vue/cli-service": "~5.0.1",
"@vue/test-utils": "1.3.0", "@vue/test-utils": "1.3.0",
"autoprefixer": "^10.4.2",
"chai": "4.3.6", "chai": "4.3.6",
"easygettext": "2.17.0", "easygettext": "2.17.0",
"eslint": "8.9.0", "eslint": "8.9.0",
@ -63,12 +60,10 @@
"mocha": "9.2.1", "mocha": "9.2.1",
"mocha-junit-reporter": "2.0.2", "mocha-junit-reporter": "2.0.2",
"moxios": "0.4.0", "moxios": "0.4.0",
"preload-webpack-plugin": "3.0.0-beta.4",
"purgecss-webpack-plugin": "4.1.3",
"sass-loader": "10.2.1",
"sinon": "13.0.1", "sinon": "13.0.1",
"vue-template-compiler": "2.6.14", "vite": "^2.8.4",
"webpack-bundle-size-analyzer": "3.1.0" "vite-plugin-vue2": "^1.9.3",
"vue-template-compiler": "^2.6.14"
}, },
"eslintConfig": { "eslintConfig": {
"root": true, "root": true,

View File

@ -2,7 +2,8 @@
<div <div
id="app" id="app"
:key="String($store.state.instance.instanceUrl)" :key="String($store.state.instance.instanceUrl)"
:class="[$store.state.ui.queueFocused ? 'queue-focused' : '', {'has-bottom-player': $store.state.queue.tracks.length > 0}, `is-${ $store.getters['ui/windowSize']}`]" :class="[$store.state.ui.queueFocused ? 'queue-focused' : '',
{'has-bottom-player': $store.state.queue.tracks.length > 0}]"
> >
<!-- here, we display custom stylesheets, if any --> <!-- here, we display custom stylesheets, if any -->
<link <link
@ -51,23 +52,23 @@ import axios from 'axios'
import _ from '@/lodash' import _ from '@/lodash'
import { mapState, mapGetters } from 'vuex' import { mapState, mapGetters } from 'vuex'
import { WebSocketBridge } from 'django-channels' import { WebSocketBridge } from 'django-channels'
import GlobalEvents from '@/components/utils/global-events' import GlobalEvents from '@/components/utils/global-events.vue'
import locales from './locales' import locales from './locales'
import { getClientOnlyRadio } from '@/radios' import { getClientOnlyRadio } from '@/radios'
export default { export default {
name: 'App', name: 'App',
components: { components: {
Player: () => import(/* webpackChunkName: "audio" */ '@/components/audio/Player'), Player: () => import('@/components/audio/Player.vue'),
Queue: () => import(/* webpackChunkName: "audio" */ '@/components/Queue'), Queue: () => import('@/components/Queue.vue'),
PlaylistModal: () => import(/* webpackChunkName: "auth-audio" */ '@/components/playlists/PlaylistModal'), PlaylistModal: () => import('@/components/playlists/PlaylistModal.vue'),
ChannelUploadModal: () => import(/* webpackChunkName: "auth-audio" */ '@/components/channels/UploadModal'), ChannelUploadModal: () => import('@/components/channels/UploadModal.vue'),
Sidebar: () => import(/* webpackChunkName: "core" */ '@/components/Sidebar'), Sidebar: () => import('@/components/Sidebar.vue'),
ServiceMessages: () => import(/* webpackChunkName: "core" */ '@/components/ServiceMessages'), ServiceMessages: () => import('@/components/ServiceMessages.vue'),
SetInstanceModal: () => import(/* webpackChunkName: "core" */ '@/components/SetInstanceModal'), SetInstanceModal: () => import('@/components/SetInstanceModal.vue'),
ShortcutsModal: () => import(/* webpackChunkName: "core" */ '@/components/ShortcutsModal'), ShortcutsModal: () => import('@/components/ShortcutsModal.vue'),
FilterModal: () => import(/* webpackChunkName: "moderation" */ '@/components/moderation/FilterModal'), FilterModal: () => import('@/components/moderation/FilterModal.vue'),
ReportModal: () => import(/* webpackChunkName: "moderation" */ '@/components/moderation/ReportModal'), ReportModal: () => import('@/components/moderation/ReportModal.vue'),
GlobalEvents GlobalEvents
}, },
data () { data () {
@ -179,7 +180,7 @@ export default {
self.$language.current = newValue self.$language.current = newValue
return self.$store.commit('ui/momentLocale', 'en') return self.$store.commit('ui/momentLocale', 'en')
} }
import(/* webpackChunkName: "locale-[request]" */ `./translations/${newValue}.json`).then((response) => { import('./translations/en_GB.json').then((response) => {
Vue.$translations[newValue] = response.default[newValue] Vue.$translations[newValue] = response.default[newValue]
}).finally(() => { }).finally(() => {
// set current language twice, otherwise we seem to have a cache somewhere // set current language twice, otherwise we seem to have a cache somewhere
@ -188,12 +189,12 @@ export default {
self.$language.current = newValue self.$language.current = newValue
}) })
const momentLocale = newValue.replace('_', '-').toLowerCase() const momentLocale = newValue.replace('_', '-').toLowerCase()
import(/* webpackChunkName: "moment-locale-[request]" */ `moment/locale/${momentLocale}.js`).then(() => { import('moment/locale/en-gb.js').then(() => {
self.$store.commit('ui/momentLocale', momentLocale) self.$store.commit('ui/momentLocale', momentLocale)
}).catch(() => { }).catch(() => {
console.log('No momentjs locale available for', momentLocale) console.log('No momentjs locale available for', momentLocale)
const shortLocale = momentLocale.split('-')[0] const shortLocale = momentLocale.split('-')[0]
import(/* webpackChunkName: "moment-locale-[request]" */ `moment/locale/${shortLocale}.js`).then(() => { import('moment/locale/en-gb.js').then(() => {
self.$store.commit('ui/momentLocale', shortLocale) self.$store.commit('ui/momentLocale', shortLocale)
}).catch(() => { }).catch(() => {
console.log('No momentjs locale available for', shortLocale) console.log('No momentjs locale available for', shortLocale)
@ -279,7 +280,9 @@ export default {
// 1. use the url provided in settings.json, if any // 1. use the url provided in settings.json, if any
// 2. use the url specified when building via VUE_APP_INSTANCE_URL // 2. use the url specified when building via VUE_APP_INSTANCE_URL
// 3. use the current url // 3. use the current url
const defaultInstanceUrl = this.$store.state.instance.frontSettings.defaultServerUrl || process.env.VUE_APP_INSTANCE_URL || this.$store.getters['instance/defaultUrl']() const defaultInstanceUrl =
this.$store.state.instance.frontSettings.defaultServerUrl ||
import.meta.env.VUE_APP_INSTANCE_URL || this.$store.getters['instance/defaultUrl']()
this.$store.commit('instance/instanceUrl', defaultInstanceUrl) this.$store.commit('instance/instanceUrl', defaultInstanceUrl)
} else { } else {
// needed to trigger initialization of axios / service worker // needed to trigger initialization of axios / service worker
@ -423,7 +426,8 @@ export default {
// let token = 'test' // let token = 'test'
const bridge = new WebSocketBridge() const bridge = new WebSocketBridge()
this.bridge = bridge this.bridge = bridge
let url = this.$store.getters['instance/absoluteUrl'](`api/v1/activity?token=${token}`) let url =
this.$store.getters['instance/absoluteUrl']('api/v1/activity?token=${token}')
url = url.replace('http://', 'ws://') url = url.replace('http://', 'ws://')
url = url.replace('https://', 'wss://') url = url.replace('https://', 'wss://')
bridge.connect( bridge.connect(
@ -442,7 +446,7 @@ export default {
const albumArtist = (track.album) ? track.album.artist.name : null const albumArtist = (track.album) ? track.album.artist.name : null
const artistName = ( const artistName = (
(track.artist) ? track.artist.name : albumArtist) (track.artist) ? track.artist.name : albumArtist)
const text = `${trackTitle} ${artistName}` const text = '♫ ${trackTitle} ${artistName} ♫'
return text return text
}, },
updateDocumentTitle () { updateDocumentTitle () {
@ -474,8 +478,8 @@ export default {
}, },
setTheme (theme) { setTheme (theme) {
const oldTheme = (theme === 'light') ? 'dark' : 'light' const oldTheme = (theme === 'light') ? 'dark' : 'light'
document.body.classList.remove(`theme-${oldTheme}`) document.body.classList.remove('theme-${oldTheme}')
document.body.classList.add(`theme-${theme}`) document.body.classList.add('theme-${theme}')
} }
} }
} }

View File

@ -254,8 +254,8 @@ import _ from '@/lodash'
import showdown from 'showdown' import showdown from 'showdown'
import { humanSize } from '@/filters' import { humanSize } from '@/filters'
import SignupForm from '@/components/auth/SignupForm' import SignupForm from '@/components/auth/SignupForm.vue'
import LogoText from '@/components/LogoText' import LogoText from '@/components/LogoText.vue'
export default { export default {
components: { components: {

View File

@ -328,10 +328,10 @@
import _ from '@/lodash' import _ from '@/lodash'
import { mapState } from 'vuex' import { mapState } from 'vuex'
import showdown from 'showdown' import showdown from 'showdown'
import AlbumWidget from '@/components/audio/album/Widget' import AlbumWidget from '@/components/audio/album/Widget.vue'
import ChannelsWidget from '@/components/audio/ChannelsWidget' import ChannelsWidget from '@/components/audio/ChannelsWidget.vue'
import LoginForm from '@/components/auth/LoginForm' import LoginForm from '@/components/auth/LoginForm.vue'
import SignupForm from '@/components/auth/SignupForm' import SignupForm from '@/components/auth/SignupForm.vue'
import { humanSize } from '@/filters' import { humanSize } from '@/filters'
export default { export default {

View File

@ -351,9 +351,11 @@ import { createFocusTrap } from 'focus-trap'
export default { export default {
components: { components: {
TrackFavoriteIcon: () => import(/* webpackChunkName: "auth-audio" */ '@/components/favorites/TrackFavoriteIcon'), TrackFavoriteIcon: () =>
TrackPlaylistIcon: () => import(/* webpackChunkName: "auth-audio" */ '@/components/playlists/TrackPlaylistIcon'), import('@/components/favorites/TrackFavoriteIcon.vue'),
draggable: () => import(/* webpackChunkName: "draggable" */ 'vuedraggable') TrackPlaylistIcon: () =>
import('@/components/playlists/TrackPlaylistIcon.vue'),
draggable: () => import('vuedraggable')
}, },
data () { data () {
return { return {

View File

@ -105,7 +105,7 @@
</template> </template>
<script> <script>
import Modal from '@/components/semantic/Modal' import Modal from '@/components/semantic/Modal.vue'
import axios from 'axios' import axios from 'axios'
import _ from '@/lodash' import _ from '@/lodash'

View File

@ -62,7 +62,7 @@
export default { export default {
components: { components: {
Modal: () => import(/* webpackChunkName: "modal" */ '@/components/semantic/Modal') Modal: () => import('@/components/semantic/Modal.vue')
}, },
props: { show: { type: Boolean, required: true } }, props: { show: { type: Boolean, required: true } },
computed: { computed: {

View File

@ -472,12 +472,12 @@
<script> <script>
import { mapState, mapActions, mapGetters } from 'vuex' import { mapState, mapActions, mapGetters } from 'vuex'
import UserModal from '@/components/common/UserModal' import UserModal from '@/components/common/UserModal.vue'
import Logo from '@/components/Logo' import Logo from '@/components/Logo.vue'
import SearchBar from '@/components/audio/SearchBar' import SearchBar from '@/components/audio/SearchBar.vue'
import ThemesMixin from '@/components/mixins/Themes' import ThemesMixin from '@/components/mixins/Themes.vue'
import UserMenu from '@/components/common/UserMenu' import UserMenu from '@/components/common/UserMenu.vue'
import Modal from '@/components/semantic/Modal' import Modal from '@/components/semantic/Modal.vue'
import $ from 'jquery' import $ from 'jquery'

View File

@ -342,8 +342,8 @@
<script> <script>
import { mapState, mapGetters, mapActions } from 'vuex' import { mapState, mapGetters, mapActions } from 'vuex'
import GlobalEvents from '@/components/utils/global-events' import GlobalEvents from '@/components/utils/global-events.vue'
import { toLinearVolumeScale } from '@/audio/volume' import { toLinearVolumeScale } from '@/audio/volume.js'
import { Howl, Howler } from 'howler' import { Howl, Howler } from 'howler'
import _ from '@/lodash' import _ from '@/lodash'
import url from '@/utils/url' import url from '@/utils/url'
@ -351,9 +351,11 @@ import axios from 'axios'
export default { export default {
components: { components: {
VolumeControl: () => import(/* webpackChunkName: "audio" */ './VolumeControl'), VolumeControl: () => import('./VolumeControl.vue'),
TrackFavoriteIcon: () => import(/* webpackChunkName: "auth-audio" */ '@/components/favorites/TrackFavoriteIcon'), TrackFavoriteIcon: () =>
TrackPlaylistIcon: () => import(/* webpackChunkName: "auth-audio" */ '@/components/playlists/TrackPlaylistIcon'), import('@/components/favorites/TrackFavoriteIcon.vue'),
TrackPlaylistIcon: () =>
import('@/components/playlists/TrackPlaylistIcon.vue'),
GlobalEvents GlobalEvents
}, },
data () { data () {

View File

@ -56,7 +56,7 @@
<script> <script>
import axios from 'axios' import axios from 'axios'
import AlbumCard from '@/components/audio/album/Card' import AlbumCard from '@/components/audio/album/Card.vue'
export default { export default {
components: { components: {

View File

@ -87,7 +87,7 @@
</template> </template>
<script> <script>
import PasswordInput from '@/components/forms/PasswordInput' import PasswordInput from '@/components/forms/PasswordInput.vue'
export default { export default {
components: { components: {

View File

@ -142,8 +142,8 @@
</template> </template>
<script> <script>
import Modal from '@/components/semantic/Modal' import Modal from '@/components/semantic/Modal.vue'
import ChannelUploadForm from '@/components/channels/UploadForm' import ChannelUploadForm from '@/components/channels/UploadForm.vue'
import { humanSize } from '@/filters' import { humanSize } from '@/filters'
export default { export default {

View File

@ -1,23 +1,23 @@
import Vue from 'vue' import Vue from 'vue'
Vue.component('HumanDate', () => import(/* webpackChunkName: "common" */ '@/components/common/HumanDate')) Vue.component('HumanDate', () => import('@/components/common/HumanDate.vue'))
Vue.component('HumanDuration', () => import(/* webpackChunkName: "common" */ '@/components/common/HumanDuration')) Vue.component('HumanDuration', () => import('@/components/common/HumanDuration.vue'))
Vue.component('Username', () => import(/* webpackChunkName: "common" */ '@/components/common/Username')) Vue.component('Username', () => import('@/components/common/Username.vue'))
Vue.component('UserLink', () => import(/* webpackChunkName: "common" */ '@/components/common/UserLink')) Vue.component('UserLink', () => import('@/components/common/UserLink.vue'))
Vue.component('ActorLink', () => import(/* webpackChunkName: "common" */ '@/components/common/ActorLink')) Vue.component('ActorLink', () => import('@/components/common/ActorLink.vue'))
Vue.component('ActorAvatar', () => import(/* webpackChunkName: "common" */ '@/components/common/ActorAvatar')) Vue.component('ActorAvatar', () => import('@/components/common/ActorAvatar.vue'))
Vue.component('Duration', () => import(/* webpackChunkName: "common" */ '@/components/common/Duration')) Vue.component('Duration', () => import('@/components/common/Duration.vue'))
Vue.component('DangerousButton', () => import(/* webpackChunkName: "common" */ '@/components/common/DangerousButton')) Vue.component('DangerousButton', () => import('@/components/common/DangerousButton.vue'))
Vue.component('Message', () => import(/* webpackChunkName: "common" */ '@/components/common/Message')) Vue.component('Message', () => import('@/components/common/Message.vue'))
Vue.component('CopyInput', () => import(/* webpackChunkName: "common" */ '@/components/common/CopyInput')) Vue.component('CopyInput', () => import('@/components/common/CopyInput.vue'))
Vue.component('AjaxButton', () => import(/* webpackChunkName: "common" */ '@/components/common/AjaxButton')) Vue.component('AjaxButton', () => import('@/components/common/AjaxButton.vue'))
Vue.component('Tooltip', () => import(/* webpackChunkName: "common" */ '@/components/common/Tooltip')) Vue.component('Tooltip', () => import('@/components/common/Tooltip.vue'))
Vue.component('EmptyState', () => import(/* webpackChunkName: "common" */ '@/components/common/EmptyState')) Vue.component('EmptyState', () => import('@/components/common/EmptyState.vue'))
Vue.component('ExpandableDiv', () => import(/* webpackChunkName: "common" */ '@/components/common/ExpandableDiv')) Vue.component('ExpandableDiv', () => import('@/components/common/ExpandableDiv.vue'))
Vue.component('CollapseLink', () => import(/* webpackChunkName: "common" */ '@/components/common/CollapseLink')) Vue.component('CollapseLink', () => import('@/components/common/CollapseLink.vue'))
Vue.component('ActionFeedback', () => import(/* webpackChunkName: "common" */ '@/components/common/ActionFeedback')) Vue.component('ActionFeedback', () => import('@/components/common/ActionFeedback.vue'))
Vue.component('RenderedDescription', () => import(/* webpackChunkName: "common" */ '@/components/common/RenderedDescription')) Vue.component('RenderedDescription', () => import('@/components/common/RenderedDescription.vue'))
Vue.component('ContentForm', () => import(/* webpackChunkName: "common" */ '@/components/common/ContentForm')) Vue.component('ContentForm', () => import('@/components/common/ContentForm.vue'))
Vue.component('InlineSearchBar', () => import(/* webpackChunkName: "common" */ '@/components/common/InlineSearchBar')) Vue.component('InlineSearchBar', () => import('@/components/common/InlineSearchBar.vue'))
export default {} export default {}

View File

@ -250,10 +250,10 @@
<script> <script>
import axios from 'axios' import axios from 'axios'
import lodash from '@/lodash' import lodash from '@/lodash'
import PlayButton from '@/components/audio/PlayButton' import PlayButton from '@/components/audio/PlayButton.vue'
import TagsList from '@/components/tags/List' import TagsList from '@/components/tags/List.vue'
import ArtistLabel from '@/components/audio/ArtistLabel' import ArtistLabel from '@/components/audio/ArtistLabel.vue'
import AlbumDropdown from './AlbumDropdown' import AlbumDropdown from './AlbumDropdown.vue'
function groupByDisc (initial) { function groupByDisc (initial) {
function inner (acc, track) { function inner (acc, track) {

View File

@ -92,11 +92,11 @@
<script> <script>
import time from '@/utils/time' import time from '@/utils/time.vue'
import LibraryWidget from '@/components/federation/LibraryWidget' import LibraryWidget from '@/components/federation/LibraryWidget.vue'
import ChannelEntries from '@/components/audio/ChannelEntries' import ChannelEntries from '@/components/audio/ChannelEntries.vue'
import TrackTable from '@/components/audio/track/Table' import TrackTable from '@/components/audio/track/Table.vue'
import PlayButton from '@/components/audio/PlayButton' import PlayButton from '@/components/audio/PlayButton.vue'
export default { export default {
components: { components: {

View File

@ -153,12 +153,12 @@ import $ from 'jquery'
import logger from '@/logging' import logger from '@/logging'
import OrderingMixin from '@/components/mixins/Ordering' import OrderingMixin from '@/components/mixins/Ordering.vue'
import PaginationMixin from '@/components/mixins/Pagination' import PaginationMixin from '@/components/mixins/Pagination.vue'
import TranslationsMixin from '@/components/mixins/Translations' import TranslationsMixin from '@/components/mixins/Translations.vue'
import AlbumCard from '@/components/audio/album/Card' import AlbumCard from '@/components/audio/album/Card.vue'
import Pagination from '@/components/Pagination' import Pagination from '@/components/Pagination.vue'
import TagsSelector from '@/components/library/TagsSelector' import TagsSelector from '@/components/library/TagsSelector.vue'
const FETCH_URL = 'albums/' const FETCH_URL = 'albums/'

View File

@ -169,12 +169,12 @@ import $ from 'jquery'
import logger from '@/logging' import logger from '@/logging'
import OrderingMixin from '@/components/mixins/Ordering' import OrderingMixin from '@/components/mixins/Ordering.vue'
import PaginationMixin from '@/components/mixins/Pagination' import PaginationMixin from '@/components/mixins/Pagination.vue'
import TranslationsMixin from '@/components/mixins/Translations' import TranslationsMixin from '@/components/mixins/Translations.vue'
import ArtistCard from '@/components/audio/artist/Card' import ArtistCard from '@/components/audio/artist/Card.vue'
import Pagination from '@/components/Pagination' import Pagination from '@/components/Pagination.vue'
import TagsSelector from '@/components/library/TagsSelector' import TagsSelector from '@/components/library/TagsSelector.vue'
const FETCH_URL = 'artists/' const FETCH_URL = 'artists/'

View File

@ -201,14 +201,14 @@ import $ from 'jquery'
import logger from '@/logging' import logger from '@/logging'
import OrderingMixin from '@/components/mixins/Ordering' import OrderingMixin from '@/components/mixins/Ordering.vue'
import PaginationMixin from '@/components/mixins/Pagination' import PaginationMixin from '@/components/mixins/Pagination.vue'
import TranslationsMixin from '@/components/mixins/Translations' import TranslationsMixin from '@/components/mixins/Translations.vue'
import ArtistCard from '@/components/audio/artist/Card' import ArtistCard from '@/components/audio/artist/Card.vue'
import Pagination from '@/components/Pagination' import Pagination from '@/components/Pagination.vue'
import TagsSelector from '@/components/library/TagsSelector' import TagsSelector from '@/components/library/TagsSelector.vue'
import Modal from '@/components/semantic/Modal' import Modal from '@/components/semantic/Modal.vue'
import RemoteSearchForm from '@/components/RemoteSearchForm' import RemoteSearchForm from '@/components/RemoteSearchForm.vue'
const FETCH_URL = 'artists/' const FETCH_URL = 'artists/'

View File

@ -179,11 +179,11 @@ import $ from 'jquery'
import logger from '@/logging' import logger from '@/logging'
import OrderingMixin from '@/components/mixins/Ordering' import OrderingMixin from '@/components/mixins/Ordering.vue'
import PaginationMixin from '@/components/mixins/Pagination' import PaginationMixin from '@/components/mixins/Pagination.vue'
import TranslationsMixin from '@/components/mixins/Translations' import TranslationsMixin from '@/components/mixins/Translations.vue'
import RadioCard from '@/components/radios/Card' import RadioCard from '@/components/radios/Card.vue'
import Pagination from '@/components/Pagination' import Pagination from '@/components/Pagination.vue'
const FETCH_URL = 'radios/radios/' const FETCH_URL = 'radios/radios/'

View File

@ -187,9 +187,9 @@
import axios from 'axios' import axios from 'axios'
import $ from 'jquery' import $ from 'jquery'
import _ from '@/lodash' import _ from '@/lodash'
import BuilderFilter from './Filter' import BuilderFilter from './Filter.vue'
import TrackTable from '@/components/audio/track/Table' import TrackTable from '@/components/audio/track/Table.vue'
import RadioButton from '@/components/radios/Button' import RadioButton from '@/components/radios/Button.vue'
export default { export default {
components: { components: {

View File

@ -109,8 +109,8 @@ import axios from 'axios'
import $ from 'jquery' import $ from 'jquery'
import _ from '@/lodash' import _ from '@/lodash'
import Modal from '@/components/semantic/Modal' import Modal from '@/components/semantic/Modal.vue'
import TrackTable from '@/components/audio/track/Table' import TrackTable from '@/components/audio/track/Table.vue'
export default { export default {
components: { components: {

View File

@ -93,7 +93,7 @@ import axios from 'axios'
import { mapState } from 'vuex' import { mapState } from 'vuex'
import logger from '@/logging' import logger from '@/logging'
import Modal from '@/components/semantic/Modal' import Modal from '@/components/semantic/Modal.vue'
export default { export default {
components: { components: {

View File

@ -165,8 +165,9 @@ function urlDomain (data) {
export default { export default {
components: { components: {
ReportCategoryDropdown: () => import(/* webpackChunkName: "reports" */ '@/components/moderation/ReportCategoryDropdown'), ReportCategoryDropdown: () =>
Modal: () => import(/* webpackChunkName: "modal" */ '@/components/semantic/Modal') import('@/components/moderation/ReportCategoryDropdown.vue'),
Modal: () => import('@/components/semantic/Modal.vue')
}, },
data () { data () {
return { return {

View File

@ -200,8 +200,8 @@ import axios from 'axios'
import { mapState } from 'vuex' import { mapState } from 'vuex'
import logger from '@/logging' import logger from '@/logging'
import Modal from '@/components/semantic/Modal' import Modal from '@/components/semantic/Modal.vue'
import PlaylistForm from '@/components/playlists/Form' import PlaylistForm from '@/components/playlists/Form.vue'
export default { export default {
components: { components: {

View File

@ -61,7 +61,7 @@
<script> <script>
import _ from '@/lodash' import _ from '@/lodash'
import axios from 'axios' import axios from 'axios'
import PlaylistCard from '@/components/playlists/Card' import PlaylistCard from '@/components/playlists/Card.vue'
export default { export default {
components: { components: {

View File

@ -5,7 +5,7 @@ import jQuery from 'jquery'
import Vue from 'vue' import Vue from 'vue'
import moment from 'moment' import moment from 'moment'
import App from './App' import App from './App.vue'
import router from './router' import router from './router'
import axios from 'axios' import axios from 'axios'
import VueLazyload from 'vue-lazyload' import VueLazyload from 'vue-lazyload'
@ -20,8 +20,8 @@ import { parseAPIErrors } from '@/utils'
import globals from '@/components/globals' // eslint-disable-line import globals from '@/components/globals' // eslint-disable-line
import './registerServiceWorker' import './registerServiceWorker'
logger.default.info('Loading environment:', process.env.NODE_ENV) logger.default.info('Loading environment:', import.meta.env.NODE_ENV)
logger.default.debug('Environment variables:', process.env) logger.default.debug('Environment variables:', import.meta.env)
sync(store, router) sync(store, router)
@ -59,7 +59,6 @@ Vue.use(GetTextPlugin, {
}) })
Vue.use(VueLazyload) Vue.use(VueLazyload)
Vue.config.productionTip = false
Vue.directive('title', function (el, binding) { Vue.directive('title', function (el, binding) {
store.commit('ui/pageTitle', binding.value) store.commit('ui/pageTitle', binding.value)
}) })

View File

@ -31,11 +31,11 @@ function libraryPermissions (to, from, next) {
} }
} }
console.log('PROCESS', process.env) console.log('PROCESS', import.meta.env)
export default new Router({ export default new Router({
mode: 'history', mode: 'history',
linkActiveClass: 'active', linkActiveClass: 'active',
base: process.env.VUE_APP_ROUTER_BASE_URL || '/', base: import.meta.env.VUE_APP_ROUTER_BASE_URL || '/',
scrollBehavior (to, from, savedPosition) { scrollBehavior (to, from, savedPosition) {
if (to.meta.preserveScrollPosition) { if (to.meta.preserveScrollPosition) {
return savedPosition return savedPosition
@ -55,7 +55,7 @@ export default new Router({
path: '/', path: '/',
name: 'index', name: 'index',
component: () => component: () =>
import(/* webpackChunkName: "core" */ '@/components/Home') import('@/components/Home.vue')
}, },
{ {
path: '/front', path: '/front',
@ -69,32 +69,32 @@ export default new Router({
path: '/about', path: '/about',
name: 'about', name: 'about',
component: () => component: () =>
import(/* webpackChunkName: "about" */ '@/components/About') import('@/components/About.vue')
}, },
{ {
path: '/about/pod', path: '/about/pod',
name: 'about-pod', name: 'about-pod',
component: () => component: () =>
import(/* webpackChunkName: "about" */ '@/components/AboutPod') import('@/components/AboutPod.vue')
}, },
{ {
path: '/login', path: '/login',
name: 'login', name: 'login',
component: () => component: () =>
import(/* webpackChunkName: "login" */ '@/views/auth/Login'), import('@/views/auth/Login.vue'),
props: route => ({ next: route.query.next || '/library' }) props: route => ({ next: route.query.next || '/library' })
}, },
{ {
path: '/notifications', path: '/notifications',
name: 'notifications', name: 'notifications',
component: () => component: () =>
import(/* webpackChunkName: "notifications" */ '@/views/Notifications') import('@/views/Notifications.vue')
}, },
{ {
path: '/auth/password/reset', path: '/auth/password/reset',
name: 'auth.password-reset', name: 'auth.password-reset',
component: () => component: () =>
import(/* webpackChunkName: "password-reset" */ '@/views/auth/PasswordReset'), import('@/views/auth/PasswordReset.vue'),
props: route => ({ props: route => ({
defaultEmail: route.query.email defaultEmail: route.query.email
}) })
@ -103,7 +103,7 @@ export default new Router({
path: '/auth/callback', path: '/auth/callback',
name: 'auth.callback', name: 'auth.callback',
component: () => component: () =>
import(/* webpackChunkName: "auth-callback" */ '@/views/auth/Callback'), import('@/views/auth/Callback.vue'),
props: route => ({ props: route => ({
code: route.query.code, code: route.query.code,
state: route.query.state state: route.query.state
@ -113,7 +113,7 @@ export default new Router({
path: '/auth/email/confirm', path: '/auth/email/confirm',
name: 'auth.email-confirm', name: 'auth.email-confirm',
component: () => component: () =>
import(/* webpackChunkName: "signup" */ '@/views/auth/EmailConfirm'), import('@/views/auth/EmailConfirm.vue'),
props: route => ({ props: route => ({
defaultKey: route.query.key defaultKey: route.query.key
}) })
@ -122,7 +122,7 @@ export default new Router({
path: '/search', path: '/search',
name: 'search', name: 'search',
component: () => component: () =>
import(/* webpackChunkName: "core" */ '@/views/Search'), import('@/views/Search.vue'),
props: route => ({ props: route => ({
initialId: route.query.id, initialId: route.query.id,
initialType: route.query.type || 'artists', initialType: route.query.type || 'artists',
@ -135,7 +135,7 @@ export default new Router({
name: 'auth.password-reset-confirm', name: 'auth.password-reset-confirm',
component: () => component: () =>
import( import(
/* webpackChunkName: "password-reset" */ '@/views/auth/PasswordResetConfirm' '@/views/auth/PasswordResetConfirm.vue'
), ),
props: route => ({ props: route => ({
defaultUid: route.query.uid, defaultUid: route.query.uid,
@ -146,7 +146,7 @@ export default new Router({
path: '/authorize', path: '/authorize',
name: 'authorize', name: 'authorize',
component: () => component: () =>
import(/* webpackChunkName: "settings" */ '@/components/auth/Authorize'), import('@/components/auth/Authorize.vue'),
props: route => ({ props: route => ({
clientId: route.query.client_id, clientId: route.query.client_id,
redirectUri: route.query.redirect_uri, redirectUri: route.query.redirect_uri,
@ -160,7 +160,7 @@ export default new Router({
path: '/signup', path: '/signup',
name: 'signup', name: 'signup',
component: () => component: () =>
import(/* webpackChunkName: "signup" */ '@/views/auth/Signup'), import('@/views/auth/Signup.vue'),
props: route => ({ props: route => ({
defaultInvitation: route.query.invitation defaultInvitation: route.query.invitation
}) })
@ -169,13 +169,13 @@ export default new Router({
path: '/logout', path: '/logout',
name: 'logout', name: 'logout',
component: () => component: () =>
import(/* webpackChunkName: "login" */ '@/components/auth/Logout') import('@/components/auth/Logout.vue')
}, },
{ {
path: '/settings', path: '/settings',
name: 'settings', name: 'settings',
component: () => component: () =>
import(/* webpackChunkName: "settings" */ '@/components/auth/Settings') import('@/components/auth/Settings.vue')
}, },
{ {
path: '/settings/applications/new', path: '/settings/applications/new',
@ -187,7 +187,7 @@ export default new Router({
}), }),
component: () => component: () =>
import( import(
/* webpackChunkName: "settings" */ '@/components/auth/ApplicationNew' '@/components/auth/ApplicationNew.vue'
) )
}, },
{ {
@ -195,7 +195,7 @@ export default new Router({
name: 'settings.plugins', name: 'settings.plugins',
component: () => component: () =>
import( import(
/* webpackChunkName: "settings" */ '@/views/auth/Plugins' '@/views/auth/Plugins.vue'
) )
}, },
{ {
@ -203,7 +203,7 @@ export default new Router({
name: 'settings.applications.edit', name: 'settings.applications.edit',
component: () => component: () =>
import( import(
/* webpackChunkName: "settings" */ '@/components/auth/ApplicationEdit' '@/components/auth/ApplicationEdit.vue'
), ),
props: true props: true
}, },
@ -212,7 +212,7 @@ export default new Router({
path: route.path, path: route.path,
name: `profile${route.suffix}`, name: `profile${route.suffix}`,
component: () => component: () =>
import(/* webpackChunkName: "core" */ '@/views/auth/ProfileBase'), import('@/views/auth/ProfileBase.vue'),
props: true, props: true,
children: [ children: [
{ {
@ -220,7 +220,7 @@ export default new Router({
name: `profile${route.suffix}.overview`, name: `profile${route.suffix}.overview`,
component: () => component: () =>
import( import(
/* webpackChunkName: "core" */ '@/views/auth/ProfileOverview' '@/views/auth/ProfileOverview.vue'
) )
}, },
{ {
@ -228,7 +228,7 @@ export default new Router({
name: `profile${route.suffix}.activity`, name: `profile${route.suffix}.activity`,
component: () => component: () =>
import( import(
/* webpackChunkName: "core" */ '@/views/auth/ProfileActivity' '@/views/auth/ProfileActivity.vue'
) )
} }
] ]
@ -238,7 +238,7 @@ export default new Router({
path: '/favorites', path: '/favorites',
name: 'favorites', name: 'favorites',
component: () => component: () =>
import(/* webpackChunkName: "favorites" */ '@/components/favorites/List'), import('@/components/favorites/List.vue'),
props: route => ({ props: route => ({
defaultOrdering: route.query.ordering, defaultOrdering: route.query.ordering,
defaultPage: route.query.page, defaultPage: route.query.page,
@ -248,27 +248,27 @@ export default new Router({
{ {
path: '/content', path: '/content',
component: () => component: () =>
import(/* webpackChunkName: "core" */ '@/views/content/Base'), import('@/views/content/Base.vue'),
children: [ children: [
{ {
path: '', path: '',
name: 'content.index', name: 'content.index',
component: () => component: () =>
import(/* webpackChunkName: "core" */ '@/views/content/Home') import('@/views/content/Home.vue')
} }
] ]
}, },
{ {
path: '/content/libraries/tracks', path: '/content/libraries/tracks',
component: () => component: () =>
import(/* webpackChunkName: "auth-libraries" */ '@/views/content/Base'), import('@/views/content/Base.vue'),
children: [ children: [
{ {
path: '', path: '',
name: 'content.libraries.files', name: 'content.libraries.files',
component: () => component: () =>
import( import(
/* webpackChunkName: "auth-libraries" */ '@/views/content/libraries/Files' '@/views/content/libraries/Files.vue'
), ),
props: route => ({ props: route => ({
query: route.query.q query: route.query.q
@ -279,14 +279,14 @@ export default new Router({
{ {
path: '/content/libraries', path: '/content/libraries',
component: () => component: () =>
import(/* webpackChunkName: "auth-libraries" */ '@/views/content/Base'), import('@/views/content/Base.vue'),
children: [ children: [
{ {
path: '', path: '',
name: 'content.libraries.index', name: 'content.libraries.index',
component: () => component: () =>
import( import(
/* webpackChunkName: "auth-libraries" */ '@/views/content/libraries/Home' '@/views/content/libraries/Home.vue'
) )
} }
] ]
@ -294,13 +294,13 @@ export default new Router({
{ {
path: '/content/remote', path: '/content/remote',
component: () => component: () =>
import(/* webpackChunkName: "auth-libraries" */ '@/views/content/Base'), import('@/views/content/Base.vue'),
children: [ children: [
{ {
path: '', path: '',
name: 'content.remote.index', name: 'content.remote.index',
component: () => component: () =>
import(/* webpackChunkName: "auth-libraries" */ '@/views/content/remote/Home') import('@/views/content/remote/Home.vue')
} }
] ]
}, },
@ -309,20 +309,20 @@ export default new Router({
name: 'manage.settings', name: 'manage.settings',
beforeEnter: adminPermissions, beforeEnter: adminPermissions,
component: () => component: () =>
import(/* webpackChunkName: "admin" */ '@/views/admin/Settings') import('@/views/admin/Settings.vue')
}, },
{ {
path: '/manage/library', path: '/manage/library',
beforeEnter: libraryPermissions, beforeEnter: libraryPermissions,
component: () => component: () =>
import(/* webpackChunkName: "admin" */ '@/views/admin/library/Base'), import('@/views/admin/library/Base.vue'),
children: [ children: [
{ {
path: 'edits', path: 'edits',
name: 'manage.library.edits', name: 'manage.library.edits',
component: () => component: () =>
import( import(
/* webpackChunkName: "admin" */ '@/views/admin/library/EditsList' '@/views/admin/library/EditsList.vue'
), ),
props: route => { props: route => {
return { return {
@ -335,7 +335,7 @@ export default new Router({
name: 'manage.library.artists', name: 'manage.library.artists',
component: () => component: () =>
import( import(
/* webpackChunkName: "admin" */ '@/views/admin/library/ArtistsList' '@/views/admin/library/ArtistsList.vue'
), ),
props: route => { props: route => {
return { return {
@ -348,7 +348,7 @@ export default new Router({
name: 'manage.library.artists.detail', name: 'manage.library.artists.detail',
component: () => component: () =>
import( import(
/* webpackChunkName: "admin" */ '@/views/admin/library/ArtistDetail' '@/views/admin/library/ArtistDetail.vue'
), ),
props: true props: true
}, },
@ -357,7 +357,7 @@ export default new Router({
name: 'manage.channels', name: 'manage.channels',
component: () => component: () =>
import( import(
/* webpackChunkName: "admin" */ '@/views/admin/ChannelsList' '@/views/admin/ChannelsList.vue'
), ),
props: route => { props: route => {
return { return {
@ -370,7 +370,7 @@ export default new Router({
name: 'manage.channels.detail', name: 'manage.channels.detail',
component: () => component: () =>
import( import(
/* webpackChunkName: "admin" */ '@/views/admin/ChannelDetail' '@/views/admin/ChannelDetail.vue'
), ),
props: true props: true
}, },
@ -379,7 +379,7 @@ export default new Router({
name: 'manage.library.albums', name: 'manage.library.albums',
component: () => component: () =>
import( import(
/* webpackChunkName: "admin" */ '@/views/admin/library/AlbumsList' '@/views/admin/library/AlbumsList.vue'
), ),
props: route => { props: route => {
return { return {
@ -392,7 +392,7 @@ export default new Router({
name: 'manage.library.albums.detail', name: 'manage.library.albums.detail',
component: () => component: () =>
import( import(
/* webpackChunkName: "admin" */ '@/views/admin/library/AlbumDetail' '@/views/admin/library/AlbumDetail.vue'
), ),
props: true props: true
}, },
@ -401,7 +401,7 @@ export default new Router({
name: 'manage.library.tracks', name: 'manage.library.tracks',
component: () => component: () =>
import( import(
/* webpackChunkName: "admin" */ '@/views/admin/library/TracksList' '@/views/admin/library/TracksList.vue'
), ),
props: route => { props: route => {
return { return {
@ -414,7 +414,7 @@ export default new Router({
name: 'manage.library.tracks.detail', name: 'manage.library.tracks.detail',
component: () => component: () =>
import( import(
/* webpackChunkName: "admin" */ '@/views/admin/library/TrackDetail' '@/views/admin/library/TrackDetail.vue'
), ),
props: true props: true
}, },
@ -423,7 +423,7 @@ export default new Router({
name: 'manage.library.libraries', name: 'manage.library.libraries',
component: () => component: () =>
import( import(
/* webpackChunkName: "admin" */ '@/views/admin/library/LibrariesList' '@/views/admin/library/LibrariesList.vue'
), ),
props: route => { props: route => {
return { return {
@ -436,7 +436,7 @@ export default new Router({
name: 'manage.library.libraries.detail', name: 'manage.library.libraries.detail',
component: () => component: () =>
import( import(
/* webpackChunkName: "admin" */ '@/views/admin/library/LibraryDetail' '@/views/admin/library/LibraryDetail.vue'
), ),
props: true props: true
}, },
@ -445,7 +445,7 @@ export default new Router({
name: 'manage.library.uploads', name: 'manage.library.uploads',
component: () => component: () =>
import( import(
/* webpackChunkName: "admin" */ '@/views/admin/library/UploadsList' '@/views/admin/library/UploadsList.vue'
), ),
props: route => { props: route => {
return { return {
@ -458,7 +458,7 @@ export default new Router({
name: 'manage.library.uploads.detail', name: 'manage.library.uploads.detail',
component: () => component: () =>
import( import(
/* webpackChunkName: "admin" */ '@/views/admin/library/UploadDetail' '@/views/admin/library/UploadDetail.vue'
), ),
props: true props: true
}, },
@ -467,7 +467,7 @@ export default new Router({
name: 'manage.library.tags', name: 'manage.library.tags',
component: () => component: () =>
import( import(
/* webpackChunkName: "admin" */ '@/views/admin/library/TagsList' '@/views/admin/library/TagsList.vue'
), ),
props: route => { props: route => {
return { return {
@ -480,7 +480,7 @@ export default new Router({
name: 'manage.library.tags.detail', name: 'manage.library.tags.detail',
component: () => component: () =>
import( import(
/* webpackChunkName: "admin" */ '@/views/admin/library/TagDetail' '@/views/admin/library/TagDetail.vue'
), ),
props: true props: true
} }
@ -490,14 +490,14 @@ export default new Router({
path: '/manage/users', path: '/manage/users',
beforeEnter: adminPermissions, beforeEnter: adminPermissions,
component: () => component: () =>
import(/* webpackChunkName: "admin" */ '@/views/admin/users/Base'), import('@/views/admin/users/Base.vue'),
children: [ children: [
{ {
path: 'users', path: 'users',
name: 'manage.users.users.list', name: 'manage.users.users.list',
component: () => component: () =>
import( import(
/* webpackChunkName: "admin" */ '@/views/admin/users/UsersList' '@/views/admin/users/UsersList.vue'
) )
}, },
{ {
@ -505,7 +505,7 @@ export default new Router({
name: 'manage.users.invitations.list', name: 'manage.users.invitations.list',
component: () => component: () =>
import( import(
/* webpackChunkName: "admin" */ '@/views/admin/users/InvitationsList' '@/views/admin/users/InvitationsList.vue'
) )
} }
] ]
@ -514,14 +514,14 @@ export default new Router({
path: '/manage/moderation', path: '/manage/moderation',
beforeEnter: moderatorPermissions, beforeEnter: moderatorPermissions,
component: () => component: () =>
import(/* webpackChunkName: "admin" */ '@/views/admin/moderation/Base'), import('@/views/admin/moderation/Base.vue'),
children: [ children: [
{ {
path: 'domains', path: 'domains',
name: 'manage.moderation.domains.list', name: 'manage.moderation.domains.list',
component: () => component: () =>
import( import(
/* webpackChunkName: "admin" */ '@/views/admin/moderation/DomainsList' '@/views/admin/moderation/DomainsList.vue'
) )
}, },
{ {
@ -529,7 +529,7 @@ export default new Router({
name: 'manage.moderation.domains.detail', name: 'manage.moderation.domains.detail',
component: () => component: () =>
import( import(
/* webpackChunkName: "admin" */ '@/views/admin/moderation/DomainsDetail' '@/views/admin/moderation/DomainsDetail.vue'
), ),
props: true props: true
}, },
@ -538,7 +538,7 @@ export default new Router({
name: 'manage.moderation.accounts.list', name: 'manage.moderation.accounts.list',
component: () => component: () =>
import( import(
/* webpackChunkName: "admin" */ '@/views/admin/moderation/AccountsList' '@/views/admin/moderation/AccountsList.vue'
), ),
props: route => { props: route => {
return { return {
@ -551,7 +551,7 @@ export default new Router({
name: 'manage.moderation.accounts.detail', name: 'manage.moderation.accounts.detail',
component: () => component: () =>
import( import(
/* webpackChunkName: "admin" */ '@/views/admin/moderation/AccountsDetail' '@/views/admin/moderation/AccountsDetail.vue'
), ),
props: true props: true
}, },
@ -560,7 +560,7 @@ export default new Router({
name: 'manage.moderation.reports.list', name: 'manage.moderation.reports.list',
component: () => component: () =>
import( import(
/* webpackChunkName: "admin" */ '@/views/admin/moderation/ReportsList' '@/views/admin/moderation/ReportsList.vue'
), ),
props: route => { props: route => {
return { return {
@ -574,7 +574,7 @@ export default new Router({
name: 'manage.moderation.reports.detail', name: 'manage.moderation.reports.detail',
component: () => component: () =>
import( import(
/* webpackChunkName: "admin" */ '@/views/admin/moderation/ReportDetail' '@/views/admin/moderation/ReportDetail.vue'
), ),
props: true props: true
}, },
@ -583,7 +583,7 @@ export default new Router({
name: 'manage.moderation.requests.list', name: 'manage.moderation.requests.list',
component: () => component: () =>
import( import(
/* webpackChunkName: "admin" */ '@/views/admin/moderation/RequestsList' '@/views/admin/moderation/RequestsList.vue'
), ),
props: route => { props: route => {
return { return {
@ -597,7 +597,7 @@ export default new Router({
name: 'manage.moderation.requests.detail', name: 'manage.moderation.requests.detail',
component: () => component: () =>
import( import(
/* webpackChunkName: "admin" */ '@/views/admin/moderation/RequestDetail' '@/views/admin/moderation/RequestDetail.vue'
), ),
props: true props: true
} }
@ -606,18 +606,18 @@ export default new Router({
{ {
path: '/library', path: '/library',
component: () => component: () =>
import(/* webpackChunkName: "core" */ '@/components/library/Library'), import('@/components/library/Library.vue'),
children: [ children: [
{ {
path: '', path: '',
component: () => component: () =>
import(/* webpackChunkName: "core" */ '@/components/library/Home'), import('@/components/library/Home.vue'),
name: 'library.index' name: 'library.index'
}, },
{ {
path: 'me', path: 'me',
component: () => component: () =>
import(/* webpackChunkName: "core" */ '@/components/library/Home'), import('@/components/library/Home.vue'),
name: 'library.me', name: 'library.me',
props: route => ({ props: route => ({
scope: 'me' scope: 'me'
@ -628,7 +628,7 @@ export default new Router({
name: 'library.artists.browse', name: 'library.artists.browse',
component: () => component: () =>
import( import(
/* webpackChunkName: "artists" */ '@/components/library/Artists' '@/components/library/Artists.vue'
), ),
props: route => ({ props: route => ({
defaultOrdering: route.query.ordering, defaultOrdering: route.query.ordering,
@ -645,7 +645,7 @@ export default new Router({
name: 'library.artists.me', name: 'library.artists.me',
component: () => component: () =>
import( import(
/* webpackChunkName: "artists" */ '@/components/library/Artists' '@/components/library/Artists.vue'
), ),
props: route => ({ props: route => ({
scope: 'me', scope: 'me',
@ -663,7 +663,7 @@ export default new Router({
name: 'library.albums.browse', name: 'library.albums.browse',
component: () => component: () =>
import( import(
/* webpackChunkName: "albums" */ '@/components/library/Albums' '@/components/library/Albums.vue'
), ),
props: route => ({ props: route => ({
defaultOrdering: route.query.ordering, defaultOrdering: route.query.ordering,
@ -680,7 +680,7 @@ export default new Router({
name: 'library.podcasts.browse', name: 'library.podcasts.browse',
component: () => component: () =>
import( import(
/* webpackChunkName: "podcasts" */ '@/components/library/Podcasts' '@/components/library/Podcasts.vue'
), ),
props: route => ({ props: route => ({
defaultOrdering: route.query.ordering, defaultOrdering: route.query.ordering,
@ -697,7 +697,7 @@ export default new Router({
name: 'library.albums.me', name: 'library.albums.me',
component: () => component: () =>
import( import(
/* webpackChunkName: "albums" */ '@/components/library/Albums' '@/components/library/Albums.vue'
), ),
props: route => ({ props: route => ({
scope: 'me', scope: 'me',
@ -715,7 +715,7 @@ export default new Router({
name: 'library.radios.browse', name: 'library.radios.browse',
component: () => component: () =>
import( import(
/* webpackChunkName: "radios" */ '@/components/library/Radios' '@/components/library/Radios.vue'
), ),
props: route => ({ props: route => ({
defaultOrdering: route.query.ordering, defaultOrdering: route.query.ordering,
@ -729,7 +729,7 @@ export default new Router({
name: 'library.radios.me', name: 'library.radios.me',
component: () => component: () =>
import( import(
/* webpackChunkName: "radios" */ '@/components/library/Radios' '@/components/library/Radios.vue'
), ),
props: route => ({ props: route => ({
scope: 'me', scope: 'me',
@ -744,7 +744,7 @@ export default new Router({
name: 'library.radios.build', name: 'library.radios.build',
component: () => component: () =>
import( import(
/* webpackChunkName: "radios" */ '@/components/library/radios/Builder' '@/components/library/radios/Builder.vue'
), ),
props: true props: true
}, },
@ -753,7 +753,7 @@ export default new Router({
name: 'library.radios.edit', name: 'library.radios.edit',
component: () => component: () =>
import( import(
/* webpackChunkName: "radios" */ '@/components/library/radios/Builder' '@/components/library/radios/Builder.vue'
), ),
props: true props: true
}, },
@ -761,14 +761,14 @@ export default new Router({
path: 'radios/:id', path: 'radios/:id',
name: 'library.radios.detail', name: 'library.radios.detail',
component: () => component: () =>
import(/* webpackChunkName: "radios" */ '@/views/radios/Detail'), import('@/views/radios/Detail.vue'),
props: true props: true
}, },
{ {
path: 'playlists/', path: 'playlists/',
name: 'library.playlists.browse', name: 'library.playlists.browse',
component: () => component: () =>
import(/* webpackChunkName: "playlists" */ '@/views/playlists/List'), import('@/views/playlists/List.vue'),
props: route => ({ props: route => ({
defaultOrdering: route.query.ordering, defaultOrdering: route.query.ordering,
defaultQuery: route.query.query, defaultQuery: route.query.query,
@ -780,7 +780,7 @@ export default new Router({
path: 'me/playlists/', path: 'me/playlists/',
name: 'library.playlists.me', name: 'library.playlists.me',
component: () => component: () =>
import(/* webpackChunkName: "playlists" */ '@/views/playlists/List'), import('@/views/playlists/List.vue'),
props: route => ({ props: route => ({
scope: 'me', scope: 'me',
defaultOrdering: route.query.ordering, defaultOrdering: route.query.ordering,
@ -793,7 +793,7 @@ export default new Router({
path: 'playlists/:id', path: 'playlists/:id',
name: 'library.playlists.detail', name: 'library.playlists.detail',
component: () => component: () =>
import(/* webpackChunkName: "playlists" */ '@/views/playlists/Detail'), import('@/views/playlists/Detail.vue'),
props: route => ({ props: route => ({
id: route.params.id, id: route.params.id,
defaultEdit: route.query.mode === 'edit' defaultEdit: route.query.mode === 'edit'
@ -804,7 +804,7 @@ export default new Router({
name: 'library.tags.detail', name: 'library.tags.detail',
component: () => component: () =>
import( import(
/* webpackChunkName: "tags" */ '@/components/library/TagDetail' '@/components/library/TagDetail.vue'
), ),
props: true props: true
}, },
@ -812,7 +812,7 @@ export default new Router({
path: 'artists/:id', path: 'artists/:id',
component: () => component: () =>
import( import(
/* webpackChunkName: "artists" */ '@/components/library/ArtistBase' '@/components/library/ArtistBase.vue'
), ),
props: true, props: true,
children: [ children: [
@ -821,7 +821,7 @@ export default new Router({
name: 'library.artists.detail', name: 'library.artists.detail',
component: () => component: () =>
import( import(
/* webpackChunkName: "artists" */ '@/components/library/ArtistDetail' '@/components/library/ArtistDetail.vue'
) )
}, },
{ {
@ -829,7 +829,7 @@ export default new Router({
name: 'library.artists.edit', name: 'library.artists.edit',
component: () => component: () =>
import( import(
/* webpackChunkName: "edits" */ '@/components/library/ArtistEdit' '@/components/library/ArtistEdit.vue'
) )
}, },
{ {
@ -837,7 +837,7 @@ export default new Router({
name: 'library.artists.edit.detail', name: 'library.artists.edit.detail',
component: () => component: () =>
import( import(
/* webpackChunkName: "edits" */ '@/components/library/EditDetail' '@/components/library/EditDetail.vue'
), ),
props: true props: true
} }
@ -847,7 +847,7 @@ export default new Router({
path: 'albums/:id', path: 'albums/:id',
component: () => component: () =>
import( import(
/* webpackChunkName: "albums" */ '@/components/library/AlbumBase' '@/components/library/AlbumBase.vue'
), ),
props: true, props: true,
children: [ children: [
@ -856,7 +856,7 @@ export default new Router({
name: 'library.albums.detail', name: 'library.albums.detail',
component: () => component: () =>
import( import(
/* webpackChunkName: "albums" */ '@/components/library/AlbumDetail' '@/components/library/AlbumDetail.vue'
) )
}, },
{ {
@ -864,7 +864,7 @@ export default new Router({
name: 'library.albums.edit', name: 'library.albums.edit',
component: () => component: () =>
import( import(
/* webpackChunkName: "edits" */ '@/components/library/AlbumEdit' '@/components/library/AlbumEdit.vue'
) )
}, },
{ {
@ -872,7 +872,7 @@ export default new Router({
name: 'library.albums.edit.detail', name: 'library.albums.edit.detail',
component: () => component: () =>
import( import(
/* webpackChunkName: "edits" */ '@/components/library/EditDetail' '@/components/library/EditDetail.vue'
), ),
props: true props: true
} }
@ -882,7 +882,7 @@ export default new Router({
path: 'tracks/:id', path: 'tracks/:id',
component: () => component: () =>
import( import(
/* webpackChunkName: "tracks" */ '@/components/library/TrackBase' '@/components/library/TrackBase.vue'
), ),
props: true, props: true,
children: [ children: [
@ -891,7 +891,7 @@ export default new Router({
name: 'library.tracks.detail', name: 'library.tracks.detail',
component: () => component: () =>
import( import(
/* webpackChunkName: "tracks" */ '@/components/library/TrackDetail' '@/components/library/TrackDetail.vue'
) )
}, },
{ {
@ -899,7 +899,7 @@ export default new Router({
name: 'library.tracks.edit', name: 'library.tracks.edit',
component: () => component: () =>
import( import(
/* webpackChunkName: "edits" */ '@/components/library/TrackEdit' '@/components/library/TrackEdit.vue'
) )
}, },
{ {
@ -907,7 +907,7 @@ export default new Router({
name: 'library.tracks.edit.detail', name: 'library.tracks.edit.detail',
component: () => component: () =>
import( import(
/* webpackChunkName: "edits" */ '@/components/library/EditDetail' '@/components/library/EditDetail.vue'
), ),
props: true props: true
} }
@ -919,7 +919,7 @@ export default new Router({
props: true, props: true,
component: () => component: () =>
import( import(
/* webpackChunkName: "uploads" */ '@/components/library/UploadDetail' '@/components/library/UploadDetail.vue'
) )
}, },
{ {
@ -928,7 +928,7 @@ export default new Router({
props: true, props: true,
component: () => component: () =>
import( import(
/* webpackChunkName: "library" */ '@/views/library/DetailBase' '@/views/library/DetailBase.vue'
), ),
children: [ children: [
{ {
@ -936,7 +936,7 @@ export default new Router({
name: 'library.detail', name: 'library.detail',
component: () => component: () =>
import( import(
/* webpackChunkName: "library" */ '@/views/library/DetailOverview' '@/views/library/DetailOverview.vue'
) )
}, },
{ {
@ -944,7 +944,7 @@ export default new Router({
name: 'library.detail.albums', name: 'library.detail.albums',
component: () => component: () =>
import( import(
/* webpackChunkName: "library" */ '@/views/library/DetailAlbums' '@/views/library/DetailAlbums.vue'
) )
}, },
{ {
@ -952,7 +952,7 @@ export default new Router({
name: 'library.detail.tracks', name: 'library.detail.tracks',
component: () => component: () =>
import( import(
/* webpackChunkName: "library" */ '@/views/library/DetailTracks' '@/views/library/DetailTracks.vue'
) )
}, },
{ {
@ -960,7 +960,7 @@ export default new Router({
name: 'library.detail.edit', name: 'library.detail.edit',
component: () => component: () =>
import( import(
/* webpackChunkName: "auth-libraries" */ '@/views/library/Edit' '@/views/library/Edit.vue'
) )
}, },
{ {
@ -968,20 +968,12 @@ export default new Router({
name: 'library.detail.upload', name: 'library.detail.upload',
component: () => component: () =>
import( import(
/* webpackChunkName: "auth-libraries" */ '@/views/library/Upload' '@/views/library/Upload.vue'
), ),
props: route => ({ props: route => ({
defaultImportReference: route.query.import defaultImportReference: route.query.import
}) })
} }
// {
// path: "episodes",
// name: "library.detail.episodes",
// component: () =>
// import(
// /* webpackChunkName: "library" */ "@/views/library/DetailEpisodes"
// )
// },
] ]
} }
] ]
@ -991,7 +983,7 @@ export default new Router({
props: true, props: true,
component: () => component: () =>
import( import(
/* webpackChunkName: "channels" */ '@/views/channels/DetailBase' '@/views/channels/DetailBase.vue'
), ),
children: [ children: [
{ {
@ -999,7 +991,7 @@ export default new Router({
name: 'channels.detail', name: 'channels.detail',
component: () => component: () =>
import( import(
/* webpackChunkName: "channels" */ '@/views/channels/DetailOverview' '@/views/channels/DetailOverview.vue'
) )
}, },
{ {
@ -1007,7 +999,7 @@ export default new Router({
name: 'channels.detail.episodes', name: 'channels.detail.episodes',
component: () => component: () =>
import( import(
/* webpackChunkName: "channels" */ '@/views/channels/DetailEpisodes' '@/views/channels/DetailEpisodes.vue'
) )
} }
] ]
@ -1022,7 +1014,7 @@ export default new Router({
}, },
component: () => component: () =>
import( import(
/* webpackChunkName: "channels-auth" */ '@/views/channels/SubscriptionsList' '@/views/channels/SubscriptionsList.vue'
) )
}, },
{ {
@ -1033,7 +1025,7 @@ export default new Router({
path: '*', path: '*',
name: '404', name: '404',
component: () => component: () =>
import(/* webpackChunkName: "core" */ '@/components/PageNotFound') import('@/components/PageNotFound.vue')
} }
] ]
}) })

View File

@ -15,59 +15,59 @@
// under a class namespace // under a class namespace
/* Global */ /* Global */
@import "~fomantic-ui-css/tweaked/reset.css"; @import "fomantic-ui-css/tweaked/reset.css";
@import "~fomantic-ui-css/tweaked/site.css"; @import "fomantic-ui-css/tweaked/site.css";
/* Elements */ /* Elements */
@import "~fomantic-ui-css/tweaked/button.css"; @import "fomantic-ui-css/tweaked/button.css";
@import "~fomantic-ui-css/tweaked/container.css"; @import "fomantic-ui-css/tweaked/container.css";
@import "~fomantic-ui-css/tweaked/divider.css"; @import "fomantic-ui-css/tweaked/divider.css";
// @import "~fomantic-ui-css/tweaked/flag.css"; // @import "fomantic-ui-css/tweaked/flag.css";
@import "~fomantic-ui-css/tweaked/header.css"; @import "fomantic-ui-css/tweaked/header.css";
@import "~fomantic-ui-css/tweaked/icon.css"; @import "fomantic-ui-css/tweaked/icon.css";
@import "~fomantic-ui-css/tweaked/image.css"; @import "fomantic-ui-css/tweaked/image.css";
@import "~fomantic-ui-css/tweaked/input.css"; @import "fomantic-ui-css/tweaked/input.css";
@import "~fomantic-ui-css/tweaked/label.css"; @import "fomantic-ui-css/tweaked/label.css";
@import "~fomantic-ui-css/tweaked/list.css"; @import "fomantic-ui-css/tweaked/list.css";
@import "~fomantic-ui-css/tweaked/loader.css"; @import "fomantic-ui-css/tweaked/loader.css";
@import "~fomantic-ui-css/tweaked/placeholder.css"; @import "fomantic-ui-css/tweaked/placeholder.css";
// @import "~fomantic-ui-css/tweaked/rail.css"; // @import "fomantic-ui-css/tweaked/rail.css";
// @import "~fomantic-ui-css/tweaked/reveal.css"; // @import "fomantic-ui-css/tweaked/reveal.css";
@import "~fomantic-ui-css/tweaked/segment.css"; @import "fomantic-ui-css/tweaked/segment.css";
@import "~fomantic-ui-css/tweaked/step.css"; @import "fomantic-ui-css/tweaked/step.css";
/* Collections */ /* Collections */
// @import "~fomantic-ui-css/tweaked/breadcrumb.css"; // @import "fomantic-ui-css/tweaked/breadcrumb.css";
@import "~fomantic-ui-css/tweaked/form.css"; @import "fomantic-ui-css/tweaked/form.css";
@import "~fomantic-ui-css/tweaked/grid.css"; @import "fomantic-ui-css/tweaked/grid.css";
@import "~fomantic-ui-css/tweaked/menu.css"; @import "fomantic-ui-css/tweaked/menu.css";
@import "~fomantic-ui-css/tweaked/message.css"; @import "fomantic-ui-css/tweaked/message.css";
@import "~fomantic-ui-css/tweaked/table.css"; @import "fomantic-ui-css/tweaked/table.css";
/* Views */ /* Views */
// @import "~fomantic-ui-css/tweaked/ad.css"; // @import "fomantic-ui-css/tweaked/ad.css";
@import "~fomantic-ui-css/tweaked/card.css"; @import "fomantic-ui-css/tweaked/card.css";
// @import "~fomantic-ui-css/tweaked/comment.css"; // @import "fomantic-ui-css/tweaked/comment.css";
@import "~fomantic-ui-css/tweaked/feed.css"; @import "fomantic-ui-css/tweaked/feed.css";
@import "~fomantic-ui-css/tweaked/item.css"; @import "fomantic-ui-css/tweaked/item.css";
@import "~fomantic-ui-css/tweaked/statistic.css"; @import "fomantic-ui-css/tweaked/statistic.css";
/* Modules */ /* Modules */
// @import "~fomantic-ui-css/tweaked/accordion.css"; // @import "fomantic-ui-css/tweaked/accordion.css";
@import "~fomantic-ui-css/tweaked/checkbox.css"; @import "fomantic-ui-css/tweaked/checkbox.css";
@import "~fomantic-ui-css/tweaked/dimmer.css"; @import "fomantic-ui-css/tweaked/dimmer.css";
@import "~fomantic-ui-css/tweaked/dropdown.css"; @import "fomantic-ui-css/tweaked/dropdown.css";
// @import "~fomantic-ui-css/tweaked/embed.css"; // @import "fomantic-ui-css/tweaked/embed.css";
@import "~fomantic-ui-css/tweaked/modal.css"; @import "fomantic-ui-css/tweaked/modal.css";
// @import "~fomantic-ui-css/tweaked/nag.css"; // @import "fomantic-ui-css/tweaked/nag.css";
@import "~fomantic-ui-css/tweaked/popup.css"; @import "fomantic-ui-css/tweaked/popup.css";
@import "~fomantic-ui-css/tweaked/progress.css"; @import "fomantic-ui-css/tweaked/progress.css";
// @import "~fomantic-ui-css/tweaked/rating.css"; // @import "fomantic-ui-css/tweaked/rating.css";
@import "~fomantic-ui-css/tweaked/search.css"; @import "fomantic-ui-css/tweaked/search.css";
// @import "~fomantic-ui-css/tweaked/shape.css"; // @import "fomantic-ui-css/tweaked/shape.css";
@import "~fomantic-ui-css/tweaked/sidebar.css"; @import "fomantic-ui-css/tweaked/sidebar.css";
@import "~fomantic-ui-css/tweaked/sticky.css"; @import "fomantic-ui-css/tweaked/sticky.css";
@import "~fomantic-ui-css/tweaked/tab.css"; @import "fomantic-ui-css/tweaked/tab.css";
@import "~fomantic-ui-css/tweaked/text.css"; @import "fomantic-ui-css/tweaked/text.css";
@import "~fomantic-ui-css/tweaked/toast.css"; @import "fomantic-ui-css/tweaked/toast.css";
@import "~fomantic-ui-css/tweaked/transition.css"; @import "fomantic-ui-css/tweaked/transition.css";

View File

@ -17,7 +17,7 @@
</template> </template>
<script> <script>
import LoginForm from '@/components/auth/LoginForm' import LoginForm from '@/components/auth/LoginForm.vue'
export default { export default {
components: { components: {

View File

@ -5,7 +5,7 @@
</template> </template>
<script> <script>
import LibraryFilesTable from './FilesTable' import LibraryFilesTable from './FilesTable.vue'
export default { export default {
components: { components: {

View File

@ -66,9 +66,9 @@
<script> <script>
import axios from 'axios' import axios from 'axios'
import LibraryForm from './Form' import LibraryForm from './Form.vue'
import LibraryCard from './Card' import LibraryCard from './Card.vue'
import Quota from './Quota' import Quota from './Quota.vue'
export default { export default {
components: { components: {

View File

@ -66,8 +66,8 @@
<script> <script>
import axios from 'axios' import axios from 'axios'
import ScanForm from './ScanForm' import ScanForm from './ScanForm.vue'
import LibraryCard from './Card' import LibraryCard from './Card.vue'
export default { export default {
components: { components: {

16
front/vite.config.js Normal file
View File

@ -0,0 +1,16 @@
// vite.config.js
import { defineConfig } from 'vite'
import { createVuePlugin as vue } from "vite-plugin-vue2";
const path = require("path");
// https://vitejs.dev/config/
export default defineConfig({
plugins: [vue()],
resolve: {
alias: {
"@": path.resolve(__dirname, "./src"),
},
},
})

File diff suppressed because it is too large Load Diff