[release-2.0] fix: activated theme not loaded after initialization (#793)

This is an automated cherry-pick of #790

/assign ruibaby

```release-note
修复首次初始化之后,Console 没有加载已激活主题的问题。
```
pull/808/head
Halo Dev Bot 2 years ago committed by GitHub
parent 8433dcbff1
commit c2f9b73a8d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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" });
} catch (error) {

Loading…
Cancel
Save