mirror of
https://github.com/patarapolw/cjdic2.git
synced 2026-11-09 17:39:35 +00:00
build for Android
This commit is contained in:
1 parent
047054f8f7
commit
cf1880c2b3
14 files changed
+56
-194
No files matched your search
@@ -45,7 +45,25 @@ function LoadingDialog() {
|
||||
if (isInit.current) return;
|
||||
isInit.current = true;
|
||||
|
||||
downloadAssets();
|
||||
// empty query warmup
|
||||
// no need to await
|
||||
invoke("search_yomitan", {
|
||||
qTerm: "",
|
||||
qReading: "",
|
||||
limit: 1,
|
||||
offset: 0,
|
||||
});
|
||||
|
||||
document.body.style.pointerEvents = "none";
|
||||
downloadAssets().finally(() => {
|
||||
document.body.style.pointerEvents = "";
|
||||
const elFirstInput = document.querySelector(
|
||||
'input[type="text"]',
|
||||
) as HTMLInputElement;
|
||||
if (elFirstInput) {
|
||||
elFirstInput.focus();
|
||||
}
|
||||
});
|
||||
async function downloadAssets(lang = "ja") {
|
||||
const dicts: YomitanDictEntry[] = [];
|
||||
|
||||
@@ -88,14 +106,6 @@ function LoadingDialog() {
|
||||
|
||||
await invoke("init_yomitan", { dicts, lang });
|
||||
setMessages([]);
|
||||
|
||||
// empty query warmup
|
||||
await invoke("search_yomitan", {
|
||||
qTerm: "",
|
||||
qReading: "",
|
||||
limit: 1,
|
||||
offset: 0,
|
||||
});
|
||||
}
|
||||
|
||||
listen<LoadYomitanZipDirResult>("load-yomitan-dir", ({ payload }) => {
|
||||
|
||||
Reference in new issue
Block a user