mirror of
https://github.com/koel/koel
synced 2024-11-14 00:17:13 +00:00
refactor: remove barrel files (#1855)
This commit is contained in:
parent
9c5b763267
commit
387b937820
344 changed files with 1294 additions and 997 deletions
|
@ -37,10 +37,10 @@
|
|||
<script lang="ts" setup>
|
||||
import { defineAsyncComponent, onMounted, provide, ref, watch } from 'vue'
|
||||
import { useOnline } from '@vueuse/core'
|
||||
import { queueStore } from '@/stores'
|
||||
import { authService } from '@/services'
|
||||
import { queueStore } from '@/stores/queueStore'
|
||||
import { authService } from '@/services/authService'
|
||||
import { CurrentPlayableKey, DialogBoxKey, MessageToasterKey, OverlayKey } from '@/symbols'
|
||||
import { useRouter } from '@/composables'
|
||||
import { useRouter } from '@/composables/useRouter'
|
||||
|
||||
import DialogBox from '@/components/ui/DialogBox.vue'
|
||||
import MessageToaster from '@/components/ui/message-toaster/MessageToaster.vue'
|
||||
|
|
|
@ -1,19 +1,20 @@
|
|||
import isMobile from 'ismobilejs'
|
||||
import { isObject, mergeWith } from 'lodash'
|
||||
import type { RenderOptions } from '@testing-library/vue'
|
||||
import { cleanup, createEvent, fireEvent, render } from '@testing-library/vue'
|
||||
import { afterEach, beforeEach, vi } from 'vitest'
|
||||
import { defineComponent, nextTick } from 'vue'
|
||||
import { commonStore, userStore } from '@/stores'
|
||||
import { http } from '@/services'
|
||||
import factory from '@/__tests__/factory'
|
||||
import { DialogBoxKey, MessageToasterKey, OverlayKey, RouterKey } from '@/symbols'
|
||||
import { DialogBoxStub, MessageToasterStub, OverlayStub } from '@/__tests__/stubs'
|
||||
import { routes } from '@/config'
|
||||
import Router from '@/router'
|
||||
import userEvent from '@testing-library/user-event'
|
||||
import type { UserEvent } from '@testing-library/user-event/dist/types/setup/setup'
|
||||
import type { EventType } from '@testing-library/dom/types/events'
|
||||
import { cleanup, createEvent, fireEvent, render } from '@testing-library/vue'
|
||||
import { afterEach, beforeEach, vi } from 'vitest'
|
||||
import { defineComponent, nextTick } from 'vue'
|
||||
import factory from '@/__tests__/factory'
|
||||
import { DialogBoxStub, MessageToasterStub, OverlayStub } from '@/__tests__/stubs'
|
||||
import { commonStore } from '@/stores/commonStore'
|
||||
import { userStore } from '@/stores/userStore'
|
||||
import { http } from '@/services/http'
|
||||
import { DialogBoxKey, MessageToasterKey, OverlayKey, RouterKey } from '@/symbols'
|
||||
import { routes } from '@/config/routes'
|
||||
import Router from '@/router'
|
||||
|
||||
// A deep-merge function that
|
||||
// - supports symbols as keys (_.merge doesn't)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import type { Faker } from '@faker-js/faker'
|
||||
import { genres } from '@/config'
|
||||
import { genres } from '@/config/genres'
|
||||
|
||||
export default (faker: Faker): Genre => {
|
||||
return {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { faker } from '@faker-js/faker'
|
||||
import { genres } from '@/config'
|
||||
import { genres } from '@/config/genres'
|
||||
|
||||
const generate = (partOfCompilation = false): Song => {
|
||||
const artistId = faker.datatype.number({ min: 3 })
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import type { Ref } from 'vue'
|
||||
import { ref } from 'vue'
|
||||
import { noop } from '@/utils'
|
||||
import { noop } from '@/utils/helpers'
|
||||
|
||||
import type MessageToaster from '@/components/ui/message-toaster/MessageToaster.vue'
|
||||
import type DialogBox from '@/components/ui/DialogBox.vue'
|
||||
|
|
|
@ -1,8 +1,12 @@
|
|||
import { createApp } from 'vue'
|
||||
import { focus, hideBrokenIcon, newTab, overflowFade, tooltip } from '@/directives'
|
||||
import { FontAwesomeIcon, FontAwesomeLayers } from '@fortawesome/vue-fontawesome'
|
||||
import { createApp } from 'vue'
|
||||
import { focus } from '@/directives/focus'
|
||||
import { tooltip } from '@/directives/tooltip'
|
||||
import { hideBrokenIcon } from '@/directives/hideBrokenIcon'
|
||||
import { overflowFade } from '@/directives/overflowFade'
|
||||
import { newTab } from '@/directives/newTab'
|
||||
import { RouterKey } from '@/symbols'
|
||||
import { routes } from '@/config'
|
||||
import { routes } from '@/config/routes'
|
||||
import Router from '@/router'
|
||||
import '@/../css/app.pcss'
|
||||
import App from './App.vue'
|
||||
|
|
|
@ -1,10 +1,12 @@
|
|||
import { screen } from '@testing-library/vue'
|
||||
import { expect, it } from 'vitest'
|
||||
import { downloadService, playbackService } from '@/services'
|
||||
import factory from '@/__tests__/factory'
|
||||
import UnitTestCase from '@/__tests__/UnitTestCase'
|
||||
import { commonStore, songStore } from '@/stores'
|
||||
import { eventBus } from '@/utils'
|
||||
import { downloadService } from '@/services/downloadService'
|
||||
import { playbackService } from '@/services/playbackService'
|
||||
import { commonStore } from '@/stores/commonStore'
|
||||
import { songStore } from '@/stores/songStore'
|
||||
import { eventBus } from '@/utils/eventBus'
|
||||
import AlbumCard from './AlbumCard.vue'
|
||||
|
||||
let album: Album
|
||||
|
|
|
@ -32,10 +32,15 @@
|
|||
|
||||
<script lang="ts" setup>
|
||||
import { computed, toRef, toRefs } from 'vue'
|
||||
import { eventBus } from '@/utils'
|
||||
import { albumStore, artistStore, commonStore, songStore } from '@/stores'
|
||||
import { downloadService, playbackService } from '@/services'
|
||||
import { useDraggable, useRouter } from '@/composables'
|
||||
import { eventBus } from '@/utils/eventBus'
|
||||
import { albumStore } from '@/stores/albumStore'
|
||||
import { artistStore } from '@/stores/artistStore'
|
||||
import { commonStore } from '@/stores/commonStore'
|
||||
import { songStore } from '@/stores/songStore'
|
||||
import { downloadService } from '@/services/downloadService'
|
||||
import { playbackService } from '@/services/playbackService'
|
||||
import { useDraggable } from '@/composables/useDragAndDrop'
|
||||
import { useRouter } from '@/composables/useRouter'
|
||||
|
||||
import BaseCard from '@/components/ui/album-artist/AlbumOrArtistCard.vue'
|
||||
|
||||
|
|
|
@ -3,9 +3,11 @@ import { expect, it } from 'vitest'
|
|||
import { screen } from '@testing-library/vue'
|
||||
import UnitTestCase from '@/__tests__/UnitTestCase'
|
||||
import factory from '@/__tests__/factory'
|
||||
import { eventBus } from '@/utils'
|
||||
import { downloadService, playbackService } from '@/services'
|
||||
import { commonStore, songStore } from '@/stores'
|
||||
import { eventBus } from '@/utils/eventBus'
|
||||
import { downloadService } from '@/services/downloadService'
|
||||
import { playbackService } from '@/services/playbackService'
|
||||
import { commonStore } from '@/stores/commonStore'
|
||||
import { songStore } from '@/stores/songStore'
|
||||
import AlbumContextMenu from './AlbumContextMenu.vue'
|
||||
|
||||
let album: Album
|
||||
|
|
|
@ -16,10 +16,15 @@
|
|||
|
||||
<script lang="ts" setup>
|
||||
import { computed, ref, toRef } from 'vue'
|
||||
import { albumStore, artistStore, commonStore, songStore } from '@/stores'
|
||||
import { downloadService, playbackService } from '@/services'
|
||||
import { useContextMenu, useRouter } from '@/composables'
|
||||
import { eventBus } from '@/utils'
|
||||
import { albumStore } from '@/stores/albumStore'
|
||||
import { artistStore } from '@/stores/artistStore'
|
||||
import { commonStore } from '@/stores/commonStore'
|
||||
import { songStore } from '@/stores/songStore'
|
||||
import { downloadService } from '@/services/downloadService'
|
||||
import { playbackService } from '@/services/playbackService'
|
||||
import { useContextMenu } from '@/composables/useContextMenu'
|
||||
import { useRouter } from '@/composables/useRouter'
|
||||
import { eventBus } from '@/utils/eventBus'
|
||||
|
||||
const { go } = useRouter()
|
||||
const { base, ContextMenu, open, trigger } = useContextMenu()
|
||||
|
|
|
@ -2,8 +2,8 @@ import { screen } from '@testing-library/vue'
|
|||
import { expect, it } from 'vitest'
|
||||
import factory from '@/__tests__/factory'
|
||||
import UnitTestCase from '@/__tests__/UnitTestCase'
|
||||
import { commonStore } from '@/stores'
|
||||
import { mediaInfoService } from '@/services'
|
||||
import { commonStore } from '@/stores/commonStore'
|
||||
import { mediaInfoService } from '@/services/mediaInfoService'
|
||||
import AlbumInfoComponent from './AlbumInfo.vue'
|
||||
|
||||
let album: Album
|
||||
|
|
|
@ -33,8 +33,8 @@
|
|||
|
||||
<script lang="ts" setup>
|
||||
import { defineAsyncComponent, ref, toRefs, watch } from 'vue'
|
||||
import { mediaInfoService } from '@/services'
|
||||
import { useThirdPartyServices } from '@/composables'
|
||||
import { mediaInfoService } from '@/services/mediaInfoService'
|
||||
import { useThirdPartyServices } from '@/composables/useThirdPartyServices'
|
||||
|
||||
import AlbumThumbnail from '@/components/ui/album-artist/AlbumOrArtistThumbnail.vue'
|
||||
import AlbumArtistInfo from '@/components/ui/album-artist/AlbumOrArtistInfo.vue'
|
||||
|
|
|
@ -2,8 +2,8 @@ import { screen } from '@testing-library/vue'
|
|||
import factory from '@/__tests__/factory'
|
||||
import { expect, it } from 'vitest'
|
||||
import UnitTestCase from '@/__tests__/UnitTestCase'
|
||||
import { songStore } from '@/stores/songStore'
|
||||
import AlbumTrackList from './AlbumTrackList.vue'
|
||||
import { songStore } from '@/stores'
|
||||
|
||||
new class extends UnitTestCase {
|
||||
protected test () {
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
<script lang="ts" setup>
|
||||
import { onMounted, provide, ref, toRefs } from 'vue'
|
||||
import { songStore } from '@/stores'
|
||||
import { songStore } from '@/stores/songStore'
|
||||
import { PlayablesKey } from '@/symbols'
|
||||
|
||||
import TrackListItem from '@/components/album/AlbumTrackListItem.vue'
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
import { ref } from 'vue'
|
||||
import { screen } from '@testing-library/vue'
|
||||
import { expect, it } from 'vitest'
|
||||
import factory from '@/__tests__/factory'
|
||||
import { songStore } from '@/stores'
|
||||
import { playbackService } from '@/services'
|
||||
import UnitTestCase from '@/__tests__/UnitTestCase'
|
||||
import { songStore } from '@/stores/songStore'
|
||||
import { playbackService } from '@/services/playbackService'
|
||||
import { PlayablesKey } from '@/symbols'
|
||||
import { ref } from 'vue'
|
||||
import AlbumTrackListItem from './AlbumTrackListItem.vue'
|
||||
|
||||
new class extends UnitTestCase {
|
||||
|
|
|
@ -15,10 +15,12 @@
|
|||
<script lang="ts" setup>
|
||||
import type { Ref } from 'vue'
|
||||
import { computed, defineAsyncComponent, toRefs } from 'vue'
|
||||
import { songStore } from '@/stores'
|
||||
import { authService, playbackService } from '@/services'
|
||||
import { useThirdPartyServices } from '@/composables'
|
||||
import { requireInjection, secondsToHis } from '@/utils'
|
||||
import { songStore } from '@/stores/songStore'
|
||||
import { authService } from '@/services/authService'
|
||||
import { playbackService } from '@/services/playbackService'
|
||||
import { useThirdPartyServices } from '@/composables/useThirdPartyServices'
|
||||
import { requireInjection } from '@/utils/helpers'
|
||||
import { secondsToHis } from '@/utils/formatters'
|
||||
import { PlayablesKey } from '@/symbols'
|
||||
|
||||
const props = defineProps<{ album: Album, track: AlbumTrack }>()
|
||||
|
|
|
@ -1,11 +1,13 @@
|
|||
import { screen } from '@testing-library/vue'
|
||||
import { expect, it } from 'vitest'
|
||||
import factory from '@/__tests__/factory'
|
||||
import { downloadService, playbackService } from '@/services'
|
||||
import UnitTestCase from '@/__tests__/UnitTestCase'
|
||||
import { commonStore, songStore } from '@/stores'
|
||||
import { downloadService } from '@/services/downloadService'
|
||||
import { playbackService } from '@/services/playbackService'
|
||||
import { commonStore } from '@/stores/commonStore'
|
||||
import { songStore } from '@/stores/songStore'
|
||||
import { eventBus } from '@/utils/eventBus'
|
||||
import ArtistCard from './ArtistCard.vue'
|
||||
import { eventBus } from '@/utils'
|
||||
|
||||
let artist: Artist
|
||||
|
||||
|
|
|
@ -24,10 +24,14 @@
|
|||
|
||||
<script lang="ts" setup>
|
||||
import { computed, toRef, toRefs } from 'vue'
|
||||
import { eventBus } from '@/utils'
|
||||
import { artistStore, commonStore, songStore } from '@/stores'
|
||||
import { downloadService, playbackService } from '@/services'
|
||||
import { useDraggable, useRouter } from '@/composables'
|
||||
import { eventBus } from '@/utils/eventBus'
|
||||
import { artistStore } from '@/stores/artistStore'
|
||||
import { commonStore } from '@/stores/commonStore'
|
||||
import { songStore } from '@/stores/songStore'
|
||||
import { downloadService } from '@/services/downloadService'
|
||||
import { playbackService } from '@/services/playbackService'
|
||||
import { useDraggable } from '@/composables/useDragAndDrop'
|
||||
import { useRouter } from '@/composables/useRouter'
|
||||
|
||||
import BaseCard from '@/components/ui/album-artist/AlbumOrArtistCard.vue'
|
||||
|
||||
|
|
|
@ -1,11 +1,13 @@
|
|||
import Router from '@/router'
|
||||
import { expect, it } from 'vitest'
|
||||
import { screen } from '@testing-library/vue'
|
||||
import UnitTestCase from '@/__tests__/UnitTestCase'
|
||||
import factory from '@/__tests__/factory'
|
||||
import { eventBus } from '@/utils'
|
||||
import { downloadService, playbackService } from '@/services'
|
||||
import { commonStore, songStore } from '@/stores'
|
||||
import { screen } from '@testing-library/vue'
|
||||
import { eventBus } from '@/utils/eventBus'
|
||||
import { downloadService } from '@/services/downloadService'
|
||||
import { playbackService } from '@/services/playbackService'
|
||||
import { commonStore } from '@/stores/commonStore'
|
||||
import { songStore } from '@/stores/songStore'
|
||||
import ArtistContextMenu from './ArtistContextMenu.vue'
|
||||
|
||||
let artist: Artist
|
||||
|
|
|
@ -17,10 +17,14 @@
|
|||
|
||||
<script lang="ts" setup>
|
||||
import { computed, ref, toRef } from 'vue'
|
||||
import { artistStore, commonStore, songStore } from '@/stores'
|
||||
import { downloadService, playbackService } from '@/services'
|
||||
import { useContextMenu, useRouter } from '@/composables'
|
||||
import { eventBus } from '@/utils'
|
||||
import { artistStore } from '@/stores/artistStore'
|
||||
import { commonStore } from '@/stores/commonStore'
|
||||
import { songStore } from '@/stores/songStore'
|
||||
import { downloadService } from '@/services/downloadService'
|
||||
import { playbackService } from '@/services/playbackService'
|
||||
import { useContextMenu } from '@/composables/useContextMenu'
|
||||
import { useRouter } from '@/composables/useRouter'
|
||||
import { eventBus } from '@/utils/eventBus'
|
||||
|
||||
const { go } = useRouter()
|
||||
const { base, ContextMenu, open, trigger } = useContextMenu()
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
import { expect, it } from 'vitest'
|
||||
import { screen } from '@testing-library/vue'
|
||||
import factory from '@/__tests__/factory'
|
||||
import UnitTestCase from '@/__tests__/UnitTestCase'
|
||||
import { commonStore } from '@/stores'
|
||||
import { screen } from '@testing-library/vue'
|
||||
import { mediaInfoService } from '@/services'
|
||||
import { commonStore } from '@/stores/commonStore'
|
||||
import { mediaInfoService } from '@/services/mediaInfoService'
|
||||
import ArtistInfoComponent from './ArtistInfo.vue'
|
||||
|
||||
let artist: Artist
|
||||
|
|
|
@ -23,8 +23,8 @@
|
|||
|
||||
<script lang="ts" setup>
|
||||
import { ref, toRefs, watch } from 'vue'
|
||||
import { mediaInfoService } from '@/services'
|
||||
import { useThirdPartyServices } from '@/composables'
|
||||
import { mediaInfoService } from '@/services/mediaInfoService'
|
||||
import { useThirdPartyServices } from '@/composables/useThirdPartyServices'
|
||||
|
||||
import ArtistThumbnail from '@/components/ui/album-artist/AlbumOrArtistThumbnail.vue'
|
||||
import AlbumArtistInfo from '@/components/ui/album-artist/AlbumOrArtistInfo.vue'
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { screen } from '@testing-library/vue'
|
||||
import { expect, it } from 'vitest'
|
||||
import UnitTestCase from '@/__tests__/UnitTestCase'
|
||||
import { authService } from '@/services'
|
||||
import { authService } from '@/services/authService'
|
||||
import ForgotPasswordForm from './ForgotPasswordForm.vue'
|
||||
|
||||
new class extends UnitTestCase {
|
||||
|
|
|
@ -23,8 +23,9 @@
|
|||
|
||||
<script lang="ts" setup>
|
||||
import { ref } from 'vue'
|
||||
import { authService } from '@/services'
|
||||
import { useErrorHandler, useMessageToaster } from '@/composables'
|
||||
import { authService } from '@/services/authService'
|
||||
import { useErrorHandler } from '@/composables/useErrorHandler'
|
||||
import { useMessageToaster } from '@/composables/useMessageToaster'
|
||||
|
||||
import Btn from '@/components/ui/form/Btn.vue'
|
||||
import TextInput from '@/components/ui/form/TextInput.vue'
|
||||
|
|
|
@ -2,8 +2,8 @@ import { screen, waitFor } from '@testing-library/vue'
|
|||
import type { Mock } from 'vitest'
|
||||
import { expect, it } from 'vitest'
|
||||
import UnitTestCase from '@/__tests__/UnitTestCase'
|
||||
import { authService } from '@/services'
|
||||
import { logger } from '@/utils'
|
||||
import { authService } from '@/services/authService'
|
||||
import { logger } from '@/utils/logger'
|
||||
import LoginFrom from './LoginForm.vue'
|
||||
|
||||
new class extends UnitTestCase {
|
||||
|
|
|
@ -40,9 +40,9 @@
|
|||
|
||||
<script lang="ts" setup>
|
||||
import { ref } from 'vue'
|
||||
import { authService } from '@/services'
|
||||
import { logger } from '@/utils'
|
||||
import { useMessageToaster } from '@/composables'
|
||||
import { authService } from '@/services/authService'
|
||||
import { logger } from '@/utils/logger'
|
||||
import { useMessageToaster } from '@/composables/useMessageToaster'
|
||||
|
||||
import Btn from '@/components/ui/form/Btn.vue'
|
||||
import PasswordField from '@/components/ui/form/PasswordField.vue'
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { screen } from '@testing-library/vue'
|
||||
import { expect, it } from 'vitest'
|
||||
import UnitTestCase from '@/__tests__/UnitTestCase'
|
||||
import { authService } from '@/services'
|
||||
import { authService } from '@/services/authService'
|
||||
import ResetPasswordForm from './ResetPasswordForm.vue'
|
||||
|
||||
new class extends UnitTestCase {
|
||||
|
|
|
@ -19,9 +19,12 @@
|
|||
|
||||
<script lang="ts" setup>
|
||||
import { computed, ref } from 'vue'
|
||||
import { authService } from '@/services'
|
||||
import { base64Decode, logger } from '@/utils'
|
||||
import { useErrorHandler, useMessageToaster, useRouter } from '@/composables'
|
||||
import { authService } from '@/services/authService'
|
||||
import { base64Decode } from '@/utils/crypto'
|
||||
import { logger } from '@/utils/logger'
|
||||
import { useErrorHandler } from '@/composables/useErrorHandler'
|
||||
import { useMessageToaster } from '@/composables/useMessageToaster'
|
||||
import { useRouter } from '@/composables/useRouter'
|
||||
|
||||
import PasswordField from '@/components/ui/form/PasswordField.vue'
|
||||
import Btn from '@/components/ui/form/Btn.vue'
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
<script lang="ts" setup>
|
||||
import googleLogo from '@/../img/logos/google.svg'
|
||||
import { openPopup } from '@/utils'
|
||||
import { openPopup } from '@/utils/helpers'
|
||||
|
||||
const emit = defineEmits<{
|
||||
(e: 'success', data: any): void
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
import { screen, waitFor } from '@testing-library/vue'
|
||||
import { expect, it } from 'vitest'
|
||||
import UnitTestCase from '@/__tests__/UnitTestCase'
|
||||
import AcceptInvitation from './AcceptInvitation.vue'
|
||||
import { invitationService } from '@/services'
|
||||
import factory from '@/__tests__/factory'
|
||||
import { invitationService } from '@/services/invitationService'
|
||||
import AcceptInvitation from './AcceptInvitation.vue'
|
||||
|
||||
new class extends UnitTestCase {
|
||||
protected test () {
|
|
@ -43,8 +43,9 @@
|
|||
|
||||
<script lang="ts" setup>
|
||||
import { onMounted, ref } from 'vue'
|
||||
import { invitationService } from '@/services'
|
||||
import { useErrorHandler, useRouter } from '@/composables'
|
||||
import { invitationService } from '@/services/invitationService'
|
||||
import { useErrorHandler } from '@/composables/useErrorHandler'
|
||||
import { useRouter } from '@/composables/useRouter'
|
||||
|
||||
import Btn from '@/components/ui/form/Btn.vue'
|
||||
import PasswordField from '@/components/ui/form/PasswordField.vue'
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { screen } from '@testing-library/vue'
|
||||
import { expect, it } from 'vitest'
|
||||
import UnitTestCase from '@/__tests__/UnitTestCase'
|
||||
import { plusService } from '@/services'
|
||||
import { plusService } from '@/services/plusService'
|
||||
import Form from './ActivateLicenseForm.vue'
|
||||
|
||||
new class extends UnitTestCase {
|
||||
|
|
|
@ -15,12 +15,13 @@
|
|||
|
||||
<script lang="ts" setup>
|
||||
import { ref } from 'vue'
|
||||
import { plusService } from '@/services'
|
||||
import { forceReloadWindow } from '@/utils'
|
||||
import { useDialogBox, useErrorHandler } from '@/composables'
|
||||
import { plusService } from '@/services/plusService'
|
||||
import { useDialogBox } from '@/composables/useDialogBox'
|
||||
import { useErrorHandler } from '@/composables/useErrorHandler'
|
||||
|
||||
import Btn from '@/components/ui/form/Btn.vue'
|
||||
import TextInput from '@/components/ui/form/TextInput.vue'
|
||||
import { forceReloadWindow } from '@/utils/helpers'
|
||||
|
||||
const { showSuccessDialog } = useDialogBox()
|
||||
const licenseKey = ref('')
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
<script lang="ts" setup>
|
||||
import { faPlus } from '@fortawesome/free-solid-svg-icons'
|
||||
import { eventBus } from '@/utils'
|
||||
import { eventBus } from '@/utils/eventBus'
|
||||
|
||||
import Btn from '@/components/ui/form/Btn.vue'
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { screen } from '@testing-library/vue'
|
||||
import { commonStore } from '@/stores'
|
||||
import { expect, it } from 'vitest'
|
||||
import UnitTestCase from '@/__tests__/UnitTestCase'
|
||||
import { commonStore } from '@/stores/commonStore'
|
||||
import Modal from './KoelPlusModal.vue'
|
||||
|
||||
new class extends UnitTestCase {
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
|
||||
<script lang="ts" setup>
|
||||
import { onMounted, ref } from 'vue'
|
||||
import { useKoelPlus } from '@/composables'
|
||||
import { useKoelPlus } from '@/composables/useKoelPlus'
|
||||
|
||||
import Btn from '@/components/ui/form/Btn.vue'
|
||||
import ActivateLicenseForm from '@/components/koel-plus/ActivateLicenseForm.vue'
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import { it } from 'vitest'
|
||||
import { screen, waitFor } from '@testing-library/vue'
|
||||
import factory from '@/__tests__/factory'
|
||||
import { eventBus } from '@/utils'
|
||||
import type { Events } from '@/config'
|
||||
import { eventBus } from '@/utils/eventBus'
|
||||
import type { Events } from '@/config/events'
|
||||
import UnitTestCase from '@/__tests__/UnitTestCase'
|
||||
import ModalWrapper from './ModalWrapper.vue'
|
||||
|
||||
|
|
|
@ -10,7 +10,8 @@
|
|||
|
||||
<script lang="ts" setup>
|
||||
import { defineAsyncComponent, ref, watch } from 'vue'
|
||||
import { arrayify, eventBus, provideReadonly } from '@/utils'
|
||||
import { arrayify, provideReadonly } from '@/utils/helpers'
|
||||
import { eventBus } from '@/utils/eventBus'
|
||||
import { ModalContextKey } from '@/symbols'
|
||||
|
||||
const modalNameToComponentMap = {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { expect, it } from 'vitest'
|
||||
import UnitTestCase from '@/__tests__/UnitTestCase'
|
||||
import { screen } from '@testing-library/vue'
|
||||
import { eventBus } from '@/utils'
|
||||
import UnitTestCase from '@/__tests__/UnitTestCase'
|
||||
import { eventBus } from '@/utils/eventBus'
|
||||
import FooterExtraControls from './FooterExtraControls.vue'
|
||||
|
||||
new class extends UnitTestCase {
|
||||
|
|
|
@ -35,8 +35,9 @@
|
|||
import { faBolt, faCompress, faExpand } from '@fortawesome/free-solid-svg-icons'
|
||||
import { AudioLinesIcon } from 'lucide-vue-next'
|
||||
import { computed, onMounted, ref } from 'vue'
|
||||
import { eventBus, isFullscreenSupported, isAudioContextSupported as useEqualizer } from '@/utils'
|
||||
import { useRouter } from '@/composables'
|
||||
import { eventBus } from '@/utils/eventBus'
|
||||
import { isFullscreenSupported, isAudioContextSupported as useEqualizer } from '@/utils/supports'
|
||||
import { useRouter } from '@/composables/useRouter'
|
||||
|
||||
import VolumeSlider from '@/components/ui/VolumeSlider.vue'
|
||||
import FooterBtn from '@/components/layout/app-footer/FooterButton.vue'
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
import { ref } from 'vue'
|
||||
import { expect, it } from 'vitest'
|
||||
import { screen } from '@testing-library/vue'
|
||||
import factory from '@/__tests__/factory'
|
||||
import UnitTestCase from '@/__tests__/UnitTestCase'
|
||||
import { CurrentPlayableKey } from '@/symbols'
|
||||
import { playbackService } from '@/services'
|
||||
import { screen } from '@testing-library/vue'
|
||||
import { playbackService } from '@/services/playbackService'
|
||||
import Component from './FooterPlaybackControls.vue'
|
||||
|
||||
new class extends UnitTestCase {
|
||||
|
|
|
@ -22,8 +22,8 @@
|
|||
<script lang="ts" setup>
|
||||
import { faStepBackward, faStepForward } from '@fortawesome/free-solid-svg-icons'
|
||||
import { ref } from 'vue'
|
||||
import { playbackService } from '@/services'
|
||||
import { requireInjection } from '@/utils'
|
||||
import { playbackService } from '@/services/playbackService'
|
||||
import { requireInjection } from '@/utils/helpers'
|
||||
import { CurrentPlayableKey } from '@/symbols'
|
||||
|
||||
import RepeatModeSwitch from '@/components/ui/RepeatModeSwitch.vue'
|
||||
|
|
|
@ -16,9 +16,11 @@
|
|||
<script setup lang="ts">
|
||||
import { faListOl } from '@fortawesome/free-solid-svg-icons'
|
||||
import { ref } from 'vue'
|
||||
import { useDroppable, useMessageToaster, useRouter } from '@/composables'
|
||||
import { queueStore } from '@/stores'
|
||||
import { pluralize } from '@/utils'
|
||||
import { useDroppable } from '@/composables/useDragAndDrop'
|
||||
import { useRouter } from '@/composables/useRouter'
|
||||
import { useMessageToaster } from '@/composables/useMessageToaster'
|
||||
import { queueStore } from '@/stores/queueStore'
|
||||
import { pluralize } from '@/utils/formatters'
|
||||
|
||||
import FooterButton from '@/components/layout/app-footer/FooterButton.vue'
|
||||
|
||||
|
|
|
@ -20,9 +20,11 @@
|
|||
|
||||
<script lang="ts" setup>
|
||||
import { computed, ref } from 'vue'
|
||||
import { defaultCover, getPlayableProp, isSong, requireInjection } from '@/utils'
|
||||
import defaultCover from '@/../img/covers/default.svg'
|
||||
import { getPlayableProp, requireInjection } from '@/utils/helpers'
|
||||
import { isSong } from '@/utils/typeGuards'
|
||||
import { CurrentPlayableKey } from '@/symbols'
|
||||
import { useDraggable } from '@/composables'
|
||||
import { useDraggable } from '@/composables/useDragAndDrop'
|
||||
|
||||
const { startDragging } = useDraggable('playables')
|
||||
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
import { waitFor } from '@testing-library/vue'
|
||||
import { expect, it } from 'vitest'
|
||||
import UnitTestCase from '@/__tests__/UnitTestCase'
|
||||
import { playbackService, volumeManager } from '@/services'
|
||||
import { preferenceStore } from '@/stores'
|
||||
import { playbackService } from '@/services/playbackService'
|
||||
import { volumeManager } from '@/services/volumeManager'
|
||||
import { preferenceStore } from '@/stores/preferenceStore'
|
||||
import Component from './index.vue'
|
||||
|
||||
new class extends UnitTestCase {
|
||||
|
|
|
@ -20,11 +20,16 @@
|
|||
<script lang="ts" setup>
|
||||
import { throttle } from 'lodash'
|
||||
import { computed, nextTick, ref, watch } from 'vue'
|
||||
import { eventBus, isAudioContextSupported, isSong, requireInjection } from '@/utils'
|
||||
import { CurrentPlayableKey } from '@/symbols'
|
||||
import { artistStore, preferenceStore } from '@/stores'
|
||||
import { audioService, playbackService } from '@/services'
|
||||
import { useFullscreen } from '@vueuse/core'
|
||||
import { eventBus } from '@/utils/eventBus'
|
||||
import { isSong } from '@/utils/typeGuards'
|
||||
import { isAudioContextSupported } from '@/utils/supports'
|
||||
import { requireInjection } from '@/utils/helpers'
|
||||
import { CurrentPlayableKey } from '@/symbols'
|
||||
import { artistStore } from '@/stores/artistStore'
|
||||
import { preferenceStore } from '@/stores/preferenceStore'
|
||||
import { audioService } from '@/services/audioService'
|
||||
import { playbackService } from '@/services/playbackService'
|
||||
|
||||
import AudioPlayer from '@/components/layout/app-footer/AudioPlayer.vue'
|
||||
import SongInfo from '@/components/layout/app-footer/FooterSongInfo.vue'
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
import { ref } from 'vue'
|
||||
import { screen, waitFor } from '@testing-library/vue'
|
||||
import { expect, it } from 'vitest'
|
||||
import factory from '@/__tests__/factory'
|
||||
import { albumStore, preferenceStore } from '@/stores'
|
||||
import UnitTestCase from '@/__tests__/UnitTestCase'
|
||||
import factory from '@/__tests__/factory'
|
||||
import { albumStore } from '@/stores/albumStore'
|
||||
import { preferenceStore } from '@/stores/preferenceStore'
|
||||
import { CurrentPlayableKey } from '@/symbols'
|
||||
import AlbumArtOverlay from '@/components/ui/AlbumArtOverlay.vue'
|
||||
import MainContent from './MainContent.vue'
|
||||
|
|
|
@ -40,9 +40,11 @@
|
|||
|
||||
<script lang="ts" setup>
|
||||
import { defineAsyncComponent, onMounted, ref, toRef } from 'vue'
|
||||
import { isSong, requireInjection } from '@/utils'
|
||||
import { preferenceStore } from '@/stores'
|
||||
import { useRouter, useThirdPartyServices } from '@/composables'
|
||||
import { isSong } from '@/utils/typeGuards'
|
||||
import { requireInjection } from '@/utils/helpers'
|
||||
import { preferenceStore } from '@/stores/preferenceStore'
|
||||
import { useRouter } from '@/composables/useRouter'
|
||||
import { useThirdPartyServices } from '@/composables/useThirdPartyServices'
|
||||
import { CurrentPlayableKey } from '@/symbols'
|
||||
|
||||
import HomeScreen from '@/components/screens/HomeScreen.vue'
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { screen } from '@testing-library/vue'
|
||||
import { expect, it } from 'vitest'
|
||||
import UnitTestCase from '@/__tests__/UnitTestCase'
|
||||
import { commonStore } from '@/stores'
|
||||
import { commonStore } from '@/stores/commonStore'
|
||||
import AboutKoelButton from './AboutKoelButton.vue'
|
||||
|
||||
new class extends UnitTestCase {
|
||||
|
|
|
@ -15,8 +15,8 @@
|
|||
|
||||
<script lang="ts" setup>
|
||||
import { faInfoCircle } from '@fortawesome/free-solid-svg-icons'
|
||||
import { eventBus } from '@/utils'
|
||||
import { useNewVersionNotification } from '@/composables'
|
||||
import { eventBus } from '@/utils/eventBus'
|
||||
import { useNewVersionNotification } from '@/composables/useNewVersionNotification'
|
||||
|
||||
import SideSheetButton from '@/components/layout/main-wrapper/side-sheet/SideSheetButton.vue'
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { screen } from '@testing-library/vue'
|
||||
import { expect, it } from 'vitest'
|
||||
import UnitTestCase from '@/__tests__/UnitTestCase'
|
||||
import { eventBus } from '@/utils'
|
||||
import { eventBus } from '@/utils/eventBus'
|
||||
import LogoutButton from './LogoutButton.vue'
|
||||
|
||||
new class extends UnitTestCase {
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
<script lang="ts" setup>
|
||||
import { faArrowRightFromBracket } from '@fortawesome/free-solid-svg-icons'
|
||||
import { eventBus } from '@/utils'
|
||||
import { eventBus } from '@/utils/eventBus'
|
||||
|
||||
import SideSheetButton from '@/components/layout/main-wrapper/side-sheet/SideSheetButton.vue'
|
||||
|
||||
|
|
|
@ -4,11 +4,14 @@ import type { Mock } from 'vitest'
|
|||
import { expect, it } from 'vitest'
|
||||
import type { RenderResult } from '@testing-library/vue'
|
||||
import { screen, waitFor } from '@testing-library/vue'
|
||||
import factory from '@/__tests__/factory'
|
||||
import { albumStore, artistStore, commonStore, preferenceStore } from '@/stores'
|
||||
import UnitTestCase from '@/__tests__/UnitTestCase'
|
||||
import factory from '@/__tests__/factory'
|
||||
import { albumStore } from '@/stores/albumStore'
|
||||
import { artistStore } from '@/stores/artistStore'
|
||||
import { commonStore } from '@/stores/commonStore'
|
||||
import { preferenceStore } from '@/stores/preferenceStore'
|
||||
import { CurrentPlayableKey } from '@/symbols'
|
||||
import { eventBus } from '@/utils'
|
||||
import { eventBus } from '@/utils/eventBus'
|
||||
import Component from './SideSheet.vue'
|
||||
|
||||
new class extends UnitTestCase {
|
||||
|
|
|
@ -75,9 +75,14 @@ import isMobile from 'ismobilejs'
|
|||
import { faBars } from '@fortawesome/free-solid-svg-icons'
|
||||
import type { Ref } from 'vue'
|
||||
import { computed, defineAsyncComponent, onMounted, ref, watch } from 'vue'
|
||||
import { albumStore, artistStore, preferenceStore } from '@/stores'
|
||||
import { useErrorHandler, useThirdPartyServices } from '@/composables'
|
||||
import { eventBus, isSong, requireInjection } from '@/utils'
|
||||
import { albumStore } from '@/stores/albumStore'
|
||||
import { artistStore } from '@/stores/artistStore'
|
||||
import { preferenceStore } from '@/stores/preferenceStore'
|
||||
import { useErrorHandler } from '@/composables/useErrorHandler'
|
||||
import { useThirdPartyServices } from '@/composables/useThirdPartyServices'
|
||||
import { eventBus } from '@/utils/eventBus'
|
||||
import { isSong } from '@/utils/typeGuards'
|
||||
import { requireInjection } from '@/utils/helpers'
|
||||
import { CurrentPlayableKey } from '@/symbols'
|
||||
|
||||
import ProfileAvatar from '@/components/ui/ProfileAvatar.vue'
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { expect, it } from 'vitest'
|
||||
import UnitTestCase from '@/__tests__/UnitTestCase'
|
||||
import { commonStore } from '@/stores'
|
||||
import { screen } from '@testing-library/vue'
|
||||
import UnitTestCase from '@/__tests__/UnitTestCase'
|
||||
import { commonStore } from '@/stores/commonStore'
|
||||
import Component from './SideSheetTabHeader.vue'
|
||||
|
||||
new class extends UnitTestCase {
|
||||
|
|
|
@ -43,7 +43,7 @@ import { faCompactDisc, faFeather } from '@fortawesome/free-solid-svg-icons'
|
|||
import { MicVocalIcon } from 'lucide-vue-next'
|
||||
import { faYoutube } from '@fortawesome/free-brands-svg-icons'
|
||||
import { computed } from 'vue'
|
||||
import { useThirdPartyServices } from '@/composables'
|
||||
import { useThirdPartyServices } from '@/composables/useThirdPartyServices'
|
||||
|
||||
import SideSheetButton from '@/components/layout/main-wrapper/side-sheet/SideSheetButton.vue'
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { screen } from '@testing-library/vue'
|
||||
import { expect, it } from 'vitest'
|
||||
import UnitTestCase from '@/__tests__/UnitTestCase'
|
||||
import { eventBus } from '@/utils'
|
||||
import { eventBus } from '@/utils/eventBus'
|
||||
import Component from './HomeButton.vue'
|
||||
|
||||
new class extends UnitTestCase {
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
<script setup lang="ts">
|
||||
import { faHome } from '@fortawesome/free-solid-svg-icons'
|
||||
import { eventBus } from '@/utils'
|
||||
import { eventBus } from '@/utils/eventBus'
|
||||
|
||||
const onClick = () => eventBus.emit('TOGGLE_SIDEBAR')
|
||||
</script>
|
||||
|
|
|
@ -43,9 +43,10 @@
|
|||
<script lang="ts" setup>
|
||||
import { faFolder, faFolderOpen } from '@fortawesome/free-solid-svg-icons'
|
||||
import { computed, ref, toRefs } from 'vue'
|
||||
import { playlistFolderStore, playlistStore } from '@/stores'
|
||||
import { eventBus } from '@/utils'
|
||||
import { useDraggable, useDroppable } from '@/composables'
|
||||
import { playlistFolderStore } from '@/stores/playlistFolderStore'
|
||||
import { playlistStore } from '@/stores/playlistStore'
|
||||
import { eventBus } from '@/utils/eventBus'
|
||||
import { useDraggable, useDroppable } from '@/composables/useDragAndDrop'
|
||||
|
||||
import PlaylistSidebarItem from './PlaylistSidebarItem.vue'
|
||||
import SidebarItem from './SidebarItem.vue'
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import { expect, it } from 'vitest'
|
||||
import { fireEvent, screen } from '@testing-library/vue'
|
||||
import { eventBus } from '@/utils'
|
||||
import factory from '@/__tests__/factory'
|
||||
import UnitTestCase from '@/__tests__/UnitTestCase'
|
||||
import factory from '@/__tests__/factory'
|
||||
import { eventBus } from '@/utils/eventBus'
|
||||
import PlaylistSidebarItem from './PlaylistSidebarItem.vue'
|
||||
|
||||
new class extends UnitTestCase {
|
||||
|
|
|
@ -25,9 +25,11 @@
|
|||
import { faClockRotateLeft, faHeart, faUsers, faWandMagicSparkles } from '@fortawesome/free-solid-svg-icons'
|
||||
import { ListMusicIcon } from 'lucide-vue-next'
|
||||
import { computed, ref, toRefs } from 'vue'
|
||||
import { eventBus } from '@/utils'
|
||||
import { favoriteStore } from '@/stores'
|
||||
import { useDraggable, useDroppable, usePlaylistManagement, useRouter } from '@/composables'
|
||||
import { eventBus } from '@/utils/eventBus'
|
||||
import { useRouter } from '@/composables/useRouter'
|
||||
import { favoriteStore } from '@/stores/favoriteStore'
|
||||
import { useDraggable, useDroppable } from '@/composables/useDragAndDrop'
|
||||
import { usePlaylistManagement } from '@/composables/usePlaylistManagement'
|
||||
|
||||
import SidebarItem from '@/components/layout/main-wrapper/sidebar/SidebarItem.vue'
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import { it } from 'vitest'
|
||||
import UnitTestCase from '@/__tests__/UnitTestCase'
|
||||
import { screen } from '@testing-library/vue'
|
||||
import { commonStore } from '@/stores'
|
||||
import { eventBus } from '@/utils'
|
||||
import UnitTestCase from '@/__tests__/UnitTestCase'
|
||||
import { commonStore } from '@/stores/commonStore'
|
||||
import { eventBus } from '@/utils/eventBus'
|
||||
import Sidebar from './Sidebar.vue'
|
||||
|
||||
const standardItems = [
|
||||
|
|
|
@ -39,8 +39,12 @@
|
|||
<script lang="ts" setup>
|
||||
import { faTimes } from '@fortawesome/free-solid-svg-icons'
|
||||
import { computed, ref, watch } from 'vue'
|
||||
import { eventBus } from '@/utils'
|
||||
import { useAuthorization, useKoelPlus, useLocalStorage, useRouter, useUpload } from '@/composables'
|
||||
import { eventBus } from '@/utils/eventBus'
|
||||
import { useAuthorization } from '@/composables/useAuthorization'
|
||||
import { useKoelPlus } from '@/composables/useKoelPlus'
|
||||
import { useLocalStorage } from '@/composables/useLocalStorage'
|
||||
import { useUpload } from '@/composables/useUpload'
|
||||
import { useRouter } from '@/composables/useRouter'
|
||||
|
||||
import BtnUpgradeToPlus from '@/components/koel-plus/BtnUpgradeToPlus.vue'
|
||||
import HomeButton from '@/components/layout/main-wrapper/sidebar/HomeButton.vue'
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
import { expect, it } from 'vitest'
|
||||
import UnitTestCase from '@/__tests__/UnitTestCase'
|
||||
import { screen } from '@testing-library/vue'
|
||||
import { faHome } from '@fortawesome/free-solid-svg-icons'
|
||||
import UnitTestCase from '@/__tests__/UnitTestCase'
|
||||
import { eventBus } from '@/utils/eventBus'
|
||||
import Component from './SidebarItem.vue'
|
||||
import { eventBus } from '@/utils'
|
||||
|
||||
new class extends UnitTestCase {
|
||||
protected test () {
|
||||
|
|
|
@ -24,8 +24,8 @@
|
|||
|
||||
<script lang="ts" setup>
|
||||
import { ref } from 'vue'
|
||||
import { useRouter } from '@/composables'
|
||||
import { eventBus } from '@/utils'
|
||||
import { useRouter } from '@/composables/useRouter'
|
||||
import { eventBus } from '@/utils/eventBus'
|
||||
|
||||
const props = withDefaults(defineProps<{ href?: string | undefined, screen?: ScreenName | undefined }>(), {
|
||||
href: undefined,
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { screen } from '@testing-library/vue'
|
||||
import { expect, it } from 'vitest'
|
||||
import { screen } from '@testing-library/vue'
|
||||
import UnitTestCase from '@/__tests__/UnitTestCase'
|
||||
import SidebarManageSection from './SidebarManageSection.vue'
|
||||
|
||||
|
|
|
@ -29,7 +29,8 @@
|
|||
|
||||
<script lang="ts" setup>
|
||||
import { faTools, faUpload, faUsers } from '@fortawesome/free-solid-svg-icons'
|
||||
import { useAuthorization, useUpload } from '@/composables'
|
||||
import { useAuthorization } from '@/composables/useAuthorization'
|
||||
import { useUpload } from '@/composables/useUpload'
|
||||
|
||||
import SidebarSection from '@/components/layout/main-wrapper/sidebar/SidebarSection.vue'
|
||||
import SidebarSectionHeader from '@/components/layout/main-wrapper/sidebar/SidebarSectionHeader.vue'
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
import { screen } from '@testing-library/vue'
|
||||
import { it } from 'vitest'
|
||||
import { playlistFolderStore, playlistStore } from '@/stores'
|
||||
import factory from '@/__tests__/factory'
|
||||
import UnitTestCase from '@/__tests__/UnitTestCase'
|
||||
import factory from '@/__tests__/factory'
|
||||
import { playlistFolderStore } from '@/stores/playlistFolderStore'
|
||||
import { playlistStore } from '@/stores/playlistStore'
|
||||
import SidebarPlaylistsSection from './SidebarPlaylistsSection.vue'
|
||||
import PlaylistSidebarItem from './PlaylistSidebarItem.vue'
|
||||
import PlaylistFolderSidebarItem from './PlaylistFolderSidebarItem.vue'
|
||||
|
|
|
@ -16,7 +16,9 @@
|
|||
|
||||
<script lang="ts" setup>
|
||||
import { computed, toRef } from 'vue'
|
||||
import { favoriteStore, playlistFolderStore, playlistStore } from '@/stores'
|
||||
import { favoriteStore } from '@/stores/favoriteStore'
|
||||
import { playlistFolderStore } from '@/stores/playlistFolderStore'
|
||||
import { playlistStore } from '@/stores/playlistStore'
|
||||
|
||||
import PlaylistSidebarItem from './PlaylistSidebarItem.vue'
|
||||
import PlaylistFolderSidebarItem from './PlaylistFolderSidebarItem.vue'
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { screen } from '@testing-library/vue'
|
||||
import { expect, it } from 'vitest'
|
||||
import UnitTestCase from '@/__tests__/UnitTestCase'
|
||||
import { eventBus } from '@/utils'
|
||||
import { eventBus } from '@/utils/eventBus'
|
||||
import SidebarYourLibrarySection from './SidebarYourLibrarySection.vue'
|
||||
|
||||
new class extends UnitTestCase {
|
||||
|
|
|
@ -47,7 +47,7 @@ import { faCompactDisc, faMusic, faPodcast } from '@fortawesome/free-solid-svg-i
|
|||
import { GuitarIcon, MicVocalIcon } from 'lucide-vue-next'
|
||||
import { unescape } from 'lodash'
|
||||
import { ref } from 'vue'
|
||||
import { eventBus } from '@/utils'
|
||||
import { eventBus } from '@/utils/eventBus'
|
||||
|
||||
import SidebarSection from '@/components/layout/main-wrapper/sidebar/SidebarSection.vue'
|
||||
import SidebarSectionHeader from '@/components/layout/main-wrapper/sidebar/SidebarSectionHeader.vue'
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import { expect, it } from 'vitest'
|
||||
import { commonStore } from '@/stores'
|
||||
import UnitTestCase from '@/__tests__/UnitTestCase'
|
||||
import { http } from '@/services'
|
||||
import { screen, waitFor } from '@testing-library/vue'
|
||||
import UnitTestCase from '@/__tests__/UnitTestCase'
|
||||
import { commonStore } from '@/stores/commonStore'
|
||||
import { http } from '@/services/http'
|
||||
import AboutKoelModel from './AboutKoelModal.vue'
|
||||
|
||||
new class extends UnitTestCase {
|
||||
|
|
|
@ -63,8 +63,10 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { useAuthorization, useKoelPlus, useNewVersionNotification } from '@/composables'
|
||||
import { eventBus } from '@/utils'
|
||||
import { useAuthorization } from '@/composables/useAuthorization'
|
||||
import { useKoelPlus } from '@/composables/useKoelPlus'
|
||||
import { useNewVersionNotification } from '@/composables/useNewVersionNotification'
|
||||
import { eventBus } from '@/utils/eventBus'
|
||||
|
||||
import SponsorList from '@/components/meta/SponsorList.vue'
|
||||
import Btn from '@/components/ui/form/Btn.vue'
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { expect, it } from 'vitest'
|
||||
import UnitTestCase from '@/__tests__/UnitTestCase'
|
||||
import { http } from '@/services'
|
||||
import { http } from '@/services/http'
|
||||
import CreditsBlock from './CreditsBlock.vue'
|
||||
|
||||
new class extends UnitTestCase {
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
<script lang="ts" setup>
|
||||
import { orderBy } from 'lodash'
|
||||
import { onMounted, ref } from 'vue'
|
||||
import { http } from '@/services'
|
||||
import { http } from '@/services/http'
|
||||
|
||||
interface DemoCredits {
|
||||
name: string
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
import { expect, it, vi } from 'vitest'
|
||||
import { screen } from '@testing-library/vue'
|
||||
import { preferenceStore } from '@/stores'
|
||||
import UnitTestCase from '@/__tests__/UnitTestCase'
|
||||
import { preferenceStore } from '@/stores/preferenceStore'
|
||||
import { http } from '@/services/http'
|
||||
import SupportKoel from './SupportKoel.vue'
|
||||
import { http } from '@/services'
|
||||
|
||||
new class extends UnitTestCase {
|
||||
protected beforeEach () {
|
||||
|
|
|
@ -21,8 +21,8 @@
|
|||
<script lang="ts" setup>
|
||||
import isMobile from 'ismobilejs'
|
||||
import { ref, watch } from 'vue'
|
||||
import { preferenceStore } from '@/stores'
|
||||
import { useKoelPlus } from '@/composables'
|
||||
import { preferenceStore } from '@/stores/preferenceStore'
|
||||
import { useKoelPlus } from '@/composables/useKoelPlus'
|
||||
|
||||
const delayUntilShow = 30 * 60 * 1000 // 30 minutes
|
||||
|
||||
|
|
|
@ -1,10 +1,9 @@
|
|||
import { expect, it } from 'vitest'
|
||||
import { screen, waitFor } from '@testing-library/vue'
|
||||
import UnitTestCase from '@/__tests__/UnitTestCase'
|
||||
import { eventBus } from '@/utils'
|
||||
import type { Events } from '@/config'
|
||||
|
||||
import CreateNewPlaylistContextMenu from './CreatePlaylistContextMenu.vue'
|
||||
import { eventBus } from '@/utils/eventBus'
|
||||
import type { Events } from '@/config/events'
|
||||
import Component from './CreatePlaylistContextMenu.vue'
|
||||
|
||||
new class extends UnitTestCase {
|
||||
protected test () {
|
||||
|
@ -21,7 +20,7 @@ new class extends UnitTestCase {
|
|||
}
|
||||
|
||||
private async renderComponent () {
|
||||
this.render(CreateNewPlaylistContextMenu)
|
||||
this.render(Component)
|
||||
eventBus.emit('CREATE_NEW_PLAYLIST_CONTEXT_MENU_REQUESTED', { top: 420, left: 42 })
|
||||
await this.tick(2)
|
||||
}
|
||||
|
|
|
@ -9,9 +9,9 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { useContextMenu } from '@/composables'
|
||||
import { eventBus } from '@/utils'
|
||||
import type { Events } from '@/config'
|
||||
import { useContextMenu } from '@/composables/useContextMenu'
|
||||
import { eventBus } from '@/utils/eventBus'
|
||||
import type { Events } from '@/config/events'
|
||||
|
||||
const { base, ContextMenu, open, trigger } = useContextMenu()
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
<script lang="ts" setup>
|
||||
import { faCirclePlus } from '@fortawesome/free-solid-svg-icons'
|
||||
import { eventBus } from '@/utils'
|
||||
import { eventBus } from '@/utils/eventBus'
|
||||
|
||||
const requestContextMenu = (e: MouseEvent) => {
|
||||
const { bottom, right } = (e.currentTarget as HTMLButtonElement).getBoundingClientRect()
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
import { expect, it } from 'vitest'
|
||||
import { screen } from '@testing-library/vue'
|
||||
import UnitTestCase from '@/__tests__/UnitTestCase'
|
||||
import { playlistFolderStore } from '@/stores'
|
||||
import factory from '@/__tests__/factory'
|
||||
import CreatePlaylistFolderForm from './CreatePlaylistFolderForm.vue'
|
||||
import { playlistFolderStore } from '@/stores/playlistFolderStore'
|
||||
import Component from './CreatePlaylistFolderForm.vue'
|
||||
|
||||
new class extends UnitTestCase {
|
||||
protected test () {
|
||||
|
@ -11,7 +11,7 @@ new class extends UnitTestCase {
|
|||
const storeMock = this.mock(playlistFolderStore, 'store')
|
||||
.mockResolvedValue(factory('playlist-folder'))
|
||||
|
||||
this.render(CreatePlaylistFolderForm)
|
||||
this.render(Component)
|
||||
|
||||
await this.type(screen.getByPlaceholderText('Folder name'), 'My folder')
|
||||
await this.user.click(screen.getByRole('button', { name: 'Save' }))
|
||||
|
|
|
@ -25,14 +25,18 @@
|
|||
|
||||
<script lang="ts" setup>
|
||||
import { ref } from 'vue'
|
||||
import { playlistFolderStore } from '@/stores'
|
||||
import { useDialogBox, useErrorHandler, useMessageToaster, useOverlay } from '@/composables'
|
||||
import { playlistFolderStore } from '@/stores/playlistFolderStore'
|
||||
import { useDialogBox } from '@/composables/useDialogBox'
|
||||
import { useErrorHandler } from '@/composables/useErrorHandler'
|
||||
import { useMessageToaster } from '@/composables/useMessageToaster'
|
||||
import { useOverlay } from '@/composables/useOverlay'
|
||||
|
||||
import Btn from '@/components/ui/form/Btn.vue'
|
||||
import TextInput from '@/components/ui/form/TextInput.vue'
|
||||
import FormRow from '@/components/ui/form/FormRow.vue'
|
||||
|
||||
const emit = defineEmits<{ (e: 'close'): void }>()
|
||||
|
||||
const { showOverlay, hideOverlay } = useOverlay()
|
||||
const { toastSuccess } = useMessageToaster()
|
||||
const { showConfirmDialog } = useDialogBox()
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
import { expect, it } from 'vitest'
|
||||
import { ref } from 'vue'
|
||||
import { screen } from '@testing-library/vue'
|
||||
import UnitTestCase from '@/__tests__/UnitTestCase'
|
||||
import { playlistStore } from '@/stores'
|
||||
import factory from '@/__tests__/factory'
|
||||
import { ref } from 'vue'
|
||||
import { playlistStore } from '@/stores/playlistStore'
|
||||
import { ModalContextKey } from '@/symbols'
|
||||
import CreatePlaylistForm from './CreatePlaylistForm.vue'
|
||||
import Component from './CreatePlaylistForm.vue'
|
||||
|
||||
new class extends UnitTestCase {
|
||||
protected test () {
|
||||
|
@ -13,7 +13,7 @@ new class extends UnitTestCase {
|
|||
const folder = factory('playlist-folder')
|
||||
const storeMock = this.mock(playlistStore, 'store').mockResolvedValue(factory('playlist'))
|
||||
|
||||
this.render(CreatePlaylistForm, {
|
||||
this.render(Component, {
|
||||
global: {
|
||||
provide: {
|
||||
[<symbol>ModalContextKey]: [ref({ folder })],
|
||||
|
@ -36,7 +36,7 @@ new class extends UnitTestCase {
|
|||
const folder = factory('playlist-folder')
|
||||
const storeMock = this.mock(playlistStore, 'store').mockResolvedValue(factory('playlist'))
|
||||
|
||||
this.render(CreatePlaylistForm, {
|
||||
this.render(Component, {
|
||||
global: {
|
||||
provide: {
|
||||
[<symbol>ModalContextKey]: [ref({ folder, playables })],
|
||||
|
|
|
@ -34,9 +34,16 @@
|
|||
|
||||
<script lang="ts" setup>
|
||||
import { computed, ref, toRef } from 'vue'
|
||||
import { playlistFolderStore, playlistStore } from '@/stores'
|
||||
import { getPlayableCollectionContentType, pluralize } from '@/utils'
|
||||
import { useDialogBox, useErrorHandler, useMessageToaster, useModal, useOverlay, useRouter } from '@/composables'
|
||||
import { playlistFolderStore } from '@/stores/playlistFolderStore'
|
||||
import { playlistStore } from '@/stores/playlistStore'
|
||||
import { getPlayableCollectionContentType } from '@/utils/typeGuards'
|
||||
import { pluralize } from '@/utils/formatters'
|
||||
import { useRouter } from '@/composables/useRouter'
|
||||
import { useDialogBox } from '@/composables/useDialogBox'
|
||||
import { useErrorHandler } from '@/composables/useErrorHandler'
|
||||
import { useMessageToaster } from '@/composables/useMessageToaster'
|
||||
import { useModal } from '@/composables/useModal'
|
||||
import { useOverlay } from '@/composables/useOverlay'
|
||||
|
||||
import Btn from '@/components/ui/form/Btn.vue'
|
||||
import TextInput from '@/components/ui/form/TextInput.vue'
|
||||
|
@ -44,6 +51,7 @@ import FormRow from '@/components/ui/form/FormRow.vue'
|
|||
import SelectBox from '@/components/ui/form/SelectBox.vue'
|
||||
|
||||
const emit = defineEmits<{ (e: 'close'): void }>()
|
||||
|
||||
const { showOverlay, hideOverlay } = useOverlay()
|
||||
const { toastSuccess } = useMessageToaster()
|
||||
const { showConfirmDialog } = useDialogBox()
|
||||
|
|
|
@ -1,18 +1,18 @@
|
|||
import { ref } from 'vue'
|
||||
import { screen, waitFor } from '@testing-library/vue'
|
||||
import { expect, it } from 'vitest'
|
||||
import factory from '@/__tests__/factory'
|
||||
import UnitTestCase from '@/__tests__/UnitTestCase'
|
||||
import { playlistFolderStore } from '@/stores'
|
||||
import factory from '@/__tests__/factory'
|
||||
import { playlistFolderStore } from '@/stores/playlistFolderStore'
|
||||
import { ModalContextKey } from '@/symbols'
|
||||
import EditPlaylistFolderForm from './EditPlaylistFolderForm.vue'
|
||||
import Component from './EditPlaylistFolderForm.vue'
|
||||
|
||||
new class extends UnitTestCase {
|
||||
protected test () {
|
||||
it('submits', async () => {
|
||||
const folder = factory('playlist-folder', { name: 'My folder' })
|
||||
const renameMock = this.mock(playlistFolderStore, 'rename')
|
||||
this.render(EditPlaylistFolderForm, {
|
||||
this.render(Component, {
|
||||
global: {
|
||||
provide: {
|
||||
[<symbol>ModalContextKey]: [ref({ folder })],
|
||||
|
|
|
@ -19,14 +19,19 @@
|
|||
|
||||
<script lang="ts" setup>
|
||||
import { ref } from 'vue'
|
||||
import { playlistFolderStore } from '@/stores'
|
||||
import { useDialogBox, useErrorHandler, useMessageToaster, useModal, useOverlay } from '@/composables'
|
||||
import { playlistFolderStore } from '@/stores/playlistFolderStore'
|
||||
import { useDialogBox } from '@/composables/useDialogBox'
|
||||
import { useErrorHandler } from '@/composables/useErrorHandler'
|
||||
import { useMessageToaster } from '@/composables/useMessageToaster'
|
||||
import { useOverlay } from '@/composables/useOverlay'
|
||||
import { useModal } from '@/composables/useModal'
|
||||
|
||||
import Btn from '@/components/ui/form/Btn.vue'
|
||||
import TextInput from '@/components/ui/form/TextInput.vue'
|
||||
import FormRow from '@/components/ui/form/FormRow.vue'
|
||||
|
||||
const emit = defineEmits<{ (e: 'close'): void }>()
|
||||
|
||||
const { showOverlay, hideOverlay } = useOverlay()
|
||||
const { toastSuccess } = useMessageToaster()
|
||||
const { showConfirmDialog } = useDialogBox()
|
||||
|
|
|
@ -1,11 +1,12 @@
|
|||
import { expect, it } from 'vitest'
|
||||
import factory from '@/__tests__/factory'
|
||||
import UnitTestCase from '@/__tests__/UnitTestCase'
|
||||
import { playlistFolderStore, playlistStore } from '@/stores'
|
||||
import { ref } from 'vue'
|
||||
import { expect, it } from 'vitest'
|
||||
import UnitTestCase from '@/__tests__/UnitTestCase'
|
||||
import factory from '@/__tests__/factory'
|
||||
import { playlistFolderStore } from '@/stores/playlistFolderStore'
|
||||
import { playlistStore } from '@/stores/playlistStore'
|
||||
import { screen, waitFor } from '@testing-library/vue'
|
||||
import { ModalContextKey } from '@/symbols'
|
||||
import EditPlaylistForm from './EditPlaylistForm.vue'
|
||||
import Component from './EditPlaylistForm.vue'
|
||||
|
||||
new class extends UnitTestCase {
|
||||
protected test () {
|
||||
|
@ -21,7 +22,7 @@ new class extends UnitTestCase {
|
|||
|
||||
const updateMock = this.mock(playlistStore, 'update')
|
||||
|
||||
this.render(EditPlaylistForm, {
|
||||
this.render(Component, {
|
||||
global: {
|
||||
provide: {
|
||||
[<symbol>ModalContextKey]: [ref({ playlist })],
|
||||
|
|
|
@ -36,8 +36,13 @@
|
|||
|
||||
<script lang="ts" setup>
|
||||
import { ref, toRef } from 'vue'
|
||||
import { playlistFolderStore, playlistStore } from '@/stores'
|
||||
import { useDialogBox, useErrorHandler, useMessageToaster, useModal, useOverlay } from '@/composables'
|
||||
import { playlistFolderStore } from '@/stores/playlistFolderStore'
|
||||
import { playlistStore } from '@/stores/playlistStore'
|
||||
import { useDialogBox } from '@/composables/useDialogBox'
|
||||
import { useErrorHandler } from '@/composables/useErrorHandler'
|
||||
import { useMessageToaster } from '@/composables/useMessageToaster'
|
||||
import { useOverlay } from '@/composables/useOverlay'
|
||||
import { useModal } from '@/composables/useModal'
|
||||
|
||||
import Btn from '@/components/ui/form/Btn.vue'
|
||||
import TextInput from '@/components/ui/form/TextInput.vue'
|
||||
|
@ -45,6 +50,7 @@ import FormRow from '@/components/ui/form/FormRow.vue'
|
|||
import SelectBox from '@/components/ui/form/SelectBox.vue'
|
||||
|
||||
const emit = defineEmits<{ (e: 'close'): void }>()
|
||||
|
||||
const { showOverlay, hideOverlay } = useOverlay()
|
||||
const { toastSuccess } = useMessageToaster()
|
||||
const { showConfirmDialog } = useDialogBox()
|
||||
|
|
|
@ -2,7 +2,7 @@ import { expect, it } from 'vitest'
|
|||
import { screen, waitFor } from '@testing-library/vue'
|
||||
import UnitTestCase from '@/__tests__/UnitTestCase'
|
||||
import factory from '@/__tests__/factory'
|
||||
import { playlistCollaborationService } from '@/services'
|
||||
import { playlistCollaborationService } from '@/services/playlistCollaborationService'
|
||||
import Component from './InvitePlaylistCollaborators.vue'
|
||||
|
||||
new class extends UnitTestCase {
|
|
@ -12,10 +12,10 @@
|
|||
<script lang="ts" setup>
|
||||
import { faCheckCircle, faCircleNotch } from '@fortawesome/free-solid-svg-icons'
|
||||
import { computed, ref, toRefs } from 'vue'
|
||||
import { copyText } from '@/utils'
|
||||
import { playlistCollaborationService } from '@/services'
|
||||
import { playlistCollaborationService } from '@/services/playlistCollaborationService'
|
||||
|
||||
import Btn from '@/components/ui/form/Btn.vue'
|
||||
import { copyText } from '@/utils/helpers'
|
||||
|
||||
const props = defineProps<{ playlist: Playlist }>()
|
||||
const { playlist } = toRefs(props)
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { ref } from 'vue'
|
||||
import { expect, it } from 'vitest'
|
||||
import factory from '@/__tests__/factory'
|
||||
import UnitTestCase from '@/__tests__/UnitTestCase'
|
||||
import { ref } from 'vue'
|
||||
import { ModalContextKey } from '@/symbols'
|
||||
import Modal from './PlaylistCollaborationModal.vue'
|
||||
|
||||
|
|
|
@ -35,13 +35,15 @@
|
|||
|
||||
<script lang="ts" setup>
|
||||
import { computed } from 'vue'
|
||||
import { useAuthorization, useModal } from '@/composables'
|
||||
import { useAuthorization } from '@/composables/useAuthorization'
|
||||
import { useModal } from '@/composables/useModal'
|
||||
|
||||
import Btn from '@/components/ui/form/Btn.vue'
|
||||
import InviteCollaborators from '@/components/playlist/InvitePlaylistCollaborators.vue'
|
||||
import CollaboratorList from '@/components/playlist/PlaylistCollaboratorList.vue'
|
||||
|
||||
const emit = defineEmits<{ (e: 'close'): void }>()
|
||||
|
||||
const playlist = useModal().getFromContext<Playlist>('playlist')
|
||||
const { currentUser } = useAuthorization()
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { expect, it } from 'vitest'
|
||||
import UnitTestCase from '@/__tests__/UnitTestCase'
|
||||
import factory from '@/__tests__/factory'
|
||||
import { playlistCollaborationService } from '@/services'
|
||||
import { playlistCollaborationService } from '@/services/playlistCollaborationService'
|
||||
import Component from './PlaylistCollaboratorList.vue'
|
||||
|
||||
new class extends UnitTestCase {
|
||||
|
|
|
@ -17,9 +17,11 @@
|
|||
import { sortBy } from 'lodash'
|
||||
import type { Ref } from 'vue'
|
||||
import { computed, onMounted, ref, toRefs } from 'vue'
|
||||
import { useAuthorization, useDialogBox, useErrorHandler } from '@/composables'
|
||||
import { playlistCollaborationService } from '@/services'
|
||||
import { eventBus } from '@/utils'
|
||||
import { playlistCollaborationService } from '@/services/playlistCollaborationService'
|
||||
import { eventBus } from '@/utils/eventBus'
|
||||
import { useAuthorization } from '@/composables/useAuthorization'
|
||||
import { useDialogBox } from '@/composables/useDialogBox'
|
||||
import { useErrorHandler } from '@/composables/useErrorHandler'
|
||||
|
||||
import ListSkeleton from '@/components/ui/skeletons/PlaylistCollaboratorListSkeleton.vue'
|
||||
import ListItem from '@/components/playlist/PlaylistCollaboratorListItem.vue'
|
||||
|
|
|
@ -28,10 +28,10 @@
|
|||
<script lang="ts" setup>
|
||||
import { faCircleCheck } from '@fortawesome/free-solid-svg-icons'
|
||||
import { toRefs } from 'vue'
|
||||
import { useAuthorization } from '@/composables/useAuthorization'
|
||||
|
||||
import Btn from '@/components/ui/form/Btn.vue'
|
||||
import UserAvatar from '@/components/user/UserAvatar.vue'
|
||||
import { useAuthorization } from '@/composables'
|
||||
|
||||
const props = defineProps<{
|
||||
collaborator: PlaylistCollaborator
|
||||
|
|
|
@ -1,12 +1,14 @@
|
|||
import Router from '@/router'
|
||||
import { expect, it } from 'vitest'
|
||||
import UnitTestCase from '@/__tests__/UnitTestCase'
|
||||
import { eventBus } from '@/utils'
|
||||
import factory from '@/__tests__/factory'
|
||||
import { screen, waitFor } from '@testing-library/vue'
|
||||
import { queueStore, songStore, userStore } from '@/stores'
|
||||
import { playbackService } from '@/services'
|
||||
import { MessageToasterStub } from '@/__tests__/stubs'
|
||||
import { screen, waitFor } from '@testing-library/vue'
|
||||
import { queueStore } from '@/stores/queueStore'
|
||||
import { songStore } from '@/stores/songStore'
|
||||
import { userStore } from '@/stores/userStore'
|
||||
import { playbackService } from '@/services/playbackService'
|
||||
import { eventBus } from '@/utils/eventBus'
|
||||
import Router from '@/router'
|
||||
import PlaylistContextMenu from './PlaylistContextMenu.vue'
|
||||
|
||||
new class extends UnitTestCase {
|
||||
|
|
|
@ -17,10 +17,15 @@
|
|||
|
||||
<script lang="ts" setup>
|
||||
import { computed, ref } from 'vue'
|
||||
import { eventBus } from '@/utils'
|
||||
import { useContextMenu, useKoelPlus, useMessageToaster, usePolicies, useRouter } from '@/composables'
|
||||
import { playbackService } from '@/services'
|
||||
import { queueStore, songStore } from '@/stores'
|
||||
import { eventBus } from '@/utils/eventBus'
|
||||
import { useRouter } from '@/composables/useRouter'
|
||||
import { useContextMenu } from '@/composables/useContextMenu'
|
||||
import { useMessageToaster } from '@/composables/useMessageToaster'
|
||||
import { usePolicies } from '@/composables/usePolicies'
|
||||
import { useKoelPlus } from '@/composables/useKoelPlus'
|
||||
import { playbackService } from '@/services/playbackService'
|
||||
import { queueStore } from '@/stores/queueStore'
|
||||
import { songStore } from '@/stores/songStore'
|
||||
|
||||
const { base, ContextMenu, open, trigger } = useContextMenu()
|
||||
const { go } = useRouter()
|
||||
|
|
|
@ -1,12 +1,13 @@
|
|||
import Router from '@/router'
|
||||
import { expect, it } from 'vitest'
|
||||
import UnitTestCase from '@/__tests__/UnitTestCase'
|
||||
import { eventBus } from '@/utils'
|
||||
import factory from '@/__tests__/factory'
|
||||
import { screen, waitFor } from '@testing-library/vue'
|
||||
import { playlistStore, songStore } from '@/stores'
|
||||
import { playbackService } from '@/services'
|
||||
import UnitTestCase from '@/__tests__/UnitTestCase'
|
||||
import factory from '@/__tests__/factory'
|
||||
import { MessageToasterStub } from '@/__tests__/stubs'
|
||||
import { playlistStore } from '@/stores/playlistStore'
|
||||
import { songStore } from '@/stores/songStore'
|
||||
import { playbackService } from '@/services/playbackService'
|
||||
import { eventBus } from '@/utils/eventBus'
|
||||
import Router from '@/router'
|
||||
import PlaylistFolderContextMenu from './PlaylistFolderContextMenu.vue'
|
||||
|
||||
new class extends UnitTestCase {
|
||||
|
|
|
@ -17,10 +17,13 @@
|
|||
|
||||
<script lang="ts" setup>
|
||||
import { computed, ref } from 'vue'
|
||||
import { eventBus } from '@/utils'
|
||||
import { playlistStore, songStore } from '@/stores'
|
||||
import { playbackService } from '@/services'
|
||||
import { useContextMenu, useMessageToaster, useRouter } from '@/composables'
|
||||
import { eventBus } from '@/utils/eventBus'
|
||||
import { playlistStore } from '@/stores/playlistStore'
|
||||
import { playbackService } from '@/services/playbackService'
|
||||
import { useRouter } from '@/composables/useRouter'
|
||||
import { useContextMenu } from '@/composables/useContextMenu'
|
||||
import { useMessageToaster } from '@/composables/useMessageToaster'
|
||||
import { songStore } from '@/stores/songStore'
|
||||
|
||||
const { base, ContextMenu, open, trigger } = useContextMenu()
|
||||
const { go } = useRouter()
|
||||
|
|
|
@ -53,17 +53,16 @@
|
|||
<script lang="ts" setup>
|
||||
import { faPlus } from '@fortawesome/free-solid-svg-icons'
|
||||
import { ref, toRef } from 'vue'
|
||||
import { playlistFolderStore, playlistStore } from '@/stores'
|
||||
import {
|
||||
useDialogBox,
|
||||
useErrorHandler,
|
||||
useKoelPlus,
|
||||
useMessageToaster,
|
||||
useModal,
|
||||
useOverlay,
|
||||
useRouter,
|
||||
useSmartPlaylistForm,
|
||||
} from '@/composables'
|
||||
import { playlistFolderStore } from '@/stores/playlistFolderStore'
|
||||
import { playlistStore } from '@/stores/playlistStore'
|
||||
import { useDialogBox } from '@/composables/useDialogBox'
|
||||
import { useErrorHandler } from '@/composables/useErrorHandler'
|
||||
import { useMessageToaster } from '@/composables/useMessageToaster'
|
||||
import { useModal } from '@/composables/useModal'
|
||||
import { useOverlay } from '@/composables/useOverlay'
|
||||
import { useSmartPlaylistForm } from '@/composables/useSmartPlaylistForm'
|
||||
import { useRouter } from '@/composables/useRouter'
|
||||
import { useKoelPlus } from '@/composables/useKoelPlus'
|
||||
|
||||
import CheckBox from '@/components/ui/form/CheckBox.vue'
|
||||
import TextInput from '@/components/ui/form/TextInput.vue'
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue