feat: add config for adapting to other page styles

This commit is contained in:
Hakadao
2023-09-30 14:28:18 +08:00
parent 43b8cd6685
commit 09986179de
24 changed files with 2029 additions and 2007 deletions

View File

@@ -151,6 +151,10 @@ watch(() => activatedPage.value, (newValue, oldValue) => {
setAppWallpaperMaskingOpacity()
})
watch(() => settings.value.adaptToOtherPageStyles, () => {
handleAdaptToOtherPageStylesChange()
})
onMounted(() => {
nextTick(() => {
setTimeout(() => {
@@ -195,6 +199,7 @@ onMounted(() => {
setAppLanguage()
setAppThemeColor()
setAppWallpaperMaskingOpacity()
handleAdaptToOtherPageStylesChange()
})
function handleChangeAccessKey() {
@@ -306,6 +311,13 @@ function handleRefresh() {
function handleBackToTop() {
smoothScrollToTop(mainAppRef.value, 300)
}
function handleAdaptToOtherPageStylesChange() {
if (settings.value.adaptToOtherPageStyles)
document.documentElement.classList.add('bewly-design')
else
document.documentElement.classList.remove('bewly-design')
}
</script>
<template>