mirror of
https://github.com/BewlyBewly/BewlyBewly.git
synced 2025-04-14 13:15:29 +00:00
feat: hide the search bar on search page (#57)
This commit is contained in:
@@ -42,6 +42,12 @@ const isVideoPage = computed(() => {
|
||||
return false
|
||||
})
|
||||
|
||||
const isSearchPage = computed(() => {
|
||||
if (/https?:\/\/search.bilibili.com\/.*$/.test(location.href))
|
||||
return true
|
||||
return false
|
||||
})
|
||||
|
||||
const isTopbarFixed = computed(() => {
|
||||
if (
|
||||
// home page
|
||||
@@ -275,6 +281,7 @@ provide('activatedPage', activatedPage)
|
||||
v-if="settings.isShowTopbar && !isHomePage"
|
||||
pos="top-0 left-0" z-9999 w-full
|
||||
:style="{ position: isTopbarFixed ? 'fixed' : 'absolute' }"
|
||||
:show-search-bar="!isSearchPage"
|
||||
/>
|
||||
<Topbar
|
||||
v-else-if="settings.isShowTopbar && isHomePage"
|
||||
|
||||
Reference in New Issue
Block a user