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,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>
|
||||
|
||||
Reference in New Issue
Block a user