mirror of
https://github.com/koel/koel
synced 2024-12-18 16:44:03 +00:00
chore: optimize imports
This commit is contained in:
parent
44c638897d
commit
2ee84720b3
15 changed files with 22 additions and 24 deletions
|
@ -1,5 +1,5 @@
|
||||||
import { createApp } from 'vue'
|
import { createApp } from 'vue'
|
||||||
import { focus, hideBrokenIcon, overflowFade, newTab, tooltip } from '@/directives'
|
import { focus, hideBrokenIcon, newTab, overflowFade, tooltip } from '@/directives'
|
||||||
import { FontAwesomeIcon, FontAwesomeLayers } from '@fortawesome/vue-fontawesome'
|
import { FontAwesomeIcon, FontAwesomeLayers } from '@fortawesome/vue-fontawesome'
|
||||||
import { RouterKey } from '@/symbols'
|
import { RouterKey } from '@/symbols'
|
||||||
import { routes } from '@/config'
|
import { routes } from '@/config'
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { computed, defineAsyncComponent, Ref, toRefs } from 'vue'
|
import { computed, defineAsyncComponent, Ref, toRefs } from 'vue'
|
||||||
import { queueStore, songStore } from '@/stores'
|
import { songStore } from '@/stores'
|
||||||
import { authService, playbackService } from '@/services'
|
import { authService, playbackService } from '@/services'
|
||||||
import { useThirdPartyServices } from '@/composables'
|
import { useThirdPartyServices } from '@/composables'
|
||||||
import { requireInjection, secondsToHis } from '@/utils'
|
import { requireInjection, secondsToHis } from '@/utils'
|
||||||
|
|
|
@ -32,7 +32,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { faListOl, faBolt, faCompress, faExpand, faSliders } from '@fortawesome/free-solid-svg-icons'
|
import { faBolt, faCompress, faExpand, faSliders } from '@fortawesome/free-solid-svg-icons'
|
||||||
import { computed, onMounted, ref } from 'vue'
|
import { computed, onMounted, ref } from 'vue'
|
||||||
import { eventBus, isAudioContextSupported as useEqualizer, isFullscreenSupported } from '@/utils'
|
import { eventBus, isAudioContextSupported as useEqualizer, isFullscreenSupported } from '@/utils'
|
||||||
import { useRouter } from '@/composables'
|
import { useRouter } from '@/composables'
|
||||||
|
|
|
@ -43,7 +43,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { faCompactDisc, faMicrophone, faMusic, faTags, faPodcast } from '@fortawesome/free-solid-svg-icons'
|
import { faCompactDisc, faMicrophone, faMusic, faPodcast, faTags } from '@fortawesome/free-solid-svg-icons'
|
||||||
import { unescape } from 'lodash'
|
import { unescape } from 'lodash'
|
||||||
import { ref } from 'vue'
|
import { ref } from 'vue'
|
||||||
import { eventBus } from '@/utils'
|
import { eventBus } from '@/utils'
|
||||||
|
|
|
@ -26,7 +26,6 @@
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref } from 'vue'
|
import { ref } from 'vue'
|
||||||
import { playlistFolderStore } from '@/stores'
|
import { playlistFolderStore } from '@/stores'
|
||||||
import { logger } from '@/utils'
|
|
||||||
import { useDialogBox, useErrorHandler, useMessageToaster, useOverlay } from '@/composables'
|
import { useDialogBox, useErrorHandler, useMessageToaster, useOverlay } from '@/composables'
|
||||||
|
|
||||||
import Btn from '@/components/ui/form/Btn.vue'
|
import Btn from '@/components/ui/form/Btn.vue'
|
||||||
|
|
|
@ -19,7 +19,6 @@
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { toRefs } from 'vue'
|
import { toRefs } from 'vue'
|
||||||
import { eventBus } from '@/utils'
|
|
||||||
import { useRouter } from '@/composables'
|
import { useRouter } from '@/composables'
|
||||||
|
|
||||||
import BaseCard from '@/components/ui/album-artist/AlbumOrArtistCard.vue'
|
import BaseCard from '@/components/ui/album-artist/AlbumOrArtistCard.vue'
|
||||||
|
|
|
@ -77,7 +77,7 @@ import { orderBy } from 'lodash'
|
||||||
import { faExternalLink, faPause, faPlay, faRotateRight, faTimes } from '@fortawesome/free-solid-svg-icons'
|
import { faExternalLink, faPause, faPlay, faRotateRight, faTimes } from '@fortawesome/free-solid-svg-icons'
|
||||||
import { computed, nextTick, reactive, ref, watch } from 'vue'
|
import { computed, nextTick, reactive, ref, watch } from 'vue'
|
||||||
import { useDialogBox, useErrorHandler, useRouter } from '@/composables'
|
import { useDialogBox, useErrorHandler, useRouter } from '@/composables'
|
||||||
import { songStore as episodeStore, podcastStore, queueStore } from '@/stores'
|
import { podcastStore, queueStore, songStore as episodeStore } from '@/stores'
|
||||||
import { playbackService } from '@/services'
|
import { playbackService } from '@/services'
|
||||||
import { isEpisode } from '@/utils'
|
import { isEpisode } from '@/utils'
|
||||||
|
|
||||||
|
|
|
@ -72,7 +72,7 @@
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { computed, ref, toRef } from 'vue'
|
import { computed, ref, toRef } from 'vue'
|
||||||
import { arrayify, getPlayableCollectionContentType, copyText, eventBus, isSong, pluralize } from '@/utils'
|
import { arrayify, copyText, eventBus, getPlayableCollectionContentType, isSong, pluralize } from '@/utils'
|
||||||
import { commonStore, favoriteStore, playlistStore, queueStore, songStore } from '@/stores'
|
import { commonStore, favoriteStore, playlistStore, queueStore, songStore } from '@/stores'
|
||||||
import { downloadService, playbackService } from '@/services'
|
import { downloadService, playbackService } from '@/services'
|
||||||
import {
|
import {
|
||||||
|
|
|
@ -4,12 +4,12 @@ import factory from '@/__tests__/factory'
|
||||||
import UnitTestCase from '@/__tests__/UnitTestCase'
|
import UnitTestCase from '@/__tests__/UnitTestCase'
|
||||||
import { arrayify } from '@/utils'
|
import { arrayify } from '@/utils'
|
||||||
import {
|
import {
|
||||||
SelectedPlayablesKey,
|
|
||||||
PlayableListConfigKey,
|
PlayableListConfigKey,
|
||||||
PlayableListContextKey,
|
PlayableListContextKey,
|
||||||
PlayableListSortFieldKey,
|
PlayableListSortFieldKey,
|
||||||
SongListSortOrderKey,
|
PlayablesKey,
|
||||||
PlayablesKey
|
SelectedPlayablesKey,
|
||||||
|
SongListSortOrderKey
|
||||||
} from '@/symbols'
|
} from '@/symbols'
|
||||||
import { screen } from '@testing-library/vue'
|
import { screen } from '@testing-library/vue'
|
||||||
import SongList from './SongList.vue'
|
import SongList from './SongList.vue'
|
||||||
|
|
|
@ -118,12 +118,12 @@ import { preferenceStore as preferences, queueStore } from '@/stores'
|
||||||
import { useDraggable, useDroppable } from '@/composables'
|
import { useDraggable, useDroppable } from '@/composables'
|
||||||
import { playbackService } from '@/services'
|
import { playbackService } from '@/services'
|
||||||
import {
|
import {
|
||||||
PlayablesKey,
|
|
||||||
SelectedPlayablesKey,
|
|
||||||
PlayableListConfigKey,
|
PlayableListConfigKey,
|
||||||
PlayableListContextKey,
|
PlayableListContextKey,
|
||||||
SongListFilterKeywordsKey,
|
|
||||||
PlayableListSortFieldKey,
|
PlayableListSortFieldKey,
|
||||||
|
PlayablesKey,
|
||||||
|
SelectedPlayablesKey,
|
||||||
|
SongListFilterKeywordsKey,
|
||||||
SongListSortOrderKey
|
SongListSortOrderKey
|
||||||
} from '@/symbols'
|
} from '@/symbols'
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@ import { ref } from 'vue'
|
||||||
import { expect, it } from 'vitest'
|
import { expect, it } from 'vitest'
|
||||||
import factory from '@/__tests__/factory'
|
import factory from '@/__tests__/factory'
|
||||||
import UnitTestCase from '@/__tests__/UnitTestCase'
|
import UnitTestCase from '@/__tests__/UnitTestCase'
|
||||||
import { SelectedPlayablesKey, PlayablesKey } from '@/symbols'
|
import { PlayablesKey, SelectedPlayablesKey } from '@/symbols'
|
||||||
import { screen } from '@testing-library/vue'
|
import { screen } from '@testing-library/vue'
|
||||||
import SongListControls from './SongListControls.vue'
|
import SongListControls from './SongListControls.vue'
|
||||||
|
|
||||||
|
|
|
@ -102,7 +102,7 @@
|
||||||
import { faPlay, faRandom, faRotateRight, faTrashCan } from '@fortawesome/free-solid-svg-icons'
|
import { faPlay, faRandom, faRotateRight, faTrashCan } from '@fortawesome/free-solid-svg-icons'
|
||||||
import { computed, defineAsyncComponent, nextTick, onBeforeUnmount, onMounted, Ref, ref, toRef, watch } from 'vue'
|
import { computed, defineAsyncComponent, nextTick, onBeforeUnmount, onMounted, Ref, ref, toRef, watch } from 'vue'
|
||||||
import { OnClickOutside } from '@vueuse/components'
|
import { OnClickOutside } from '@vueuse/components'
|
||||||
import { SelectedPlayablesKey, PlayablesKey } from '@/symbols'
|
import { PlayablesKey, SelectedPlayablesKey } from '@/symbols'
|
||||||
import { requireInjection } from '@/utils'
|
import { requireInjection } from '@/utils'
|
||||||
import { useFloatingUi } from '@/composables'
|
import { useFloatingUi } from '@/composables'
|
||||||
|
|
||||||
|
|
|
@ -44,7 +44,7 @@
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { faPodcast } from '@fortawesome/free-solid-svg-icons'
|
import { faPodcast } from '@fortawesome/free-solid-svg-icons'
|
||||||
import { computed, toRefs } from 'vue'
|
import { computed, toRefs } from 'vue'
|
||||||
import { getPlayableProp, isEpisode, isSong, requireInjection, secondsToHis } from '@/utils'
|
import { getPlayableProp, isSong, requireInjection, secondsToHis } from '@/utils'
|
||||||
import { useAuthorization, useKoelPlus } from '@/composables'
|
import { useAuthorization, useKoelPlus } from '@/composables'
|
||||||
import { PlayableListConfigKey } from '@/symbols'
|
import { PlayableListConfigKey } from '@/symbols'
|
||||||
|
|
||||||
|
|
|
@ -1,19 +1,19 @@
|
||||||
import { differenceBy, orderBy, sampleSize, take, throttle } from 'lodash'
|
import { differenceBy, orderBy, sampleSize, take, throttle } from 'lodash'
|
||||||
import isMobile from 'ismobilejs'
|
import isMobile from 'ismobilejs'
|
||||||
import { computed, provide, reactive, Ref, ref, watch } from 'vue'
|
import { computed, provide, reactive, Ref, ref } from 'vue'
|
||||||
import { playbackService } from '@/services'
|
import { playbackService } from '@/services'
|
||||||
import { queueStore, songStore } from '@/stores'
|
import { queueStore, songStore } from '@/stores'
|
||||||
import { arrayify, eventBus, getPlayableProp, provideReadonly } from '@/utils'
|
import { arrayify, eventBus, getPlayableProp, provideReadonly } from '@/utils'
|
||||||
import { useRouter } from '@/composables'
|
import { useRouter } from '@/composables'
|
||||||
|
|
||||||
import {
|
import {
|
||||||
SelectedPlayablesKey,
|
|
||||||
PlayableListConfigKey,
|
PlayableListConfigKey,
|
||||||
PlayableListContextKey,
|
PlayableListContextKey,
|
||||||
SongListFilterKeywordsKey,
|
|
||||||
PlayableListSortFieldKey,
|
PlayableListSortFieldKey,
|
||||||
SongListSortOrderKey,
|
PlayablesKey,
|
||||||
PlayablesKey
|
SelectedPlayablesKey,
|
||||||
|
SongListFilterKeywordsKey,
|
||||||
|
SongListSortOrderKey
|
||||||
} from '@/symbols'
|
} from '@/symbols'
|
||||||
|
|
||||||
import ControlsToggle from '@/components/ui/ScreenControlsToggle.vue'
|
import ControlsToggle from '@/components/ui/ScreenControlsToggle.vue'
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
import { reactive, watch } from 'vue'
|
import { reactive } from 'vue'
|
||||||
import { http } from '@/services'
|
import { http } from '@/services'
|
||||||
import { songStore } from '@/stores/songStore'
|
import { songStore } from '@/stores/songStore'
|
||||||
import { albumStore } from '@/stores/albumStore'
|
import { albumStore } from '@/stores/albumStore'
|
||||||
import { artistStore } from '@/stores/artistStore'
|
import { artistStore } from '@/stores/artistStore'
|
||||||
import { recentlyPlayedStore } from '@/stores'
|
import { recentlyPlayedStore } from '@/stores'
|
||||||
import { isEpisode, isSong } from '@/utils'
|
import { isSong } from '@/utils'
|
||||||
|
|
||||||
export const overviewStore = {
|
export const overviewStore = {
|
||||||
state: reactive({
|
state: reactive({
|
||||||
|
|
Loading…
Reference in a new issue