mirror of
https://github.com/BewlyBewly/BewlyBewly.git
synced 2025-04-14 13:15:29 +00:00
refactor: remove composable auto import (#741)
This commit is contained in:
@@ -9,6 +9,7 @@ import { injectCSS, isHomePage } from '~/utils/main'
|
||||
import { settings } from '~/logic'
|
||||
|
||||
import { runWhenIdle } from '~/utils/lazyLoad'
|
||||
import { useDark } from '~/composables/useDark'
|
||||
|
||||
const isFirefox: boolean = /Firefox/i.test(navigator.userAgent)
|
||||
|
||||
|
||||
@@ -10,6 +10,8 @@ import Empty from '~/components/Empty.vue'
|
||||
import HorizontalScrollView from '~/components/HorizontalScrollView.vue'
|
||||
import LongCoverCard from '~/components/LongCoverCard/LongCoverCard.vue'
|
||||
import LongCoverCardSkeleton from '~/components/LongCoverCard/LongCoverCardSkeleton.vue'
|
||||
import { useApiClient } from '~/composables/api'
|
||||
import { useBewlyApp } from '~/composables/useAppProvider'
|
||||
|
||||
const api = useApiClient()
|
||||
const animeWatchList = reactive<WatchListItem[]>([])
|
||||
|
||||
@@ -5,6 +5,7 @@ import browser from 'webextension-polyfill'
|
||||
import { removeHttpFromUrl } from '~/utils/main'
|
||||
import type { Result as TimetableItem, TimetableResult } from '~/models/anime/timeTable'
|
||||
import HorizontalScrollView from '~/components/HorizontalScrollView.vue'
|
||||
import { useApiClient } from '~/composables/api'
|
||||
|
||||
const { t } = useI18n()
|
||||
const api = useApiClient()
|
||||
|
||||
@@ -11,6 +11,7 @@ import RightSideButtons from '~/components/RightSideButtons/RightSideButtons.vue
|
||||
import Settings from '~/components/Settings/Settings.vue'
|
||||
import TopBar from '~/components/TopBar/TopBar.vue'
|
||||
import type { BewlyAppProvider } from '~/composables/useAppProvider'
|
||||
import { useDark } from '~/composables/useDark'
|
||||
import { AppPage, LanguageType } from '~/enums/appEnums'
|
||||
import { accessKey, settings } from '~/logic'
|
||||
import { getUserID, hexToRGBA, isHomePage, smoothScrollToTop } from '~/utils/main'
|
||||
|
||||
@@ -13,6 +13,8 @@ import Loading from '~/components/Loading.vue'
|
||||
import Select from '~/components/Select.vue'
|
||||
import Tooltip from '~/components/Tooltip.vue'
|
||||
import VideoCard from '~/components/VideoCard/VideoCard.vue'
|
||||
import { useApiClient } from '~/composables/api'
|
||||
import { useBewlyApp } from '~/composables/useAppProvider'
|
||||
|
||||
const { t } = useI18n()
|
||||
const api = useApiClient()
|
||||
|
||||
@@ -9,6 +9,8 @@ import type { List as HistoryItem, HistoryResult } from '~/models/history/histor
|
||||
import type { List as HistorySearchItem, HistorySearchResult } from '~/models/video/historySearch'
|
||||
import Empty from '~/components/Empty.vue'
|
||||
import Progress from '~/components/Progress.vue'
|
||||
import { useApiClient } from '~/composables/api'
|
||||
import { useBewlyApp } from '~/composables/useAppProvider'
|
||||
|
||||
const { t } = useI18n()
|
||||
const api = useApiClient()
|
||||
|
||||
@@ -9,6 +9,8 @@ import type { HomeTab } from '~/stores/mainStore'
|
||||
import { useMainStore } from '~/stores/mainStore'
|
||||
import Logo from '~/components/Logo.vue'
|
||||
import SearchBar from '~/components/SearchBar/SearchBar.vue'
|
||||
import { useBewlyImage } from '~/composables/useImage'
|
||||
import { useBewlyApp } from '~/composables/useAppProvider'
|
||||
|
||||
const mainStore = useMainStore()
|
||||
const { handleBackToTop, scrollbarRef } = useBewlyApp()
|
||||
|
||||
@@ -7,6 +7,8 @@ import Empty from '~/components/Empty.vue'
|
||||
import Loading from '~/components/Loading.vue'
|
||||
import VideoCard from '~/components/VideoCard/VideoCard.vue'
|
||||
import VideoCardSkeleton from '~/components/VideoCard/VideoCardSkeleton.vue'
|
||||
import { useApiClient } from '~/composables/api'
|
||||
import { useBewlyApp } from '~/composables/useAppProvider'
|
||||
|
||||
const props = defineProps<{
|
||||
gridLayout: GridLayout
|
||||
|
||||
@@ -16,6 +16,8 @@ import Empty from '~/components/Empty.vue'
|
||||
import Loading from '~/components/Loading.vue'
|
||||
import VideoCard from '~/components/VideoCard/VideoCard.vue'
|
||||
import VideoCardSkeleton from '~/components/VideoCard/VideoCardSkeleton.vue'
|
||||
import { useApiClient } from '~/composables/api'
|
||||
import { useBewlyApp } from '~/composables/useAppProvider'
|
||||
|
||||
const props = defineProps<{
|
||||
gridLayout: GridLayout
|
||||
|
||||
@@ -11,6 +11,8 @@ import LongCoverCardSkeleton from '~/components/LongCoverCard/LongCoverCardSkele
|
||||
import OverlayScrollbarsComponent from '~/components/OverlayScrollbarsComponent'
|
||||
import VideoCard from '~/components/VideoCard/VideoCard.vue'
|
||||
import VideoCardSkeleton from '~/components/VideoCard/VideoCardSkeleton.vue'
|
||||
import { useBewlyApp } from '~/composables/useAppProvider'
|
||||
import { useApiClient } from '~/composables/api'
|
||||
|
||||
const props = defineProps<{
|
||||
gridLayout: GridLayout
|
||||
|
||||
@@ -7,6 +7,8 @@ import Empty from '~/components/Empty.vue'
|
||||
import Loading from '~/components/Loading.vue'
|
||||
import VideoCard from '~/components/VideoCard/VideoCard.vue'
|
||||
import VideoCardSkeleton from '~/components/VideoCard/VideoCardSkeleton.vue'
|
||||
import { useApiClient } from '~/composables/api'
|
||||
import { useBewlyApp } from '~/composables/useAppProvider'
|
||||
|
||||
const props = defineProps<{
|
||||
gridLayout: GridLayout
|
||||
|
||||
@@ -5,6 +5,8 @@ import type { TrendingResult, List as VideoItem } from '~/models/video/trending'
|
||||
import Loading from '~/components/Loading.vue'
|
||||
import VideoCard from '~/components/VideoCard/VideoCard.vue'
|
||||
import VideoCardSkeleton from '~/components/VideoCard/VideoCardSkeleton.vue'
|
||||
import { useApiClient } from '~/composables/api'
|
||||
import { useBewlyApp } from '~/composables/useAppProvider'
|
||||
|
||||
const props = defineProps<{
|
||||
gridLayout: GridLayout
|
||||
|
||||
@@ -4,6 +4,7 @@ import { useDateFormat } from '@vueuse/core'
|
||||
import type { Comment, UserCardInfo, VideoInfo } from './types'
|
||||
import { getCSRF, removeHttpFromUrl } from '~/utils/main'
|
||||
import { calcTimeSince, numFormatter } from '~/utils/dataFormatter'
|
||||
import { useApiClient } from '~/composables/api'
|
||||
|
||||
const api = useApiClient()
|
||||
const videoContent = ref() as Ref<HTMLElement>
|
||||
|
||||
@@ -7,6 +7,8 @@ import type { List as VideoItem, WatchLaterResult } from '~/models/video/watchLa
|
||||
import Button from '~/components/Button.vue'
|
||||
import Empty from '~/components/Empty.vue'
|
||||
import Progress from '~/components/Progress.vue'
|
||||
import { useApiClient } from '~/composables/api'
|
||||
import { useBewlyApp } from '~/composables/useAppProvider'
|
||||
|
||||
const { t } = useI18n()
|
||||
const api = useApiClient()
|
||||
|
||||
Reference in New Issue
Block a user