2FAuth/public/build/assets/RequestReset-ow2Ty6yH.js.map
2024-11-27 12:03:02 +01:00

1 line
2.7 KiB
Plaintext

{"version":3,"file":"RequestReset-ow2Ty6yH.js","sources":["../../../resources/js/views/auth/RequestReset.vue"],"sourcesContent":["<script setup>\n import Form from '@/components/formElements/Form'\n import { useNotifyStore } from '@/stores/notify'\n\n const notify = useNotifyStore()\n const route = useRoute()\n\n const isWebauthnReset = route.name == 'webauthn.lost'\n\n const form = reactive(new Form({\n email: '',\n }))\n\n /**\n * Submits the reset request to the backend\n */\n function requestPasswordReset(e) {\n notify.clear()\n form.post(isWebauthnReset ? '/webauthn/lost' : '/user/password/lost', {returnError: true})\n .then(response => {\n notify.success({ text: response.data.message, duration:-1 })\n })\n .catch(error => {\n if( error.response.data.requestFailed ) {\n notify.alert({ text: error.response.data.requestFailed, duration:-1 })\n }\n else if( error.response.status !== 422 ) {\n notify.error(error)\n }\n })\n }\n\n onBeforeRouteLeave(() => {\n notify.clear()\n })\n</script>\n\n<template>\n <FormWrapper :title=\"$t(isWebauthnReset ? 'auth.webauthn.account_recovery' : 'auth.forms.reset_password')\" :punchline=\"$t(isWebauthnReset ? 'auth.webauthn.recovery_punchline' : 'auth.forms.reset_punchline')\">\n <form @submit.prevent=\"requestPasswordReset\" @keydown=\"form.onKeydown($event)\">\n <FormField v-model=\"form.email\" fieldName=\"email\" :fieldError=\"form.errors.get('email')\" label=\"auth.forms.email\" autofocus />\n <FormButtons\n :submitId=\"'btnSendResetPwd'\"\n :isBusy=\"form.isBusy\"\n :caption=\"$t(isWebauthnReset ? 'auth.webauthn.send_recovery_link' : 'auth.forms.send_password_reset_link')\"\n :showCancelButton=\"true\"\n cancelLandingView=\"login\" />\n </form>\n <VueFooter />\n </FormWrapper>\n</template>\n"],"names":["notify","useNotifyStore","isWebauthnReset","useRoute","form","reactive","Form","requestPasswordReset","e","response","error","onBeforeRouteLeave"],"mappings":"2RAII,MAAMA,EAASC,EAAc,EAGvBC,EAFQC,EAAQ,EAEQ,MAAQ,gBAEhCC,EAAOC,EAAS,IAAIC,EAAK,CAC3B,MAAO,EACf,CAAK,CAAC,EAKF,SAASC,EAAqBC,EAAG,CAC7BR,EAAO,MAAK,EACZI,EAAK,KAAKF,EAAkB,iBAAmB,sBAAuB,CAAC,YAAa,EAAI,CAAC,EACxF,KAAKO,GAAY,CACdT,EAAO,QAAQ,CAAE,KAAMS,EAAS,KAAK,QAAS,SAAS,EAAI,CAAA,CAC9D,CAAA,EACA,MAAMC,GAAS,CACRA,EAAM,SAAS,KAAK,cACpBV,EAAO,MAAM,CAAE,KAAMU,EAAM,SAAS,KAAK,cAAe,SAAS,EAAI,CAAA,EAEhEA,EAAM,SAAS,SAAW,KAC/BV,EAAO,MAAMU,CAAK,CAEzB,CAAA,CACT,CAEI,OAAAC,EAAmB,IAAM,CACrBX,EAAO,MAAK,CACf,CAAA"}