From c89d1b554f8b05a78b515c0ddd78e72324efe62c Mon Sep 17 00:00:00 2001 From: keven1024 Date: Sat, 23 May 2026 22:19:51 +0800 Subject: [PATCH] feat(config): add site_enable_bg property to app configuration and update layout to conditionally render background image --- front/composables/useMyAppConfig.ts | 1 + front/layouts/default.vue | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/front/composables/useMyAppConfig.ts b/front/composables/useMyAppConfig.ts index 11607fe..1a5054d 100644 --- a/front/composables/useMyAppConfig.ts +++ b/front/composables/useMyAppConfig.ts @@ -6,6 +6,7 @@ const useMyAppConfig = () => { site_url: string site_icon: string site_bg_url: string + site_enable_bg: boolean version: string build_time: number features: string[] diff --git a/front/layouts/default.vue b/front/layouts/default.vue index 58483a4..df634e9 100644 --- a/front/layouts/default.vue +++ b/front/layouts/default.vue @@ -4,13 +4,16 @@ const { locale } = useI18n() await useSeo({ locale: locale.value }) const appConfig = useMyAppConfig() const bgUrl = computed(() => appConfig.value?.site_bg_url) +const enableBg = computed(() => appConfig.value?.site_enable_bg ?? true)