mirror of
https://github.com/BewlyBewly/BewlyBewly.git
synced 2025-04-14 13:15:29 +00:00
feat: enable automatic wallpaper masking
if you had already set the wallpaper, it enables the wallpaper masking to prevent text hard to see
This commit is contained in:
@@ -25,9 +25,6 @@ const themeColorOptions = computed<Array<string>>(() => {
|
||||
'#fda4af',
|
||||
]
|
||||
})
|
||||
// const bilibiliEvolvedThemeColor = computed(() => {
|
||||
// return getComputedStyle(document.querySelector('html') as HTMLElement).getPropertyValue('--theme-color').trim() ?? '#00a1d6'
|
||||
// })
|
||||
const wallpapers = computed<Array<{ name: string, url: string, thumbnail: string }>>(() => {
|
||||
return [
|
||||
{
|
||||
@@ -74,6 +71,12 @@ function changeThemeColor(color: string) {
|
||||
}
|
||||
|
||||
function changeWallpaper(url: string) {
|
||||
// If you had already set the wallpaper, it enables the wallpaper masking to prevent text hard to see
|
||||
if (url)
|
||||
settings.value.enableWallpaperMasking = true
|
||||
else
|
||||
settings.value.enableWallpaperMasking = false
|
||||
|
||||
settings.value.wallpaper = url
|
||||
}
|
||||
</script>
|
||||
@@ -100,22 +103,6 @@ function changeWallpaper(url: string) {
|
||||
/>
|
||||
</div>
|
||||
</SettingsItem>
|
||||
<!-- <SettingsItem :title="$t('settings.follow_bilibili_evolved_color')" :desc="$t('settings.follow_bilibili_evolved_color_desc')">
|
||||
<div
|
||||
w-20px h-20px rounded-8 cursor-pointer transition
|
||||
duration-300 box-border
|
||||
:style="{
|
||||
background: bilibiliEvolvedThemeColor,
|
||||
transform: bilibiliEvolvedThemeColor === settings.themeColor ? 'scale(1.3)' : 'scale(1)',
|
||||
border: bilibiliEvolvedThemeColor === settings.themeColor ? '2px solid white' : '2px solid transparent',
|
||||
boxShadow: bilibiliEvolvedThemeColor === settings.themeColor ? '0 0 0 1px var(--bew-border-color), var(--bew-shadow-1)' : 'none',
|
||||
}"
|
||||
@click="changeThemeColor(bilibiliEvolvedThemeColor)"
|
||||
/>
|
||||
</SettingsItem> -->
|
||||
<!-- <SettingsItem :title="$t('settings.adapt_to_other_page_styles')" :desc="$t('settings.adapt_to_other_page_styles_desc')">
|
||||
<Radio v-model="settings.adaptToOtherPageStyles" />
|
||||
</SettingsItem> -->
|
||||
</SettingsItemGroup>
|
||||
|
||||
<SettingsItemGroup :title="$t('settings.group_wallpaper')">
|
||||
|
||||
@@ -77,7 +77,7 @@ export const settings = useStorageLocal('settings', ref<Settings>({
|
||||
searchPageWallpaperMode: 'buildIn',
|
||||
searchPageWallpaper: '',
|
||||
searchPageEnableWallpaperMasking: false,
|
||||
searchPageWallpaperMaskOpacity: 0,
|
||||
searchPageWallpaperMaskOpacity: 0.6,
|
||||
searchPageWallpaperBlurIntensity: 0,
|
||||
|
||||
recommendationMode: 'web',
|
||||
|
||||
Reference in New Issue
Block a user