aboutsummaryrefslogtreecommitdiffstats
path: root/src/scripts/common
diff options
context:
space:
mode:
Diffstat (limited to 'src/scripts/common')
-rw-r--r--src/scripts/common/login/form-caching.ts22
-rw-r--r--src/scripts/common/login/index.ts1
2 files changed, 22 insertions, 1 deletions
diff --git a/src/scripts/common/login/form-caching.ts b/src/scripts/common/login/form-caching.ts
new file mode 100644
index 0000000..bde6442
--- /dev/null
+++ b/src/scripts/common/login/form-caching.ts
@@ -0,0 +1,22 @@
+import { addPostListener, addPostResponder, JQueryAjaxResponse } from "@/shared/intercept-jquery-ajax";
+
+let loginAreaHTML: string | null = null;
+
+addPostResponder(
+ "viewLoginAreaAction",
+ function(_args): JQueryAjaxResponse | undefined | null {
+ return loginAreaHTML
+ ? {
+ data: loginAreaHTML
+ }
+ : null;
+ }
+);
+
+addPostListener(
+ "viewLoginAreaAction",
+ function(_args, result): void {
+ loginAreaHTML = result.data?.toString() ?? "";
+ },
+ false
+);
diff --git a/src/scripts/common/login/index.ts b/src/scripts/common/login/index.ts
deleted file mode 100644
index 95b9c5b..0000000
--- a/src/scripts/common/login/index.ts
+++ /dev/null
@@ -1 +0,0 @@
-import "@/scripts/common/login/captcha";