Files
miriamgemeinde/public/js/493.e95b30f4.js

2 lines
2.5 KiB
JavaScript

"use strict";(self["webpackChunkmiriamgemeinde"]=self["webpackChunkmiriamgemeinde"]||[]).push([[493],{5493:function(e,i,a){a.r(i),a.d(i,{default:function(){return L}});var s=a(641),t=a(3751),o=a(33);const l=e=>((0,s.Qi)("data-v-63b3c0a3"),e=e(),(0,s.jt)(),e),r={class:"register"},n=l((()=>(0,s.Lk)("h2",null,"Registrieren",-1))),d=l((()=>(0,s.Lk)("label",{for:"name"},"Name:",-1))),g=l((()=>(0,s.Lk)("label",{for:"email"},"Email-Adresse:",-1))),u=l((()=>(0,s.Lk)("label",{for:"password"},"Passwort:",-1))),m=l((()=>(0,s.Lk)("button",{type:"submit"},"Registrieren",-1))),p={key:0,class:"dialog"},c={class:"dialog-content"};function h(e,i,a,l,h,k){const b=(0,s.g2)("router-link");return(0,s.uX)(),(0,s.CE)("div",r,[n,(0,s.Lk)("form",{onSubmit:i[3]||(i[3]=(0,t.D$)(((...e)=>k.register&&k.register(...e)),["prevent"]))},[d,(0,s.bo)((0,s.Lk)("input",{type:"text",id:"name","onUpdate:modelValue":i[0]||(i[0]=e=>h.name=e),required:""},null,512),[[t.Jo,h.name]]),g,(0,s.bo)((0,s.Lk)("input",{type:"email",id:"email","onUpdate:modelValue":i[1]||(i[1]=e=>h.email=e),required:""},null,512),[[t.Jo,h.email]]),u,(0,s.bo)((0,s.Lk)("input",{type:"password",id:"password","onUpdate:modelValue":i[2]||(i[2]=e=>h.password=e),required:""},null,512),[[t.Jo,h.password]]),m],32),(0,s.Lk)("p",null,[(0,s.bF)(b,{to:"/login"},{default:(0,s.k6)((()=>[(0,s.eW)("Login")])),_:1})]),(0,s.Lk)("p",null,[(0,s.bF)(b,{to:"/forgot-password"},{default:(0,s.k6)((()=>[(0,s.eW)("Passwort vergessen?")])),_:1})]),h.dialogVisible?((0,s.uX)(),(0,s.CE)("div",p,[(0,s.Lk)("div",c,[(0,s.Lk)("h3",null,(0,o.v_)(h.dialogTitle),1),(0,s.Lk)("p",null,(0,o.v_)(h.dialogMessage),1),(0,s.Lk)("button",{type:"button",onClick:i[4]||(i[4]=(...e)=>k.closeDialog&&k.closeDialog(...e))},"Schließen")])])):(0,s.Q3)("",!0)])}var k=a(6296),b={name:"RegisterComponent",components:{},data(){return{name:"",email:"",password:"",dialogTitle:"",dialogMessage:"",dialogVisible:!1}},methods:{async register(){try{const e=await k.A.post("/auth/register",{name:this.name,email:this.email,password:this.password});this.showDialog("Registrierung erfolgreich",e.data?.message||"Ihr Konto wurde erfolgreich erstellt."),this.name="",this.email="",this.password=""}catch(e){const i=e?.response?.data?.message||e?.message||"Ein unbekannter Fehler ist aufgetreten";this.showDialog("Fehler",i)}},showDialog(e,i){this.dialogTitle=e,this.dialogMessage=i,this.dialogVisible=!0},closeDialog(){this.dialogVisible=!1}}},w=a(6262);const f=(0,w.A)(b,[["render",h],["__scopeId","data-v-63b3c0a3"]]);var L=f}}]);
//# sourceMappingURL=493.e95b30f4.js.map