From 3549c4dbd53f35c5ef99c8a060efaccfbb1c4b9c Mon Sep 17 00:00:00 2001 From: CyberShen123 Date: Fri, 3 Oct 2025 07:55:06 +0800 Subject: [PATCH] feat(projects): support set global redius --- .../theme-drawer/modules/preset/modules/theme-preset.vue | 1 + src/store/modules/theme/shared.ts | 5 +++-- src/theme/preset/azir.json | 1 + src/theme/preset/compact.json | 1 + src/theme/preset/dark.json | 1 + src/theme/preset/default.json | 1 + src/views/home/modules/card-data.vue | 2 +- 7 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/layouts/modules/theme-drawer/modules/preset/modules/theme-preset.vue b/src/layouts/modules/theme-drawer/modules/preset/modules/theme-preset.vue index f31ea220..9248b396 100644 --- a/src/layouts/modules/theme-drawer/modules/preset/modules/theme-preset.vue +++ b/src/layouts/modules/theme-drawer/modules/preset/modules/theme-preset.vue @@ -14,6 +14,7 @@ type ThemePreset = Pick< | 'colourWeakness' | 'recommendColor' | 'themeColor' + | 'themeRadius' | 'otherColor' | 'isInfoFollowPrimary' | 'layout' diff --git a/src/store/modules/theme/shared.ts b/src/store/modules/theme/shared.ts index 02bf9384..82931719 100644 --- a/src/store/modules/theme/shared.ts +++ b/src/store/modules/theme/shared.ts @@ -236,8 +236,9 @@ function getNaiveThemeColors(colors: App.Theme.ThemeColor, recommended = false) /** * Get naive theme * - * @param colors Theme colors - * @param [recommended=false] Use recommended color. Default is `false` + * @param settings Theme settings object. + * @param settings.recommendColor Whether to use recommended color palette. + * @param settings.themeRadius Border radius to use in the theme (in px). */ export function getNaiveTheme(colors: App.Theme.ThemeColor, settings: App.Theme.ThemeSetting) { const { primary: colorLoading } = colors; diff --git a/src/theme/preset/azir.json b/src/theme/preset/azir.json index a30625ec..3b3d34b5 100644 --- a/src/theme/preset/azir.json +++ b/src/theme/preset/azir.json @@ -14,6 +14,7 @@ "warning": "#d4bb9d", "error": "#c49a9a" }, + "themeRadius": 8, "isInfoFollowPrimary": true, "layout": { "mode": "vertical-mix", diff --git a/src/theme/preset/compact.json b/src/theme/preset/compact.json index 46fc6628..99dd4751 100644 --- a/src/theme/preset/compact.json +++ b/src/theme/preset/compact.json @@ -14,6 +14,7 @@ "warning": "#faad14", "error": "#f5222d" }, + "themeRadius": 8, "isInfoFollowPrimary": true, "layout": { "mode": "vertical", diff --git a/src/theme/preset/dark.json b/src/theme/preset/dark.json index 367bba97..832f5902 100644 --- a/src/theme/preset/dark.json +++ b/src/theme/preset/dark.json @@ -14,6 +14,7 @@ "warning": "#faad14", "error": "#f5222d" }, + "themeRadius": 8, "isInfoFollowPrimary": true, "layout": { "mode": "vertical", diff --git a/src/theme/preset/default.json b/src/theme/preset/default.json index bcf97db8..69181e23 100644 --- a/src/theme/preset/default.json +++ b/src/theme/preset/default.json @@ -14,6 +14,7 @@ "warning": "#faad14", "error": "#f5222d" }, + "themeRadius": 8, "isInfoFollowPrimary": true, "layout": { "mode": "vertical", diff --git a/src/views/home/modules/card-data.vue b/src/views/home/modules/card-data.vue index 7b802d88..f1ff6d6f 100644 --- a/src/views/home/modules/card-data.vue +++ b/src/views/home/modules/card-data.vue @@ -85,7 +85,7 @@ function getGradientColor(color: CardData['color']) {