Merge branch 'main' into dev

This commit is contained in:
Hakadao
2024-03-03 18:43:17 -03:00
4 changed files with 21 additions and 8 deletions

View File

@@ -134,8 +134,8 @@ async function getFavoriteResources(
async function changeCategory(categoryItem: FavoriteCategory) {
currentPageNum.value = 1
selectedCategory.value = categoryItem
noMoreContent.value = false
favoriteResources.length = 0
noMoreContent.value = false
getFavoriteResources(categoryItem.id, 1)
}

View File

@@ -9,7 +9,7 @@ import { delay } from '~/utils/main'
const { t } = useI18n()
const { handleBackToTop } = useBewlyApp()
const { handleBackToTop, scrollbarRef } = useBewlyApp()
const activatedPage = ref<HomeSubPage>(HomeSubPage.ForYou)
const pages = {
@@ -84,11 +84,24 @@ onMounted(() => {
// This feature is primarily designed to compatible with the Bilibili Evolved's top bar
// Even when the BewlyBewly top bar is hidden, the Bilibili Evolved top bar still exists, so not moving up
if (settings.value.autoHideTopBar && settings.value.showTopBar) {
if (val)
shouldMoveTabsUp.value = false
if (!settings.value.useSearchPageModeOnHomePage) {
if (val)
shouldMoveTabsUp.value = false
else
shouldMoveTabsUp.value = true
else
shouldMoveTabsUp.value = true
}
else {
// fix #349
const osInstance = scrollbarRef.value?.osInstance()
const scrollTop = osInstance.elements().viewport.scrollTop as number
if (val)
shouldMoveTabsUp.value = false
else if (scrollTop > 510 + 40)
shouldMoveTabsUp.value = true
}
}
})

View File

@@ -116,7 +116,7 @@ function jumpToLoginPage() {
<a
v-for="(item, index) in watchLaterList"
:key="item.aid"
:href="`https://www.bilibili.com/video/${item.bvid}`" target="_blank" rel="noopener noreferrer"
:href="`https://www.bilibili.com/list/watchlater?bvid=${item.bvid}`" target="_blank" rel="noopener noreferrer"
class="group"
block flex cursor-pointer
>