@ozdao/prometheus-framework 0.1.78 → 0.1.79
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/components/Popup/Popup.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Popup/Popup.vue.js +2 -72
- package/dist/prometheus-framework/src/components/Popup/Popup.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Popup/Popup.vue2.js +72 -2
- 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/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 +87 -84
- 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/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/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 +3 -3
- 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 +1 -4
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.js +2 -61
- 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 +1 -1
- 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/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 +3 -3
- 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 +3 -3
- 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 +2 -2
- 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 +2 -2
- 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/blocks/DepartmentMemberModify.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.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 +3 -3
- 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 +2 -2
- 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 +3 -3
- 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/MembersAdd.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.js +2 -2
- 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 +3 -3
- 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 +3 -3
- 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 +17 -47
- 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/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/globals/localization/vue-i18n-new.js +0 -70
@@ -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.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("../../../../node_modules/axios/lib/axios.cjs"),p=require("../../../../../node_modules/js-cookie/src/js.cookie.cjs"),l=require("../../../../node_modules/@capacitor/core/dist/index.cjs"),w=require("vue"),n=require("../../globals/store/globals.cjs"),O=require("./twofa.cjs"),i=f.default.create({baseURL:process.env.API_URL,withCredentials:!0}),a=w.reactive({user:{_id:void 0,username:"",email:"",phone:"",password:"",passwordRepeat:""},access:{roles:null,token:null,status:!1}});async function k(){const e=await P("user");if(e){const{_id:t,email:s,phone:c,roles:o,accessToken:r}=e;Object.assign(a.user,{_id:t,email:s,phone:c}),Object.assign(a.access,{token:r,roles:o,status:!!r}),i.interceptors.request.use(u=>(r&&(u.headers["x-access-token"]=r),u),u=>Promise.reject(u))}}k();const g={async login(e,t){try{const s=await i.post("/api/auth/signin",{...e,type:t});return d("user",s.data),Object.assign(a.user,{...s.data}),Object.assign(a.access,{token:s.data.accessToken,status:!0,roles:s.data.roles}),s.data}catch(s){return Object.assign(a.access,{token:null,status:!1,roles:null}),n.setError(s),Promise.reject(s)}},async signup(e,t,s){const{password:c,passwordRepeat:o}=a.user;if(c!==o){const r={response:{data:{errorCode:"PASSWORDS_DO_NOT_MATCH"}}};throw n.setError(r),new Error(r.response.status)}try{e.phone=e.phone.number;const r=await i.post("/api/auth/signup",{...e,type:t,inviteCode:s});return r.data.accessToken&&d("user",r.data),Object.assign(a.user,{...r.data}),Object.assign(a.access,{token:r.data.accessToken,status:!0,roles:r.data.roles}),r.data}catch(r){throw n.setError(r),console.log("Sign up falied"),r}},logout(){b("user"),Object.assign(a.user,{email:"",phone:"",password:"",passwordRepeat:""}),Object.assign(a.access,{token:null,status:!1})},async resetPassword(e,t){try{const s=await i.post("/api/auth/reset-password",{email:e.email,phone:e.phone.number,type:t});return Object.assign(O.state.code,{...s.data,isSended:!0}),s.data}catch(s){return n.setError(s),Promise.reject(s)}},async updatePassword(e,t){const{password:s,passwordRepeat:c}=a.user;if(s!==c){const o={response:{data:{errorCode:"PASSWORDS_DO_NOT_MATCH"}}};throw n.setError(o),new Error(o.response.status)}try{const o=await i.post("/api/auth/update-password",{email:e.email,phone:e.phone.number,password:e.password,passwordRepeat:e.passwordRepeat,type:t});return o.data.accessToken&&d("user",o.data),Object.assign(a.user,{...o.data}),Object.assign(a.access,{token:o.data.accessToken,status:!0}),o.data}catch(o){return n.setError(o),Promise.reject(o)}}},h={development:{secure:!1,expires:1},production:{expires:1,domain:process.env.API_URL,sameSite:"none",secure:!0}};function P(e){if(process.env.MOBILE_APP){const t=p.default.get(e);return t?JSON.parse(t):null}else{const t=p.default.get(e);return t?JSON.parse(t):null}}function d(e,t,s=process.env.NODE_ENV){process.env.MOBILE_APP?l.CapacitorCookies.setCookie({url:process.env.API_URL,key:e,value:JSON.stringify(t)}):p.default.set(e,JSON.stringify(t),h[s])}function b(e,t=process.env.NODE_ENV){if(process.env.MOBILE_APP)l.CapacitorCookies.deleteCookie({url:process.env.API_URL,key:e});else{const s=t==="production"?{domain:process.env.API_URL}:{};p.default.remove(e,s)}}w.watch(a,(e,t)=>{});exports.actions=g;exports.state=a;
|
@@ -1,10 +1,10 @@
|
|
1
|
-
import
|
1
|
+
import m from "../../../../node_modules/axios/lib/axios.js";
|
2
2
|
import u from "../../../../../node_modules/js-cookie/src/js.cookie.js";
|
3
|
-
import { CapacitorCookies as
|
4
|
-
import { reactive as
|
3
|
+
import { CapacitorCookies as l } from "../../../../node_modules/@capacitor/core/dist/index.js";
|
4
|
+
import { reactive as w, watch as f } from "vue";
|
5
5
|
import { setError as n } from "../../globals/store/globals.js";
|
6
|
-
import { state as
|
7
|
-
const
|
6
|
+
import { state as O } from "./twofa.js";
|
7
|
+
const i = m.create({ baseURL: process.env.API_URL, withCredentials: !0 }), a = w({
|
8
8
|
user: {
|
9
9
|
_id: void 0,
|
10
10
|
username: "",
|
@@ -18,137 +18,155 @@ const c = l.create({ baseURL: process.env.API_URL, withCredentials: !0 }), r = m
|
|
18
18
|
token: null,
|
19
19
|
status: !1
|
20
20
|
}
|
21
|
-
})
|
22
|
-
|
21
|
+
});
|
22
|
+
async function k() {
|
23
|
+
const e = await h("user");
|
24
|
+
if (e) {
|
25
|
+
const { _id: t, email: s, phone: c, roles: r, accessToken: o } = e;
|
26
|
+
Object.assign(a.user, { _id: t, email: s, phone: c }), 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
|
+
}
|
28
|
+
}
|
29
|
+
k();
|
30
|
+
const R = {
|
31
|
+
async login(e, t) {
|
23
32
|
try {
|
24
|
-
const
|
25
|
-
...
|
33
|
+
const s = await i.post("/api/auth/signin", {
|
34
|
+
...e,
|
26
35
|
type: t
|
27
36
|
});
|
28
|
-
return
|
29
|
-
...
|
30
|
-
}), Object.assign(
|
31
|
-
token:
|
37
|
+
return d("user", s.data), Object.assign(a.user, {
|
38
|
+
...s.data
|
39
|
+
}), Object.assign(a.access, {
|
40
|
+
token: s.data.accessToken,
|
32
41
|
status: !0,
|
33
|
-
roles:
|
34
|
-
}),
|
35
|
-
} catch (
|
36
|
-
return Object.assign(
|
42
|
+
roles: s.data.roles
|
43
|
+
}), s.data;
|
44
|
+
} catch (s) {
|
45
|
+
return Object.assign(a.access, {
|
37
46
|
token: null,
|
38
47
|
status: !1,
|
39
48
|
roles: null
|
40
|
-
}), n(
|
49
|
+
}), n(s), Promise.reject(s);
|
41
50
|
}
|
42
51
|
},
|
43
|
-
async signup(
|
44
|
-
const { password:
|
45
|
-
if (
|
46
|
-
const
|
52
|
+
async signup(e, t, s) {
|
53
|
+
const { password: c, passwordRepeat: r } = a.user;
|
54
|
+
if (c !== r) {
|
55
|
+
const o = {
|
47
56
|
response: {
|
48
57
|
data: { errorCode: "PASSWORDS_DO_NOT_MATCH" }
|
49
58
|
}
|
50
59
|
};
|
51
|
-
throw n(
|
60
|
+
throw n(o), new Error(o.response.status);
|
52
61
|
}
|
53
62
|
try {
|
54
|
-
|
55
|
-
const
|
56
|
-
...
|
63
|
+
e.phone = e.phone.number;
|
64
|
+
const o = await i.post("/api/auth/signup", {
|
65
|
+
...e,
|
57
66
|
type: t,
|
58
|
-
inviteCode:
|
67
|
+
inviteCode: s
|
59
68
|
});
|
60
|
-
return
|
61
|
-
...
|
62
|
-
}), Object.assign(
|
63
|
-
token:
|
69
|
+
return o.data.accessToken && d("user", o.data), Object.assign(a.user, {
|
70
|
+
...o.data
|
71
|
+
}), Object.assign(a.access, {
|
72
|
+
token: o.data.accessToken,
|
64
73
|
status: !0,
|
65
|
-
roles:
|
66
|
-
}),
|
67
|
-
} catch (
|
68
|
-
throw n(
|
74
|
+
roles: o.data.roles
|
75
|
+
}), o.data;
|
76
|
+
} catch (o) {
|
77
|
+
throw n(o), console.log("Sign up falied"), o;
|
69
78
|
}
|
70
79
|
},
|
71
80
|
logout() {
|
72
|
-
|
81
|
+
P("user"), Object.assign(a.user, {
|
73
82
|
email: "",
|
74
83
|
phone: "",
|
75
84
|
password: "",
|
76
85
|
passwordRepeat: ""
|
77
|
-
}), Object.assign(
|
86
|
+
}), Object.assign(a.access, {
|
78
87
|
token: null,
|
79
88
|
status: !1
|
80
89
|
});
|
81
90
|
},
|
82
|
-
async resetPassword(
|
91
|
+
async resetPassword(e, t) {
|
83
92
|
try {
|
84
|
-
const
|
85
|
-
email:
|
86
|
-
phone:
|
93
|
+
const s = await i.post("/api/auth/reset-password", {
|
94
|
+
email: e.email,
|
95
|
+
phone: e.phone.number,
|
87
96
|
type: t
|
88
97
|
});
|
89
|
-
return Object.assign(
|
90
|
-
...
|
98
|
+
return Object.assign(O.code, {
|
99
|
+
...s.data,
|
91
100
|
isSended: !0
|
92
|
-
}),
|
93
|
-
} catch (
|
94
|
-
return n(
|
101
|
+
}), s.data;
|
102
|
+
} catch (s) {
|
103
|
+
return n(s), Promise.reject(s);
|
95
104
|
}
|
96
105
|
},
|
97
|
-
async updatePassword(
|
98
|
-
const { password:
|
99
|
-
if (
|
100
|
-
const
|
106
|
+
async updatePassword(e, t) {
|
107
|
+
const { password: s, passwordRepeat: c } = a.user;
|
108
|
+
if (s !== c) {
|
109
|
+
const r = {
|
101
110
|
response: {
|
102
111
|
data: { errorCode: "PASSWORDS_DO_NOT_MATCH" }
|
103
112
|
}
|
104
113
|
};
|
105
|
-
throw n(
|
114
|
+
throw n(r), new Error(r.response.status);
|
106
115
|
}
|
107
116
|
try {
|
108
|
-
const
|
109
|
-
email:
|
110
|
-
phone:
|
111
|
-
password:
|
112
|
-
passwordRepeat:
|
117
|
+
const r = await i.post("/api/auth/update-password", {
|
118
|
+
email: e.email,
|
119
|
+
phone: e.phone.number,
|
120
|
+
password: e.password,
|
121
|
+
passwordRepeat: e.passwordRepeat,
|
113
122
|
type: t
|
114
123
|
});
|
115
|
-
return
|
116
|
-
...
|
117
|
-
}), Object.assign(
|
118
|
-
token:
|
124
|
+
return r.data.accessToken && d("user", r.data), Object.assign(a.user, {
|
125
|
+
...r.data
|
126
|
+
}), Object.assign(a.access, {
|
127
|
+
token: r.data.accessToken,
|
119
128
|
status: !0
|
120
|
-
}),
|
121
|
-
} catch (
|
122
|
-
return n(
|
129
|
+
}), r.data;
|
130
|
+
} catch (r) {
|
131
|
+
return n(r), Promise.reject(r);
|
123
132
|
}
|
124
133
|
}
|
125
|
-
},
|
134
|
+
}, g = {
|
126
135
|
development: { secure: !1, expires: 1 },
|
127
136
|
production: { expires: 1, domain: process.env.API_URL, sameSite: "none", secure: !0 }
|
128
137
|
};
|
129
|
-
function
|
130
|
-
process.env.MOBILE_APP
|
138
|
+
function h(e) {
|
139
|
+
if (process.env.MOBILE_APP) {
|
140
|
+
const t = u.get(e);
|
141
|
+
return t ? JSON.parse(t) : null;
|
142
|
+
} else {
|
143
|
+
const t = u.get(e);
|
144
|
+
return t ? JSON.parse(t) : null;
|
145
|
+
}
|
146
|
+
}
|
147
|
+
function d(e, t, s = process.env.NODE_ENV) {
|
148
|
+
process.env.MOBILE_APP ? l.setCookie({
|
131
149
|
url: process.env.API_URL,
|
132
150
|
// используйте ваш API_URL
|
133
|
-
key:
|
151
|
+
key: e,
|
134
152
|
value: JSON.stringify(t)
|
135
|
-
}) : u.set(
|
153
|
+
}) : u.set(e, JSON.stringify(t), g[s]);
|
136
154
|
}
|
137
|
-
function
|
155
|
+
function P(e, t = process.env.NODE_ENV) {
|
138
156
|
if (process.env.MOBILE_APP)
|
139
|
-
|
157
|
+
l.deleteCookie({
|
140
158
|
url: process.env.API_URL,
|
141
159
|
// используйте ваш API_URL
|
142
|
-
key:
|
160
|
+
key: e
|
143
161
|
});
|
144
162
|
else {
|
145
|
-
const
|
146
|
-
u.remove(
|
163
|
+
const s = t === "production" ? { domain: process.env.API_URL } : {};
|
164
|
+
u.remove(e, s);
|
147
165
|
}
|
148
166
|
}
|
149
|
-
|
167
|
+
f(a, (e, t) => {
|
150
168
|
});
|
151
169
|
export {
|
152
170
|
R as actions,
|
153
|
-
|
171
|
+
a as state
|
154
172
|
};
|
package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.cjs
CHANGED
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),n=require("vue-router"),u=require("../../../../components/Select/Select.
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),n=require("vue-router"),u=require("../../../../components/Select/Select.vue2.cjs"),a=require("../../store/blogposts.cjs"),c=require("../../../auth/store/auth.cjs"),m={class:"min-h-100vh pd-thin"},d={class:"mn-thin flex-v-center t-left flex-nowrap flex"},p={class:"flex-v-center flex-nowrap flex t-left"},f=e.createElementVNode("span",{class:""},"Topics for ",-1),g={class:"w-100 bg-grey pd-small radius-big mn-semi gap-thin flex-nowrap flex"},h={class:""},w={__name:"Community",setup(k){const l=n.useRoute(),r=n.useRouter();return(y,t)=>{const s=e.resolveComponent("router-view");return e.openBlock(),e.createElementBlock("div",m,[e.createElementVNode("header",d,[e.createElementVNode("h2",p,[f,e.createVNode(u.default,{options:["today","week","month","year"],select:a.state.filter.period,"onUpdate:select":t[0]||(t[0]=o=>a.state.filter.period=o),placeholder:"Select type",class:"w-max mn-l-small bg-grey pd-thin radius-medium h2 t-center t-black"},null,8,["select"])])]),e.createElementVNode("ul",g,[e.createElementVNode("li",{class:e.normalizeClass([{"t-white bg-black":e.unref(l).params.category==="featured"},"t-medium pd-thin radius-small"]),onClick:t[1]||(t[1]=o=>e.unref(r).push({name:"Blog"}))},"👑 Featured",2),e.createElementVNode("li",{class:e.normalizeClass([{"t-white bg-black":e.unref(l).params.category==="popular"},"t-medium pd-thin radius-small"]),onClick:t[2]||(t[2]=o=>e.unref(r).push({name:"Blog",params:{category:"popular"}}))},"🔥 Popular",2),e.createElementVNode("li",{class:e.normalizeClass([{"t-white bg-black":e.unref(l).params.category==="new"},"t-medium pd-thin radius-small"]),onClick:t[3]||(t[3]=o=>e.unref(r).push({name:"Blog",params:{category:"new"}}))},"🆕 New",2),c.state.user._id?(e.openBlock(),e.createElementBlock("li",{key:0,class:e.normalizeClass([{"t-white bg-black":e.unref(l).params.category==="following"},"t-medium pd-thin radius-small"]),onClick:t[4]||(t[4]=o=>e.unref(r).push({name:"Blog",params:{category:"following"}}))},"👥 Following",2)):e.createCommentVNode("",!0)]),e.createElementVNode("section",h,[e.createVNode(s,null,{default:e.withCtx(({Component:o,route:i})=>[e.createVNode(e.Transition,{name:"scaleIn",mode:"out-in"},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o),{ref:"page",key:i.query}))]),_:2},1024)]),_:1})])])}}};exports.default=w;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { resolveComponent as f, openBlock as n, createElementBlock as m, createElementVNode as o, createVNode as i, normalizeClass as r, unref as t, createCommentVNode as g, withCtx as p, Transition as h, createBlock as w, resolveDynamicComponent as y } from "vue";
|
2
2
|
import { useRoute as _, useRouter as k } from "vue-router";
|
3
|
-
import b from "../../../../components/Select/Select.
|
3
|
+
import b from "../../../../components/Select/Select.vue2.js";
|
4
4
|
import { state as c } from "../../store/blogposts.js";
|
5
5
|
import { state as v } from "../../../auth/store/auth.js";
|
6
6
|
const x = { class: "min-h-100vh pd-thin" }, C = { class: "mn-thin flex-v-center t-left flex-nowrap flex" }, B = { class: "flex-v-center flex-nowrap flex t-left" }, $ = /* @__PURE__ */ o("span", { class: "" }, "Topics for ", -1), N = { class: "w-100 bg-grey pd-small radius-big mn-semi gap-thin flex-nowrap flex" }, V = { class: "" }, D = {
|
package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.cjs
CHANGED
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),w=require("../../../constructor/components/elements/Textarea.
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),w=require("../../../constructor/components/elements/Textarea.vue2.cjs"),V=require("../../../constructor/components/sections/Constructor.vue.cjs"),y=require("../../../../components/Popup/Popup.vue2.cjs");require("../../../../components/FieldTags/tag-input.vue.cjs");require("../../../../components/FieldTags/vue-tags-input.scss.cjs");const B=require("../../../../components/FieldTags/BlockTags.vue.cjs"),N=require("../../../../components/Checkbox/Checkbox.vue.cjs"),P=require("../../../../components/SelectMulti/SelectMulti.vue.cjs"),x=require("../../../../components/Button/Button.vue2.cjs"),f=require("vue-router"),n=require("../../store/blogposts.cjs"),i=require("../../../auth/store/auth.cjs"),C=require("../../../organizations/store/organizations.cjs"),q={class:"pd-thin"},E={key:0,class:"h-100 w-100 bg-grey pd-big radius-big"},T={class:"w-full h-full"},z={key:1,class:"pd-thin pos-sticky pos-l-0 pos-b-0 w-100"},O={class:"pd-thin radius-big bg-main w-100 flex-nowrap flex"},D=e.createElementVNode("h3",{class:"mn-small"},"Final Touches",-1),M=e.createElementVNode("h5",{class:"mn-thin"},"Add to public:",-1),S={key:0,class:"mn-thin"},U={key:1,class:"mn-medium br-grey br-2px br-solid pd-small radius-big"},A={__name:"CreateBlogPost",setup(R){const s=f.useRoute(),u=f.useRouter();let t=e.ref(null),p=e.ref(null);const c=e.ref([]),r=e.ref(null);e.onMounted(async()=>{if(s.params.url){const a=await n.read({user:i.state.user._id,url:s.params.url});t.value=a.pop()}else n.clean(),t.value=n.state.current;t.value.owner||(t.value.owner={target:i.state.user._id,type:"user"}),t.value.creator||(t.value.creator={target:i.state.user._id,type:"user",hidden:!1}),t.value.owner.type==="organization"&&(r.value={_id:t.value.owner.target._id,name:t.value.owner.target.profile.name,photo:t.value.owner.target.profile.photo});const o=await C.actions.read({user:i.state.user._id,postable:i.state.user._id,limit:100});console.log(o),p.value=o.map(a=>({name:a.profile.name,_id:a._id,photo:a.profile.photo}))});const g=e.ref(""),m=e.ref([{text:"story"},{text:"news"},{text:"guide"},{text:"discussion"},{text:"photos"}]);e.computed(()=>m.value.filter(o=>o.text.toLowerCase().includes(g.value.toLowerCase()))),e.computed(()=>m.value.filter(o=>!c.value.some(a=>a.text===o.text)));const d=e.ref(!1);function v(){d.value=!0}function h(){d.value=!1}function b(){c.value.length>0&&c.value.map(o=>o.text),t.value.status="draft",s.params.url?n.update(t.value).then(o=>{u.push({name:"BlogPost",params:{url:o.url}})}).catch(o=>{console.log(o)}):n.create(t.value).then(o=>{u.push({name:"BlogPost",params:{url:o.url}})}).catch(o=>{console.log(o)})}function k(){r.value&&(t.value.owner={target:r.value._id,type:"organization"}),r.value||(t.value.creator.hidden=!1),r.value||(t.value.organization=t.value.creator),t.value.status="published",console.log(t.value),s.params.url?n.update(t.value).then(o=>{u.push({name:"BlogPost",params:{url:o.url}})}).catch(o=>{console.log(o)}):n.create(t.value).then(o=>{u.push({name:"BlogPost",params:{url:o.url}})}).catch(o=>{console.log(o)})}function _(){confirm("Are you sure you want to delete this post?")&&n.remove(t.value._id).then(o=>{u.push({name:"User Blogposts",params:{_id:t.value.creator.target._id}})}).catch(o=>{console.log(o)})}return(o,a)=>(e.openBlock(),e.createElementBlock("article",q,[e.unref(t)?(e.openBlock(),e.createElementBlock("section",E,[e.createElementVNode("div",T,[e.createVNode(w.default,{prop:e.unref(t),content:"name",placeholder:"Enter post title",class:"h2"},null,8,["prop"])]),e.createVNode(V.default,{content:e.unref(t).content,onUpdate:a[0]||(a[0]=l=>e.unref(t).content=l)},null,8,["content"])])):e.createCommentVNode("",!0),e.unref(t)?(e.openBlock(),e.createElementBlock("section",z,[e.createElementVNode("div",O,[e.unref(s).params.url?(e.openBlock(),e.createElementBlock("a",{key:0,onClick:a[1]||(a[1]=l=>_()),class:"mn-r-auto bg-red t-white t-black button"},"Delete")):e.createCommentVNode("",!0),e.createElementVNode("a",{onClick:a[2]||(a[2]=l=>b()),class:"mn-l-auto bg-white t-black button"},"To Drafts"),e.createElementVNode("a",{onClick:a[3]||(a[3]=l=>v()),class:"mn-l-thin bg-black t-white button"},"Publish")])])):e.createCommentVNode("",!0),e.createVNode(y.default,{title:"Добавить участника",onClosePopup:h,isPopupOpen:d.value,class:"w-m-33r t-left pd-big bg-white radius-big"},{default:e.withCtx(()=>[D,e.createVNode(B.default,{onTagsChanged:a[4]||(a[4]=l=>e.unref(t).tags=l),tags:e.unref(t).tags},null,8,["tags"]),M,e.createVNode(P.default,{modelValue:r.value,"onUpdate:modelValue":a[5]||(a[5]=l=>r.value=l),options:e.unref(p),multiple:!1,taggable:!1,placeholder:"Type to search or add tag",label:"name","track-by":"_id",class:"mn-medium bg-grey radius-medium pd-small"},null,8,["modelValue","options"]),r.value?(e.openBlock(),e.createElementBlock("h5",S,"Options:")):e.createCommentVNode("",!0),r.value?(e.openBlock(),e.createElementBlock("div",U,[e.createVNode(N.default,{label:"Hide Author",radio:e.unref(t).creator.hidden,"onUpdate:radio":a[6]||(a[6]=l=>e.unref(t).creator.hidden=l),name:"prices",class:"w-100"},null,8,["radio"])])):e.createCommentVNode("",!0),e.createVNode(x.default,{submit:k,callback:o.redirectTo,class:"w-100 bg-black t-white"},{default:e.withCtx(()=>[e.createTextVNode("Publish")]),_:1},8,["callback"])]),_:1},8,["isPopupOpen"])]))}};exports.default=A;
|
package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
import { ref as r, onMounted as V, computed as _, openBlock as u, createElementBlock as i, unref as a, createElementVNode as p, createVNode as n, createCommentVNode as m, withCtx as w, createTextVNode as z } from "vue";
|
2
|
-
import D from "../../../constructor/components/elements/Textarea.
|
2
|
+
import D from "../../../constructor/components/elements/Textarea.vue2.js";
|
3
3
|
import N from "../../../constructor/components/sections/Constructor.vue.js";
|
4
|
-
import O from "../../../../components/Popup/Popup.
|
4
|
+
import O from "../../../../components/Popup/Popup.vue2.js";
|
5
5
|
import "../../../../components/FieldTags/tag-input.vue.js";
|
6
6
|
import "../../../../components/FieldTags/vue-tags-input.scss.js";
|
7
7
|
import U from "../../../../components/FieldTags/BlockTags.vue.js";
|
8
8
|
import A from "../../../../components/Checkbox/Checkbox.vue.js";
|
9
9
|
import E from "../../../../components/SelectMulti/SelectMulti.vue.js";
|
10
|
-
import L from "../../../../components/Button/Button.
|
10
|
+
import L from "../../../../components/Button/Button.vue2.js";
|
11
11
|
import { useRoute as M, useRouter as R } from "vue-router";
|
12
12
|
import { read as S, clean as F, state as H, update as k, create as y, remove as j } from "../../store/blogposts.js";
|
13
13
|
import { state as f } from "../../../auth/store/auth.js";
|
package/dist/prometheus-framework/src/modules/constructor/components/elements/Bullets.vue.cjs
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),f=["placeholder"],h={__name:"Bullets",props:["obj","label","prop","value","content","textarea","placeholder","index","ref"],emits:["deleteBlock","addBlock","focus"],setup(t,{emit:i}){const l=t;e.ref(l);const r=e.ref(null);function p(n){const o=/^\s*[-*]\s+(.*)/;let s=n.target.value.split(/\n+/).map(u=>{const d=o.exec(u);return d?d[1]:null}).filter(u=>u!==null);s.length>0?(l.prop[l.content]=s,a()):n.target.value.trim()===""&&(l.prop[l.content]=[],a())}function a(){r.value.style.height="1rem",r.value.style.height=r.value.scrollHeight+"px"}return e.onUpdated(()=>{a()}),e.onMounted(()=>{a()}),e.watch(()=>l.prop[l.content],n=>{(!n||n.length===0)&&i("deleteBlock",l.prop)}),(n,o)=>(e.openBlock(),e.createElementBlock("div",null,[e.createTextVNode(e.toDisplayString(t.prop[t.content])+" ",1),e.withDirectives(e.createElementVNode("textarea",{"onUpdate:modelValue":o[0]||(o[0]=c=>t.prop[t.content]=c),placeholder:t.placeholder?t.placeholder:"Enter text",onInput:p,onFocus:o[1]||(o[1]=c=>i("focus",r.value)),ref_key:"textarea",ref:r,class:"text-area mn-small"},`
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),f=["placeholder"],h={__name:"Bullets",props:["obj","label","prop","value","content","textarea","placeholder","index","ref"],emits:["deleteBlock","addBlock","focus"],setup(t,{emit:i}){const l=t;e.ref(l);const r=e.ref(null);function p(n){const o=/^\s*[-*]\s+(.*)/;let s=n.target.value.split(/\n+/).map(u=>{const d=o.exec(u);return d?d[1]:null}).filter(u=>u!==null);s.length>0?(l.prop[l.content]=s,a()):n.target.value.trim()===""&&(l.prop[l.content]=[],a())}function a(){r.value.style.height="1rem",r.value.style.height=r.value.scrollHeight+"px"}return e.onUpdated(()=>{a()}),e.onMounted(()=>{a()}),e.watch(()=>l.prop[l.content],n=>{(!n||n.length===0)&&i("deleteBlock",l.prop)}),(n,o)=>(e.openBlock(),e.createElementBlock("div",null,[e.createTextVNode(e.toDisplayString(t.prop[t.content])+" ",1),e.withDirectives(e.createElementVNode("textarea",{"onUpdate:modelValue":o[0]||(o[0]=c=>t.prop[t.content]=c),placeholder:t.placeholder?t.placeholder:"Enter text",onInput:p,onFocus:o[1]||(o[1]=c=>i("focus",r.value)),ref_key:"textarea",ref:r,tabindex:"-1",class:"text-area mn-small"},`
|
2
2
|
`,40,f),[[e.vModelText,t.prop[t.content]]])]))}};exports.default=h;
|
package/dist/prometheus-framework/src/modules/constructor/components/elements/Bullets.vue.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import { ref as d, onUpdated as f, onMounted as
|
1
|
+
import { ref as d, onUpdated as f, onMounted as x, watch as h, openBlock as m, createElementBlock as v, createTextVNode as g, toDisplayString as k, withDirectives as B, createElementVNode as b, vModelText as y } from "vue";
|
2
2
|
const E = ["placeholder"], I = {
|
3
3
|
__name: "Bullets",
|
4
4
|
props: ["obj", "label", "prop", "value", "content", "textarea", "placeholder", "index", "ref"],
|
@@ -20,9 +20,9 @@ const E = ["placeholder"], I = {
|
|
20
20
|
}
|
21
21
|
return f(() => {
|
22
22
|
a();
|
23
|
-
}),
|
23
|
+
}), x(() => {
|
24
24
|
a();
|
25
|
-
}),
|
25
|
+
}), h(() => t.prop[t.content], (l) => {
|
26
26
|
(!l || l.length === 0) && u("deleteBlock", t.prop);
|
27
27
|
}), (l, n) => (m(), v("div", null, [
|
28
28
|
g(k(e.prop[e.content]) + " ", 1),
|
@@ -33,6 +33,7 @@ const E = ["placeholder"], I = {
|
|
33
33
|
onFocus: n[1] || (n[1] = (r) => u("focus", o.value)),
|
34
34
|
ref_key: "textarea",
|
35
35
|
ref: o,
|
36
|
+
tabindex: "-1",
|
36
37
|
class: "text-area mn-small"
|
37
38
|
}, `
|
38
39
|
`, 40, E), [
|
package/dist/prometheus-framework/src/modules/constructor/components/elements/Caption.vue.cjs
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),f=["placeholder"],h={__name:"Caption",props:["obj","label","prop","value","content","textarea","placeholder","index","ref"],emits:["deleteBlock","addBlock","focus"],setup(l,{emit:
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),f=["placeholder"],h={__name:"Caption",props:["obj","label","prop","value","content","textarea","placeholder","index","ref"],emits:["deleteBlock","addBlock","focus"],setup(l,{emit:i}){const t=l;e.ref(t);const r=e.ref(null);function p(n){const o=/^\s*[-*]\s+(.*)/;let s=n.target.value.split(/\n+/).map(u=>{const d=o.exec(u);return d?d[1]:null}).filter(u=>u!==null);s.length>0?(t.prop[t.content]=s,a()):n.target.value.trim()===""&&(t.prop[t.content]=[],a())}function a(){r.value.style.height="1rem",r.value.style.height=r.value.scrollHeight+"px"}return e.onUpdated(()=>{a()}),e.onMounted(()=>{a()}),e.watch(()=>t.prop[t.content],n=>{(!n||n.length===0)&&i("deleteBlock",t.prop)}),(n,o)=>(e.openBlock(),e.createElementBlock("div",null,[e.withDirectives(e.createElementVNode("textarea",{"onUpdate:modelValue":o[0]||(o[0]=c=>l.prop[l.content]=c),placeholder:l.placeholder?l.placeholder:"Enter text",onInput:p,onFocus:o[1]||(o[1]=c=>i("focus",r.value)),ref_key:"textarea",ref:r,tabindex:"-1",class:"br-l br-solid br-main pd-l-small text-area mn-small"},`
|
2
2
|
`,40,f),[[e.vModelText,l.prop[l.content]]])]))}};exports.default=h;
|