new build
This commit is contained in:
1
frontend/build/_app/immutable/nodes/2.B8Ctw_Lt.js
Normal file
1
frontend/build/_app/immutable/nodes/2.B8Ctw_Lt.js
Normal file
@@ -0,0 +1 @@
|
||||
import{f as w,a as d}from"../chunks/CSHBicSK.js";import{i as P}from"../chunks/cSLH0kY1.js";import{u as S,v as t,w as q,x as r,y as o,z as i,A as v,B as g,C as b,D as B}from"../chunks/DvA19Lby.js";import{e as O,s as T}from"../chunks/DZOPhXt6.js";import{i as j}from"../chunks/BwmlK8l3.js";import{r as h}from"../chunks/C7arfCkg.js";import{b as _,A as z}from"../chunks/BxUMJXpY.js";import{g as D}from"../chunks/6QStQzpW.js";var E=w('<p class="error svelte-1uha8ag"> </p>'),I=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=I(),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