mirror of
https://github.com/BewlyBewly/BewlyBewly.git
synced 2025-04-14 13:15:29 +00:00
refactor: adjust the directory structure of messageListeners/ (#1066)
This commit is contained in:
@@ -1,15 +1,14 @@
|
||||
<script setup lang="ts">
|
||||
import { useApiClient } from '~/composables/api'
|
||||
import { useBewlyApp } from '~/composables/useAppProvider'
|
||||
import type { List as PopularAnimeItem, PopularAnimeResult } from '~/models/anime/popular'
|
||||
import type { ItemSubItem as RecommendationItem, RecommendationResult } from '~/models/anime/recommendation'
|
||||
import type { List as WatchListItem, WatchListResult } from '~/models/anime/watchList'
|
||||
import api from '~/utils/api'
|
||||
import { numFormatter } from '~/utils/dataFormatter'
|
||||
import { getUserID, openLinkToNewTab } from '~/utils/main'
|
||||
|
||||
import AnimeTimeTable from './components/AnimeTimeTable.vue'
|
||||
|
||||
const api = useApiClient()
|
||||
const animeWatchList = reactive<WatchListItem[]>([])
|
||||
const recommendAnimeList = reactive<RecommendationItem[]>([])
|
||||
const popularAnimeList = reactive<PopularAnimeItem[]>([])
|
||||
|
||||
@@ -4,12 +4,11 @@ import { useI18n } from 'vue-i18n'
|
||||
import browser from 'webextension-polyfill'
|
||||
|
||||
import HorizontalScrollView from '~/components/HorizontalScrollView.vue'
|
||||
import { useApiClient } from '~/composables/api'
|
||||
import type { Result as TimetableItem, TimetableResult } from '~/models/anime/timeTable'
|
||||
import api from '~/utils/api'
|
||||
import { removeHttpFromUrl } from '~/utils/main'
|
||||
|
||||
const { t } = useI18n()
|
||||
const api = useApiClient()
|
||||
const animeTimeTable = reactive<TimetableItem[]>([])
|
||||
const animeTimeTableWrap = ref<HTMLElement>() as Ref<HTMLElement>
|
||||
|
||||
|
||||
@@ -2,17 +2,16 @@
|
||||
import { useI18n } from 'vue-i18n'
|
||||
|
||||
import type { FavoriteCategory, FavoriteResource } from '~/components/TopBar/types'
|
||||
import { useApiClient } from '~/composables/api'
|
||||
import { useBewlyApp } from '~/composables/useAppProvider'
|
||||
import { TOP_BAR_VISIBILITY_CHANGE } from '~/constants/globalEvents'
|
||||
import { settings } from '~/logic'
|
||||
import type { FavoritesResult, Media as FavoriteItem } from '~/models/video/favorite'
|
||||
import type { FavoritesCategoryResult, List as CategoryItem } from '~/models/video/favoriteCategory'
|
||||
import api from '~/utils/api'
|
||||
import { getCSRF, getUserID, openLinkToNewTab, removeHttpFromUrl } from '~/utils/main'
|
||||
import emitter from '~/utils/mitt'
|
||||
|
||||
const { t } = useI18n()
|
||||
const api = useApiClient()
|
||||
|
||||
const favoriteCategories = reactive<CategoryItem[]>([])
|
||||
const favoriteResources = reactive<FavoriteItem[]>([])
|
||||
|
||||
@@ -2,17 +2,16 @@
|
||||
import { useDateFormat } from '@vueuse/core'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
|
||||
import { useApiClient } from '~/composables/api'
|
||||
import { useBewlyApp } from '~/composables/useAppProvider'
|
||||
import { settings } from '~/logic'
|
||||
import type { HistoryResult, List as HistoryItem } from '~/models/history/history'
|
||||
import { Business } from '~/models/history/history'
|
||||
import type { HistorySearchResult, List as HistorySearchItem } from '~/models/video/historySearch'
|
||||
import api from '~/utils/api'
|
||||
import { calcCurrentTime } from '~/utils/dataFormatter'
|
||||
import { getCSRF, removeHttpFromUrl } from '~/utils/main'
|
||||
|
||||
const { t } = useI18n()
|
||||
const api = useApiClient()
|
||||
const { openIframeDrawer } = useBewlyApp()
|
||||
|
||||
const isLoading = ref<boolean>()
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
<script setup lang="ts">
|
||||
import type { Ref } from 'vue'
|
||||
|
||||
import { useApiClient } from '~/composables/api'
|
||||
import { useBewlyApp } from '~/composables/useAppProvider'
|
||||
import type { GridLayout } from '~/logic'
|
||||
import type { DataItem as MomentItem, MomentResult } from '~/models/moment/moment'
|
||||
import api from '~/utils/api'
|
||||
|
||||
// https://github.com/starknt/BewlyBewly/blob/fad999c2e482095dc3840bb291af53d15ff44130/src/contentScripts/views/Home/components/ForYou.vue#L16
|
||||
interface VideoElement {
|
||||
@@ -29,8 +29,6 @@ const gridValue = computed((): string => {
|
||||
return '~ cols-1 gap-4'
|
||||
})
|
||||
|
||||
const api = useApiClient()
|
||||
|
||||
const videoList = ref<VideoElement[]>([])
|
||||
const isLoading = ref<boolean>(false)
|
||||
const needToLoginFirst = ref<boolean>(false)
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
import { onKeyStroke } from '@vueuse/core'
|
||||
import type { Ref } from 'vue'
|
||||
|
||||
import { useApiClient } from '~/composables/api'
|
||||
import { useBewlyApp } from '~/composables/useAppProvider'
|
||||
import { FilterType, useFilter } from '~/composables/useFilter'
|
||||
import { LanguageType } from '~/enums/appEnums'
|
||||
@@ -11,6 +10,7 @@ import { accessKey, settings } from '~/logic'
|
||||
import type { AppForYouResult, Item as AppVideoItem } from '~/models/video/appForYou'
|
||||
import { Type as ThreePointV2Type } from '~/models/video/appForYou'
|
||||
import type { forYouResult, Item as VideoItem } from '~/models/video/forYou'
|
||||
import api from '~/utils/api'
|
||||
import { TVAppKey } from '~/utils/authProvider'
|
||||
import { isVerticalVideo } from '~/utils/uriParse'
|
||||
|
||||
@@ -53,7 +53,6 @@ const gridValue = computed((): string => {
|
||||
return '~ cols-1 gap-4'
|
||||
})
|
||||
|
||||
const api = useApiClient()
|
||||
const videoList = ref<VideoElement[]>([])
|
||||
const appVideoList = ref<AppVideoElement[]>([])
|
||||
const isLoading = ref<boolean>(false)
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
<script setup lang="ts">
|
||||
import { useI18n } from 'vue-i18n'
|
||||
|
||||
import { useApiClient } from '~/composables/api'
|
||||
import { useBewlyApp } from '~/composables/useAppProvider'
|
||||
import { TOP_BAR_VISIBILITY_CHANGE } from '~/constants/globalEvents'
|
||||
import type { GridLayout } from '~/logic'
|
||||
import { settings } from '~/logic'
|
||||
import type { List as RankingVideoItem, RankingResult } from '~/models/video/ranking'
|
||||
import type { List as RankingPgcItem, RankingPgcResult } from '~/models/video/rankingPgc'
|
||||
import api from '~/utils/api'
|
||||
import emitter from '~/utils/mitt'
|
||||
|
||||
import type { RankingType } from '../types'
|
||||
@@ -22,7 +22,6 @@ const emit = defineEmits<{
|
||||
}>()
|
||||
|
||||
const { t } = useI18n()
|
||||
const api = useApiClient()
|
||||
const { handleBackToTop, handlePageRefresh } = useBewlyApp()
|
||||
|
||||
const gridValue = computed((): string => {
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
<script setup lang="ts">
|
||||
import type { Ref } from 'vue'
|
||||
|
||||
import { useApiClient } from '~/composables/api'
|
||||
import { useBewlyApp } from '~/composables/useAppProvider'
|
||||
import type { GridLayout } from '~/logic'
|
||||
import type { DataItem as MomentItem, MomentResult } from '~/models/moment/moment'
|
||||
import api from '~/utils/api'
|
||||
|
||||
// https://github.com/starknt/BewlyBewly/blob/fad999c2e482095dc3840bb291af53d15ff44130/src/contentScripts/views/Home/components/ForYou.vue#L16
|
||||
interface VideoElement {
|
||||
@@ -29,8 +29,6 @@ const gridValue = computed((): string => {
|
||||
return '~ cols-1 gap-4'
|
||||
})
|
||||
|
||||
const api = useApiClient()
|
||||
|
||||
const videoList = ref<VideoElement[]>([])
|
||||
const isLoading = ref<boolean>(false)
|
||||
const needToLoginFirst = ref<boolean>(false)
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
<script setup lang="ts">
|
||||
import type { Ref } from 'vue'
|
||||
|
||||
import { useApiClient } from '~/composables/api'
|
||||
import { useBewlyApp } from '~/composables/useAppProvider'
|
||||
import type { GridLayout } from '~/logic'
|
||||
import type { List as VideoItem, TrendingResult } from '~/models/video/trending'
|
||||
import api from '~/utils/api'
|
||||
|
||||
// https://github.com/starknt/BewlyBewly/blob/fad999c2e482095dc3840bb291af53d15ff44130/src/contentScripts/views/Home/components/ForYou.vue#L16
|
||||
interface VideoElement {
|
||||
@@ -28,7 +28,6 @@ const gridValue = computed((): string => {
|
||||
return '~ cols-1 xl:cols-2 gap-4'
|
||||
return '~ cols-1 gap-4'
|
||||
})
|
||||
const api = useApiClient()
|
||||
const videoList = ref<VideoElement[]>([])
|
||||
const isLoading = ref<boolean>(false)
|
||||
const containerRef = ref<HTMLElement>() as Ref<HTMLElement>
|
||||
|
||||
@@ -2,15 +2,14 @@
|
||||
import { useDateFormat } from '@vueuse/core'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
|
||||
import { useApiClient } from '~/composables/api'
|
||||
import { useBewlyApp } from '~/composables/useAppProvider'
|
||||
import { settings } from '~/logic'
|
||||
import type { List as VideoItem, WatchLaterResult } from '~/models/video/watchLater'
|
||||
import api from '~/utils/api'
|
||||
import { calcCurrentTime } from '~/utils/dataFormatter'
|
||||
import { getCSRF, openLinkToNewTab, removeHttpFromUrl } from '~/utils/main'
|
||||
|
||||
const { t } = useI18n()
|
||||
const api = useApiClient()
|
||||
const { openIframeDrawer } = useBewlyApp()
|
||||
|
||||
const isLoading = ref<boolean>()
|
||||
|
||||
Reference in New Issue
Block a user