fix(ui): safelist settings entry icons (#2050)

This commit is contained in:
Ryanba
2026-07-13 11:34:20 +08:00
committed by GitHub
parent 88983a1611
commit 563a738c88
2 changed files with 39 additions and 0 deletions
+15
View File
@@ -66,6 +66,20 @@ export function safelistAllPrimaryBackgrounds(): string[] {
}).flat()
}
export function safelistSettingsEntryIcons(): string[] {
return [
'i-solar:emoji-funny-square-bold-duotone',
'i-solar:people-nearby-bold-duotone',
'i-solar:leaf-bold-duotone',
'i-solar:armchair-2-bold-duotone',
'i-solar:database-bold-duotone',
'i-solar:wi-fi-router-bold-duotone',
'i-solar:layers-bold-duotone',
'i-solar:box-minimalistic-bold-duotone',
'i-solar:filters-bold-duotone',
]
}
export function presetWebFontsFonts(provider: 'fontsource' | 'none'): Record<string, string | WebFontMeta | (string | WebFontMeta)[]> {
return {
'sans': {
@@ -155,6 +169,7 @@ export function sharedUnoConfig() {
safelist: [
...'prose prose-sm m-auto text-left'.split(' '),
...safelistAllPrimaryBackgrounds(),
...safelistSettingsEntryIcons(),
],
// hyoban/unocss-preset-shadcn: Use shadcn ui with UnoCSS
// https://github.com/hyoban/unocss-preset-shadcn