Skip to content

Commit

Permalink
Merge branch 'main' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
hakadao committed Apr 18, 2024
2 parents a28d1ef + bc95c48 commit 0e97808
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 4 deletions.
1 change: 1 addition & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
# The branch where the project source code resides
# 项目源代码所在的分支
- main
- dev
paths-ignore:
# Changes involving the following path files will not trigger the workflow
# 涉及以下路径文件的更改不会触发工作流
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,4 @@ jobs:
release-as: 0.16.5
signoff: 'github-actions <41898282+github-actions[bot]@users.noreply.github.com>'
changelog-types: '[{"type":"types","section":"Types","hidden":false},{"type":"revert","section":"Reverts","hidden":false},{"type":"feat","section":"Features","hidden":false},{"type":"fix","section":"Bug Fixes","hidden":false},{"type":"improvement","section":"Feature Improvements","hidden":false},{"type":"docs","section":"Docs","hidden":false},{"type":"i18n","section":"I18n","hidden":true},{"type":"style","section":"Style Changes","hidden":false},{"type":"ci","section":"CI","hidden":false},{"type":"chore","section":"Miscellaneous","hidden":true},{"type":"contributor","section":"New Contributors","hidden":false},{"type":"notice","section":"Notices","hidden":false}]'
default-branch: main
7 changes: 6 additions & 1 deletion src/components/TopBar/components/FavoritesPop.vue
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,10 @@ function changeCategory(categoryItem: FavoriteCategory) {
activatedFavoriteTitle.value = categoryItem.title
}
function isMusic(item: FavoriteResource) {
return item.link.includes('bilibili://music')
}
defineExpose({
refreshFavoriteResources,
})
Expand Down Expand Up @@ -224,7 +228,8 @@ defineExpose({
<a
v-for="item in favoriteResources"
:key="item.id"
:href="`//www.bilibili.com/video/${item.bvid}`" :target="isHomePage() ? '_blank' : '_self'" rel="noopener noreferrer"
:href="isMusic(item) ? `https://www.bilibili.com/audio/au${item.id}` : `//www.bilibili.com/video/${item.bvid}`"
:target="isHomePage() ? '_blank' : '_self'" rel="noopener noreferrer"
hover:bg="$bew-fill-2"
rounded="$bew-radius"
m="first:t-50px last:b-4" p="2"
Expand Down
11 changes: 8 additions & 3 deletions src/contentScripts/views/Favorites/Favorites.vue
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,8 @@ async function getFavoriteCategories() {
/**
* Get favorite video resources
* @param mediaId
* @param pageNum
* @param media_id
* @param pn
* @param keyword
*/
async function getFavoriteResources(
Expand Down Expand Up @@ -168,6 +168,10 @@ function handleUnfavorite(favoriteResource: FavoriteResource) {
favoriteResources.splice(favoriteResources.indexOf(favoriteResource as FavoriteItem), 1)
})
}
function isMusic(item: FavoriteResource) {
return item.link.includes('bilibili://music')
}
</script>

<template>
Expand Down Expand Up @@ -214,7 +218,8 @@ function handleUnfavorite(favoriteResource: FavoriteResource) {
:view="item.cnt_info.play"
:danmaku="item.cnt_info.danmaku"
:published-timestamp="item.pubtime"
:bvid="item.bvid"
:bvid="isMusic(item) ? undefined : item.bvid"
:uri="isMusic(item) ? `https://www.bilibili.com/audio/au${item.id}` : undefined"
group
>
<template #coverTopLeft>
Expand Down

0 comments on commit 0e97808

Please sign in to comment.