@ozdao/prometheus-framework 0.1.78 → 0.1.80
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/main.css +1 -1
- 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/Field/Field.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Field/Field.vue2.js +33 -30
- package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue.js +1 -1
- 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 +1 -1
- 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 +41 -43
- 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 +33 -35
- 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 +1 -1
- 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 +44 -46
- 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 +83 -81
- 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 +44 -46
- package/dist/prometheus-framework/src/modules/auth/localization/SignIn.json.cjs +1 -0
- package/dist/prometheus-framework/src/modules/auth/localization/SignIn.json.js +38 -0
- package/dist/prometheus-framework/src/modules/auth/router/auth.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/router/auth.js +114 -111
- package/dist/prometheus-framework/src/modules/auth/store/auth.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/store/auth.js +93 -75
- 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 +1 -1
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Bullets.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Bullets.vue.js +4 -3
- 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 +12 -11
- package/dist/prometheus-framework/src/modules/constructor/components/elements/H2.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/constructor/components/elements/H2.vue.js +12 -11
- 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 +5 -4
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.js +20 -19
- 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 +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 +1 -1
- 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 +1 -1
- 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 +1 -1
- 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 +1 -1
- 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/globals/localization/vue-i18n.cjs +1 -1
- package/dist/prometheus-framework/src/modules/globals/localization/vue-i18n.js +15 -13
- 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 +1 -1
- 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 +1 -1
- 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 +1 -1
- 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 +1 -1
- 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 +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 +1 -1
- 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 +1 -1
- 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 +1 -1
- 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 +1 -1
- 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 +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 +1 -1
- package/dist/prometheus-framework.cjs.js +10 -10
- package/dist/prometheus-framework.es.js +8 -5
- package/dist/style.css +1 -1
- package/package.json +1 -2
- package/src/components/Field/Field.vue +4 -1
- package/src/modules/auth/components/layouts/Auth.vue +45 -36
- package/src/modules/auth/components/pages/EnterCode.vue +0 -17
- package/src/modules/auth/components/pages/EnterPassword.vue +0 -23
- package/src/modules/auth/components/pages/ResetPassword.vue +0 -27
- package/src/modules/auth/components/pages/SignIn.vue +26 -54
- package/src/modules/auth/components/pages/SignUp.vue +0 -29
- package/src/modules/auth/localization/EnterCode.json +14 -0
- package/src/modules/auth/localization/EnterPassword.json +20 -0
- package/src/modules/auth/localization/ResetPassword.json +24 -0
- package/src/modules/auth/localization/SignIn.json +34 -0
- package/src/modules/auth/localization/SignUp.json +26 -0
- package/src/modules/auth/router/auth.js +95 -86
- package/src/modules/auth/store/auth.js +20 -20
- package/src/modules/constructor/components/elements/Bullets.vue +1 -0
- package/src/modules/constructor/components/elements/Caption.vue +1 -0
- package/src/modules/constructor/components/elements/H2.vue +1 -0
- package/src/modules/constructor/components/elements/ImageUpload.vue +1 -1
- package/src/modules/constructor/components/elements/Textarea.vue +1 -0
- package/src/modules/globals/localization/methods/get-app-locales.js +13 -0
- package/src/modules/globals/localization/vue-i18n.js +20 -14
- package/src/modules/globals/localization/vue-i18n.singleton.js +1 -1
- package/src/modules/middlewares/client/inputs.validation.js +1 -0
- package/src/modules/globals/localization/vue-i18n-new.js +0 -70
@@ -1,150 +1,153 @@
|
|
1
|
-
import { ref as
|
1
|
+
import { ref as p, onMounted as U, resolveComponent as k, openBlock as C, createElementBlock as E, createElementVNode as l, createTextVNode as c, toDisplayString as d, unref as a, createVNode as i, withCtx as u, Transition as f, withDirectives as v, vShow as g } from "vue";
|
2
2
|
import I from "../../../../components/Tab/Tab.vue2.js";
|
3
3
|
import w from "../../../../components/Field/Field.vue2.js";
|
4
4
|
import D from "../../../../components/FieldPhone/FieldPhone.vue.js";
|
5
|
-
import
|
6
|
-
import { useRoute as
|
7
|
-
import "vue-i18n";
|
8
|
-
import
|
9
|
-
import {
|
5
|
+
import j from "../../../../components/Button/Button.vue2.js";
|
6
|
+
import { useRoute as F, useRouter as N } from "vue-router";
|
7
|
+
import { useI18n as O } from "vue-i18n";
|
8
|
+
import T from "../../localization/SignIn.json.js";
|
9
|
+
import { state as o, actions as q } from "../../store/auth.js";
|
10
|
+
import { validateInputs as b, validatePhone as A, validateEmail as B } from "../../../middlewares/client/inputs.validation.js";
|
10
11
|
import "./SignIn.vue2.js";
|
11
|
-
|
12
|
-
const F = { class: "" }, O = { class: "mn-medium" }, B = /* @__PURE__ */ s("br", null, null, -1), q = { class: "t-semi" }, M = { class: "mn-big" }, z = { class: "mn-small p-small uppercase t-semi bg-grey radius-big o-hidden" }, G = { class: "" }, H = { class: "mn-thin radius-small" }, J = { class: "mn-thin radius-small o-hidden" }, K = { class: "w-100 mn-big" }, Q = {
|
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: "" }, 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
|
-
setup(
|
15
|
-
const
|
16
|
-
|
17
|
-
const
|
18
|
-
|
19
|
-
|
20
|
-
const t = document.createElement("script");
|
21
|
-
t.type = "text/javascript", t.src = e, t.onload = o, t.onerror = d, document.head.appendChild(t);
|
14
|
+
setup(X) {
|
15
|
+
const h = p(null), y = p(null), _ = p(null);
|
16
|
+
F();
|
17
|
+
const V = N(), { t: s } = O(T), n = p("phone"), x = (r) => new Promise((t, m) => {
|
18
|
+
const e = document.createElement("script");
|
19
|
+
e.type = "text/javascript", e.src = r, e.onload = t, e.onerror = m, document.head.appendChild(e);
|
22
20
|
});
|
23
|
-
|
24
|
-
await
|
21
|
+
U(async () => {
|
22
|
+
await x("https://appleid.cdn-apple.com/appleauth/static/jsapi/appleid/1/en_US/appleid.auth.js");
|
25
23
|
});
|
26
|
-
async function
|
24
|
+
async function P() {
|
27
25
|
try {
|
28
|
-
|
29
|
-
|
26
|
+
n.value === "phone" && await b(
|
27
|
+
h,
|
30
28
|
A,
|
31
|
-
|
29
|
+
o.user.phone,
|
32
30
|
"Некорректный телефон"
|
33
|
-
),
|
34
|
-
|
35
|
-
|
36
|
-
|
31
|
+
), n.value === "email" && await b(
|
32
|
+
_,
|
33
|
+
B,
|
34
|
+
o.user.email,
|
37
35
|
"Некорректный email"
|
38
36
|
);
|
39
37
|
} catch {
|
40
38
|
throw new Error();
|
41
39
|
}
|
42
|
-
|
40
|
+
const r = { ...o.user };
|
41
|
+
r.phone = o.user.phone.number, await q.login(r, n.value);
|
43
42
|
}
|
44
|
-
function
|
45
|
-
|
43
|
+
function S() {
|
44
|
+
V.push({
|
46
45
|
name: "User Profile",
|
47
46
|
params: {
|
48
|
-
_id:
|
47
|
+
_id: o.user._id
|
49
48
|
},
|
50
49
|
query: { afterAuth: "true" }
|
51
50
|
});
|
52
51
|
}
|
53
|
-
return (
|
54
|
-
const
|
55
|
-
return
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
52
|
+
return (r, t) => {
|
53
|
+
const m = k("router-link");
|
54
|
+
return C(), E("section", R, [
|
55
|
+
l("img", {
|
56
|
+
src: "/logo/logo_square.svg",
|
57
|
+
class: "i-extra mn-small"
|
58
|
+
}, null, 8, $),
|
59
|
+
l("h3", L, [
|
60
|
+
c(d(a(s)("title")) + " ", 1),
|
61
|
+
M,
|
62
|
+
l("span", z, d(a(s)("subtitle")), 1)
|
60
63
|
]),
|
61
|
-
|
62
|
-
|
64
|
+
l("p", G, [
|
65
|
+
i(m, {
|
63
66
|
to: { name: "Sign Up" },
|
64
67
|
class: "underline t-second"
|
65
68
|
}, {
|
66
|
-
default:
|
67
|
-
|
69
|
+
default: u(() => [
|
70
|
+
c(d(a(s)("signup")), 1)
|
68
71
|
]),
|
69
72
|
_: 1
|
70
73
|
})
|
71
74
|
]),
|
72
|
-
|
73
|
-
|
74
|
-
selected:
|
75
|
-
"onUpdate:selected":
|
75
|
+
l("div", H, [
|
76
|
+
i(I, {
|
77
|
+
selected: n.value,
|
78
|
+
"onUpdate:selected": t[0] || (t[0] = (e) => n.value = e),
|
76
79
|
tabs: [
|
77
|
-
{ name:
|
78
|
-
{ name:
|
80
|
+
{ name: a(s)("phone"), value: "phone" },
|
81
|
+
{ name: a(s)("email"), value: "email" }
|
79
82
|
]
|
80
83
|
}, null, 8, ["selected", "tabs"])
|
81
84
|
]),
|
82
|
-
|
83
|
-
|
84
|
-
default:
|
85
|
-
v(
|
86
|
-
|
87
|
-
modelValue:
|
88
|
-
"onUpdate:modelValue":
|
85
|
+
l("div", J, [
|
86
|
+
i(f, { name: "slide-fade" }, {
|
87
|
+
default: u(() => [
|
88
|
+
v(l("div", K, [
|
89
|
+
i(D, {
|
90
|
+
modelValue: o.user.phone,
|
91
|
+
"onUpdate:modelValue": t[1] || (t[1] = (e) => o.user.phone = e),
|
89
92
|
dropdownOptions: {
|
90
93
|
showDialCodeInSelection: !0,
|
91
94
|
showFlags: !0,
|
92
95
|
showDialCodeInList: !0
|
93
96
|
},
|
94
|
-
validation:
|
97
|
+
validation: h.value,
|
95
98
|
mode: "national",
|
96
|
-
inputOptions: { placeholder:
|
99
|
+
inputOptions: { placeholder: a(s)("phonePlaceholder") },
|
97
100
|
class: "bg-grey pd-small radius-small mn-thin"
|
98
101
|
}, null, 8, ["modelValue", "validation", "inputOptions"])
|
99
102
|
], 512), [
|
100
|
-
[
|
103
|
+
[g, n.value === "phone"]
|
101
104
|
])
|
102
105
|
]),
|
103
106
|
_: 1
|
104
107
|
}),
|
105
|
-
|
106
|
-
default:
|
107
|
-
v(
|
108
|
-
|
109
|
-
field:
|
110
|
-
"onUpdate:field":
|
111
|
-
placeholder:
|
112
|
-
validation:
|
108
|
+
i(f, { name: "slide-fade" }, {
|
109
|
+
default: u(() => [
|
110
|
+
v(l("div", Q, [
|
111
|
+
i(w, {
|
112
|
+
field: o.user.email,
|
113
|
+
"onUpdate:field": t[2] || (t[2] = (e) => o.user.email = e),
|
114
|
+
placeholder: a(s)("emailPlaceholder"),
|
115
|
+
validation: _.value,
|
113
116
|
class: "bg-grey pd-medium radius-small"
|
114
117
|
}, null, 8, ["field", "placeholder", "validation"])
|
115
118
|
], 512), [
|
116
|
-
[
|
119
|
+
[g, n.value === "email"]
|
117
120
|
])
|
118
121
|
]),
|
119
122
|
_: 1
|
120
123
|
})
|
121
124
|
]),
|
122
|
-
|
123
|
-
field:
|
124
|
-
"onUpdate:field":
|
125
|
+
i(w, {
|
126
|
+
field: o.user.password,
|
127
|
+
"onUpdate:field": t[3] || (t[3] = (e) => o.user.password = e),
|
125
128
|
type: "password",
|
126
129
|
validation: y.value,
|
127
|
-
placeholder:
|
130
|
+
placeholder: a(s)("passwordPlaceholder"),
|
128
131
|
class: "bg-grey pd-medium radius-small mn-semi"
|
129
132
|
}, null, 8, ["field", "validation", "placeholder"]),
|
130
|
-
|
131
|
-
|
133
|
+
l("div", W, [
|
134
|
+
i(m, {
|
132
135
|
to: "/auth/reset-password",
|
133
136
|
class: "underline d-block t-blue"
|
134
137
|
}, {
|
135
|
-
default:
|
136
|
-
|
138
|
+
default: u(() => [
|
139
|
+
c(d(a(s)("forgotPassword")), 1)
|
137
140
|
]),
|
138
141
|
_: 1
|
139
142
|
})
|
140
143
|
]),
|
141
|
-
|
142
|
-
submit:
|
143
|
-
callback:
|
144
|
+
i(j, {
|
145
|
+
submit: P,
|
146
|
+
callback: S,
|
144
147
|
class: "mn-thin"
|
145
148
|
}, {
|
146
|
-
default:
|
147
|
-
|
149
|
+
default: u(() => [
|
150
|
+
c(d(a(s)("signin")), 1)
|
148
151
|
]),
|
149
152
|
_: 1
|
150
153
|
})
|
@@ -152,7 +155,6 @@ const F = { class: "" }, O = { class: "mn-medium" }, B = /* @__PURE__ */ s("br",
|
|
152
155
|
};
|
153
156
|
}
|
154
157
|
};
|
155
|
-
typeof g == "function" && g(Q);
|
156
158
|
export {
|
157
|
-
|
159
|
+
de as default
|
158
160
|
};
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),v=require("../../../../components/Tab/Tab.vue2.cjs"),
|
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"),d=require("vue-router"),w=require("vue-i18n"),l=require("../../store/auth.cjs"),g=require("../../store/twofa.cjs"),s=require("../../../middlewares/client/inputs.validation.cjs");require("./SignUp.vue2.cjs");const N={class:"t-left pd-medium"},b={class:"mn-small"},E={class:"mn-small t-transp"},S={class:"mn-small p-small uppercase t-semi bg-grey radius-big o-hidden"},y={class:""},q={class:"mn-semi radius-small"},C={class:"mn-small t-transp"},D={class:"mn-semi radius-small o-hidden"},x={class:"mn-small t-transp"},T={class:"w-100"},k={__name:"SignUp",setup(I){const{t}=w.useI18n({inheritLocale:!0,useScope:"local"}),i=e.ref(null),r=e.ref(null);d.useRoute();const c=d.useRouter(),a=e.ref("phone");async function m(){try{a.value==="phone"&&await s.validateInputs(i,s.validatePhone,l.state.user.phone,"Некорректный телефон"),a.value==="email"&&await s.validateInputs(r,s.validateEmail,l.state.user.email,"Некорректный email")}catch{throw new Error}try{await g.sendCode(l.state.user,"signup",a.value)}catch{throw new Error}}function p(){c.push({name:"Enter Code"})}return(u,n)=>{const h=e.resolveComponent("router-link");return e.openBlock(),e.createElementBlock("section",N,[e.createElementVNode("h3",b,e.toDisplayString(e.unref(t)("title")),1),e.createElementVNode("p",E,e.toDisplayString(e.unref(t)("description")),1),e.createElementVNode("div",S,[e.createVNode(v.default,{selected:a.value,"onUpdate:selected":n[0]||(n[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",y,[e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",q,[e.createElementVNode("p",C,e.toDisplayString(e.unref(t)("smsNotice")),1),e.createVNode(_.default,{modelValue:l.state.user.phone,"onUpdate:modelValue":n[1]||(n[1]=o=>l.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",D,[e.createElementVNode("p",x,e.toDisplayString(e.unref(t)("emailNotice")),1),e.createVNode(f.default,{field:l.state.user.email,"onUpdate:field":n[2]||(n[2]=o=>l.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",T,[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=k;
|
@@ -1,34 +1,33 @@
|
|
1
|
-
import { ref as
|
2
|
-
import
|
3
|
-
import
|
4
|
-
import
|
5
|
-
import
|
6
|
-
import { useRoute as
|
7
|
-
import { useI18n as
|
1
|
+
import { ref as m, 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 d, withDirectives as _, vShow as f, createTextVNode as v } from "vue";
|
2
|
+
import S from "../../../../components/Tab/Tab.vue2.js";
|
3
|
+
import N from "../../../../components/Field/Field.vue2.js";
|
4
|
+
import x from "../../../../components/FieldPhone/FieldPhone.vue.js";
|
5
|
+
import D from "../../../../components/Button/Button.vue2.js";
|
6
|
+
import { useRoute as I, useRouter as P } from "vue-router";
|
7
|
+
import { useI18n as U } from "vue-i18n";
|
8
8
|
import { state as s } from "../../store/auth.js";
|
9
|
-
import { sendCode as
|
10
|
-
import { validateInputs as w, validatePhone as
|
9
|
+
import { sendCode as F } from "../../store/twofa.js";
|
10
|
+
import { validateInputs as w, validatePhone as O, validateEmail as T } from "../../../middlewares/client/inputs.validation.js";
|
11
11
|
import "./SignUp.vue2.js";
|
12
|
-
|
13
|
-
const B = { class: "t-left pd-medium" }, L = { class: "mn-small" }, R = { class: "mn-small t-transp" }, $ = { class: "mn-small p-small uppercase t-semi bg-grey radius-big o-hidden" }, j = { class: "" }, q = { class: "mn-semi radius-small" }, z = { class: "mn-small t-transp" }, G = { class: "mn-semi radius-small o-hidden" }, H = { class: "mn-small t-transp" }, J = { class: "w-100" }, K = {
|
12
|
+
const A = { class: "t-left pd-medium" }, B = { class: "mn-small" }, L = { class: "mn-small t-transp" }, R = { class: "mn-small p-small uppercase t-semi bg-grey radius-big o-hidden" }, $ = { class: "" }, j = { class: "mn-semi radius-small" }, q = { class: "mn-small t-transp" }, z = { class: "mn-semi radius-small o-hidden" }, G = { class: "mn-small t-transp" }, H = { class: "w-100" }, ae = {
|
14
13
|
__name: "SignUp",
|
15
|
-
setup(
|
16
|
-
const { t: e } =
|
14
|
+
setup(J) {
|
15
|
+
const { t: e } = U({
|
17
16
|
inheritLocale: !0,
|
18
17
|
useScope: "local"
|
19
|
-
}), u =
|
20
|
-
|
21
|
-
const
|
22
|
-
async function
|
18
|
+
}), u = m(null), c = m(null);
|
19
|
+
I();
|
20
|
+
const b = P(), l = m("phone");
|
21
|
+
async function g() {
|
23
22
|
try {
|
24
23
|
l.value === "phone" && await w(
|
25
24
|
u,
|
26
|
-
|
25
|
+
O,
|
27
26
|
s.user.phone,
|
28
27
|
"Некорректный телефон"
|
29
28
|
), l.value === "email" && await w(
|
30
29
|
c,
|
31
|
-
|
30
|
+
T,
|
32
31
|
s.user.email,
|
33
32
|
"Некорректный email"
|
34
33
|
);
|
@@ -36,21 +35,21 @@ const B = { class: "t-left pd-medium" }, L = { class: "mn-small" }, R = { class:
|
|
36
35
|
throw new Error();
|
37
36
|
}
|
38
37
|
try {
|
39
|
-
await
|
38
|
+
await F(s.user, "signup", l.value);
|
40
39
|
} catch {
|
41
40
|
throw new Error();
|
42
41
|
}
|
43
42
|
}
|
44
43
|
function V() {
|
45
|
-
|
44
|
+
b.push({ name: "Enter Code" });
|
46
45
|
}
|
47
46
|
return (p, i) => {
|
48
|
-
const
|
49
|
-
return
|
50
|
-
o("h3",
|
51
|
-
o("p",
|
52
|
-
o("div",
|
53
|
-
a(
|
47
|
+
const y = C("router-link");
|
48
|
+
return k(), E("section", A, [
|
49
|
+
o("h3", B, n(t(e)("title")), 1),
|
50
|
+
o("p", L, n(t(e)("description")), 1),
|
51
|
+
o("div", R, [
|
52
|
+
a(S, {
|
54
53
|
selected: l.value,
|
55
54
|
"onUpdate:selected": i[0] || (i[0] = (r) => l.value = r),
|
56
55
|
tabs: [
|
@@ -59,12 +58,12 @@ const B = { class: "t-left pd-medium" }, L = { class: "mn-small" }, R = { class:
|
|
59
58
|
]
|
60
59
|
}, null, 8, ["selected", "tabs"])
|
61
60
|
]),
|
62
|
-
o("div",
|
61
|
+
o("div", $, [
|
63
62
|
a(h, { name: "slide-fade" }, {
|
64
|
-
default:
|
65
|
-
|
66
|
-
o("p",
|
67
|
-
a(
|
63
|
+
default: d(() => [
|
64
|
+
_(o("div", j, [
|
65
|
+
o("p", q, n(t(e)("smsNotice")), 1),
|
66
|
+
a(x, {
|
68
67
|
modelValue: s.user.phone,
|
69
68
|
"onUpdate:modelValue": i[1] || (i[1] = (r) => s.user.phone = r),
|
70
69
|
dropdownOptions: {
|
@@ -78,16 +77,16 @@ const B = { class: "t-left pd-medium" }, L = { class: "mn-small" }, R = { class:
|
|
78
77
|
class: "bg-grey pd-small radius-small mn-thin"
|
79
78
|
}, null, 8, ["modelValue", "validation", "inputOptions"])
|
80
79
|
], 512), [
|
81
|
-
[
|
80
|
+
[f, l.value === "phone"]
|
82
81
|
])
|
83
82
|
]),
|
84
83
|
_: 1
|
85
84
|
}),
|
86
85
|
a(h, { name: "slide-fade" }, {
|
87
|
-
default:
|
88
|
-
|
89
|
-
o("p",
|
90
|
-
a(
|
86
|
+
default: d(() => [
|
87
|
+
_(o("div", z, [
|
88
|
+
o("p", G, n(t(e)("emailNotice")), 1),
|
89
|
+
a(N, {
|
91
90
|
field: s.user.email,
|
92
91
|
"onUpdate:field": i[2] || (i[2] = (r) => s.user.email = r),
|
93
92
|
placeholder: t(e)("emailPlaceholder"),
|
@@ -95,28 +94,28 @@ const B = { class: "t-left pd-medium" }, L = { class: "mn-small" }, R = { class:
|
|
95
94
|
class: "bg-grey pd-medium radius-small"
|
96
95
|
}, null, 8, ["field", "placeholder", "validation"])
|
97
96
|
], 512), [
|
98
|
-
[
|
97
|
+
[f, l.value === "email"]
|
99
98
|
])
|
100
99
|
]),
|
101
100
|
_: 1
|
102
101
|
})
|
103
102
|
]),
|
104
|
-
a(
|
105
|
-
submit:
|
103
|
+
a(D, {
|
104
|
+
submit: g,
|
106
105
|
callback: V,
|
107
106
|
class: "mn-big"
|
108
107
|
}, {
|
109
|
-
default:
|
108
|
+
default: d(() => [
|
110
109
|
v(n(t(e)("sendCode")), 1)
|
111
110
|
]),
|
112
111
|
_: 1
|
113
112
|
}),
|
114
|
-
o("div",
|
115
|
-
a(
|
113
|
+
o("div", H, [
|
114
|
+
a(y, {
|
116
115
|
to: "/auth/signin",
|
117
116
|
class: "underline mn-medium d-block t-blue"
|
118
117
|
}, {
|
119
|
-
default:
|
118
|
+
default: d(() => [
|
120
119
|
v(n(t(e)("haveAccount")), 1)
|
121
120
|
]),
|
122
121
|
_: 1
|
@@ -126,7 +125,6 @@ const B = { class: "t-left pd-medium" }, L = { class: "mn-small" }, R = { class:
|
|
126
125
|
};
|
127
126
|
}
|
128
127
|
};
|
129
|
-
typeof b == "function" && b(K);
|
130
128
|
export {
|
131
|
-
|
129
|
+
ae as default
|
132
130
|
};
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e={en:{title:"Welcome to Weeder",subtitle:"Sign In to Continue",signup:"Don't have an account?",phone:"Phone",email:"Email",phonePlaceholder:"Enter your phone",emailPlaceholder:"Enter your email",haveAccount:"Don't have an account? Sign Up",passwordPlaceholder:"Enter your password",forgotPassword:"Forgot Password?",signin:"Sign In",signin_apple:"Sign In with Apple",soon:"SOON"},ru:{title:"Приветствуем вас,",subtitle:"Войдите для продолжения",signup:"Нет аккаунта?",phone:"Телефон",email:"Email",phonePlaceholder:"Введите ваш телефон",emailPlaceholder:"Введите ваш email",haveAccount:"Нет аккаунта? Зарегистрироваться",passwordPlaceholder:"Введите ваш пароль",forgotPassword:"Забыли пароль?",signin:"Войти",signin_apple:"Войти через Apple",soon:"СКОРО"}},o={messages:e};exports.default=o;exports.messages=e;
|
@@ -0,0 +1,38 @@
|
|
1
|
+
const e = {
|
2
|
+
en: {
|
3
|
+
title: "Welcome to Weeder",
|
4
|
+
subtitle: "Sign In to Continue",
|
5
|
+
signup: "Don't have an account?",
|
6
|
+
phone: "Phone",
|
7
|
+
email: "Email",
|
8
|
+
phonePlaceholder: "Enter your phone",
|
9
|
+
emailPlaceholder: "Enter your email",
|
10
|
+
haveAccount: "Don't have an account? Sign Up",
|
11
|
+
passwordPlaceholder: "Enter your password",
|
12
|
+
forgotPassword: "Forgot Password?",
|
13
|
+
signin: "Sign In",
|
14
|
+
signin_apple: "Sign In with Apple",
|
15
|
+
soon: "SOON"
|
16
|
+
},
|
17
|
+
ru: {
|
18
|
+
title: "Приветствуем вас,",
|
19
|
+
subtitle: "Войдите для продолжения",
|
20
|
+
signup: "Нет аккаунта?",
|
21
|
+
phone: "Телефон",
|
22
|
+
email: "Email",
|
23
|
+
phonePlaceholder: "Введите ваш телефон",
|
24
|
+
emailPlaceholder: "Введите ваш email",
|
25
|
+
haveAccount: "Нет аккаунта? Зарегистрироваться",
|
26
|
+
passwordPlaceholder: "Введите ваш пароль",
|
27
|
+
forgotPassword: "Забыли пароль?",
|
28
|
+
signin: "Войти",
|
29
|
+
signin_apple: "Войти через Apple",
|
30
|
+
soon: "СКОРО"
|
31
|
+
}
|
32
|
+
}, o = {
|
33
|
+
messages: e
|
34
|
+
};
|
35
|
+
export {
|
36
|
+
o as default,
|
37
|
+
e as messages
|
38
|
+
};
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const n=require("../components/layouts/Auth.vue.cjs"),e=require("../../middlewares/client/states.validation.cjs"),t=require("../../middlewares/client/auth.validation.cjs");function o(r){return[{path:"auth",name:"Authentication",meta:{title:{en:"Аутентификация",ru:"Authentication"},options:r},component:n.default,children:[{path:"signin",name:"Sign In",beforeEnter:[t.requiresNoAuth,e.resetUser],meta:{title:{en:"Sign In",ru:"Вход"}},component:()=>Promise.resolve().then(()=>require("../components/pages/SignIn.vue.cjs"))},{path:"reset-password",name:"Reset Password",beforeEnter:[t.requiresNoAuth,e.resetUser],meta:{title:{en:"Reset Password",ru:"Сбросить Пароль"}},component:()=>Promise.resolve().then(()=>require("../components/pages/ResetPassword.vue.cjs"))},{path:"signup",name:"Sign Up",beforeEnter:[t.requiresNoAuth,e.resetUser],meta:{title:{en:"Sign Up",ru:"Регистрация"}},component:()=>Promise.resolve().then(()=>require("../components/pages/SignUp.vue.cjs"))},{path:"enter-code",name:"Enter Code",beforeEnter:[t.requiresNoAuth,e.checkUser],meta:{title:{en:"Enter Code",ru:"Введите Код"}},component:()=>Promise.resolve().then(()=>require("../components/pages/EnterCode.vue.cjs"))},{path:"enter-password",name:"Enter Password",beforeEnter:[t.requiresNoAuth,e.checkUser],meta:{title:{en:"Enter Password",ru:"Введите Пароль"}},component:()=>Promise.resolve().then(()=>require("../components/pages/EnterPassword.vue.cjs"))},{path:"invite",name:"Invite",meta:{title:{en:"Invite",ru:"Приглашение"}},component:()=>Promise.resolve().then(()=>require("../components/pages/Invite.vue.cjs"))}]}]}exports.default=o;
|