The student app's login page offers Microsoft 365 when the provider is configured, /auth/oauth/callback redeems the one-time code, a consent screen finishes a first sign-in, the profile attaches Microsoft through a link ticket, and the service worker leaves /oauth alone. The build also carries the summer presentation theme already committed in the frontend sources.
2 lines
3.1 KiB
JavaScript
2 lines
3.1 KiB
JavaScript
import{d as q,u as N,c as o,b as s,t as n,i as _,j as g,h as j,f as u,w as d,v as m,r as l,l as B,n as i,p as x,m as C}from"./index-DmTksCHf.js";import{f as I}from"./forms-X1As8WqF.js";const M={class:"auth"},h={key:0,class:"stack"},S={class:"notice",role:"status"},Z={key:0,class:"notice error",role:"alert",style:{"margin-bottom":"14px"}},A={class:"field"},D={key:0,class:"error-text"},E={class:"field"},P={key:0,class:"error-text"},R={class:"field"},T={key:0,class:"error-text"},H={class:"field"},K={key:0,class:"error-text"},W={class:"field"},F=["disabled"],G={class:"auth-links"},Q=q({__name:"RegisterView",setup(J){const V=N(),z=C(),v=l(""),f=l(""),w=l(""),c=l(""),y=l(""),p=l(!1),t=l(null),k=l("");async function U(){p.value=!0,t.value=null;try{const r=await V.register({name:v.value.trim(),surname:f.value.trim(),email:w.value.trim(),password:c.value,password_confirmation:y.value},!0);r.signedIn?await z.replace("/"):k.value=r.message||"Konto zostało utworzone. Sprawdź pocztę, aby je aktywować."}catch(r){t.value=I(r)}finally{p.value=!1}}return(r,e)=>{const b=B("router-link");return i(),o("div",M,[e[12]||(e[12]=s("header",{class:"page-head"},[s("span",{class:"eyebrow"},"BM II° · UWr"),s("h1",null,"Załóż konto")],-1)),k.value?(i(),o("div",h,[s("p",S,n(k.value),1),_(b,{class:"btn",to:"/logowanie"},{default:g(()=>[...e[5]||(e[5]=[x("Przejdź do logowania",-1)])]),_:1})])):(i(),o("form",{key:1,onSubmit:j(U,["prevent"]),novalidate:""},[t.value?.message?(i(),o("div",Z,n(t.value.message),1)):u("",!0),s("div",A,[e[6]||(e[6]=s("label",{for:"name"},"Imię",-1)),d(s("input",{id:"name","onUpdate:modelValue":e[0]||(e[0]=a=>v.value=a),type:"text",autocomplete:"given-name",required:""},null,512),[[m,v.value]]),t.value?.fields.name?(i(),o("p",D,n(t.value.fields.name),1)):u("",!0)]),s("div",E,[e[7]||(e[7]=s("label",{for:"surname"},"Nazwisko",-1)),d(s("input",{id:"surname","onUpdate:modelValue":e[1]||(e[1]=a=>f.value=a),type:"text",autocomplete:"family-name",required:""},null,512),[[m,f.value]]),t.value?.fields.surname?(i(),o("p",P,n(t.value.fields.surname),1)):u("",!0)]),s("div",R,[e[8]||(e[8]=s("label",{for:"email"},"Adres e-mail",-1)),d(s("input",{id:"email","onUpdate:modelValue":e[2]||(e[2]=a=>w.value=a),type:"email",autocomplete:"email",inputmode:"email",required:""},null,512),[[m,w.value]]),t.value?.fields.email?(i(),o("p",T,n(t.value.fields.email),1)):u("",!0)]),s("div",H,[e[9]||(e[9]=s("label",{for:"password"},"Hasło (min. 8 znaków)",-1)),d(s("input",{id:"password","onUpdate:modelValue":e[3]||(e[3]=a=>c.value=a),type:"password",autocomplete:"new-password",required:""},null,512),[[m,c.value]]),t.value?.fields.password?(i(),o("p",K,n(t.value.fields.password),1)):u("",!0)]),s("div",W,[e[10]||(e[10]=s("label",{for:"confirmation"},"Powtórz hasło",-1)),d(s("input",{id:"confirmation","onUpdate:modelValue":e[4]||(e[4]=a=>y.value=a),type:"password",autocomplete:"new-password",required:""},null,512),[[m,y.value]])]),s("button",{class:"btn primary block",type:"submit",disabled:p.value},n(p.value?"Zakładanie…":"Załóż konto"),9,F)],32)),s("div",G,[_(b,{to:"/logowanie"},{default:g(()=>[...e[11]||(e[11]=[x("Mam już konto",-1)])]),_:1})])])}}});export{Q as default};
|