mirror of https://github.com/halo-dev/halo-admin
fix: activated theme not loaded after initialization (#790)
#### What type of PR is this? /kind bug #### What this PR does / why we need it: 修复首次初始化之后,Console 没有加载已激活主题的问题。 #### Which issue(s) this PR fixes: Fixes https://github.com/halo-dev/halo/issues/3018 #### Special notes for your reviewer: 测试方式: 1. 使用全新的环境 2. 参考 https://docs.halo.run/developer-guide/core/build 构建可执行 JAR。 3. 运行 Halo,初始化之后检查 Console 主题页面是否已经加载了已经激活的主题。 #### Does this PR introduce a user-facing change? ```release-note 修复首次初始化之后,Console 没有加载已激活主题的问题。 ```pull/789/head^2
parent
a396aad87f
commit
4666d4fa07
|
@ -18,6 +18,7 @@ import type {
|
||||||
SinglePageRequest,
|
SinglePageRequest,
|
||||||
Tag,
|
Tag,
|
||||||
} from "@halo-dev/api-client";
|
} from "@halo-dev/api-client";
|
||||||
|
import { useThemeStore } from "@/stores/theme";
|
||||||
|
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
|
||||||
|
@ -98,6 +99,8 @@ const handleSubmit = async () => {
|
||||||
|
|
||||||
const systemStateStore = useSystemStatesStore();
|
const systemStateStore = useSystemStatesStore();
|
||||||
await systemStateStore.fetchSystemStates();
|
await systemStateStore.fetchSystemStates();
|
||||||
|
const themeStore = useThemeStore();
|
||||||
|
await themeStore.fetchActivatedTheme();
|
||||||
|
|
||||||
router.push({ name: "Dashboard" });
|
router.push({ name: "Dashboard" });
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue