Merge branch 'bugfixes' into refactor-lazy-components

This commit is contained in:
Hakadao
2024-01-28 02:03:50 +08:00
8 changed files with 19 additions and 10 deletions

View File

@@ -215,6 +215,7 @@ topbar:
live: 直播
articles: 专栏
uploaded: 上传了:
now_streaming: 正在直播:
live_status: 直播中
upload_dropdown:
article: 专栏

View File

@@ -218,6 +218,7 @@ topbar:
live: 直播
articles: 文章
uploaded: 上傳了:
now_streaming: 正在直播:
live_status: 直播中
upload_dropdown:
article: 上傳文章

View File

@@ -216,6 +216,7 @@ topbar:
live: Live
articles: Articles
uploaded: 'uploaded: '
now_streaming: 'now streaming: '
live_status: LIVE
upload_dropdown:
article: Article

View File

@@ -218,7 +218,8 @@ topbar:
live: 直播
articles: 文章
uploaded: po 咗:
live_status: 直播緊
now_streaming: 開緊 live
live_status: Live 緊
upload_dropdown:
article: 寫文
music: 擺音樂

View File

@@ -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

View File

@@ -325,7 +325,7 @@ function toggleWatchLater(aid: number) {
/>
<!-- empty -->
<empty
<Empty
v-if="!isLoading && moments.length === 0"
pos="absolute top-0 left-0"
bg="$bew-content-1"
@@ -338,7 +338,7 @@ function toggleWatchLater(aid: number) {
/>
<!-- moments -->
<transition-group name="list">
<TransitionGroup name="list">
<a
v-for="(moment, index) in moments"
:key="index"
@@ -386,7 +386,8 @@ function toggleWatchLater(aid: number) {
<div flex="~" justify="between" w="full">
<div>
<span>{{ `${moment.name} ${t('topbar.moments_dropdown.uploaded')}` }}</span>
<span v-if="selectedTab !== 1">{{ `${moment.name} ${t('topbar.moments_dropdown.uploaded')}` }}</span>
<span v-else>{{ `${moment.name} ${t('topbar.moments_dropdown.now_streaming')}` }}</span>
<div overflow-hidden text-ellipsis break-anywhere>
{{ moment.title }}
</div>
@@ -446,7 +447,7 @@ function toggleWatchLater(aid: number) {
</div>
</div>
</a>
</transition-group>
</TransitionGroup>
<!-- loading -->
<Transition name="fade">

View File

@@ -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

View File

@@ -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}`