feat(projects): support set global redius

This commit is contained in:
CyberShen123
2025-10-03 07:55:06 +08:00
parent 3b0ace3868
commit 21efca5194
7 changed files with 9 additions and 3 deletions

View File

@@ -14,6 +14,7 @@ type ThemePreset = Pick<
| 'colourWeakness'
| 'recommendColor'
| 'themeColor'
| 'themeRadius'
| 'otherColor'
| 'isInfoFollowPrimary'
| 'layout'

View File

@@ -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;

View File

@@ -14,6 +14,7 @@
"warning": "#d4bb9d",
"error": "#c49a9a"
},
"themeRadius": 8,
"isInfoFollowPrimary": true,
"layout": {
"mode": "vertical-mix",

View File

@@ -14,6 +14,7 @@
"warning": "#faad14",
"error": "#f5222d"
},
"themeRadius": 8,
"isInfoFollowPrimary": true,
"layout": {
"mode": "vertical",

View File

@@ -14,6 +14,7 @@
"warning": "#faad14",
"error": "#f5222d"
},
"themeRadius": 8,
"isInfoFollowPrimary": true,
"layout": {
"mode": "vertical",

View File

@@ -14,6 +14,7 @@
"warning": "#faad14",
"error": "#f5222d"
},
"themeRadius": 8,
"isInfoFollowPrimary": true,
"layout": {
"mode": "vertical",

View File

@@ -85,7 +85,7 @@ function getGradientColor(color: CardData['color']) {
<!-- define component start: GradientBg -->
<DefineGradientBg v-slot="{ $slots, gradientColor }">
<div
class="rd-8px px-16px pb-4px pt-8px text-white"
class="px-16px pb-4px pt-8px text-white"
:style="{ backgroundImage: gradientColor, borderRadius: themeStore.themeRadius + 'px' }"
>
<component :is="$slots.default" />