diff --git a/.eslintignore b/.eslintignore new file mode 100644 index 00000000..185c0ea2 --- /dev/null +++ b/.eslintignore @@ -0,0 +1,2 @@ +assets +scripts diff --git a/package.json b/package.json index e3d3b9fb..39b6f997 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "displayName": "BewlyBewly", "version": "0.14.3", "private": true, - "packageManager": "pnpm@8.14.1", + "packageManager": "pnpm@8.15.0", "description": "Just make a few small changes to your Bilibili homepage.", "homepage": "https://github.com/hakadao/BewlyBewly", "scripts": { diff --git a/src/_locales/cmn-CN.yml b/src/_locales/cmn-CN.yml index 21fc6fef..115b30d8 100644 --- a/src/_locales/cmn-CN.yml +++ b/src/_locales/cmn-CN.yml @@ -214,6 +214,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 e77cc172..5428ca1f 100644 --- a/src/_locales/cmn-TW.yml +++ b/src/_locales/cmn-TW.yml @@ -217,6 +217,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 be456657..788823ff 100644 --- a/src/_locales/en.yml +++ b/src/_locales/en.yml @@ -215,6 +215,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 f1d91580..28cfce2d 100644 --- a/src/_locales/jyut.yml +++ b/src/_locales/jyut.yml @@ -217,7 +217,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 fadd1747..15b25863 100644 --- a/src/contentScripts/views/History/History.vue +++ b/src/contentScripts/views/History/History.vue @@ -2,7 +2,6 @@ import { useDateFormat } from '@vueuse/core' import { useI18n } from 'vue-i18n' -// import type { HistoryItem } from './types' import { getCSRF, openLinkToNewTab, removeHttpFromUrl } from '~/utils/main' import { calcCurrentTime } from '~/utils/dataFormatter' import emitter from '~/utils/mitt' @@ -158,8 +157,10 @@ function getHistoryUrl(item: HistoryItem) { 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}`