mirror of
https://github.com/BewlyBewly/BewlyBewly.git
synced 2025-04-14 13:15:29 +00:00
refactor: move contents from the src/models/apiModels to parent directory
This commit is contained in:
@@ -3,9 +3,9 @@ import AnimeTimeTable from './components/AnimeTimeTable.vue'
|
||||
import { getUserID, openLinkToNewTab } from '~/utils/main'
|
||||
import { numFormatter } from '~/utils/dataFormatter'
|
||||
import emitter from '~/utils/mitt'
|
||||
import type { List as WatchListItem, WatchListResult } from '~/models/apiModels/anime/watchList'
|
||||
import type { List as PopularAnimeItem, PopularAnimeResult } from '~/models/apiModels/anime/popular'
|
||||
import type { ItemSubItem as RecommendationItem, RecommendationResult } from '~/models/apiModels/anime/recommendation'
|
||||
import type { List as WatchListItem, WatchListResult } from '~/models/anime/watchList'
|
||||
import type { List as PopularAnimeItem, PopularAnimeResult } from '~/models/anime/popular'
|
||||
import type { ItemSubItem as RecommendationItem, RecommendationResult } from '~/models/anime/recommendation'
|
||||
|
||||
const animeWatchList = reactive<WatchListItem[]>([])
|
||||
const recommendAnimeList = reactive<RecommendationItem[]>([])
|
||||
@@ -256,4 +256,3 @@ function getPopularAnimeList() {
|
||||
--at-apply: mb-8 mt-14 first:mt-0;
|
||||
}
|
||||
</style>
|
||||
~/models/apiModels/anime/watchList
|
||||
|
||||
@@ -4,8 +4,8 @@ import { getCSRF, getUserID, openLinkToNewTab, removeHttpFromUrl } from '~/utils
|
||||
import type { FavoriteCategory, FavoriteResource } from '~/components/Topbar/types'
|
||||
import emitter from '~/utils/mitt'
|
||||
import { settings } from '~/logic'
|
||||
import type { Media as FavoriteItem, FavoritesResult } from '~/models/apiModels/video/favorite'
|
||||
import type { List as CategoryItem, FavoritesCategoryResult } from '~/models/apiModels/video/favoriteCategory'
|
||||
import type { Media as FavoriteItem, FavoritesResult } from '~/models/video/favorite'
|
||||
import type { List as CategoryItem, FavoritesCategoryResult } from '~/models/video/favoriteCategory'
|
||||
|
||||
const { t } = useI18n()
|
||||
|
||||
|
||||
@@ -6,9 +6,9 @@ import { useI18n } from 'vue-i18n'
|
||||
import { getCSRF, openLinkToNewTab, removeHttpFromUrl } from '~/utils/main'
|
||||
import { calcCurrentTime } from '~/utils/dataFormatter'
|
||||
import emitter from '~/utils/mitt'
|
||||
import { Business } from '~/models/apiModels/video/history'
|
||||
import type { List as HistoryItem, HistoryResult } from '~/models/apiModels/video/history'
|
||||
import type { List as HistorySearchItem, HistorySearchResult } from '~/models/apiModels/video/historySearch'
|
||||
import { Business } from '~/models/video/history'
|
||||
import type { List as HistoryItem, HistoryResult } from '~/models/video/history'
|
||||
import type { List as HistorySearchItem, HistorySearchResult } from '~/models/video/historySearch'
|
||||
|
||||
const { t } = useI18n()
|
||||
|
||||
@@ -350,13 +350,6 @@ function jumpToLoginPage() {
|
||||
>
|
||||
Livestreaming
|
||||
</template>
|
||||
<template
|
||||
v-else-if="
|
||||
historyItem.history.business === HistoryBusiness.ARCHIVE
|
||||
"
|
||||
>
|
||||
Article
|
||||
</template>
|
||||
<template
|
||||
v-else-if="historyItem.history.business === HistoryBusiness.PGC"
|
||||
>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<script setup lang="ts">
|
||||
import type { Ref } from 'vue'
|
||||
import type { DataItem as MomentItem, MomentResult } from '~/models/apiModels/moment/moment'
|
||||
import type { DataItem as MomentItem, MomentResult } from '~/models/moment/moment'
|
||||
import emitter from '~/utils/mitt'
|
||||
|
||||
const videoList = reactive<MomentItem[]>([])
|
||||
@@ -124,4 +124,3 @@ function jumpToLoginPage() {
|
||||
|
||||
<style lang="scss" scoped>
|
||||
</style>
|
||||
~/models/apiModels/moment/momentResult
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<script setup lang="ts">
|
||||
import type { Ref } from 'vue'
|
||||
import type { AppForYouResult, Item as AppVideoItem } from '~/models/apiModels/video/appForYou'
|
||||
import type { Item as VideoItem, forYouResult } from '~/models/apiModels/video/forYou'
|
||||
import type { AppForYouResult, Item as AppVideoItem } from '~/models/video/appForYou'
|
||||
import type { Item as VideoItem, forYouResult } from '~/models/video/forYou'
|
||||
import emitter from '~/utils/mitt'
|
||||
import { accessKey, settings } from '~/logic'
|
||||
import { LanguageType } from '~/enums/appEnums'
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<script setup lang="ts">
|
||||
import { useI18n } from 'vue-i18n'
|
||||
import type { RankingType } from '../types'
|
||||
import type { RankingResult, List as RankingVideoItem } from '~/models/apiModels/video/ranking'
|
||||
import type { List as RankingPgcItem, RankingPgcResult } from '~/models/apiModels/video/rankingPgc'
|
||||
import type { RankingResult, List as RankingVideoItem } from '~/models/video/ranking'
|
||||
import type { List as RankingPgcItem, RankingPgcResult } from '~/models/video/rankingPgc'
|
||||
import { settings } from '~/logic'
|
||||
import emitter from '~/utils/mitt'
|
||||
|
||||
@@ -195,4 +195,3 @@ function getRankingPgc() {
|
||||
--at-apply: h-[calc(100vh-70)] translate-y--70px;
|
||||
}
|
||||
</style>
|
||||
~/models/apiModels/video/ranking
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<script setup lang="ts">
|
||||
import type { Ref } from 'vue'
|
||||
import type { DataItem as MomentItem, MomentResult } from '~/models/apiModels/moment/moment'
|
||||
import type { DataItem as MomentItem, MomentResult } from '~/models/moment/moment'
|
||||
import emitter from '~/utils/mitt'
|
||||
|
||||
const momentList = reactive<MomentItem[]>([])
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<script setup lang="ts">
|
||||
import type { Ref } from 'vue'
|
||||
import type { TrendingResult, List as VideoItem } from '~/models/apiModels/video/trending'
|
||||
import type { TrendingResult, List as VideoItem } from '~/models/video/trending'
|
||||
import emitter from '~/utils/mitt'
|
||||
|
||||
const videoList = reactive<VideoItem[]>([])
|
||||
@@ -97,4 +97,3 @@ async function getTrendingVideos() {
|
||||
|
||||
<style lang="scss" scoped>
|
||||
</style>
|
||||
~/models/apiModels/video/trendingResult
|
||||
|
||||
@@ -4,7 +4,7 @@ import { useI18n } from 'vue-i18n'
|
||||
import { getCSRF, openLinkToNewTab, removeHttpFromUrl } from '~/utils/main'
|
||||
import { calcCurrentTime } from '~/utils/dataFormatter'
|
||||
import emitter from '~/utils/mitt'
|
||||
import type { List as VideoItem, WatchLaterResult } from '~/models/apiModels/video/watchLater'
|
||||
import type { List as VideoItem, WatchLaterResult } from '~/models/video/watchLater'
|
||||
|
||||
const { t } = useI18n()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user