Fix: perf being shit
This commit is contained in:
parent
dcbde420a4
commit
b38dcc09aa
1 changed files with 1 additions and 3 deletions
|
|
@ -59,6 +59,7 @@ const t = useTranslations(lang);
|
||||||
const omnibox = document.getElementById("omnibox") as HTMLDivElement;
|
const omnibox = document.getElementById("omnibox") as HTMLDivElement;
|
||||||
let epoxyClientOptions: any = null;
|
let epoxyClientOptions: any = null;
|
||||||
let epoxyClient: any = null;
|
let epoxyClient: any = null;
|
||||||
|
await initEpoxy(); //This ONLY runs once
|
||||||
input?.addEventListener("keypress", function (event: any) {
|
input?.addEventListener("keypress", function (event: any) {
|
||||||
if (event.key === "Enter") {
|
if (event.key === "Enter") {
|
||||||
initSw().then(() => {
|
initSw().then(() => {
|
||||||
|
|
@ -68,15 +69,12 @@ const t = useTranslations(lang);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
input?.addEventListener("input", async function() {
|
input?.addEventListener("input", async function() {
|
||||||
console.log("EA");
|
|
||||||
await initEpoxy(); //This ONLY runs once
|
|
||||||
if (!epoxyClient) {
|
if (!epoxyClient) {
|
||||||
console.debug("Creating epoxy client");
|
console.debug("Creating epoxy client");
|
||||||
epoxyClientOptions = new EpoxyClientOptions();
|
epoxyClientOptions = new EpoxyClientOptions();
|
||||||
epoxyClient = new EpoxyClient(wispUrl, epoxyClientOptions);
|
epoxyClient = new EpoxyClient(wispUrl, epoxyClientOptions);
|
||||||
}
|
}
|
||||||
const value = input?.value;
|
const value = input?.value;
|
||||||
console.log(value);
|
|
||||||
input.classList.remove("rounded-b-2xl");
|
input.classList.remove("rounded-b-2xl");
|
||||||
omnibox.classList.remove("hidden");
|
omnibox.classList.remove("hidden");
|
||||||
if (value.length === 0) {
|
if (value.length === 0) {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue