From d7f74a3a8a9815cc357e2cd3ec833004103b1522 Mon Sep 17 00:00:00 2001 From: jxxghp Date: Mon, 18 May 2026 11:20:58 +0800 Subject: [PATCH] feat: implement dynamic accent color extraction and styling for UI cards with standardized shadow removal --- src/components/cards/CustomRuleCard.vue | 11 +- src/components/cards/DirectoryCard.vue | 157 +++++++++++++++++- src/components/cards/DownloaderCard.vue | 8 +- src/components/cards/FilterRuleGroupCard.vue | 11 +- src/components/cards/MediaServerCard.vue | 11 +- .../cards/NotificationChannelCard.vue | 11 +- src/components/cards/StorageCard.vue | 21 ++- src/composables/useCardAccentColor.ts | 38 +++++ src/styles/common.scss | 101 ++++++++++- src/styles/themes/transparent.scss | 13 ++ .../setting/AccountSettingNotification.vue | 70 ++------ 11 files changed, 379 insertions(+), 73 deletions(-) create mode 100644 src/composables/useCardAccentColor.ts diff --git a/src/components/cards/CustomRuleCard.vue b/src/components/cards/CustomRuleCard.vue index 9a0ba55e..3eec3a34 100644 --- a/src/components/cards/CustomRuleCard.vue +++ b/src/components/cards/CustomRuleCard.vue @@ -2,8 +2,10 @@ import type { CustomRule } from '@/api/types' import filter_svg from '@images/svg/filter.svg' import { openSharedDialog } from '@/composables/useSharedDialog' +import { useCardAccentColor } from '@/composables/useCardAccentColor' const CustomRuleInfoDialog = defineAsyncComponent(() => import('@/components/dialog/CustomRuleInfoDialog.vue')) +const { accentRgb, imageRef, updateAccentColor } = useCardAccentColor('#8A8D93') // 输入参数 const props = defineProps({ @@ -45,7 +47,12 @@ function onClose() {