FitTrackee/fittrackee/dist/static/js/reset.518e646f.js

2 lines
25 KiB
JavaScript
Raw Normal View History

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["reset"],{"0395":function(t,e,n){"use strict";var r=n("1da1"),c=(n("caad"),n("96cf"),n("7a23")),o=n("6c02"),a=n("dad5"),i=n("2906"),s={id:"user-auth-form"},u={id:"user-form"},l={class:"form-items"},d=["disabled","placeholder"],f=["disabled","placeholder"],p=["disabled","placeholder"],h=["disabled","placeholder"],b=["disabled"],O={key:1},j=Object(c["createTextVNode"])(" - "),v={key:2},m={class:"account"},g=Object(c["defineComponent"])({props:{action:null,token:{default:""}},setup:function(t){var e=t,n=Object(o["c"])(),g=Object(i["a"])(),y=Object(c["toRefs"])(e),w=y.action,E=Object(c["reactive"])({username:"",email:"",password:"",password_conf:""}),k=Object(c["computed"])((function(){return R(e.action)})),S=Object(c["computed"])((function(){return g.getters[a["b"].GETTERS.ERROR_MESSAGES]})),_=Object(c["computed"])((function(){return g.getters[a["b"].GETTERS.APP_CONFIG]})),x=Object(c["computed"])((function(){return"register"===e.action&&!_.value.is_registration_enabled})),N=Object(c["ref"])(!1);function R(t){switch(t){case"reset-request":case"reset":return"buttons.SUBMIT";default:return"buttons.".concat(e.action.toUpperCase())}}function T(){N.value=!0}function V(t){switch(t){case"reset":return e.token?g.dispatch(a["a"].ACTIONS.RESET_USER_PASSWORD,{password:E.password,password_conf:E.password_conf,token:e.token}):g.commit(a["b"].MUTATIONS.SET_ERROR_MESSAGES,"user.INVALID_TOKEN");case"reset-request":return g.dispatch(a["a"].ACTIONS.SEND_PASSWORD_RESET_REQUEST,{email:E.email});default:g.dispatch(a["a"].ACTIONS.LOGIN_OR_REGISTER,{actionType:t,formData:E,redirectUrl:n.query.from})}}function C(){E.username="",E.email="",E.password="",E.password_conf=""}return Object(c["watch"])((function(){return n.path}),Object(r["a"])(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:g.commit(a["b"].MUTATIONS.EMPTY_ERROR_MESSAGES),N.value=!1,C();case 3:case"end":return t.stop()}}),t)})))),function(t,e){var n=Object(c["resolveComponent"])("AlertMessage"),r=Object(c["resolveComponent"])("router-link"),o=Object(c["resolveComponent"])("ErrorMessage");return Object(c["openBlock"])(),Object(c["createElementBlock"])("div",s,[Object(c["createElementVNode"])("div",u,[Object(c["createElementVNode"])("div",{class:Object(c["normalizeClass"])(["form-box",{disabled:Object(c["unref"])(x)}])},[Object(c["unref"])(x)?(Object(c["openBlock"])(),Object(c["createBlock"])(n,{key:0,message:"user.REGISTER_DISABLED"})):Object(c["createCommentVNode"])("",!0),Object(c["createElementVNode"])("form",{class:Object(c["normalizeClass"])({errors:N.value}),onSubmit:e[4]||(e[4]=Object(c["withModifiers"])((function(t){return V(Object(c["unref"])(w))}),["prevent"]))},[Object(c["createElementVNode"])("div",l,["register"===Object(c["unref"])(w)?Object(c["withDirectives"])((Object(c["openBlock"])(),Object(c["createElementBlock"])("input",{key:0,id:"username",disabled:Object(c["unref"])(x),required:"",onInvalid:T,"onUpdate:modelValue":e[0]||(e[0]=function(t){return Object(c["unref"])(E).username=t}),placeholder:t.$t("user.USERNAME")},null,40,d)),[[c["vModelText"],Object(c["unref"])(E).username]]):Object(c["createCommentVNode"])("",!0),"reset"!==Object(c["unref"])(w)?Object(c["withDirectives"])((Object(c["openBlock"])(),Object(c["createElementBlock"])("input",{key:1,id:"email",disabled:Object(c["unref"])(x),required:"",onInvalid:T,type:"email","onUpdate:modelValue":e[1]||(e[1]=function(t){return Object(c["unref"])(E).email=t}),placeholder:"reset-request"===Object(c["unref"])(w)?t.$t("user.ENTER_EMAIL"):t.$t("user.EMAIL")},null,40,f)),[[c["vModelText"],Object(c["unref"])(E).email]]):Object(c["createCommentVNode"])("",!0),"reset-request"!==Object(c["unref"])(w)?Object(c["withDirectives"])((Object(c["openBlock"])(),Object(c["createElementBlock"])("input",{key:2,id:"password",disabled:Object(c["unref"])(x),required:"",onInvalid:T,type:"password","onUpdate:modelValue":e[2]||(e[2]=function(t){return Object(c["unref"])(E).password=t}),placeholder:"reset"===Object(c["
//# sourceMappingURL=reset.518e646f.js.map