@ozdao/prometheus-framework 0.1.82 → 0.1.84
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/node_modules/vue-draggable-next/dist/vue-draggable-next.esm-bundler.cjs +4 -4
- package/dist/node_modules/vue-draggable-next/dist/vue-draggable-next.esm-bundler.js +3 -3
- package/dist/prometheus-framework/node_modules/@capacitor/core/dist/index.cjs +1 -1
- package/dist/prometheus-framework/node_modules/@capacitor/core/dist/index.js +22 -22
- package/dist/prometheus-framework/node_modules/@vuepic/vue-datepicker/dist/vue-datepicker.cjs +1 -1
- package/dist/prometheus-framework/node_modules/@vuepic/vue-datepicker/dist/vue-datepicker.js +2981 -2804
- package/dist/prometheus-framework/node_modules/date-fns/esm/getQuarter/index.cjs +1 -0
- package/dist/prometheus-framework/node_modules/date-fns/esm/getQuarter/index.js +10 -0
- package/dist/prometheus-framework/node_modules/libphonenumber-js/es6/helpers/getNumberType.cjs +2 -2
- package/dist/prometheus-framework/node_modules/libphonenumber-js/es6/helpers/getNumberType.js +26 -26
- package/dist/prometheus-framework/node_modules/libphonenumber-js/es6/helpers/isObject.cjs +1 -0
- package/dist/prometheus-framework/node_modules/libphonenumber-js/es6/helpers/isObject.js +7 -0
- package/dist/prometheus-framework/node_modules/libphonenumber-js/es6/metadata.cjs +1 -1
- package/dist/prometheus-framework/node_modules/libphonenumber-js/es6/metadata.js +28 -29
- package/dist/prometheus-framework/node_modules/libphonenumber-js/es6/normalizeArguments.cjs +2 -2
- package/dist/prometheus-framework/node_modules/libphonenumber-js/es6/normalizeArguments.js +55 -65
- package/dist/prometheus-framework/node_modules/libphonenumber-js/metadata.min.json.cjs +1 -1
- package/dist/prometheus-framework/node_modules/libphonenumber-js/metadata.min.json.js +1 -1
- package/dist/prometheus-framework/src/components/Address/Address.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Address/Address.vue.js +23 -23
- package/dist/prometheus-framework/src/components/Breadcrumbs/Breadcrumbs.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Breadcrumbs/Breadcrumbs.vue2.js +31 -31
- package/dist/prometheus-framework/src/components/Button/Button.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Button/Button.vue.js +2 -224
- package/dist/prometheus-framework/src/components/Button/Button.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Button/Button.vue2.js +224 -2
- package/dist/prometheus-framework/src/components/Checkbox/Checkbox.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Checkbox/Checkbox.vue.js +22 -22
- package/dist/prometheus-framework/src/components/DatePicker/DatePicker.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/DatePicker/DatePicker.vue.js +18 -18
- package/dist/prometheus-framework/src/components/EditImages/EditImages.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/EditImages/EditImages.vue.js +24 -24
- package/dist/prometheus-framework/src/components/Field/Field.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Field/Field.vue.js +2 -76
- package/dist/prometheus-framework/src/components/Field/Field.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Field/Field.vue2.js +76 -2
- package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.js +31 -30
- package/dist/prometheus-framework/src/components/FieldPhone/FieldPhone.vue.js +1 -1
- package/dist/prometheus-framework/src/components/FieldTags/BlockTags.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/FieldTags/BlockTags.vue.js +20 -20
- package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue.js +33 -33
- package/dist/prometheus-framework/src/components/Popup/Popup.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Popup/Popup.vue.js +21 -21
- package/dist/prometheus-framework/src/components/Select/Select.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Select/Select.vue.js +2 -78
- package/dist/prometheus-framework/src/components/Select/Select.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Select/Select.vue2.js +78 -2
- package/dist/prometheus-framework/src/components/Tab/Tab.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Tab/Tab.vue.js +2 -44
- package/dist/prometheus-framework/src/components/Tab/Tab.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Tab/Tab.vue2.js +44 -2
- package/dist/prometheus-framework/src/components/Text/Text.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Text/Text.vue.js +11 -11
- package/dist/prometheus-framework/src/components/Upload/Upload.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Upload/Upload.vue.js +27 -27
- package/dist/prometheus-framework/src/components/UploadImage/UploadImage.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/UploadImage/UploadImage.vue.js +18 -18
- package/dist/prometheus-framework/src/components/UploadImageMultiple/UploadImageMultiple.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/UploadImageMultiple/UploadImageMultiple.vue.js +17 -17
- package/dist/prometheus-framework/src/modules/auth/components/layouts/Auth.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/layouts/Auth.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/auth/components/pages/EnterCode.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/EnterCode.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/EnterPassword.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/EnterPassword.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/auth/components/pages/ResetPassword.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/ResetPassword.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.js +44 -43
- package/dist/prometheus-framework/src/modules/auth/components/pages/SignUp.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/SignUp.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/auth/store/auth.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/store/auth.js +65 -96
- package/dist/prometheus-framework/src/modules/community/components/blocks/CardBlogpost.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/blocks/CardBlogpost.vue.js +24 -24
- package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Audio.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Audio.vue.js +19 -19
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Bullets.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Bullets.vue.js +16 -16
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Caption.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Caption.vue.js +13 -13
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Embed.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Embed.vue.js +16 -16
- package/dist/prometheus-framework/src/modules/constructor/components/elements/H2.vue.cjs +3 -3
- package/dist/prometheus-framework/src/modules/constructor/components/elements/H2.vue.js +30 -30
- package/dist/prometheus-framework/src/modules/constructor/components/elements/ImageUpload.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/constructor/components/elements/ImageUpload.vue.js +22 -22
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.cjs +1 -4
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.js +2 -62
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.cjs +4 -1
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.js +62 -2
- package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.js +56 -56
- package/dist/prometheus-framework/src/modules/events/components/blocks/CardEvent.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/blocks/CardEvent.vue.js +44 -43
- package/dist/prometheus-framework/src/modules/events/components/elements/ButtonJoin.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/elements/ButtonJoin.vue.js +15 -15
- package/dist/prometheus-framework/src/modules/events/components/layouts/layoutEvents.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/layouts/layoutEvents.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js +13 -13
- package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.js +51 -53
- package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.js +59 -61
- package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/Contacts.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/Contacts.vue.js +22 -22
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.js +25 -25
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/EditArray.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/EditArray.vue.js +9 -9
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/Socials.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/Socials.vue.js +23 -23
- package/dist/prometheus-framework/src/modules/organizations/components/elements/ButtonToggleMembership.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/elements/ButtonToggleMembership.vue.js +11 -11
- package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +4 -4
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.js +4 -4
- package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js +4 -4
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Organizations.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Organizations.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/organizations/components/sections/FeedDepartments.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/FeedDepartments.vue.js +19 -19
- package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersList.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersList.vue.js +30 -30
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.js +4 -4
- package/dist/prometheus-framework/src/modules/products/components/sections/FilterProducts.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/FilterProducts.vue.js +24 -24
- package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/spots/components/sections/Feed.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/spots/components/sections/Feed.vue.js +21 -21
- package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/users/components/pages/ProfileBlogposts.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/ProfileBlogposts.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEvents.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEvents.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/ProfileOrganizations.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/ProfileOrganizations.vue.js +1 -1
- package/dist/prometheus-framework.cjs.js +27 -27
- package/dist/prometheus-framework.es.js +1949 -1937
- package/dist/style.css +1 -1
- package/package.json +2 -4
- package/src/modules/auth/components/pages/ResetPassword.vue +1 -1
- package/src/modules/auth/components/pages/SignIn.vue +1 -0
- package/src/modules/auth/store/auth.js +42 -51
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("../../../../components/Tab/Tab.
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("../../../../components/Tab/Tab.vue.cjs");const l=require("../../../../components/Field/Field.vue2.cjs"),f=require("../../../../components/Button/Button.vue2.cjs"),d=require("vue-router"),h=require("vue-i18n"),t=require("../../store/auth.cjs"),i=require("../../../middlewares/client/inputs.validation.cjs"),w=require("../../localization/EnterPassword.json.cjs");require("./EnterPassword.vue2.cjs");const y={class:"t-left pd-medium"},_={class:"mn-small"},g={key:0,class:"mn-semi t-transp"},k={key:1,class:"mn-semi t-transp"},q={class:"mn-semi radius-small o-hidden"},B={key:2,class:"p-medium t-semi mn-semi"},E=e.createElementVNode("a",{class:"t-second",href:"https://thecommunephuket.com/legal/eula",target:"_blank",rel:"noopener noreferrer"},"End User License Agreement (EULA)",-1),P={key:0},v={key:1},b={__name:"EnterPassword",setup(V){const n=e.ref(null),{t:s}=h.useI18n(w.default),r=d.useRoute(),u=d.useRouter();e.ref("phone");async function c(){try{await i.validateInputs(n,i.validatePassword,t.state.user.password,"Некорректный пароль")}catch{throw new Error}r.query.method==="reset-password"&&await t.actions.updatePassword(t.state.user,r.query.type),r.query.method!=="reset-password"&&await t.actions.signup(t.state.user,r.query.type)}function p(){u.push({name:"User Profile",params:{_id:t.state.user._id},query:{afterAuth:"true"}})}return(m,o)=>(e.openBlock(),e.createElementBlock("section",y,[e.createElementVNode("h3",_,e.toDisplayString(e.unref(s)("almostDone")),1),e.unref(r).query.method==="reset-password"?(e.openBlock(),e.createElementBlock("p",g,e.toDisplayString(e.unref(s)("newPasswordPrompt")),1)):(e.openBlock(),e.createElementBlock("p",k,e.toDisplayString(e.unref(s)("registrationPasswordPrompt")),1)),e.createElementVNode("div",q,[e.createVNode(l.default,{field:t.state.user.password,"onUpdate:field":o[0]||(o[0]=a=>t.state.user.password=a),type:"password",validation:n.value,placeholder:e.unref(s)("passwordPlaceholder"),class:"bg-grey pd-small radius-small mn-thin"},null,8,["field","validation","placeholder"]),e.createVNode(l.default,{field:t.state.user.passwordRepeat,"onUpdate:field":o[1]||(o[1]=a=>t.state.user.passwordRepeat=a),type:"password",placeholder:e.unref(s)("repeatPasswordPlaceholder"),class:"bg-grey pd-small radius-small mn-thin"},null,8,["field","placeholder"])]),e.unref(r).query.method!=="reset-password"?(e.openBlock(),e.createElementBlock("div",B,[e.createTextVNode(" By registering, you agree to our "),E])):e.createCommentVNode("",!0),e.createVNode(f.default,{submit:c,callback:p,class:"mn-big"},{default:e.withCtx(()=>[e.unref(r).query.method==="reset-password"?(e.openBlock(),e.createElementBlock("span",P,e.toDisplayString(e.unref(s)("changePasswordBtn")),1)):(e.openBlock(),e.createElementBlock("span",v,e.toDisplayString(e.unref(s)("registerBtn")),1))]),_:1})]))}};exports.default=b;
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { ref as u, openBlock as o, createElementBlock as a, createElementVNode as m, toDisplayString as d, unref as e, createVNode as l, createTextVNode as g, createCommentVNode as P, withCtx as k } from "vue";
|
2
|
-
import "../../../../components/Tab/Tab.
|
3
|
-
import c from "../../../../components/Field/Field.
|
4
|
-
import q from "../../../../components/Button/Button.
|
2
|
+
import "../../../../components/Tab/Tab.vue.js";
|
3
|
+
import c from "../../../../components/Field/Field.vue2.js";
|
4
|
+
import q from "../../../../components/Button/Button.vue2.js";
|
5
5
|
import { useRoute as b, useRouter as v } from "vue-router";
|
6
6
|
import { useI18n as E } from "vue-i18n";
|
7
7
|
import { state as s, actions as h } from "../../store/auth.js";
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("../../../../components/Tab/Tab.
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("../../../../components/Tab/Tab.vue.cjs");const l=require("../../../../components/Field/Field.vue2.cjs"),f=require("../../../../components/Button/Button.vue2.cjs"),d=require("vue-router"),t=require("../../store/auth.cjs"),u=require("../../store/invites.cjs"),c=require("../../../middlewares/client/inputs.validation.cjs");require("./Invite.vue2.cjs");const h={class:"t-left pd-medium"},v=e.createElementVNode("h3",{class:"mn-small"},"Вы были пригилашены в организацию",-1),y=e.createElementVNode("p",{class:"mn-semi t-transp"},"Пожалуйста, укажите пароль, на этом регистрация будет закочена.",-1),b={class:"mn-semi radius-small o-hidden"},q={key:0},k={key:1},B={__name:"Invite",async setup(E){let r,n;const i=e.ref(null),s=d.useRoute(),p=d.useRouter();[r,n]=e.withAsyncContext(()=>u.actions.readOne(s.query.inviteCode)),await r,n();async function m(){try{await c.validateInputs(i,c.validatePassword,t.state.user.password,"Некорректный пароль")}catch{throw new Error}await t.actions.signup(t.state.user,s.query.type,s.query.inviteCode)}function _(){p.push({name:"Dashboard"})}return(w,a)=>(e.openBlock(),e.createElementBlock("section",h,[v,y,e.createElementVNode("div",b,[e.createVNode(l.default,{field:t.state.user.password,"onUpdate:field":a[0]||(a[0]=o=>t.state.user.password=o),type:"password",validation:i.value,label:"Пароль",placeholder:"******",class:"bg-white radius-small mn-small"},null,8,["field","validation"]),e.createVNode(l.default,{field:t.state.user.passwordRepeat,"onUpdate:field":a[1]||(a[1]=o=>t.state.user.passwordRepeat=o),type:"password",label:"Повторите пароль",placeholder:"******",class:"bg-white radius-small mn-semi"},null,8,["field"])]),e.createVNode(f.default,{disabled:u.state.invite===null,submit:m,callback:_,class:"mn-big"},{default:e.withCtx(()=>[e.unref(s).query.method==="reset-password"?(e.openBlock(),e.createElementBlock("span",q,"Поменять пароль")):(e.openBlock(),e.createElementBlock("span",k,"Зарегистрироваться"))]),_:1},8,["disabled"])]))}};exports.default=B;
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { ref as w, withAsyncContext as h, openBlock as o, createElementBlock as r, createElementVNode as n, createVNode as i, withCtx as y, unref as b } from "vue";
|
2
|
-
import "../../../../components/Tab/Tab.
|
3
|
-
import p from "../../../../components/Field/Field.
|
4
|
-
import v from "../../../../components/Button/Button.
|
2
|
+
import "../../../../components/Tab/Tab.vue.js";
|
3
|
+
import p from "../../../../components/Field/Field.vue2.js";
|
4
|
+
import v from "../../../../components/Button/Button.vue2.js";
|
5
5
|
import { useRoute as k, useRouter as g } from "vue-router";
|
6
6
|
import { state as e, actions as q } from "../../store/auth.js";
|
7
7
|
import { actions as x, state as C } from "../../store/invites.js";
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),h=require("../../../../components/Tab/Tab.
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),h=require("../../../../components/Tab/Tab.vue2.cjs"),f=require("../../../../components/Field/Field.vue2.cjs"),v=require("../../../../components/FieldPhone/FieldPhone.vue.cjs"),_=require("../../../../components/Button/Button.vue2.cjs"),u=require("vue-router"),w=require("vue-i18n"),V=require("../../localization/ResetPassword.json.cjs"),s=require("../../store/auth.cjs");require("../../store/twofa.cjs");const n=require("../../../middlewares/client/inputs.validation.cjs");require("./ResetPassword.vue2.cjs");const g={class:"t-left pd-medium"},y={class:"mn-small"},N={class:"mn-small t-transp"},b={class:"mn-small p-small uppercase t-semi bg-grey radius-big o-hidden"},q={class:"pos-relative"},E={key:0,class:"mn-semi radius-small o-hidden"},k={class:"mn-small t-transp"},C={key:0,class:"mn-semi radius-small o-hidden"},P={class:"mn-small t-transp"},S={__name:"ResetPassword",setup(I){const{t}=w.useI18n(V.default),i=e.ref(null),d=e.ref(null);u.useRoute();const c=u.useRouter(),a=e.ref("phone");async function m(){try{a.value==="phone"&&await n.validateInputs(i,n.validatePhone,s.state.user.phone,"Некорректный телефон"),a.value==="email"&&await n.validateInputs(d,n.validateEmail,s.state.user.email,"Некорректный email")}catch{throw new Error}try{await s.actions.resetPassword(s.state.user,a.value,"reset-password")}catch(r){throw console.log(r),new Error}}function p(){c.push({name:"Enter Code",query:{type:a.value,method:"reset-password"}})}return(r,o)=>(e.openBlock(),e.createElementBlock("section",g,[e.createElementVNode("h3",y,e.toDisplayString(e.unref(t)("forgotPasswordTitle")),1),e.createElementVNode("p",N,e.toDisplayString(e.unref(t)("instructions")),1),e.createElementVNode("div",b,[e.createVNode(h.default,{selected:a.value,"onUpdate:selected":o[0]||(o[0]=l=>a.value=l),tabs:[{name:e.unref(t)("phone"),value:"phone"},{name:e.unref(t)("email"),value:"email"}]},null,8,["selected","tabs"])]),e.createElementVNode("div",q,[e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[a.value==="phone"?(e.openBlock(),e.createElementBlock("div",E,[e.createElementVNode("p",k,e.toDisplayString(e.unref(t)("smsInfo")),1),e.createVNode(v.default,{modelValue:s.state.user.phone,"onUpdate:modelValue":o[1]||(o[1]=l=>s.state.user.phone=l),dropdownOptions:{showDialCodeInSelection:!0,showFlags:!0,showDialCodeInList:!0},validation:i.value,mode:"national",inputOptions:{placeholder:e.unref(t)("phonePlaceholder")},class:"bg-grey pd-small radius-small mn-thin"},null,8,["modelValue","validation","inputOptions"])])):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[a.value==="email"?(e.openBlock(),e.createElementBlock("div",C,[e.createElementVNode("p",P,e.toDisplayString(e.unref(t)("emailInfo")),1),e.createVNode(f.default,{field:s.state.user.email,"onUpdate:field":o[2]||(o[2]=l=>s.state.user.email=l),placeholder:e.unref(t)("emailPlaceholder"),validation:d.value,class:"bg-grey pd-medium radius-small"},null,8,["field","placeholder","validation"])])):e.createCommentVNode("",!0)]),_:1})]),e.createVNode(_.default,{submit:m,callback:p,class:"mn-big"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(t)("sendCode")),1)]),_:1})]))}};exports.default=S;
|
@@ -1,8 +1,8 @@
|
|
1
1
|
import { ref as m, openBlock as u, createElementBlock as p, createElementVNode as l, toDisplayString as r, unref as t, createVNode as i, Transition as _, withCtx as c, createCommentVNode as v, createTextVNode as V } from "vue";
|
2
|
-
import P from "../../../../components/Tab/Tab.
|
3
|
-
import C from "../../../../components/Field/Field.
|
2
|
+
import P from "../../../../components/Tab/Tab.vue2.js";
|
3
|
+
import C from "../../../../components/Field/Field.vue2.js";
|
4
4
|
import E from "../../../../components/FieldPhone/FieldPhone.vue.js";
|
5
|
-
import I from "../../../../components/Button/Button.
|
5
|
+
import I from "../../../../components/Button/Button.vue2.js";
|
6
6
|
import { useRoute as k, useRouter as x } from "vue-router";
|
7
7
|
import { useI18n as N } from "vue-i18n";
|
8
8
|
import T from "../../localization/ResetPassword.json.js";
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),g=require("../../../../components/Tab/Tab.
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),g=require("../../../../components/Tab/Tab.vue2.cjs"),c=require("../../../../components/Field/Field.vue2.cjs"),V=require("../../../../components/FieldPhone/FieldPhone.vue.cjs"),w=require("../../../../components/Button/Button.vue2.cjs"),p=require("vue-router"),N=require("vue-i18n"),b=require("../../localization/SignIn.json.cjs"),a=require("../../store/auth.cjs"),r=require("../../../middlewares/client/inputs.validation.cjs");require("./SignIn.vue2.cjs");const y={class:""},S=["src"],E={class:"mn-medium"},q=e.createElementVNode("br",null,null,-1),x={class:"t-semi"},C={class:"mn-big"},D={class:"mn-small p-small uppercase t-semi bg-grey radius-big o-hidden"},T={class:"pos-relative"},P={class:"mn-thin radius-small"},I={class:"mn-thin radius-small o-hidden"},k={class:"w-100 mn-big"},U={__name:"SignIn",setup(j){const d=e.ref(null),m=e.ref(null),u=e.ref(null);p.useRoute();const h=p.useRouter(),{t:o}=N.useI18n(b.default),l=e.ref("phone"),f=n=>new Promise((s,i)=>{const t=document.createElement("script");t.type="text/javascript",t.src=n,t.onload=s,t.onerror=i,document.head.appendChild(t)});e.onMounted(async()=>{await f("https://appleid.cdn-apple.com/appleauth/static/jsapi/appleid/1/en_US/appleid.auth.js")});async function v(){try{l.value==="phone"&&await r.validateInputs(d,r.validatePhone,a.state.user.phone,"Некорректный телефон"),l.value==="email"&&await r.validateInputs(u,r.validateEmail,a.state.user.email,"Некорректный email")}catch{throw new Error}const n={...a.state.user};n.phone=a.state.user.phone.number,await a.actions.login(n,l.value)}function _(){h.push({name:"User Profile",params:{_id:a.state.user._id},query:{afterAuth:"true"}})}return(n,s)=>{const i=e.resolveComponent("router-link");return e.openBlock(),e.createElementBlock("section",y,[e.createTextVNode(e.toDisplayString(n.document.cookie)+" ",1),e.createElementVNode("img",{src:"/logo/logo_square.svg",class:"i-extra radius-small mn-small"},null,8,S),e.createElementVNode("h3",E,[e.createTextVNode(e.toDisplayString(e.unref(o)("title"))+" ",1),q,e.createElementVNode("span",x,e.toDisplayString(e.unref(o)("subtitle")),1)]),e.createElementVNode("p",C,[e.createVNode(i,{to:{name:"Sign Up"},class:"underline t-second"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o)("signup")),1)]),_:1})]),e.createElementVNode("div",D,[e.createVNode(g.default,{selected:l.value,"onUpdate:selected":s[0]||(s[0]=t=>l.value=t),tabs:[{name:e.unref(o)("phone"),value:"phone"},{name:e.unref(o)("email"),value:"email"}]},null,8,["selected","tabs"])]),e.createElementVNode("div",T,[e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",P,[e.createVNode(V.default,{modelValue:a.state.user.phone,"onUpdate:modelValue":s[1]||(s[1]=t=>a.state.user.phone=t),dropdownOptions:{showDialCodeInSelection:!0,showFlags:!0,showDialCodeInList:!0},validation:d.value,mode:"national",inputOptions:{placeholder:e.unref(o)("phonePlaceholder")},class:"bg-grey pd-small radius-small mn-thin"},null,8,["modelValue","validation","inputOptions"])],512),[[e.vShow,l.value==="phone"]])]),_:1}),e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",I,[e.createVNode(c.default,{field:a.state.user.email,"onUpdate:field":s[2]||(s[2]=t=>a.state.user.email=t),placeholder:e.unref(o)("emailPlaceholder"),validation:u.value,class:"bg-grey pd-medium radius-small"},null,8,["field","placeholder","validation"])],512),[[e.vShow,l.value==="email"]])]),_:1})]),e.createVNode(c.default,{field:a.state.user.password,"onUpdate:field":s[3]||(s[3]=t=>a.state.user.password=t),type:"password",validation:m.value,placeholder:e.unref(o)("passwordPlaceholder"),class:"bg-grey pd-medium radius-small mn-semi"},null,8,["field","validation","placeholder"]),e.createElementVNode("div",k,[e.createVNode(i,{to:"/auth/reset-password",class:"underline d-block t-blue"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o)("forgotPassword")),1)]),_:1})]),e.createVNode(w.default,{submit:v,callback:_,class:"mn-thin"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o)("signin")),1)]),_:1})])}}};exports.default=U;
|
@@ -1,73 +1,74 @@
|
|
1
|
-
import { ref as
|
2
|
-
import I from "../../../../components/Tab/Tab.
|
3
|
-
import w from "../../../../components/Field/Field.
|
1
|
+
import { ref as c, onMounted as x, resolveComponent as U, openBlock as C, createElementBlock as E, createTextVNode as u, toDisplayString as d, createElementVNode as l, unref as a, createVNode as i, withCtx as m, Transition as f, withDirectives as v, vShow as g } from "vue";
|
2
|
+
import I from "../../../../components/Tab/Tab.vue2.js";
|
3
|
+
import w from "../../../../components/Field/Field.vue2.js";
|
4
4
|
import D from "../../../../components/FieldPhone/FieldPhone.vue.js";
|
5
|
-
import j from "../../../../components/Button/Button.
|
5
|
+
import j from "../../../../components/Button/Button.vue2.js";
|
6
6
|
import { useRoute as F, useRouter as N } from "vue-router";
|
7
7
|
import { useI18n as O } from "vue-i18n";
|
8
8
|
import T from "../../localization/SignIn.json.js";
|
9
|
-
import { state as
|
9
|
+
import { state as o, actions as q } from "../../store/auth.js";
|
10
10
|
import { validateInputs as b, validatePhone as A, validateEmail as B } from "../../../middlewares/client/inputs.validation.js";
|
11
11
|
import "./SignIn.vue2.js";
|
12
12
|
const R = { class: "" }, $ = ["src"], L = { class: "mn-medium" }, M = /* @__PURE__ */ l("br", null, null, -1), z = { class: "t-semi" }, G = { class: "mn-big" }, H = { class: "mn-small p-small uppercase t-semi bg-grey radius-big o-hidden" }, J = { class: "pos-relative" }, K = { class: "mn-thin radius-small" }, Q = { class: "mn-thin radius-small o-hidden" }, W = { class: "w-100 mn-big" }, de = {
|
13
13
|
__name: "SignIn",
|
14
14
|
setup(X) {
|
15
|
-
const h =
|
15
|
+
const h = c(null), y = c(null), _ = c(null);
|
16
16
|
F();
|
17
|
-
const V = N(), { t:
|
17
|
+
const V = N(), { t: s } = O(T), n = c("phone"), P = (r) => new Promise((t, p) => {
|
18
18
|
const e = document.createElement("script");
|
19
|
-
e.type = "text/javascript", e.src = r, e.onload = t, e.onerror =
|
19
|
+
e.type = "text/javascript", e.src = r, e.onload = t, e.onerror = p, document.head.appendChild(e);
|
20
20
|
});
|
21
|
-
|
22
|
-
await
|
21
|
+
x(async () => {
|
22
|
+
await P("https://appleid.cdn-apple.com/appleauth/static/jsapi/appleid/1/en_US/appleid.auth.js");
|
23
23
|
});
|
24
|
-
async function
|
24
|
+
async function S() {
|
25
25
|
try {
|
26
26
|
n.value === "phone" && await b(
|
27
27
|
h,
|
28
28
|
A,
|
29
|
-
|
29
|
+
o.user.phone,
|
30
30
|
"Некорректный телефон"
|
31
31
|
), n.value === "email" && await b(
|
32
32
|
_,
|
33
33
|
B,
|
34
|
-
|
34
|
+
o.user.email,
|
35
35
|
"Некорректный email"
|
36
36
|
);
|
37
37
|
} catch {
|
38
38
|
throw new Error();
|
39
39
|
}
|
40
|
-
const r = { ...
|
41
|
-
r.phone =
|
40
|
+
const r = { ...o.user };
|
41
|
+
r.phone = o.user.phone.number, await q.login(r, n.value);
|
42
42
|
}
|
43
|
-
function
|
43
|
+
function k() {
|
44
44
|
V.push({
|
45
45
|
name: "User Profile",
|
46
46
|
params: {
|
47
|
-
_id:
|
47
|
+
_id: o.user._id
|
48
48
|
},
|
49
49
|
query: { afterAuth: "true" }
|
50
50
|
});
|
51
51
|
}
|
52
52
|
return (r, t) => {
|
53
|
-
const
|
53
|
+
const p = U("router-link");
|
54
54
|
return C(), E("section", R, [
|
55
|
+
u(d(r.document.cookie) + " ", 1),
|
55
56
|
l("img", {
|
56
57
|
src: "/logo/logo_square.svg",
|
57
58
|
class: "i-extra radius-small mn-small"
|
58
59
|
}, null, 8, $),
|
59
60
|
l("h3", L, [
|
60
|
-
|
61
|
+
u(d(a(s)("title")) + " ", 1),
|
61
62
|
M,
|
62
|
-
l("span", z, d(
|
63
|
+
l("span", z, d(a(s)("subtitle")), 1)
|
63
64
|
]),
|
64
65
|
l("p", G, [
|
65
|
-
i(
|
66
|
+
i(p, {
|
66
67
|
to: { name: "Sign Up" },
|
67
68
|
class: "underline t-second"
|
68
69
|
}, {
|
69
|
-
default:
|
70
|
-
|
70
|
+
default: m(() => [
|
71
|
+
u(d(a(s)("signup")), 1)
|
71
72
|
]),
|
72
73
|
_: 1
|
73
74
|
})
|
@@ -77,18 +78,18 @@ const R = { class: "" }, $ = ["src"], L = { class: "mn-medium" }, M = /* @__PURE
|
|
77
78
|
selected: n.value,
|
78
79
|
"onUpdate:selected": t[0] || (t[0] = (e) => n.value = e),
|
79
80
|
tabs: [
|
80
|
-
{ name:
|
81
|
-
{ name:
|
81
|
+
{ name: a(s)("phone"), value: "phone" },
|
82
|
+
{ name: a(s)("email"), value: "email" }
|
82
83
|
]
|
83
84
|
}, null, 8, ["selected", "tabs"])
|
84
85
|
]),
|
85
86
|
l("div", J, [
|
86
87
|
i(f, { name: "slide-fade" }, {
|
87
|
-
default:
|
88
|
+
default: m(() => [
|
88
89
|
v(l("div", K, [
|
89
90
|
i(D, {
|
90
|
-
modelValue:
|
91
|
-
"onUpdate:modelValue": t[1] || (t[1] = (e) =>
|
91
|
+
modelValue: o.user.phone,
|
92
|
+
"onUpdate:modelValue": t[1] || (t[1] = (e) => o.user.phone = e),
|
92
93
|
dropdownOptions: {
|
93
94
|
showDialCodeInSelection: !0,
|
94
95
|
showFlags: !0,
|
@@ -96,7 +97,7 @@ const R = { class: "" }, $ = ["src"], L = { class: "mn-medium" }, M = /* @__PURE
|
|
96
97
|
},
|
97
98
|
validation: h.value,
|
98
99
|
mode: "national",
|
99
|
-
inputOptions: { placeholder:
|
100
|
+
inputOptions: { placeholder: a(s)("phonePlaceholder") },
|
100
101
|
class: "bg-grey pd-small radius-small mn-thin"
|
101
102
|
}, null, 8, ["modelValue", "validation", "inputOptions"])
|
102
103
|
], 512), [
|
@@ -106,12 +107,12 @@ const R = { class: "" }, $ = ["src"], L = { class: "mn-medium" }, M = /* @__PURE
|
|
106
107
|
_: 1
|
107
108
|
}),
|
108
109
|
i(f, { name: "slide-fade" }, {
|
109
|
-
default:
|
110
|
+
default: m(() => [
|
110
111
|
v(l("div", Q, [
|
111
112
|
i(w, {
|
112
|
-
field:
|
113
|
-
"onUpdate:field": t[2] || (t[2] = (e) =>
|
114
|
-
placeholder:
|
113
|
+
field: o.user.email,
|
114
|
+
"onUpdate:field": t[2] || (t[2] = (e) => o.user.email = e),
|
115
|
+
placeholder: a(s)("emailPlaceholder"),
|
115
116
|
validation: _.value,
|
116
117
|
class: "bg-grey pd-medium radius-small"
|
117
118
|
}, null, 8, ["field", "placeholder", "validation"])
|
@@ -123,31 +124,31 @@ const R = { class: "" }, $ = ["src"], L = { class: "mn-medium" }, M = /* @__PURE
|
|
123
124
|
})
|
124
125
|
]),
|
125
126
|
i(w, {
|
126
|
-
field:
|
127
|
-
"onUpdate:field": t[3] || (t[3] = (e) =>
|
127
|
+
field: o.user.password,
|
128
|
+
"onUpdate:field": t[3] || (t[3] = (e) => o.user.password = e),
|
128
129
|
type: "password",
|
129
130
|
validation: y.value,
|
130
|
-
placeholder:
|
131
|
+
placeholder: a(s)("passwordPlaceholder"),
|
131
132
|
class: "bg-grey pd-medium radius-small mn-semi"
|
132
133
|
}, null, 8, ["field", "validation", "placeholder"]),
|
133
134
|
l("div", W, [
|
134
|
-
i(
|
135
|
+
i(p, {
|
135
136
|
to: "/auth/reset-password",
|
136
137
|
class: "underline d-block t-blue"
|
137
138
|
}, {
|
138
|
-
default:
|
139
|
-
|
139
|
+
default: m(() => [
|
140
|
+
u(d(a(s)("forgotPassword")), 1)
|
140
141
|
]),
|
141
142
|
_: 1
|
142
143
|
})
|
143
144
|
]),
|
144
145
|
i(j, {
|
145
|
-
submit:
|
146
|
-
callback:
|
146
|
+
submit: S,
|
147
|
+
callback: k,
|
147
148
|
class: "mn-thin"
|
148
149
|
}, {
|
149
|
-
default:
|
150
|
-
|
150
|
+
default: m(() => [
|
151
|
+
u(d(a(s)("signin")), 1)
|
151
152
|
]),
|
152
153
|
_: 1
|
153
154
|
})
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),v=require("../../../../components/Tab/Tab.
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),v=require("../../../../components/Tab/Tab.vue2.cjs"),f=require("../../../../components/Field/Field.vue2.cjs"),_=require("../../../../components/FieldPhone/FieldPhone.vue.cjs"),V=require("../../../../components/Button/Button.vue2.cjs"),u=require("vue-router"),g=require("vue-i18n"),w=require("../../localization/SignUp.json.cjs"),n=require("../../store/auth.cjs"),N=require("../../store/twofa.cjs"),s=require("../../../middlewares/client/inputs.validation.cjs");require("./SignUp.vue2.cjs");const b={class:"t-left pd-medium"},E={class:"mn-small"},S={class:"mn-small t-transp"},y={class:"mn-small p-small uppercase t-semi bg-grey radius-big o-hidden"},q={class:"pos-relative"},C={class:"mn-semi radius-small"},D={class:"mn-small t-transp"},x={class:"mn-semi radius-small o-hidden"},T={class:"mn-small t-transp"},k={class:"w-100"},I={__name:"SignUp",setup(P){const{t}=g.useI18n(w.default),i=e.ref(null),r=e.ref(null);u.useRoute();const c=u.useRouter(),a=e.ref("phone");async function m(){try{a.value==="phone"&&await s.validateInputs(i,s.validatePhone,n.state.user.phone,"Некорректный телефон"),a.value==="email"&&await s.validateInputs(r,s.validateEmail,n.state.user.email,"Некорректный email")}catch{throw new Error}try{await N.sendCode(n.state.user,"signup",a.value)}catch{throw new Error}}function p(){c.push({name:"Enter Code"})}return(d,l)=>{const h=e.resolveComponent("router-link");return e.openBlock(),e.createElementBlock("section",b,[e.createElementVNode("h3",E,e.toDisplayString(e.unref(t)("title")),1),e.createElementVNode("p",S,e.toDisplayString(e.unref(t)("description")),1),e.createElementVNode("div",y,[e.createVNode(v.default,{selected:a.value,"onUpdate:selected":l[0]||(l[0]=o=>a.value=o),tabs:[{name:e.unref(t)("phone"),value:"phone"},{name:e.unref(t)("email"),value:"email"}]},null,8,["selected","tabs"])]),e.createElementVNode("div",q,[e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",C,[e.createElementVNode("p",D,e.toDisplayString(e.unref(t)("smsNotice")),1),e.createVNode(_.default,{modelValue:n.state.user.phone,"onUpdate:modelValue":l[1]||(l[1]=o=>n.state.user.phone=o),dropdownOptions:{showDialCodeInSelection:!0,showFlags:!0,showDialCodeInList:!0},validation:i.value,mode:"national",inputOptions:{placeholder:e.unref(t)("phonePlaceholder")},class:"bg-grey pd-small radius-small mn-thin"},null,8,["modelValue","validation","inputOptions"])],512),[[e.vShow,a.value==="phone"]])]),_:1}),e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",x,[e.createElementVNode("p",T,e.toDisplayString(e.unref(t)("emailNotice")),1),e.createVNode(f.default,{field:n.state.user.email,"onUpdate:field":l[2]||(l[2]=o=>n.state.user.email=o),placeholder:e.unref(t)("emailPlaceholder"),validation:r.value,class:"bg-grey pd-medium radius-small"},null,8,["field","placeholder","validation"])],512),[[e.vShow,a.value==="email"]])]),_:1})]),e.createVNode(V.default,{submit:m,callback:p,class:"mn-big"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(t)("sendCode")),1)]),_:1}),e.createElementVNode("div",k,[e.createVNode(h,{to:"/auth/signin",class:"underline mn-medium d-block t-blue"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(t)("haveAccount")),1)]),_:1})])])}}};exports.default=I;
|
@@ -1,8 +1,8 @@
|
|
1
1
|
import { ref as d, resolveComponent as C, openBlock as k, createElementBlock as E, createElementVNode as o, toDisplayString as n, unref as t, createVNode as a, Transition as h, withCtx as m, withDirectives as _, vShow as f, createTextVNode as v } from "vue";
|
2
|
-
import x from "../../../../components/Tab/Tab.
|
3
|
-
import N from "../../../../components/Field/Field.
|
2
|
+
import x from "../../../../components/Tab/Tab.vue2.js";
|
3
|
+
import N from "../../../../components/Field/Field.vue2.js";
|
4
4
|
import S from "../../../../components/FieldPhone/FieldPhone.vue.js";
|
5
|
-
import D from "../../../../components/Button/Button.
|
5
|
+
import D from "../../../../components/Button/Button.vue2.js";
|
6
6
|
import { useRoute as I, useRouter as P } from "vue-router";
|
7
7
|
import { useI18n as U } from "vue-i18n";
|
8
8
|
import F from "../../localization/SignUp.json.js";
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const w=require("../../../../node_modules/axios/lib/axios.cjs"),p=require("../../../../../node_modules/js-cookie/src/js.cookie.cjs");require("../../../../node_modules/@capacitor/core/dist/index.cjs");const l=require("vue"),n=require("../../globals/store/globals.cjs"),g=require("./twofa.cjs"),i=w.default.create({baseURL:process.env.API_URL,withCredentials:!0}),o=l.reactive({user:{_id:void 0,username:"",email:"",phone:"",password:"",passwordRepeat:""},access:{roles:null,token:null,status:!1}}),d=f("user");if(d){const{_id:s,email:r,phone:e,roles:c,accessToken:t}=d;Object.assign(o.user,{_id:s,email:r,phone:e}),Object.assign(o.access,{token:t,roles:c,status:!!t}),i.interceptors.request.use(a=>(t&&(a.headers["x-access-token"]=t),a),a=>Promise.reject(a))}const h={async login(s,r){try{const e=await i.post("/api/auth/signin",{...s,type:r});return u("user",e.data),Object.assign(o.user,{...e.data}),Object.assign(o.access,{token:e.data.accessToken,status:!0,roles:e.data.roles}),e.data}catch(e){return Object.assign(o.access,{token:null,status:!1,roles:null}),n.setError(e),Promise.reject(e)}},async signup(s,r,e){const{password:c,passwordRepeat:t}=o.user;if(c!==t){const a={response:{data:{errorCode:"PASSWORDS_DO_NOT_MATCH"}}};throw n.setError(a),new Error(a.response.status)}try{s.phone=s.phone.number;const a=await i.post("/api/auth/signup",{...s,type:r,inviteCode:e});return a.data.accessToken&&u("user",a.data),Object.assign(o.user,{...a.data}),Object.assign(o.access,{token:a.data.accessToken,status:!0,roles:a.data.roles}),a.data}catch(a){throw n.setError(a),console.log("Sign up falied"),a}},logout(){m("user"),Object.assign(o.user,{email:"",phone:"",password:"",passwordRepeat:""}),Object.assign(o.access,{token:null,status:!1})},async resetPassword(s,r){try{const e=await i.post("/api/auth/reset-password",{email:s.email,phone:s.phone.number,type:r});return Object.assign(g.state.code,{...e.data,isSended:!0}),e.data}catch(e){return n.setError(e),Promise.reject(e)}},async updatePassword(s,r){const{password:e,passwordRepeat:c}=o.user;if(e!==c){const t={response:{data:{errorCode:"PASSWORDS_DO_NOT_MATCH"}}};throw n.setError(t),new Error(t.response.status)}try{const t=await i.post("/api/auth/update-password",{email:s.email,phone:s.phone.number,password:s.password,passwordRepeat:s.passwordRepeat,type:r});return t.data.accessToken&&u("user",t.data),Object.assign(o.user,{...t.data}),Object.assign(o.access,{token:t.data.accessToken,status:!0}),t.data}catch(t){return n.setError(t),Promise.reject(t)}}},O={development:{secure:!1,expires:1},production:{expires:1,domain:process.env.API_URL,sameSite:"none",secure:!0}};function f(s){const r=p.default.get(s);return r?JSON.parse(r):null}function u(s,r,e=process.env.NODE_ENV){p.default.set(s,JSON.stringify(r),O[e])}function m(s,r=process.env.NODE_ENV){const e=r==="production"?{domain:process.env.API_URL}:{};p.default.remove(s,e)}l.watch(o,(s,r)=>{});exports.actions=h;exports.state=o;
|
@@ -1,10 +1,10 @@
|
|
1
|
-
import
|
2
|
-
import
|
3
|
-
import
|
4
|
-
import { reactive as
|
5
|
-
import { setError as
|
6
|
-
import { state as
|
7
|
-
const i =
|
1
|
+
import l from "../../../../node_modules/axios/lib/axios.js";
|
2
|
+
import u from "../../../../../node_modules/js-cookie/src/js.cookie.js";
|
3
|
+
import "../../../../node_modules/@capacitor/core/dist/index.js";
|
4
|
+
import { reactive as m, watch as w } from "vue";
|
5
|
+
import { setError as n } from "../../globals/store/globals.js";
|
6
|
+
import { state as h } from "./twofa.js";
|
7
|
+
const i = l.create({ baseURL: process.env.API_URL, withCredentials: !0 }), o = m({
|
8
8
|
user: {
|
9
9
|
_id: void 0,
|
10
10
|
username: "",
|
@@ -18,164 +18,133 @@ const i = m.create({ baseURL: process.env.API_URL, withCredentials: !0 }), a = w
|
|
18
18
|
token: null,
|
19
19
|
status: !1
|
20
20
|
}
|
21
|
-
});
|
22
|
-
|
23
|
-
const s =
|
24
|
-
|
25
|
-
const { _id: t, email: e, phone: n, roles: r, accessToken: o } = s;
|
26
|
-
Object.assign(a.user, { _id: t, email: e, phone: n }), Object.assign(a.access, { token: o, roles: r, status: !!o }), i.interceptors.request.use((p) => (o && (p.headers["x-access-token"] = o), p), (p) => Promise.reject(p));
|
27
|
-
}
|
21
|
+
}), d = f("user");
|
22
|
+
if (d) {
|
23
|
+
const { _id: s, email: a, phone: e, roles: c, accessToken: t } = d;
|
24
|
+
Object.assign(o.user, { _id: s, email: a, phone: e }), Object.assign(o.access, { token: t, roles: c, status: !!t }), i.interceptors.request.use((r) => (t && (r.headers["x-access-token"] = t), r), (r) => Promise.reject(r));
|
28
25
|
}
|
29
|
-
|
30
|
-
|
31
|
-
async login(s, t) {
|
26
|
+
const C = {
|
27
|
+
async login(s, a) {
|
32
28
|
try {
|
33
29
|
const e = await i.post("/api/auth/signin", {
|
34
30
|
...s,
|
35
|
-
type:
|
31
|
+
type: a
|
36
32
|
});
|
37
|
-
return
|
33
|
+
return p("user", e.data), Object.assign(o.user, {
|
38
34
|
...e.data
|
39
|
-
}), Object.assign(
|
35
|
+
}), Object.assign(o.access, {
|
40
36
|
token: e.data.accessToken,
|
41
37
|
status: !0,
|
42
38
|
roles: e.data.roles
|
43
39
|
}), e.data;
|
44
40
|
} catch (e) {
|
45
|
-
return Object.assign(
|
41
|
+
return Object.assign(o.access, {
|
46
42
|
token: null,
|
47
43
|
status: !1,
|
48
44
|
roles: null
|
49
|
-
}),
|
45
|
+
}), n(e), Promise.reject(e);
|
50
46
|
}
|
51
47
|
},
|
52
|
-
async signup(s,
|
53
|
-
const { password:
|
54
|
-
if (
|
55
|
-
const
|
48
|
+
async signup(s, a, e) {
|
49
|
+
const { password: c, passwordRepeat: t } = o.user;
|
50
|
+
if (c !== t) {
|
51
|
+
const r = {
|
56
52
|
response: {
|
57
53
|
data: { errorCode: "PASSWORDS_DO_NOT_MATCH" }
|
58
54
|
}
|
59
55
|
};
|
60
|
-
throw
|
56
|
+
throw n(r), new Error(r.response.status);
|
61
57
|
}
|
62
58
|
try {
|
63
59
|
s.phone = s.phone.number;
|
64
|
-
const
|
60
|
+
const r = await i.post("/api/auth/signup", {
|
65
61
|
...s,
|
66
|
-
type:
|
62
|
+
type: a,
|
67
63
|
inviteCode: e
|
68
64
|
});
|
69
|
-
return
|
70
|
-
...
|
71
|
-
}), Object.assign(
|
72
|
-
token:
|
65
|
+
return r.data.accessToken && p("user", r.data), Object.assign(o.user, {
|
66
|
+
...r.data
|
67
|
+
}), Object.assign(o.access, {
|
68
|
+
token: r.data.accessToken,
|
73
69
|
status: !0,
|
74
|
-
roles:
|
75
|
-
}),
|
76
|
-
} catch (
|
77
|
-
throw
|
70
|
+
roles: r.data.roles
|
71
|
+
}), r.data;
|
72
|
+
} catch (r) {
|
73
|
+
throw n(r), console.log("Sign up falied"), r;
|
78
74
|
}
|
79
75
|
},
|
80
76
|
logout() {
|
81
|
-
|
77
|
+
g("user"), Object.assign(o.user, {
|
82
78
|
email: "",
|
83
79
|
phone: "",
|
84
80
|
password: "",
|
85
81
|
passwordRepeat: ""
|
86
|
-
}), Object.assign(
|
82
|
+
}), Object.assign(o.access, {
|
87
83
|
token: null,
|
88
84
|
status: !1
|
89
85
|
});
|
90
86
|
},
|
91
|
-
async resetPassword(s,
|
87
|
+
async resetPassword(s, a) {
|
92
88
|
try {
|
93
89
|
const e = await i.post("/api/auth/reset-password", {
|
94
90
|
email: s.email,
|
95
91
|
phone: s.phone.number,
|
96
|
-
type:
|
92
|
+
type: a
|
97
93
|
});
|
98
|
-
return Object.assign(
|
94
|
+
return Object.assign(h.code, {
|
99
95
|
...e.data,
|
100
96
|
isSended: !0
|
101
97
|
}), e.data;
|
102
98
|
} catch (e) {
|
103
|
-
return
|
99
|
+
return n(e), Promise.reject(e);
|
104
100
|
}
|
105
101
|
},
|
106
|
-
async updatePassword(s,
|
107
|
-
const { password: e, passwordRepeat:
|
108
|
-
if (e !==
|
109
|
-
const
|
102
|
+
async updatePassword(s, a) {
|
103
|
+
const { password: e, passwordRepeat: c } = o.user;
|
104
|
+
if (e !== c) {
|
105
|
+
const t = {
|
110
106
|
response: {
|
111
107
|
data: { errorCode: "PASSWORDS_DO_NOT_MATCH" }
|
112
108
|
}
|
113
109
|
};
|
114
|
-
throw
|
110
|
+
throw n(t), new Error(t.response.status);
|
115
111
|
}
|
116
112
|
try {
|
117
|
-
const
|
113
|
+
const t = await i.post("/api/auth/update-password", {
|
118
114
|
email: s.email,
|
119
115
|
phone: s.phone.number,
|
120
116
|
password: s.password,
|
121
117
|
passwordRepeat: s.passwordRepeat,
|
122
|
-
type:
|
118
|
+
type: a
|
123
119
|
});
|
124
|
-
return
|
125
|
-
...
|
126
|
-
}), Object.assign(
|
127
|
-
token:
|
120
|
+
return t.data.accessToken && p("user", t.data), Object.assign(o.user, {
|
121
|
+
...t.data
|
122
|
+
}), Object.assign(o.access, {
|
123
|
+
token: t.data.accessToken,
|
128
124
|
status: !0
|
129
|
-
}),
|
130
|
-
} catch (
|
131
|
-
return
|
125
|
+
}), t.data;
|
126
|
+
} catch (t) {
|
127
|
+
return n(t), Promise.reject(t);
|
132
128
|
}
|
133
129
|
}
|
134
|
-
},
|
130
|
+
}, O = {
|
135
131
|
development: { secure: !1, expires: 1 },
|
136
132
|
production: { expires: 1, domain: process.env.API_URL, sameSite: "none", secure: !0 }
|
137
133
|
};
|
138
|
-
function
|
139
|
-
|
140
|
-
|
141
|
-
document.cookie.split("/; *").map((t) => {
|
142
|
-
const [e, ...n] = t.split("=");
|
143
|
-
return [
|
144
|
-
{
|
145
|
-
key: e,
|
146
|
-
value: n.join("=")
|
147
|
-
}
|
148
|
-
];
|
149
|
-
})
|
150
|
-
);
|
151
|
-
else {
|
152
|
-
const t = d.get(s);
|
153
|
-
return t ? JSON.parse(t) : null;
|
154
|
-
}
|
134
|
+
function f(s) {
|
135
|
+
const a = u.get(s);
|
136
|
+
return a ? JSON.parse(a) : null;
|
155
137
|
}
|
156
|
-
function
|
157
|
-
|
158
|
-
url: process.env.API_URL,
|
159
|
-
// используйте ваш API_URL
|
160
|
-
key: s,
|
161
|
-
value: JSON.stringify(t)
|
162
|
-
}) : d.set(s, JSON.stringify(t), h[e]);
|
138
|
+
function p(s, a, e = process.env.NODE_ENV) {
|
139
|
+
u.set(s, JSON.stringify(a), O[e]);
|
163
140
|
}
|
164
|
-
function
|
165
|
-
|
166
|
-
|
167
|
-
url: process.env.API_URL,
|
168
|
-
// используйте ваш API_URL
|
169
|
-
key: s
|
170
|
-
});
|
171
|
-
else {
|
172
|
-
const e = t === "production" ? { domain: process.env.API_URL } : {};
|
173
|
-
d.remove(s, e);
|
174
|
-
}
|
141
|
+
function g(s, a = process.env.NODE_ENV) {
|
142
|
+
const e = a === "production" ? { domain: process.env.API_URL } : {};
|
143
|
+
u.remove(s, e);
|
175
144
|
}
|
176
|
-
|
145
|
+
w(o, (s, a) => {
|
177
146
|
});
|
178
147
|
export {
|
179
|
-
|
180
|
-
|
148
|
+
C as actions,
|
149
|
+
o as state
|
181
150
|
};
|