Fix workflow detail (#3382)

* fix: loop node init

* fix: workflow detail

* fix: point table

* add null check
This commit is contained in:
Archer
2024-12-12 17:14:46 +08:00
committed by GitHub
parent 181b854342
commit ddddd998c8
34 changed files with 292 additions and 237 deletions

View File

@@ -43,14 +43,16 @@ export const useI18nLng = () => {
setLang(lang);
await i18n?.changeLanguage?.(lang);
if (prevLang && prevLang !== lang) {
if (!i18n.hasResourceBundle(lang, 'common') && prevLang !== lang) {
window?.location?.reload?.();
}
};
const setUserDefaultLng = () => {
const setUserDefaultLng = (forceGetDefaultLng: boolean = false) => {
if (!navigator || !localStorage) return;
if (getLang()) return onChangeLng(getLang() as string);
if (getLang() && !forceGetDefaultLng) return onChangeLng(getLang() as string);
const lang = languageMap[navigator.language] || 'en';