diff options
Diffstat (limited to 'frontend/pwmodal.ts')
-rw-r--r-- | frontend/pwmodal.ts | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/frontend/pwmodal.ts b/frontend/pwmodal.ts new file mode 100644 index 0000000..3d783c6 --- /dev/null +++ b/frontend/pwmodal.ts @@ -0,0 +1,23 @@ +import { e } from "./helper.ts" + +export let username: string | undefined = undefined; +export let password: string | undefined = undefined; + +export function pw_modal() { + const inp_name = e("input", {type: "text", placeholder: "Username"}) + const inp_pw = e("input", {type: "password", placeholder: "Password"}) + const login_btn = e("button", { + onclick: () => { + username = inp_name.value + password = inp_pw.value + } + }, "Login") + + return e("dialog", {}, + e("form", {method: "dialog"}, + inp_name, + inp_pw, + login_btn, + ) + ) +} |