From 4666d4fa07b165115e2e0a58ab86bedbb4883802 Mon Sep 17 00:00:00 2001 From: Ryan Wang Date: Thu, 22 Dec 2022 12:16:30 +0800 Subject: [PATCH] fix: activated theme not loaded after initialization (#790) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit #### 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 没有加载已激活主题的问题。 ``` --- src/views/system/Setup.vue | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/views/system/Setup.vue b/src/views/system/Setup.vue index fb4281b7..5e87ef46 100644 --- a/src/views/system/Setup.vue +++ b/src/views/system/Setup.vue @@ -18,6 +18,7 @@ import type { SinglePageRequest, Tag, } from "@halo-dev/api-client"; +import { useThemeStore } from "@/stores/theme"; const router = useRouter(); @@ -98,6 +99,8 @@ const handleSubmit = async () => { const systemStateStore = useSystemStatesStore(); await systemStateStore.fetchSystemStates(); + const themeStore = useThemeStore(); + await themeStore.fetchActivatedTheme(); router.push({ name: "Dashboard" });