Commit f20e1199 authored by Chunchi Che's avatar Chunchi Che

fix filter in BuildDeck

parent 6be2bb28
......@@ -70,6 +70,13 @@ export const loader: LoaderFunction = async () => {
});
}
// 最后,等待I18N文案的加载
if (!initStore.i18n) {
await new Promise<void>((rs) => {
subscribeKey(initStore, "i18n", (done) => done && rs());
});
}
return null;
};
......
......@@ -24,6 +24,7 @@ import {
handleSSOLogin,
initDeck,
initForbidden,
initI18N,
initSqlite,
initWASM,
} from "./utils";
......@@ -36,6 +37,7 @@ export const loader: LoaderFunction = async () => {
initSqlite();
initWASM();
initForbidden();
initI18N();
return null;
};
......
import rustInit from "rust-src";
import { CookieKeys, forbidden, getCookie, setCookie } from "@/api";
import {
CookieKeys,
forbidden,
getCookie,
initStrings,
setCookie,
} from "@/api";
import { useConfig } from "@/config";
import { useEnv } from "@/hook";
import sqliteMiddleWare, { sqliteCmd } from "@/middleware/sqlite";
......@@ -49,6 +55,14 @@ export const initForbidden = async () => {
}
};
/** 加载I18N文案 */
export const initI18N = async () => {
if (!initStore.i18n) {
await initStrings();
initStore.i18n = true;
}
};
/** sso登录跳转回来 */
export const handleSSOLogin = async (search: string) => {
/** 从SSO跳转回的URL之中,解析用户信息 */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment