From c17a5ea4e12cd074e894fce0769a9919fb9f4ca2 Mon Sep 17 00:00:00 2001 From: Cano1997 <1978141412@qq.com> Date: Fri, 17 Oct 2025 20:09:35 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=B8=BB=E9=A2=98=E9=80=82=E9=85=8D?= =?UTF-8?q?=E5=A4=9A=E4=B8=BB=E9=A2=98=E6=8F=92=E4=BB=B6=EF=BC=8C=E5=B9=B6?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=88=B0=E8=87=AA=E5=AE=9A=E4=B9=89=E4=B8=BB?= =?UTF-8?q?=E9=A2=98=E5=88=97=E8=A1=A8=E4=B8=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 4 ++++ src/web-app/guard/auth-guard/auth-guard.ts | 14 ++++++++++---- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index da079c2d3..4575a9c33 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ ## [Unreleased] +### Changed + +- 主题适配多主题插件,并添加到自定义主题列表中 + ## [0.7.41-alpha.32] - 2025-10-16 ### Added diff --git a/src/web-app/guard/auth-guard/auth-guard.ts b/src/web-app/guard/auth-guard/auth-guard.ts index ed7278984..1ec8cfeb5 100644 --- a/src/web-app/guard/auth-guard/auth-guard.ts +++ b/src/web-app/guard/auth-guard/auth-guard.ts @@ -322,8 +322,11 @@ export class AuthGuard { ); }); if (colorThemes.length > 0) { - const colorTheme = colorThemes[0]; - await ibiz.util.theme.loadTheme(colorTheme); + for (let index = 0; index < colorThemes.length; index++) { + const colorTheme = colorThemes[index]; + // eslint-disable-next-line no-await-in-loop + await ibiz.util.theme.loadTheme(colorTheme); + } } // 加载图标主题 const iconThemes = uiThemes.filter(uiTheme => { @@ -332,8 +335,11 @@ export class AuthGuard { ); }); if (iconThemes.length > 0) { - const iconTheme = iconThemes[0]; - await ibiz.util.theme.loadTheme(iconTheme, 'ICON'); + for (let index = 0; index < iconThemes.length; index++) { + const iconTheme = iconThemes[index]; + // eslint-disable-next-line no-await-in-loop + await ibiz.util.theme.loadTheme(iconTheme, 'ICON'); + } } } } -- Gitee