mirror of
https://github.com/patarapolw/cjdic2.git
synced 2026-11-08 17:35:18 +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 }) => {
|
||||
|
||||
@@ -215,6 +215,7 @@ function SearchPage() {
|
||||
<InputGroup endElement={clearButton}>
|
||||
<Input
|
||||
id="greet-input"
|
||||
type="text"
|
||||
ref={searchboxRef}
|
||||
value={q}
|
||||
onChange={(e) => onSearchboxChange(e.currentTarget.value)}
|
||||
|
||||
Reference in new issue
Block a user