Commit 33a714b6 authored by Chunchi Che's avatar Chunchi Che

Merge branch 'fix/filter' into 'main'

修复组卡页筛选器不展示文本的问题

See merge request mycard/Neos!329
parents 6be2bb28 f20e1199
Pipeline #23667 passed with stages
in 14 minutes and 20 seconds
......@@ -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