diff --git a/src/contentScripts/views/Anime/Anime.vue b/src/contentScripts/views/Anime/Anime.vue
index b8c4f608..88e27b28 100644
--- a/src/contentScripts/views/Anime/Anime.vue
+++ b/src/contentScripts/views/Anime/Anime.vue
@@ -1,14 +1,15 @@
diff --git a/src/contentScripts/views/Anime/components/PopularAnimeCarousel.vue b/src/contentScripts/views/Anime/components/PopularAnimeCarousel.vue
deleted file mode 100644
index 3e6e81a3..00000000
--- a/src/contentScripts/views/Anime/components/PopularAnimeCarousel.vue
+++ /dev/null
@@ -1,105 +0,0 @@
-
-
-
-
-
-
-
-
-
-
- -
-
-
-
-
-
-
-
-
diff --git a/src/contentScripts/views/Anime/types.ts b/src/contentScripts/views/Anime/types.ts
deleted file mode 100644
index 89f231a9..00000000
--- a/src/contentScripts/views/Anime/types.ts
+++ /dev/null
@@ -1,90 +0,0 @@
-export interface PopularAnime {
- badge: '独家' | '会员抢先' | '会员专享' | '出品'
- badge_info: {
- bg_color: string
- bg_color_night: string
- text: string
- }
- badge_type: number
- copyright: string
- cover: string // 豎向封面
- new_ep: {
- cover: string
- index_show: string
- }
- rank: number // 排名
- rating: string // 評分
- season_id: number
- ss_horizontal_cover: string // 橫向封面
- stat: {
- danmaku: number // 彈幕
- follow: number // 訂閲
- series_follow: number // 當前系列訂閲???
- view: number // 觀看數
- }
- title: string
- url: string
-}
-
-export interface AnimeItem {
- cover: string
- horizontal_cover_16_9?: string
- episode_id: number
- evaluate: string
- hover: {
- img: string
- text: string[] // 番劇風格
- }
- link: string
- url: string
- rank_id: number
- rating: string
- rating_count: number
- report: object
- season_id: number
- season_type: number
- stat: {
- danmaku: number
- duration: number
- view: number
- series_follow: number
- }
- sub_title: string
- subtitle: string
- text: string[]
- title: string
- user_status: {
- follow: number
- }
- progress: string
- is_finish: 1 | 0 // 是否已經完結
- total_count: number // 當前集數
- styles: string[] // 番劇風格
- rank: number
-}
-
-// https://github.com/SocialSisterYi/bilibili-API-collect/blob/master/bangumi/timeline.md#%E8%8E%B7%E5%8F%96%E7%95%AA%E5%89%A7%E6%88%96%E5%BD%B1%E8%A7%86%E6%97%B6%E9%97%B4%E7%BA%BF
-export interface AnimeTimeTableItem {
- date: string
- date_ts: number
- day_of_week: number
- episodes: Array<{
- cover: string
- delay: number
- delay_id: number
- delay_index: string
- delay_reason: string
- ep_cover: string
- episode_id: number
- follows: string
- plays: string
- pub_index: string
- pub_time: string
- pub_ts: number
- published: number
- season_id: number
- square_cover: string
- title: string
- }>
- is_today: number
-}
diff --git a/src/contentScripts/views/Favorites/Favorites.vue b/src/contentScripts/views/Favorites/Favorites.vue
index 957c342d..698bae99 100644
--- a/src/contentScripts/views/Favorites/Favorites.vue
+++ b/src/contentScripts/views/Favorites/Favorites.vue
@@ -4,11 +4,13 @@ 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'
const { t } = useI18n()
-const favoriteCategories = reactive>([])
-const favoriteResources = reactive>([])
+const favoriteCategories = reactive([])
+const favoriteResources = reactive([])
const categoryOptions = reactive>([])
const selectedCategory = ref()
@@ -69,7 +71,7 @@ async function getFavoriteCategories() {
contentScriptQuery: 'getFavoriteCategories',
mid: getUserID(),
})
- .then((res) => {
+ .then((res: FavoritesCategoryResult) => {
if (res.code === 0) {
Object.assign(favoriteCategories, res.data.list)
@@ -99,7 +101,7 @@ async function getFavoriteResources(
isFullPageLoading.value = true
isLoading.value = true
try {
- const res = await browser.runtime
+ const res: FavoritesResult = await browser.runtime
.sendMessage({
contentScriptQuery: 'getFavoriteResources',
mediaId,
diff --git a/src/contentScripts/views/History/History.vue b/src/contentScripts/views/History/History.vue
index 20a0c57c..3e89e8ea 100644
--- a/src/contentScripts/views/History/History.vue
+++ b/src/contentScripts/views/History/History.vue
@@ -1,11 +1,14 @@