chore: pnpm version upgrade and add eslintigore rule

This commit is contained in:
MengNianxiaoyao
2024-01-28 12:42:20 +08:00
parent f9701b09b3
commit db2320eee0
10 changed files with 22 additions and 10 deletions

2
.eslintignore Normal file
View File

@@ -0,0 +1,2 @@
assets
scripts

View File

@@ -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": {

View File

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

View File

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

View File

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

View File

@@ -217,7 +217,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,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}`