feat: add setting to fix wallpaper in search page mode

This commit is contained in:
Hakadao
2023-10-16 18:38:45 +08:00
parent 12e623eae0
commit d0c1bfacdf
8 changed files with 12 additions and 1 deletions

View File

@@ -115,6 +115,7 @@ settings:
use_search_page_mode: 首页使用搜索页模式
settings_shared_with_the_search_page: 与搜索页共用的配置
settings_shared_with_the_search_page_desc: 这些设置都与搜索页共用
search_page_mode_wallpaper_fixed: 将搜索页模式的壁纸固定
auth:
err_tip: 授权 access key 失败

View File

@@ -115,6 +115,7 @@ settings:
use_search_page_mode: 首頁使用搜尋頁模式
settings_shared_with_the_search_page: 與搜尋頁共用的設定
settings_shared_with_the_search_page_desc: 這些設定都與搜尋頁共用
search_page_mode_wallpaper_fixed: 將搜尋頁模式的背景固定
auth:
err_tip: 無法授權 access key

View File

@@ -116,6 +116,7 @@ settings:
use_search_page_mode: Use search page mode on homepage
settings_shared_with_the_search_page: Settings shared with the search page
settings_shared_with_the_search_page_desc: Those settings are used in common with the search page
search_page_mode_wallpaper_fixed: Make the wallpaper of the search page mode fixed
auth:
err_tip: Failed to grant access key

View File

@@ -115,6 +115,7 @@ settings:
use_search_page_mode: 主頁使用搵嘢頁模式
settings_shared_with_the_search_page: 同搵嘢頁共用嘅設定
settings_shared_with_the_search_page_desc: 呢啲設定都同搵嘢頁共用
search_page_mode_wallpaper_fixed: 定住搵嘢頁模式嘅背景
auth:
err_tip: 無法授權 access key

View File

@@ -106,12 +106,16 @@ function handleCloseSearchPageModeSharedSettings() {
@close="handleCloseSearchPageModeSharedSettings"
>
<template #desc>
<span color="$bew-warning-color">{{ $t('settings.settings_shared_with_the_search_page_desc') }}</span>
<span color="$bew-warning-color">{{ $t('settings.search_page_mode_wallpaper_fixed') }}</span>
</template>
<SearchPage />
</ChildSettingsDialog>
</SettingsItem>
<SettingsItem :title="$t('settings.settings_shared_with_the_search_page')">
<Radio v-model="settings.searchPageModeWallpaperFixed" />
</SettingsItem>
</SettingsItemGroup>
</div>
</template>

View File

@@ -59,6 +59,7 @@ onUnmounted(() => {
pos="absolute left-0 top-0" w-full h-580px mb--580px bg="cover center" z-1
:style="{
backgroundImage: `url(${settings.searchPageWallpaper})`,
backgroundAttachment: settings.searchPageModeWallpaperFixed ? 'fixed' : 'unset'
}"
/>
<!-- background mask -->

View File

@@ -37,4 +37,5 @@ export const settings = useStorageLocal('settings', ref<Settings>({
recommendationMode: 'web',
useSearchPageModeOnHomePage: false,
searchPageModeWallpaperFixed: true,
}), { mergeDefaults: true })

View File

@@ -32,4 +32,5 @@ export interface Settings {
recommendationMode: 'web' | 'app'
useSearchPageModeOnHomePage: boolean
searchPageModeWallpaperFixed: boolean
}