@ozdao/prometheus-framework 0.2.130 → 0.2.133
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/auth.server.js +0 -1
- package/dist/auth.server.mjs +0 -1
- package/dist/community.server.js +172 -31
- package/dist/community.server.mjs +172 -31
- package/dist/events.server.js +1 -1
- package/dist/events.server.mjs +1 -1
- package/dist/files.server.js +38 -4
- package/dist/files.server.mjs +38 -4
- package/dist/gallery.server.js +1 -1
- package/dist/gallery.server.mjs +1 -1
- package/dist/main-CI9l9xMs.js +92 -0
- package/dist/main-DPg58GOU.mjs +14509 -0
- package/dist/main.css +1 -1
- package/dist/orders.server.js +1 -1
- package/dist/orders.server.mjs +1 -1
- package/dist/organizations.server.js +4 -3
- package/dist/organizations.server.mjs +4 -3
- package/dist/products.server.js +2 -1
- package/dist/products.server.mjs +2 -1
- package/dist/prometheus-framework/src/components/Address/Address.vue.cjs +1 -0
- package/dist/prometheus-framework/src/components/Address/Address.vue.js +89 -0
- package/dist/prometheus-framework/src/components/Address/Address.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Address/Address.vue2.js +22 -23
- package/dist/prometheus-framework/src/components/Block/Block.vue.js +13 -13
- package/dist/prometheus-framework/src/components/Button/Button.vue.cjs +1 -0
- package/dist/prometheus-framework/src/components/Button/Button.vue.js +95 -0
- package/dist/prometheus-framework/src/components/Chips/Chips.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Chips/Chips.vue.js +12 -13
- package/dist/prometheus-framework/src/components/Chips/Chips.vue2.cjs +1 -0
- package/dist/prometheus-framework/src/components/Chips/Chips.vue2.js +26 -0
- package/dist/prometheus-framework/src/components/DatePicker/Calendar.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/DatePicker/Calendar.vue2.js +32 -33
- package/dist/prometheus-framework/src/components/Draggable/Draggable.vue.cjs +1 -0
- package/dist/prometheus-framework/src/components/Draggable/Draggable.vue.js +75 -0
- package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue.js +14 -15
- package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue2.cjs +1 -0
- package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue2.js +57 -0
- package/dist/prometheus-framework/src/components/Feed/Feed.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Feed/Feed.vue.js +93 -87
- package/dist/prometheus-framework/src/components/Field/Field.vue.cjs +1 -0
- package/dist/prometheus-framework/src/components/Field/Field.vue.js +84 -0
- package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.js +32 -29
- package/dist/prometheus-framework/src/components/FieldPhone/FieldPhone.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/FieldPhone/FieldPhone.vue.js +22 -23
- package/dist/prometheus-framework/src/components/FieldTags/FieldTags.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/FieldTags/FieldTags.vue.js +39 -39
- package/dist/prometheus-framework/src/components/FieldTags/tag-input.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/FieldTags/tag-input.vue2.js +5 -5
- package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue.cjs +1 -0
- package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue.js +127 -0
- package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue2.js +46 -47
- package/dist/prometheus-framework/src/components/Menu/Menu.vue.cjs +1 -0
- package/dist/prometheus-framework/src/components/Menu/Menu.vue.js +13 -0
- package/dist/prometheus-framework/src/components/PhotoViewer/PhotoViewer.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/PhotoViewer/PhotoViewer.vue.js +22 -23
- package/dist/prometheus-framework/src/components/Popup/Popup.vue2.cjs +1 -0
- package/dist/prometheus-framework/src/components/Popup/Popup.vue2.js +77 -0
- package/dist/prometheus-framework/src/components/Select/Select.vue.cjs +1 -0
- package/dist/prometheus-framework/src/components/Select/Select.vue.js +103 -0
- package/dist/prometheus-framework/src/components/Spoiler/Spoiler.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Spoiler/Spoiler.vue2.js +14 -15
- package/dist/prometheus-framework/src/components/Tooltip/Tooltip.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Tooltip/Tooltip.vue.js +9 -10
- package/dist/prometheus-framework/src/components/Upload/Upload.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Upload/Upload.vue.js +37 -34
- package/dist/prometheus-framework/src/modules/auth/components/pages/ResetPassword.vue.js +30 -30
- package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.js +30 -30
- package/dist/prometheus-framework/src/modules/auth/components/pages/SignUp.vue.js +18 -18
- package/dist/prometheus-framework/src/modules/auth/store/auth.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/store/auth.js +11 -11
- package/dist/prometheus-framework/src/modules/community/community.client.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/community.client.js +12 -14
- 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 +54 -71
- package/dist/prometheus-framework/src/modules/community/components/blocks/FooterBlogpost.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/blocks/FooterBlogpost.vue.js +57 -29
- 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 +86 -76
- package/dist/prometheus-framework/src/modules/community/components/pages/Blog.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/Blog.vue.js +58 -28
- 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 +71 -80
- package/dist/prometheus-framework/src/modules/community/components/sections/Comment.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/community/components/sections/Comment.vue.js +104 -0
- package/dist/prometheus-framework/src/modules/community/components/sections/Comments.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/sections/Comments.vue.js +99 -54
- package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.js +27 -28
- package/dist/prometheus-framework/src/modules/community/store/blogposts.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/store/blogposts.js +45 -34
- 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 +31 -29
- 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 +32 -27
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.cjs +5 -0
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.js +67 -0
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Video.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Video.vue.js +16 -16
- 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 +119 -112
- package/dist/prometheus-framework/src/modules/events/components/blocks/CardEvent.vue.js +6 -6
- package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.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/EditEventTickets.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/gallery/components/pages/Gallery.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/gallery/components/pages/Gallery.vue.js +22 -22
- 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 +27 -27
- package/dist/prometheus-framework/src/modules/globals/components/blocks/BlockFilter.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/globals/components/blocks/BlockFilter.vue.js +33 -22
- package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.js +16 -16
- package/dist/prometheus-framework/src/modules/marketplace/store/marketplace.cjs +1 -1
- package/dist/prometheus-framework/src/modules/marketplace/store/marketplace.js +3 -9
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderBackoffice.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderBackoffice.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.js +9 -9
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardOrganization.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardOrganization.vue.js +39 -38
- 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/Members.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.js +2 -2
- 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 +112 -85
- 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 +36 -35
- package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.vue.js +8 -8
- 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/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/organizations/components/sections/Publics.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Publics.vue.js +17 -17
- package/dist/prometheus-framework/src/modules/organizations/store/memberships.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/store/memberships.js +18 -18
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardProduct.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardProduct.vue.js +6 -6
- package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.js +12 -12
- package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/ProductRecommmendation.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/ProductRecommmendation.vue.js +3 -2
- package/dist/prometheus-framework/src/modules/products/components/sections/HeroRecommendation.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/HeroRecommendation.vue.js +32 -37
- 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/spots/components/blocks/CardSpot.vue.js +4 -4
- package/dist/prometheus-framework/src/modules/users/components/blocks/CardUser.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/users/components/blocks/CardUser.vue.js +14 -14
- package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.js +29 -29
- 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 +53 -35
- package/dist/prometheus-framework/src/modules/wallet/components/blocks/CardBalanceReplenished.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/wallet/components/blocks/CardBalanceReplenished.vue.js +30 -0
- package/dist/prometheus-framework/src/modules/wallet/components/blocks/CardDeposite.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/wallet/components/blocks/CardDeposite.vue.js +42 -0
- package/dist/prometheus-framework/src/modules/wallet/components/blocks/CashDeposite.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/wallet/components/blocks/CashDeposite.vue.js +26 -0
- package/dist/prometheus-framework/src/modules/wallet/components/blocks/CryptoDeposite.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/wallet/components/blocks/CryptoDeposite.vue.js +42 -0
- package/dist/prometheus-framework/src/modules/wallet/localization/Wallet.json.cjs +1 -0
- package/dist/prometheus-framework/src/modules/wallet/localization/Wallet.json.js +26 -0
- package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.js +154 -77
- package/dist/prometheus-framework.cjs.js +1 -1
- package/dist/prometheus-framework.es.js +14 -14
- package/dist/queryProcessor-DQSFR9YA.mjs +179 -0
- package/dist/queryProcessor-iewDZq_f.js +178 -0
- package/dist/style.css +1 -1
- package/dist/wallet.server.js +80 -27
- package/dist/wallet.server.mjs +80 -27
- package/dist/web-DZUec7pP.js +1 -0
- package/dist/web-krQQeSb6.mjs +54 -0
- package/package.json +1 -1
- package/src/components/Address/Address.vue +1 -1
- package/src/components/Chips/Chips.vue +1 -1
- package/src/components/Completion/Completion.vue +1 -4
- package/src/components/DatePicker/Calendar.vue +1 -1
- package/src/components/Draggable/Draggable.vue +113 -0
- package/src/components/Dropdown/Dropdown.vue +1 -1
- package/src/components/Feed/Feed.vue +18 -12
- package/src/components/FieldBig/FieldBig.vue +11 -1
- package/src/components/FieldPhone/FieldPhone.vue +1 -1
- package/src/components/FieldTags/FieldTags.vue +2 -1
- package/src/components/FieldTags/tag-input.vue +1 -1
- package/src/components/LocationMarker/LocationMarker.vue +1 -1
- package/src/components/PhotoViewer/PhotoViewer.vue +1 -1
- package/src/components/Shader/Shader.vue +2 -2
- package/src/components/Slider/Slider.vue +1 -5
- package/src/components/Spoiler/Spoiler.vue +1 -1
- package/src/components/Text/Text.vue +1 -4
- package/src/components/Tooltip/Tooltip.vue +1 -1
- package/src/components/Upload/Upload.vue +5 -3
- package/src/modules/auth/controllers/auth.controller.js +0 -2
- package/src/modules/auth/store/auth.js +2 -2
- package/src/modules/community/DOCUMENTATION.MD +4 -0
- package/src/modules/community/community.client.js +0 -2
- package/src/modules/community/components/blocks/CardBlogpost.vue +6 -2
- package/src/modules/community/components/blocks/FooterBlogpost.vue +21 -5
- package/src/modules/community/components/layouts/Community.vue +15 -11
- package/src/modules/community/components/pages/Blog.vue +25 -32
- package/src/modules/community/components/pages/CreateBlogPost.vue +8 -15
- package/src/modules/community/components/sections/Comment.vue +123 -0
- package/src/modules/community/components/sections/Comments.vue +90 -19
- package/src/modules/community/components/sections/HotPosts.vue +3 -6
- package/src/modules/community/controllers/blog.controller.js +1 -1
- package/src/modules/community/controllers/comments.controller.aggr.js +280 -0
- package/src/modules/community/controllers/comments.controller.js +187 -38
- package/src/modules/community/controllers/comments.controller.populate.js +180 -0
- package/src/modules/community/models/comment.model.js +15 -0
- package/src/modules/community/store/blogposts.js +20 -2
- package/src/modules/constructor/components/elements/Audio.vue +28 -40
- package/src/modules/constructor/components/elements/ImageUpload.vue +12 -7
- package/src/modules/constructor/components/elements/Video.vue +10 -18
- package/src/modules/constructor/components/sections/Constructor.vue +54 -47
- package/src/modules/files/controllers/files.controller.js +2 -0
- package/src/modules/files/middlewares/server/middlewareBusboy.js +32 -4
- package/src/modules/files/routes/files.routes.js +8 -0
- package/src/modules/globals/components/blocks/BlockFilter.vue +17 -7
- package/src/modules/globals/components/partials/Header.vue +12 -7
- package/src/modules/globals/controllers/utils/queryProcessor.js +1 -0
- package/src/modules/icons/logos/Logotype.vue +8 -6
- package/src/modules/icons/logos/LogotypeNunito.vue +12 -0
- package/src/modules/marketplace/components/layouts/Marketplace.vue +29 -27
- package/src/modules/marketplace/store/marketplace.js +2 -8
- package/src/modules/organizations/components/blocks/CardOrganization.vue +1 -1
- package/src/modules/organizations/components/pages/Members.vue +1 -1
- package/src/modules/organizations/components/pages/Organization.vue +33 -5
- package/src/modules/organizations/components/pages/OrganizationEdit.vue +7 -4
- package/src/modules/organizations/components/sections/DetailsTab.vue +10 -10
- package/src/modules/organizations/components/sections/Publics.vue +2 -2
- package/src/modules/organizations/controllers/memberships.controller.js +2 -3
- package/src/modules/organizations/controllers/organizations.controller.js +1 -1
- package/src/modules/organizations/store/memberships.js +4 -1
- package/src/modules/products/components/blocks/CardProduct.vue +1 -1
- package/src/modules/products/components/sections/HeroRecommendation.vue +11 -8
- package/src/modules/products/models/product.model.js +2 -1
- package/src/modules/spots/components/layouts/Spots.vue +0 -3
- package/src/modules/spots/components/pages/Map.vue +13 -3
- package/src/modules/users/components/blocks/CardUser.vue +2 -2
- package/src/modules/users/components/pages/ProfileBlogposts.vue +45 -28
- package/src/modules/wallet/components/blocks/CardBalanceReplenished.vue +40 -0
- package/src/modules/wallet/components/blocks/CardDeposite.vue +55 -0
- package/src/modules/wallet/components/blocks/CashDeposite.vue +28 -0
- package/src/modules/wallet/components/blocks/CryptoDeposite.vue +55 -0
- package/src/modules/wallet/controllers/factories/rewards.factory.aggr.js +181 -0
- package/src/modules/wallet/controllers/factories/rewards.factory.js +87 -113
- package/src/modules/wallet/controllers/factories/rewards.factory.population.js +213 -0
- package/src/modules/wallet/localization/Wallet.json +22 -0
- package/src/modules/wallet/views/components/pages/Wallet.vue +153 -53
- package/src/styles/base/all.scss +16 -26
- package/src/styles/config.scss +70 -34
- package/src/styles/typography.scss +5 -5
- package/src/modules/community/components/sections/Feed.vue +0 -148
- package/src/modules/middlewares/server/accessors/AccessController.js +0 -33
- package/src/modules/middlewares/server/accessors/ReadDepartments.js +0 -101
@@ -1,4 +1,4 @@
|
|
1
|
-
import { ref as
|
1
|
+
import { ref as u, watch as y, openBlock as a, createElementBlock as o, Fragment as _, createElementVNode as i, normalizeClass as w, toDisplayString as s, createCommentVNode as m, createVNode as p, Transition as b, withCtx as k } from "vue";
|
2
2
|
import C from "axios";
|
3
3
|
import U from "../../modules/icons/navigation/IconCross.vue.js";
|
4
4
|
/* empty css */
|
@@ -9,18 +9,21 @@ const F = {
|
|
9
9
|
}, N = {
|
10
10
|
key: 1,
|
11
11
|
class: "flex-nowrap flex w-100 flex-v-center"
|
12
|
-
}, R = ["href"],
|
12
|
+
}, R = ["href"], S = {
|
13
13
|
key: 2,
|
14
14
|
class: "w-100"
|
15
|
-
},
|
15
|
+
}, B = ["placeholder", "multiple"], D = {
|
16
16
|
key: 0,
|
17
17
|
class: "mn-t-thin mn-b-thin invalid-feedback"
|
18
|
-
},
|
18
|
+
}, I = {
|
19
19
|
__name: "Upload",
|
20
20
|
props: {
|
21
21
|
field: String,
|
22
22
|
label: null,
|
23
|
-
type:
|
23
|
+
type: {
|
24
|
+
type: String,
|
25
|
+
default: "file"
|
26
|
+
},
|
24
27
|
placeholder: "Upload a file",
|
25
28
|
validation: !1,
|
26
29
|
uploadPath: {
|
@@ -33,69 +36,69 @@ const F = {
|
|
33
36
|
}
|
34
37
|
},
|
35
38
|
emits: ["update:field", "focus", "blur", "file-change"],
|
36
|
-
setup(e, { emit:
|
37
|
-
const
|
38
|
-
|
39
|
-
|
39
|
+
setup(e, { emit: h }) {
|
40
|
+
const r = h, n = e, t = u(n.field);
|
41
|
+
u(null), y(() => n.field, (l) => {
|
42
|
+
t.value = l;
|
40
43
|
});
|
41
|
-
async function
|
42
|
-
let c =
|
44
|
+
async function v(l) {
|
45
|
+
let c = l.target.files[0], d = new FormData();
|
43
46
|
d.append("file", c);
|
44
47
|
try {
|
45
|
-
let
|
48
|
+
let x = await C.create({ baseURL: process.env.API_URL, withCredentials: !0 }).post(`/api/upload/${n.type}?folderName=${encodeURIComponent(n.uploadPath)}`, d, {
|
46
49
|
headers: {
|
47
50
|
"Content-Type": "multipart/form-data"
|
48
51
|
}
|
49
52
|
});
|
50
|
-
|
53
|
+
t.value = x.data[0].filepath, r("file-change", t.value);
|
51
54
|
} catch (f) {
|
52
55
|
console.error(f);
|
53
56
|
}
|
54
57
|
}
|
55
|
-
const
|
56
|
-
|
58
|
+
const g = () => {
|
59
|
+
t.value = null, r("update:field", null), r("file-change", null);
|
57
60
|
};
|
58
|
-
return (
|
59
|
-
|
60
|
-
class: w([[
|
61
|
+
return (l, c) => (a(), o(_, null, [
|
62
|
+
i("div", {
|
63
|
+
class: w([[l.$attrs.class, { "bg-fourth-nano": e.validation }], "flex-center flex-nowrap flex"])
|
61
64
|
}, [
|
62
|
-
e.label ? (
|
63
|
-
|
64
|
-
])) :
|
65
|
-
|
66
|
-
|
67
|
-
href:
|
65
|
+
e.label ? (a(), o("div", F, [
|
66
|
+
i("span", null, s(e.label), 1)
|
67
|
+
])) : m("", !0),
|
68
|
+
t.value ? (a(), o("div", N, [
|
69
|
+
i("a", {
|
70
|
+
href: t.value,
|
68
71
|
class: "w-100",
|
69
72
|
target: "_blank"
|
70
|
-
},
|
71
|
-
|
72
|
-
onClick:
|
73
|
+
}, s(t.value), 9, R),
|
74
|
+
p(U, {
|
75
|
+
onClick: g,
|
73
76
|
class: "cursor-pointer t-center flex-center flex radius-extra i-medium bg-red pd-micro"
|
74
77
|
})
|
75
|
-
])) : (
|
76
|
-
|
77
|
-
onChange:
|
78
|
+
])) : (a(), o("div", S, [
|
79
|
+
i("input", {
|
80
|
+
onChange: v,
|
78
81
|
type: "file",
|
79
82
|
class: "w-100",
|
80
83
|
placeholder: e.placeholder,
|
81
84
|
multiple: e.multiple,
|
82
85
|
id: "photo",
|
83
86
|
name: "photo"
|
84
|
-
}, null, 40,
|
87
|
+
}, null, 40, B)
|
85
88
|
]))
|
86
89
|
], 2),
|
87
|
-
|
90
|
+
p(b, {
|
88
91
|
mode: "out-in",
|
89
92
|
name: "fade"
|
90
93
|
}, {
|
91
94
|
default: k(() => [
|
92
|
-
e.validation ? (
|
95
|
+
e.validation ? (a(), o("div", D, " * " + s(e.validation.message), 1)) : m("", !0)
|
93
96
|
]),
|
94
97
|
_: 1
|
95
98
|
})
|
96
99
|
], 64));
|
97
100
|
}
|
98
|
-
}, z = /* @__PURE__ */ $(
|
101
|
+
}, z = /* @__PURE__ */ $(I, [["__scopeId", "data-v-516f3e07"]]);
|
99
102
|
export {
|
100
103
|
z as default
|
101
104
|
};
|
@@ -1,40 +1,40 @@
|
|
1
|
-
import { ref as
|
2
|
-
import
|
3
|
-
import
|
4
|
-
import
|
1
|
+
import { ref as d, openBlock as u, createElementBlock as p, createElementVNode as a, toDisplayString as r, unref as t, createVNode as l, Transition as _, withCtx as c, createCommentVNode as v, createTextVNode as C } from "vue";
|
2
|
+
import E from "../../../../components/Tab/Tab.vue2.js";
|
3
|
+
import I from "../../../../components/Field/Field.vue2.js";
|
4
|
+
import P from "../../../../components/FieldPhone/FieldPhone.vue.js";
|
5
5
|
import V 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 S from "../../localization/ResetPassword.json.js";
|
9
9
|
import { state as i, actions as T } from "../../store/auth.js";
|
10
10
|
import "../../store/twofa.js";
|
11
|
-
import { validateInputs as b, validatePhone as D, validateEmail as
|
11
|
+
import { validateInputs as b, validatePhone as D, validateEmail as O } from "../../../middlewares/client/inputs.validation.js";
|
12
12
|
/* empty css */
|
13
|
-
const
|
13
|
+
const R = { class: "t-left pd-medium" }, $ = { class: "mn-b-small" }, B = { class: "mn-b-small t-transp" }, F = { class: "mn-b-small p-small uppercase t-semi bg-light radius-big o-hidden" }, U = { class: "pos-relative" }, q = {
|
14
14
|
key: 0,
|
15
15
|
class: "mn-b-semi radius-small o-hidden"
|
16
16
|
}, A = { class: "mn-b-small t-transp" }, L = {
|
17
17
|
key: 0,
|
18
18
|
class: "mn-b-semi radius-small o-hidden"
|
19
|
-
}, j = { class: "mn-b-small t-transp" },
|
19
|
+
}, j = { class: "mn-b-small t-transp" }, se = {
|
20
20
|
__name: "ResetPassword",
|
21
21
|
setup(z) {
|
22
22
|
const { t: e } = N({
|
23
23
|
useScope: "global",
|
24
24
|
...S
|
25
|
-
}), h =
|
25
|
+
}), h = d(null), f = d(null);
|
26
26
|
k();
|
27
|
-
const w = x(),
|
27
|
+
const w = x(), s = d("phone");
|
28
28
|
async function g() {
|
29
29
|
try {
|
30
|
-
|
30
|
+
s.value === "phone" && await b(
|
31
31
|
h,
|
32
32
|
D,
|
33
33
|
i.user.phone,
|
34
34
|
"Некорректный телефон"
|
35
|
-
),
|
35
|
+
), s.value === "email" && await b(
|
36
36
|
f,
|
37
|
-
|
37
|
+
O,
|
38
38
|
i.user.email,
|
39
39
|
"Некорректный email"
|
40
40
|
);
|
@@ -42,34 +42,34 @@ const O = { class: "t-left pd-medium" }, R = { class: "mn-b-small" }, B = { clas
|
|
42
42
|
throw new Error();
|
43
43
|
}
|
44
44
|
try {
|
45
|
-
await T.resetPassword(i.user,
|
46
|
-
} catch (
|
47
|
-
throw console.log(
|
45
|
+
await T.resetPassword(i.user, s.value, "reset-password");
|
46
|
+
} catch (m) {
|
47
|
+
throw console.log(m), new Error();
|
48
48
|
}
|
49
49
|
}
|
50
50
|
function y() {
|
51
|
-
w.push({ name: "Enter Code", query: { type:
|
51
|
+
w.push({ name: "Enter Code", query: { type: s.value, method: "reset-password" } });
|
52
52
|
}
|
53
|
-
return (
|
54
|
-
a("h3",
|
53
|
+
return (m, o) => (u(), p("section", R, [
|
54
|
+
a("h3", $, r(t(e)("forgotPasswordTitle")), 1),
|
55
55
|
a("p", B, r(t(e)("instructions")), 1),
|
56
|
-
a("div",
|
57
|
-
l(
|
58
|
-
selected:
|
59
|
-
"onUpdate:selected":
|
56
|
+
a("div", F, [
|
57
|
+
l(E, {
|
58
|
+
selected: s.value,
|
59
|
+
"onUpdate:selected": o[0] || (o[0] = (n) => s.value = n),
|
60
60
|
tabs: [
|
61
61
|
{ name: t(e)("phone"), value: "phone" },
|
62
62
|
{ name: t(e)("email"), value: "email" }
|
63
63
|
]
|
64
64
|
}, null, 8, ["selected", "tabs"])
|
65
65
|
]),
|
66
|
-
a("div",
|
66
|
+
a("div", U, [
|
67
67
|
l(_, { name: "slide-fade" }, {
|
68
68
|
default: c(() => [
|
69
|
-
|
69
|
+
s.value === "phone" ? (u(), p("div", q, [
|
70
70
|
a("p", A, r(t(e)("smsInfo")), 1),
|
71
|
-
l(
|
72
|
-
onChange:
|
71
|
+
l(P, {
|
72
|
+
onChange: o[1] || (o[1] = (n) => i.user.phone = n),
|
73
73
|
dropdownOptions: {
|
74
74
|
showDialCodeInSelection: !0,
|
75
75
|
showFlags: !0,
|
@@ -86,11 +86,11 @@ const O = { class: "t-left pd-medium" }, R = { class: "mn-b-small" }, B = { clas
|
|
86
86
|
}),
|
87
87
|
l(_, { name: "slide-fade" }, {
|
88
88
|
default: c(() => [
|
89
|
-
|
89
|
+
s.value === "email" ? (u(), p("div", L, [
|
90
90
|
a("p", j, r(t(e)("emailInfo")), 1),
|
91
|
-
l(
|
91
|
+
l(I, {
|
92
92
|
field: i.user.email,
|
93
|
-
"onUpdate:field":
|
93
|
+
"onUpdate:field": o[2] || (o[2] = (n) => i.user.email = n),
|
94
94
|
placeholder: t(e)("emailPlaceholder"),
|
95
95
|
validation: f.value,
|
96
96
|
class: "bg-light pd-medium radius-small"
|
@@ -114,5 +114,5 @@ const O = { class: "t-left pd-medium" }, R = { class: "mn-b-small" }, B = { clas
|
|
114
114
|
}
|
115
115
|
};
|
116
116
|
export {
|
117
|
-
|
117
|
+
se as default
|
118
118
|
};
|
@@ -1,31 +1,31 @@
|
|
1
|
-
import { ref as
|
1
|
+
import { ref as p, onMounted as k, resolveComponent as E, openBlock as V, createElementBlock as I, createElementVNode as s, createTextVNode as c, toDisplayString as r, unref as l, createVNode as o, withCtx as d, Transition as b, withDirectives as g, vShow as w } from "vue";
|
2
2
|
import q from "../../../../components/Tab/Tab.vue2.js";
|
3
3
|
import y from "../../../../components/Field/Field.vue2.js";
|
4
4
|
import D from "../../../../components/FieldPhone/FieldPhone.vue.js";
|
5
5
|
import O from "../../../../components/Button/Button.vue2.js";
|
6
6
|
import { useRoute as j, useRouter as A } from "vue-router";
|
7
|
-
import { useI18n as
|
8
|
-
import
|
9
|
-
import { state as i, actions as
|
10
|
-
import { validateInputs as S, validatePhone as B, validateEmail as
|
7
|
+
import { useI18n as N } from "vue-i18n";
|
8
|
+
import T from "../../localization/SignIn.json.js";
|
9
|
+
import { state as i, actions as $ } from "../../store/auth.js";
|
10
|
+
import { validateInputs as S, validatePhone as B, validateEmail as F } from "../../../middlewares/client/inputs.validation.js";
|
11
11
|
/* empty css */
|
12
|
-
const
|
12
|
+
const R = { class: "" }, L = /* @__PURE__ */ s("img", {
|
13
13
|
src: "/logo/logo.svg",
|
14
14
|
class: "i-extra radius-small mn-b-small"
|
15
15
|
}, null, -1), M = { class: "mn-b-medium" }, z = /* @__PURE__ */ s("br", null, null, -1), G = { class: "t-semi" }, H = { class: "mn-b-big" }, J = { class: "mn-b-small p-small uppercase t-semi bg-light radius-big o-hidden" }, K = { class: "pos-relative" }, Q = { class: "mn-b-thin radius-small" }, W = { class: "mn-b-thin radius-small o-hidden" }, X = { class: "w-100 mn-b-big" }, ue = {
|
16
16
|
__name: "SignIn",
|
17
17
|
setup(Y) {
|
18
|
-
const h =
|
18
|
+
const h = p(null), x = p(null), f = p(null), _ = j(), v = A(), { t: a } = N({
|
19
19
|
useScope: "global",
|
20
|
-
...
|
21
|
-
}), n =
|
20
|
+
...T
|
21
|
+
}), n = p("phone"), C = (u) => new Promise((t, m) => {
|
22
22
|
const e = document.createElement("script");
|
23
|
-
e.type = "text/javascript", e.src = u, e.onload = t, e.onerror =
|
23
|
+
e.type = "text/javascript", e.src = u, e.onload = t, e.onerror = m, document.head.appendChild(e);
|
24
24
|
});
|
25
25
|
k(async () => {
|
26
26
|
await C("https://appleid.cdn-apple.com/appleauth/static/jsapi/appleid/1/en_US/appleid.auth.js");
|
27
27
|
});
|
28
|
-
async function
|
28
|
+
async function U() {
|
29
29
|
try {
|
30
30
|
n.value === "phone" && await S(
|
31
31
|
h,
|
@@ -34,7 +34,7 @@ const $ = { class: "" }, L = /* @__PURE__ */ s("img", {
|
|
34
34
|
"Некорректный телефон"
|
35
35
|
), n.value === "email" && await S(
|
36
36
|
f,
|
37
|
-
|
37
|
+
F,
|
38
38
|
i.user.email,
|
39
39
|
"Некорректный email"
|
40
40
|
);
|
@@ -42,9 +42,9 @@ const $ = { class: "" }, L = /* @__PURE__ */ s("img", {
|
|
42
42
|
throw new Error();
|
43
43
|
}
|
44
44
|
const u = { ...i.user };
|
45
|
-
await
|
45
|
+
await $.login(u, n.value);
|
46
46
|
}
|
47
|
-
function
|
47
|
+
function P() {
|
48
48
|
_.query.returnUrl ? v.push({
|
49
49
|
path: _.query.returnUrl,
|
50
50
|
query: {
|
@@ -61,21 +61,21 @@ const $ = { class: "" }, L = /* @__PURE__ */ s("img", {
|
|
61
61
|
});
|
62
62
|
}
|
63
63
|
return (u, t) => {
|
64
|
-
const
|
65
|
-
return V(), I("section",
|
64
|
+
const m = E("router-link");
|
65
|
+
return V(), I("section", R, [
|
66
66
|
L,
|
67
67
|
s("h3", M, [
|
68
|
-
c(r(a
|
68
|
+
c(r(l(a)("title")) + " ", 1),
|
69
69
|
z,
|
70
|
-
s("span", G, r(a
|
70
|
+
s("span", G, r(l(a)("subtitle")), 1)
|
71
71
|
]),
|
72
72
|
s("p", H, [
|
73
|
-
o(
|
73
|
+
o(m, {
|
74
74
|
to: { name: "Sign Up" },
|
75
75
|
class: "underline t-second"
|
76
76
|
}, {
|
77
77
|
default: d(() => [
|
78
|
-
c(r(a
|
78
|
+
c(r(l(a)("signup")), 1)
|
79
79
|
]),
|
80
80
|
_: 1
|
81
81
|
})
|
@@ -85,8 +85,8 @@ const $ = { class: "" }, L = /* @__PURE__ */ s("img", {
|
|
85
85
|
selected: n.value,
|
86
86
|
"onUpdate:selected": t[0] || (t[0] = (e) => n.value = e),
|
87
87
|
tabs: [
|
88
|
-
{ name: a
|
89
|
-
{ name: a
|
88
|
+
{ name: l(a)("phone"), value: "phone" },
|
89
|
+
{ name: l(a)("email"), value: "email" }
|
90
90
|
]
|
91
91
|
}, null, 8, ["selected", "tabs"])
|
92
92
|
]),
|
@@ -104,7 +104,7 @@ const $ = { class: "" }, L = /* @__PURE__ */ s("img", {
|
|
104
104
|
validCharactersOnly: !0,
|
105
105
|
validation: h.value,
|
106
106
|
mode: "national",
|
107
|
-
inputOptions: { placeholder: a
|
107
|
+
inputOptions: { placeholder: l(a)("phonePlaceholder"), type: "tel" },
|
108
108
|
class: "bg-light pd-small radius-small mn-b-thin"
|
109
109
|
}, null, 8, ["validation", "inputOptions"])
|
110
110
|
], 512), [
|
@@ -119,7 +119,7 @@ const $ = { class: "" }, L = /* @__PURE__ */ s("img", {
|
|
119
119
|
o(y, {
|
120
120
|
field: i.user.email,
|
121
121
|
"onUpdate:field": t[2] || (t[2] = (e) => i.user.email = e),
|
122
|
-
placeholder: a
|
122
|
+
placeholder: l(a)("emailPlaceholder"),
|
123
123
|
validation: f.value,
|
124
124
|
class: "bg-light pd-medium radius-small"
|
125
125
|
}, null, 8, ["field", "placeholder", "validation"])
|
@@ -135,27 +135,27 @@ const $ = { class: "" }, L = /* @__PURE__ */ s("img", {
|
|
135
135
|
"onUpdate:field": t[3] || (t[3] = (e) => i.user.password = e),
|
136
136
|
type: "password",
|
137
137
|
validation: x.value,
|
138
|
-
placeholder: a
|
138
|
+
placeholder: l(a)("passwordPlaceholder"),
|
139
139
|
class: "bg-light pd-medium radius-small mn-b-semi"
|
140
140
|
}, null, 8, ["field", "validation", "placeholder"]),
|
141
141
|
s("div", X, [
|
142
|
-
o(
|
142
|
+
o(m, {
|
143
143
|
to: "/auth/reset-password",
|
144
144
|
class: "underline d-block t-blue"
|
145
145
|
}, {
|
146
146
|
default: d(() => [
|
147
|
-
c(r(a
|
147
|
+
c(r(l(a)("forgotPassword")), 1)
|
148
148
|
]),
|
149
149
|
_: 1
|
150
150
|
})
|
151
151
|
]),
|
152
152
|
o(O, {
|
153
|
-
submit:
|
154
|
-
callback:
|
153
|
+
submit: U,
|
154
|
+
callback: P,
|
155
155
|
class: "w-100 bg-main mn-b-thin"
|
156
156
|
}, {
|
157
157
|
default: d(() => [
|
158
|
-
c(r(a
|
158
|
+
c(r(l(a)("signin")), 1)
|
159
159
|
]),
|
160
160
|
_: 1
|
161
161
|
})
|
@@ -1,29 +1,29 @@
|
|
1
|
-
import { ref as d, resolveComponent as E, openBlock as S, createElementBlock as x, createElementVNode as o, toDisplayString as r, unref as t, createVNode as a, Transition as h, withCtx as m, withDirectives as
|
1
|
+
import { ref as d, resolveComponent as E, openBlock as S, createElementBlock as x, createElementVNode as o, toDisplayString as r, unref as t, createVNode as a, Transition as h, withCtx as m, withDirectives as _, vShow as f, createTextVNode as v } from "vue";
|
2
2
|
import N from "../../../../components/Tab/Tab.vue2.js";
|
3
3
|
import V from "../../../../components/Field/Field.vue2.js";
|
4
4
|
import y from "../../../../components/FieldPhone/FieldPhone.vue.js";
|
5
5
|
import D from "../../../../components/Button/Button.vue2.js";
|
6
|
-
import { useRoute as I, useRouter as
|
7
|
-
import { useI18n as
|
8
|
-
import
|
6
|
+
import { useRoute as I, useRouter as O } from "vue-router";
|
7
|
+
import { useI18n as P } from "vue-i18n";
|
8
|
+
import T from "../../localization/SignUp.json.js";
|
9
9
|
import { state as s } from "../../store/auth.js";
|
10
|
-
import { sendCode as
|
11
|
-
import { validateInputs as b, validatePhone as
|
10
|
+
import { sendCode as U } from "../../store/twofa.js";
|
11
|
+
import { validateInputs as b, validatePhone as $, validateEmail as A } from "../../../middlewares/client/inputs.validation.js";
|
12
12
|
/* empty css */
|
13
|
-
const B = { class: "t-left pd-medium" },
|
13
|
+
const B = { class: "t-left pd-medium" }, F = { class: "mn-b-small" }, R = { class: "mn-b-small p-small uppercase t-semi bg-light radius-big o-hidden" }, L = { class: "pos-relative" }, j = { class: "mn-b-semi radius-small" }, q = { class: "mn-b-small t-transp" }, z = { class: "mn-b-semi radius-small o-hidden" }, G = { class: "mn-b-small t-transp" }, H = { class: "w-100" }, ie = {
|
14
14
|
__name: "SignUp",
|
15
15
|
setup(J) {
|
16
|
-
const { t: e } =
|
16
|
+
const { t: e } = P({
|
17
17
|
useScope: "global",
|
18
|
-
...
|
18
|
+
...T
|
19
19
|
}), u = d(null), c = d(null);
|
20
20
|
I();
|
21
|
-
const g =
|
21
|
+
const g = O(), l = d("phone");
|
22
22
|
async function w() {
|
23
23
|
try {
|
24
24
|
l.value === "phone" && await b(
|
25
25
|
u,
|
26
|
-
|
26
|
+
$,
|
27
27
|
s.user.phone,
|
28
28
|
"Некорректный телефон"
|
29
29
|
), l.value === "email" && await b(
|
@@ -36,7 +36,7 @@ const B = { class: "t-left pd-medium" }, R = { class: "mn-b-small" }, $ = { clas
|
|
36
36
|
throw new Error();
|
37
37
|
}
|
38
38
|
try {
|
39
|
-
await
|
39
|
+
await U(s.user, "signup", l.value);
|
40
40
|
} catch {
|
41
41
|
throw new Error();
|
42
42
|
}
|
@@ -47,8 +47,8 @@ const B = { class: "t-left pd-medium" }, R = { class: "mn-b-small" }, $ = { clas
|
|
47
47
|
return (p, i) => {
|
48
48
|
const k = E("router-link");
|
49
49
|
return S(), x("section", B, [
|
50
|
-
o("h3",
|
51
|
-
o("div",
|
50
|
+
o("h3", F, r(t(e)("title")), 1),
|
51
|
+
o("div", R, [
|
52
52
|
a(N, {
|
53
53
|
selected: l.value,
|
54
54
|
"onUpdate:selected": i[0] || (i[0] = (n) => l.value = n),
|
@@ -61,7 +61,7 @@ const B = { class: "t-left pd-medium" }, R = { class: "mn-b-small" }, $ = { clas
|
|
61
61
|
o("div", L, [
|
62
62
|
a(h, { name: "slide-fade" }, {
|
63
63
|
default: m(() => [
|
64
|
-
|
64
|
+
_(o("div", j, [
|
65
65
|
o("p", q, r(t(e)("smsNotice")), 1),
|
66
66
|
a(y, {
|
67
67
|
onChange: i[1] || (i[1] = (n) => s.user.phone = n),
|
@@ -76,14 +76,14 @@ const B = { class: "t-left pd-medium" }, R = { class: "mn-b-small" }, $ = { clas
|
|
76
76
|
class: "bg-light pd-small radius-small mn-b-thin"
|
77
77
|
}, null, 8, ["validation", "inputOptions"])
|
78
78
|
], 512), [
|
79
|
-
[
|
79
|
+
[f, l.value === "phone"]
|
80
80
|
])
|
81
81
|
]),
|
82
82
|
_: 1
|
83
83
|
}),
|
84
84
|
a(h, { name: "slide-fade" }, {
|
85
85
|
default: m(() => [
|
86
|
-
|
86
|
+
_(o("div", z, [
|
87
87
|
o("p", G, r(t(e)("emailNotice")), 1),
|
88
88
|
a(V, {
|
89
89
|
field: s.user.email,
|
@@ -93,7 +93,7 @@ const B = { class: "t-left pd-medium" }, R = { class: "mn-b-small" }, $ = { clas
|
|
93
93
|
class: "bg-light pd-medium radius-small"
|
94
94
|
}, null, 8, ["field", "placeholder", "validation"])
|
95
95
|
], 512), [
|
96
|
-
[
|
96
|
+
[f, l.value === "email"]
|
97
97
|
])
|
98
98
|
]),
|
99
99
|
_: 1
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("axios"),d=require("../../../../../node_modules/js-cookie/dist/js.cookie.cjs"),g=require("../../../../node_modules/@capacitor/preferences/dist/esm/index.cjs"),w=require("vue"),c=require("../../globals/store/globals.cjs"),k=require("./twofa.cjs"),u=l.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},accesses:[]});async function
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("axios"),d=require("../../../../../node_modules/js-cookie/dist/js.cookie.cjs"),g=require("../../../../node_modules/@capacitor/preferences/dist/esm/index.cjs"),w=require("vue"),c=require("../../globals/store/globals.cjs"),k=require("./twofa.cjs"),u=l.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},accesses:[]});async function O(){try{const e=await m("user");if(e){const{_id:t,email:s,phone:n,roles:o,accessToken:r}=e;l.interceptors.request.use(i=>(i.headers["x-access-token"]=r,i),i=>Promise.reject(i));const h=(await l.get("/api/auth/check-accesses")).data;Object.assign(a.user,{_id:t,email:s,phone:n}),Object.assign(a.access,{token:r,roles:o,status:!!r}),a.accesses=h}}catch(e){console.error("Error initializing app:",e),f("user"),a.accesses=[]}}O();const P={async login(e,t){try{const s=await u.post("/api/auth/signin",{...e,type:t});return p("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}),console.log(s),c.setError(s),Promise.reject(s)}},async signup(e,t,s){const{password:n,passwordRepeat:o}=a.user;if(console.log(n),console.log(o),n!==o){const r={response:{data:{errorCode:"PASSWORDS_DO_NOT_MATCH"}}};throw c.setError(r),new Error(r.response.status)}try{const r=await u.post("/api/auth/signup",{...e,type:t,inviteCode:s});return console.log(r),r.data.accessToken&&p("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 c.setError(r),console.log("Sign up falied"),r}},logout(){f("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 u.post("/api/auth/reset-password",{email:e.email,phone:e.phone,type:t});return Object.assign(k.state.code,{...s.data,isSended:!0}),s.data}catch(s){return c.setError(s),Promise.reject(s)}},async updatePassword(e,t){const{password:s,passwordRepeat:n}=a.user;if(s!==n){const o={response:{data:{errorCode:"PASSWORDS_DO_NOT_MATCH"}}};throw c.setError(o),new Error(o.response.status)}try{const o=await u.post("/api/auth/update-password",{email:e.email,phone:e.phone,password:e.password,passwordRepeat:e.passwordRepeat,type:t});return o.data.accessToken&&p("user",o.data),Object.assign(a.user,{...o.data}),Object.assign(a.access,{token:o.data.accessToken,status:!0}),o.data}catch(o){return c.setError(o),Promise.reject(o)}}},j={development:{secure:!1,expires:7,sameSite:"Lax"},production:{expires:7,path:"/",domain:process.env.DOMAIN_URL,sameSite:"none",secure:!0}};async function m(e){if(process.env.MOBILE_APP){const{value:t}=await g.Preferences.get({key:e});return t?JSON.parse(t):null}else{const t=d.default.get(e);return t?JSON.parse(t):null}}function p(e,t,s=process.env.DOMAIN_URL){process.env.MOBILE_APP?g.Preferences.set({key:e,value:JSON.stringify(t)}):d.default.set(e,JSON.stringify(t),j[s])}function f(e,t=process.env.NODE_ENV){if(process.env.MOBILE_APP)g.Preferences.remove({key:e});else{const s=t==="production"?{domain:process.env.DOMAIN_URL}:{};d.default.remove(e,s)}}w.watch(a,(e,t)=>{});exports.actions=P;exports.initialize=O;exports.state=a;
|
@@ -1,10 +1,10 @@
|
|
1
1
|
import d from "axios";
|
2
2
|
import l from "../../../../../node_modules/js-cookie/dist/js.cookie.js";
|
3
3
|
import { Preferences as w } from "../../../../node_modules/@capacitor/preferences/dist/esm/index.js";
|
4
|
-
import { reactive as
|
4
|
+
import { reactive as O, watch as f } from "vue";
|
5
5
|
import { setError as c } from "../../globals/store/globals.js";
|
6
6
|
import { state as h } from "./twofa.js";
|
7
|
-
const p = d.create({ baseURL: process.env.API_URL, withCredentials: !0 }), o =
|
7
|
+
const p = d.create({ baseURL: process.env.API_URL, withCredentials: !0 }), o = O({
|
8
8
|
user: {
|
9
9
|
_id: void 0,
|
10
10
|
username: "",
|
@@ -22,7 +22,7 @@ const p = d.create({ baseURL: process.env.API_URL, withCredentials: !0 }), o = f
|
|
22
22
|
});
|
23
23
|
async function k() {
|
24
24
|
try {
|
25
|
-
const e = await
|
25
|
+
const e = await v("user");
|
26
26
|
if (e) {
|
27
27
|
const { _id: t, email: s, phone: n, roles: r, accessToken: a } = e;
|
28
28
|
d.interceptors.request.use((i) => (i.headers["x-access-token"] = a, i), (i) => Promise.reject(i));
|
@@ -34,7 +34,7 @@ async function k() {
|
|
34
34
|
}
|
35
35
|
}
|
36
36
|
k();
|
37
|
-
const
|
37
|
+
const N = {
|
38
38
|
async login(e, t) {
|
39
39
|
try {
|
40
40
|
const s = await p.post("/api/auth/signin", {
|
@@ -137,11 +137,11 @@ const C = {
|
|
137
137
|
return c(r), Promise.reject(r);
|
138
138
|
}
|
139
139
|
}
|
140
|
-
},
|
140
|
+
}, j = {
|
141
141
|
development: { secure: !1, expires: 7, sameSite: "Lax" },
|
142
|
-
production: { expires: 7, path: "/", domain: process.env.
|
142
|
+
production: { expires: 7, path: "/", domain: process.env.DOMAIN_URL, sameSite: "none", secure: !0 }
|
143
143
|
};
|
144
|
-
async function
|
144
|
+
async function v(e) {
|
145
145
|
if (process.env.MOBILE_APP) {
|
146
146
|
const { value: t } = await w.get({ key: e });
|
147
147
|
return t ? JSON.parse(t) : null;
|
@@ -154,20 +154,20 @@ function u(e, t, s = process.env.DOMAIN_URL) {
|
|
154
154
|
process.env.MOBILE_APP ? w.set({
|
155
155
|
key: e,
|
156
156
|
value: JSON.stringify(t)
|
157
|
-
}) : l.set(e, JSON.stringify(t),
|
157
|
+
}) : l.set(e, JSON.stringify(t), j[s]);
|
158
158
|
}
|
159
159
|
function g(e, t = process.env.NODE_ENV) {
|
160
160
|
if (process.env.MOBILE_APP)
|
161
161
|
w.remove({ key: e });
|
162
162
|
else {
|
163
|
-
const s = t === "production" ? { domain: process.env.
|
163
|
+
const s = t === "production" ? { domain: process.env.DOMAIN_URL } : {};
|
164
164
|
l.remove(e, s);
|
165
165
|
}
|
166
166
|
}
|
167
|
-
|
167
|
+
f(o, (e, t) => {
|
168
168
|
});
|
169
169
|
export {
|
170
|
-
|
170
|
+
N as actions,
|
171
171
|
k as initialize,
|
172
172
|
o as state
|
173
173
|
};
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./components/layouts/Community.vue.cjs"),
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./components/layouts/Community.vue.cjs"),o=require("./components/pages/CreateBlogPost.vue.cjs"),e=require("./components/pages/BlogPost.vue.cjs"),s=require("./components/pages/Blog.vue.cjs"),r=require("./components/blocks/FooterBlogpost.vue.cjs"),u=require("./components/blocks/Activity.vue.cjs"),l=require("./components/blocks/CardBlogpost.vue.cjs"),i=require("./components/sections/JoinUs.vue.cjs"),n=require("./components/sections/Comments.vue.cjs"),a=require("./components/sections/HotPosts.vue.cjs"),c=require("./store/blogposts.cjs"),g=require("./store/reactions.cjs"),d=require("./router/blogposts.cjs");exports.Community=t.default;exports.CreateBlogPost=o.default;exports.BlogPost=e.default;exports.Blog=s.default;exports.FooterBlogpost=r.default;exports.Activity=u.default;exports.CardBlogpost=l.default;exports.JoinUs=i.default;exports.Comments=n.default;exports.HotPosts=a.default;exports.blogpostsStore=c;exports.reactionsStore=g;exports.blogpostsRoutes=d.default;
|