(window.webpackJsonp=window.webpackJsonp||[]).push([[51],{565:function(e,r,o){"use strict";o.r(r);var t=o(3),c=(o(17),o(30),{name:"Recover",asyncData:e=>Object(t.a)((function*(){var{params:r,$axios:o}=e,code=r.code;try{return{user:yield o.$post("/user/check_recover_code",{recover_code:code}),code:code}}catch(e){return{user:!1}}}))(),data:()=>({new_password:""}),methods:{change_password(){var e=this;return Object(t.a)((function*(){try{yield e.$axios.$post("/user/recover_password",{recover_code:e.code,password:e.new_password}),e.$root.$message("common.password_updated",{color:"success"}),e.$router.replace("/login")}catch(r){e.$root.$message(r,{color:"warning"})}}))()}}}),n=o(6),component=Object(n.a)(c,(function(){var e=this,r=e.$createElement,o=e._self._c||r;return o("v-container",[o("v-row",{staticClass:"mt-5",attrs:{align:"center",justify:"center"}},[o("v-col",{attrs:{cols:"12",md:"6",lg:"5",xl:"4"}},[o("v-card",[o("v-card-title",[e._v(e._s(e.$t("common.set_password")))]),e.user?[o("v-card-subtitle",[e._v(e._s(e.user.email))]),o("v-card-text",[o("v-form",[o("v-text-field",{attrs:{type:"password",label:e.$t("common.new_password"),rules:e.$validators.password,autofocus:""},model:{value:e.new_password,callback:function(r){e.new_password=r},expression:"new_password"}})],1)],1),o("v-card-actions",[o("v-spacer"),o("v-btn",{attrs:{text:"",color:"primary",disabled:!e.new_password},on:{click:e.change_password}},[e._v(e._s(e.$t("common.send")))])],1)]:o("v-card-text",[o("v-alert",{staticClass:"ma-5",attrs:{type:"error"}},[e._v(e._s(e.$t("recover.not_valid_code")))])],1)],2)],1)],1)],1)}),[],!1,null,null,null);r.default=component.exports}}]);