diff --git a/src/components/RightSideButtons.vue b/src/components/RightSideButtons.vue new file mode 100644 index 00000000..58321258 --- /dev/null +++ b/src/components/RightSideButtons.vue @@ -0,0 +1,37 @@ + + + diff --git a/src/contentScripts/views/App.vue b/src/contentScripts/views/App.vue index fa04beb1..0dbbd5d0 100644 --- a/src/contentScripts/views/App.vue +++ b/src/contentScripts/views/App.vue @@ -29,16 +29,6 @@ const mainAppOpacity = ref(0) const showTopbarMask = ref(false) const dynamicComponentKey = ref(`dynamicComponent${Number(new Date())}`) -const tooltipPlacement = computed(() => { - if (settings.value.dockPosition === 'left') - return 'right' - else if (settings.value.dockPosition === 'right') - return 'left' - else if (settings.value.dockPosition === 'bottom') - return 'top' - return 'right' -}) - const isHomePage = computed(() => { if ( /https?:\/\/bilibili.com\/?$/.test(location.href) @@ -78,20 +68,6 @@ const isTopbarFixed = computed(() => { return true return false }) -const currentAppColorScheme = computed((): 'dark' | 'light' => { - if (settings.value.theme !== 'auto') - return settings.value.theme - else - return window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light' -}) - -// const isSearchPage = computed(() => { -// if ( -// /https?:\/\/search.bilibili.com\/.*$/.test(location.href) -// ) -// return true -// return false -// }) watch( () => activatedPage.value, @@ -243,13 +219,6 @@ function setAppAppearance() { } } -function toggleDark() { - if (currentAppColorScheme.value === 'light') - settings.value.theme = 'dark' - else - settings.value.theme = 'light' -} - function setAppThemeColor() { const bewlyElement = document.querySelector('#bewly') as HTMLElement if (bewlyElement) { @@ -349,24 +318,8 @@ function handleOsScroll() { id="main-app" ref="mainAppRef" class="bewly-wrapper" text="$bew-text-1" transition="opacity duration-300" overflow-y-hidden z-60 :style="{ opacity: 1, height: isHomePage ? '100vh' : '0' }" > - - - - + +