fix: sync rules

This commit is contained in:
Gabe Yuan
2024-03-19 14:08:23 +08:00
parent fbc70e43e3
commit 9ee4c20250

View File

@@ -40,7 +40,7 @@ export default function Options() {
setError( setError(
`The version of the local script(v${version}) is not the latest version(v${process.env.REACT_APP_VERSION}). 本地脚本之版本(v${version})非最新版(v${process.env.REACT_APP_VERSION})。` `The version of the local script(v${version}) is not the latest version(v${process.env.REACT_APP_VERSION}). 本地脚本之版本(v${version})非最新版(v${process.env.REACT_APP_VERSION})。`
); );
break; return;
} }
if (eventName) { if (eventName) {
@@ -48,9 +48,6 @@ export default function Options() {
adaptScript(eventName); adaptScript(eventName);
} }
// 同步数据
await trySyncSettingAndRules();
setReady(true);
break; break;
} }
@@ -58,16 +55,16 @@ export default function Options() {
setError( setError(
"Time out. Please confirm whether to install or enable KISS Translator GreaseMonkey script? 连接超时,请检查是否安装或启用简约翻译油猴脚本。" "Time out. Please confirm whether to install or enable KISS Translator GreaseMonkey script? 连接超时,请检查是否安装或启用简约翻译油猴脚本。"
); );
break; return;
} }
await sleep(1000); await sleep(1000);
} }
} else {
// 同步数据
await trySyncSettingAndRules();
setReady(true);
} }
// 同步数据
await trySyncSettingAndRules();
setReady(true);
})(); })();
}, []); }, []);