diff --git a/src/_locales/cmn-CN.yml b/src/_locales/cmn-CN.yml index f2e5a59d..fa4049cd 100644 --- a/src/_locales/cmn-CN.yml +++ b/src/_locales/cmn-CN.yml @@ -215,6 +215,7 @@ topbar: live: 直播 articles: 专栏 uploaded: 上传了: + now_streaming: 正在直播: live_status: 直播中 upload_dropdown: article: 专栏 diff --git a/src/_locales/cmn-TW.yml b/src/_locales/cmn-TW.yml index fb346986..011b2ae0 100644 --- a/src/_locales/cmn-TW.yml +++ b/src/_locales/cmn-TW.yml @@ -218,6 +218,7 @@ topbar: live: 直播 articles: 文章 uploaded: 上傳了: + now_streaming: 正在直播: live_status: 直播中 upload_dropdown: article: 上傳文章 diff --git a/src/_locales/en.yml b/src/_locales/en.yml index a0c60f19..d6b8d1c1 100644 --- a/src/_locales/en.yml +++ b/src/_locales/en.yml @@ -216,6 +216,7 @@ topbar: live: Live articles: Articles uploaded: 'uploaded: ' + now_streaming: 'now streaming: ' live_status: LIVE upload_dropdown: article: Article diff --git a/src/_locales/jyut.yml b/src/_locales/jyut.yml index 20087e04..af83c8c9 100644 --- a/src/_locales/jyut.yml +++ b/src/_locales/jyut.yml @@ -218,7 +218,8 @@ topbar: live: 直播 articles: 文章 uploaded: po 咗: - live_status: 直播緊 + now_streaming: 開緊 live: + live_status: Live 緊 upload_dropdown: article: 寫文 music: 擺音樂 diff --git a/src/components/TopBar/components/HistoryPop.vue b/src/components/TopBar/components/HistoryPop.vue index f196a27a..d33f2c3b 100644 --- a/src/components/TopBar/components/HistoryPop.vue +++ b/src/components/TopBar/components/HistoryPop.vue @@ -114,7 +114,9 @@ function getHistoryUrl(item: HistoryItem) { // Video if (activatedTab.value === 0) { if (item.history.business === HistoryType.PGC) - return item.uri + return removeHttpFromUrl(item.uri) + if (item.history.business === HistoryType.Archive && item?.videos && item.videos > 0) + return `//www.bilibili.com/video/${item.history.bvid}?p=${item.history.page}` return `//www.bilibili.com/video/${item.history.bvid}` } // Live diff --git a/src/components/TopBar/components/MomentsPop.vue b/src/components/TopBar/components/MomentsPop.vue index 2ffbfeb7..42128575 100644 --- a/src/components/TopBar/components/MomentsPop.vue +++ b/src/components/TopBar/components/MomentsPop.vue @@ -325,7 +325,7 @@ function toggleWatchLater(aid: number) { /> - - +
- {{ `${moment.name} ${t('topbar.moments_dropdown.uploaded')}` }} + {{ `${moment.name} ${t('topbar.moments_dropdown.uploaded')}` }} + {{ `${moment.name} ${t('topbar.moments_dropdown.now_streaming')}` }}
{{ moment.title }}
@@ -446,7 +447,7 @@ function toggleWatchLater(aid: number) {
-
+ diff --git a/src/components/TopBar/types.ts b/src/components/TopBar/types.ts index 07617036..27b6a6a8 100644 --- a/src/components/TopBar/types.ts +++ b/src/components/TopBar/types.ts @@ -93,9 +93,11 @@ export interface HistoryItem { epid?: number bvid?: string part?: string + page?: number oid: number cid: number } + videos?: number author_name: string author_face: string author_mid: string diff --git a/src/contentScripts/views/History/History.vue b/src/contentScripts/views/History/History.vue index 13fad48d..141a1a10 100644 --- a/src/contentScripts/views/History/History.vue +++ b/src/contentScripts/views/History/History.vue @@ -2,8 +2,6 @@ import { useDateFormat } from '@vueuse/core' import { useI18n } from 'vue-i18n' -// import type { HistoryItem } from './types' -import type { Ref } from 'vue' import { getCSRF, openLinkToNewTab, removeHttpFromUrl } from '~/utils/main' import { calcCurrentTime } from '~/utils/dataFormatter' import { Business } from '~/models/video/history' @@ -158,8 +156,10 @@ function getHistoryUrl(item: HistoryItem): string { return removeHttpFromUrl(item.uri) } // video - else if (item.history.business === 'archive') { - return removeHttpFromUrl(item.history.bvid) + else if (item.history.business === Business.ARCHIVE) { + if (item?.videos && item.videos > 0) + return `//www.bilibili.com/video/${item.history.bvid}?p=${item.history.page}` + return item.history.bvid } else if (item.history.business === 'live') { return `//live.bilibili.com/${item.history.oid}`