mirror of
https://github.com/BewlyBewly/BewlyBewly.git
synced 2025-04-14 13:15:29 +00:00
refactor: avoid directly importing all methods from ~/utils
This commit is contained in:
@@ -3,7 +3,8 @@ import { createApp } from 'vue'
|
||||
import type { App as AppType } from 'vue'
|
||||
import App from './views/App.vue'
|
||||
import { setupApp } from '~/logic/common-setup'
|
||||
import { SVG_ICONS, i18n } from '~/utils'
|
||||
import { i18n } from '~/utils/i18n'
|
||||
import { SVG_ICONS } from '~/utils/svgIcons'
|
||||
|
||||
let app: AppType | null = null;
|
||||
|
||||
|
||||
@@ -4,7 +4,8 @@ import AnimeTimeTable from './components/AnimeTimeTable.vue'
|
||||
import AnimeCard from './components/AnimeCard.vue'
|
||||
import AnimeCardSkeleton from './components/AnimeCardSkeleton.vue'
|
||||
import type { AnimeItem, PopularAnime } from './types'
|
||||
import { getUserID, numFormatter, openLinkToNewTab, removeHttpFromUrl } from '~/utils'
|
||||
import { getUserID, openLinkToNewTab, removeHttpFromUrl } from '~/utils/main'
|
||||
import { numFormatter } from '~/utils/dataFormatter'
|
||||
|
||||
const animeWatchList = reactive<AnimeItem[]>([])
|
||||
const recommendAnimeList = reactive<AnimeItem[]>([])
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
import { removeHttpFromUrl } from '~/utils'
|
||||
import { removeHttpFromUrl } from '~/utils/main'
|
||||
|
||||
defineProps<{
|
||||
url: string
|
||||
|
||||
@@ -3,7 +3,7 @@ import type { Ref } from 'vue'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
import browser from 'webextension-polyfill'
|
||||
import type { AnimeTimeTableItem } from '../types'
|
||||
import { removeHttpFromUrl } from '~/utils'
|
||||
import { removeHttpFromUrl } from '~/utils/main'
|
||||
|
||||
const { t } = useI18n()
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ import Video from './Video/Video.vue'
|
||||
import { activatedPage, settings } from '~/logic'
|
||||
import '~/styles/index.ts'
|
||||
import { AppPage, LanguageType } from '~/enums/appEnums'
|
||||
import { hexToRGBA } from '~/utils'
|
||||
import { hexToRGBA } from '~/utils/main'
|
||||
|
||||
const { locale } = useI18n()
|
||||
const [showSettings, toggle] = useToggle(false)
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
import type { Ref } from 'vue'
|
||||
import { TransitionGroup, onMounted, reactive, ref, watch } from 'vue'
|
||||
import type { FavoriteCategory, FavoriteResource } from './types'
|
||||
import { calcCurrentTime, getUserID, removeHttpFromUrl } from '~/utils'
|
||||
import { getUserID, removeHttpFromUrl } from '~/utils/main'
|
||||
import { calcCurrentTime } from '~/utils/dataFormatter'
|
||||
|
||||
const favoriteCategories = reactive<Array<FavoriteCategory>>([])
|
||||
const favoriteResources = reactive<Array<FavoriteResource>>([])
|
||||
|
||||
@@ -3,12 +3,8 @@ import { useDateFormat } from '@vueuse/core'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
import { HistoryType } from './types'
|
||||
import type { HistoryItem } from './types'
|
||||
import {
|
||||
calcCurrentTime,
|
||||
getCSRF,
|
||||
openLinkToNewTab,
|
||||
removeHttpFromUrl,
|
||||
} from '~/utils'
|
||||
import { getCSRF, openLinkToNewTab, removeHttpFromUrl } from '~/utils/main'
|
||||
import { calcCurrentTime } from '~/utils/dataFormatter'
|
||||
|
||||
const { t } = useI18n()
|
||||
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
import type { Ref, UnwrapNestedRefs } from 'vue'
|
||||
import { useDateFormat } from '@vueuse/core'
|
||||
import type { Comment, UserCardInfo, VideoInfo } from './types'
|
||||
import { calcTimeSince, getCSRF, numFormatter, removeHttpFromUrl } from '~/utils'
|
||||
import { getCSRF, removeHttpFromUrl } from '~/utils/main'
|
||||
import { calcTimeSince, numFormatter } from '~/utils/dataFormatter'
|
||||
|
||||
const videoContent = ref() as Ref<HTMLElement>
|
||||
// const commentContent = ref() as Ref<HTMLElement>
|
||||
|
||||
Reference in New Issue
Block a user