update
This commit is contained in:
1
frontend/build/_app/immutable/nodes/2.AqEHOJb6.js
Normal file
1
frontend/build/_app/immutable/nodes/2.AqEHOJb6.js
Normal file
@@ -0,0 +1 @@
|
||||
import{f as w,a as d}from"../chunks/wrmqo5Xl.js";import{i as P}from"../chunks/FF6OmFSc.js";import{w as S,x as t,y as q,z as r,A as o,B as i,C as v,D as g,F as b,G as B}from"../chunks/a9_IrBSG.js";import{e as O,s as T}from"../chunks/CMb69aT-.js";import{i as j}from"../chunks/DhE1ouZL.js";import{r as h}from"../chunks/LnFm25i4.js";import{b as _,A as z}from"../chunks/BePdLpFV.js";import{g as D}from"../chunks/B0dV4Hxy.js";var E=w('<p class="error svelte-1uha8ag"> </p>'),F=w('<form class="login svelte-1uha8ag"><h2>Login</h2> <label class="svelte-1uha8ag">User <input type="text" required/></label> <label class="svelte-1uha8ag">Password <input type="password" required/></label> <button>Login</button> <!></form>');function M(y,x){S(x,!1);let s=v(""),e=v({username:"",password:""});async function A(){try{const a=await fetch(`${z}/login`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify(t(e))});if(!a.ok){b(s,await a.text());return}D("/shadowrun")}catch(a){b(s,a.message)}}P();var n=F(),l=r(o(n),2),u=r(o(l));h(u),i(l);var p=r(l,2),f=r(o(p));h(f),i(p);var c=r(p,2),k=r(c,2);{var C=a=>{var m=E(),L=o(m,!0);i(m),B(()=>T(L,t(s))),d(a,m)};j(k,a=>{t(s)&&a(C)})}i(n),_(u,()=>t(e).username,a=>g(e,t(e).username=a)),_(f,()=>t(e).password,a=>g(e,t(e).password=a)),O("click",c,A),d(y,n),q()}export{M as component};
|
||||
Reference in New Issue
Block a user