@ozdao/prometheus-framework 0.2.221 → 0.2.222
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/builder.js +7 -4
- package/dist/builder.mjs +7 -4
- package/dist/community.server.js +1 -1
- package/dist/community.server.mjs +1 -1
- package/dist/main.css +1 -1
- package/dist/organizations.server.js +39 -2
- package/dist/organizations.server.mjs +39 -2
- package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/auth/views/components/layouts/Auth.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/auth/views/components/layouts/Auth.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/EnterCode.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/EnterCode.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/EnterPassword.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/EnterPassword.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/Invite.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/Invite.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/ResetPassword.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/ResetPassword.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/SignIn.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/SignIn.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/SignUp.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/SignUp.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/auth/views/middlewares/ownership.validation.cjs +33 -0
- package/dist/prometheus-framework/src/modules/auth/views/middlewares/ownership.validation.cjs.map +1 -0
- package/dist/prometheus-framework/src/modules/auth/views/middlewares/ownership.validation.js +33 -0
- package/dist/prometheus-framework/src/modules/auth/views/middlewares/ownership.validation.js.map +1 -0
- package/dist/prometheus-framework/src/modules/community/components/blocks/CardBlogpost.vue.cjs +3 -1
- package/dist/prometheus-framework/src/modules/community/components/blocks/CardBlogpost.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/community/components/blocks/CardBlogpost.vue.js +3 -1
- package/dist/prometheus-framework/src/modules/community/components/blocks/CardBlogpost.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.cjs +8 -7
- package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.js +9 -8
- package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/BlogPost.vue.cjs +10 -12
- package/dist/prometheus-framework/src/modules/community/components/pages/BlogPost.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/BlogPost.vue.js +10 -12
- package/dist/prometheus-framework/src/modules/community/components/pages/BlogPost.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/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 +1 -1
- package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/community/router/blogposts.cjs +11 -4
- package/dist/prometheus-framework/src/modules/community/router/blogposts.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/community/router/blogposts.js +11 -4
- package/dist/prometheus-framework/src/modules/community/router/blogposts.js.map +1 -1
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Embed.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Embed.vue.js +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/sections/BackofficeGallery.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/globals/views/components/blocks/BlockFilter.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/globals/views/components/blocks/BlockFilter.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/globals/views/components/blocks/BlockSearch.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/globals/views/components/blocks/BlockSearch.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/globals/views/components/sections/SectionPageTitle.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/globals/views/components/sections/SectionPageTitle.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/landing/components/sections/SectionGuide.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/landing/components/sections/SectionGuide.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.js +1 -1
- 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 +2 -2
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/orders/components/pages/Orders.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/Orders.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormDelivery.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormDelivery.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardDepartment.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardDepartment.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Department.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Department.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +2 -2
- 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 +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Organizations.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Organizations.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/pages/pages.client.cjs +759 -759
- package/dist/prometheus-framework/src/modules/pages/pages.client.js +759 -759
- package/dist/prometheus-framework/src/modules/pages/views/components/blocks/CardPage.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/pages/views/components/blocks/CardPage.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/pages/views/components/pages/PageEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/pages/views/components/pages/PageEdit.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/LeftoverPositions.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/LeftoverPositions.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/ListPositions.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/ListPositions.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.js +1 -1
- 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/Leftovers.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/Leftovers.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/products/components/pages/Products.vue.cjs +3 -3
- package/dist/prometheus-framework/src/modules/products/components/pages/Products.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/products/components/sections/EditModifications.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/EditModifications.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/FilterProducts.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/FilterProducts.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/spots/components/blocks/SpotMemberModify.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/spots/components/blocks/SpotMemberModify.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/spots/components/layouts/Spots.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/spots/components/layouts/Spots.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/spots/components/pages/Spot.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/spots/components/pages/Spot.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/spots/components/pages/SpotEdit.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/spots/components/pages/SpotEdit.vue.js +2 -2
- 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/ProfileBlogposts.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/ProfileBlogposts.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEvents.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEvents.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CardDeposit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CardDeposit.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CryptoDeposit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CryptoDeposit.vue.js +1 -1
- package/package.json +1 -1
- package/src/builder/webpack/webpack.config.client.js +7 -4
- package/src/modules/auth/views/middlewares/ownership.validation.js +45 -0
- package/src/modules/community/components/blocks/CardBlogpost.vue +3 -1
- package/src/modules/community/components/layouts/Community.vue +5 -7
- package/src/modules/community/components/pages/BlogPost.vue +7 -10
- package/src/modules/community/models/blogpost.model.js +1 -1
- package/src/modules/community/router/blogposts.js +10 -2
- package/src/modules/organizations/controllers/organizations.controller.js +26 -34
- package/src/modules/organizations/models/department.model.js +14 -0
- package/src/styles/base/all.scss +0 -2
- package/src/styles/config.scss +6 -0
@@ -103,7 +103,6 @@ const controllerFactory$5 = (db) => {
|
|
103
103
|
[sortParam]: sortOrder === "desc" ? -1 : 1,
|
104
104
|
"_id": 1
|
105
105
|
};
|
106
|
-
console.log(sort);
|
107
106
|
const pagination = {
|
108
107
|
skip: parseInt(req.query.skip) || 0,
|
109
108
|
limit: parseInt(req.query.limit) || 20
|
@@ -126,7 +125,31 @@ const controllerFactory$5 = (db) => {
|
|
126
125
|
...req.query.owner ? [{ owner: new ObjectId$1(req.query.owner) }] : [],
|
127
126
|
...req.query.member ? [{ "memberships.user": new ObjectId$1(req.query.member), "memberships.role": "member" }] : [],
|
128
127
|
...req.query.subscriber ? [{ "memberships.user": new ObjectId$1(req.query.subscriber), "memberships.role": "subscriber" }] : [],
|
129
|
-
...req.query.postable ? [{
|
128
|
+
...req.query.postable ? [{
|
129
|
+
$or: [{
|
130
|
+
$and: [{
|
131
|
+
types: {
|
132
|
+
$elemMatch: { $eq: "public" }
|
133
|
+
}
|
134
|
+
}, {
|
135
|
+
"memberships.user": new ObjectId$1(req.query.postable)
|
136
|
+
}]
|
137
|
+
}, {
|
138
|
+
$and: [{
|
139
|
+
types: {
|
140
|
+
$elemMatch: {
|
141
|
+
$in: ["exclusive", "hidden"]
|
142
|
+
}
|
143
|
+
}
|
144
|
+
}, {
|
145
|
+
"memberships.user": new ObjectId$1(req.query.postable)
|
146
|
+
}, {
|
147
|
+
"memberships.role": {
|
148
|
+
$ne: "subscriber"
|
149
|
+
}
|
150
|
+
}]
|
151
|
+
}]
|
152
|
+
}] : [],
|
130
153
|
...req.query.types ? [{ types: { $in: req.query.types } }] : [],
|
131
154
|
// Если req.query.types - строка
|
132
155
|
// to remove
|
@@ -790,6 +813,20 @@ var department_model = (mongoose) => {
|
|
790
813
|
default: false
|
791
814
|
}
|
792
815
|
},
|
816
|
+
posts: {
|
817
|
+
read: {
|
818
|
+
type: Boolean,
|
819
|
+
default: false
|
820
|
+
},
|
821
|
+
edit: {
|
822
|
+
type: Boolean,
|
823
|
+
default: false
|
824
|
+
},
|
825
|
+
delete: {
|
826
|
+
type: Boolean,
|
827
|
+
default: false
|
828
|
+
}
|
829
|
+
},
|
793
830
|
gallery: {
|
794
831
|
read: {
|
795
832
|
type: Boolean,
|
@@ -102,7 +102,6 @@ const controllerFactory$5 = (db) => {
|
|
102
102
|
[sortParam]: sortOrder === "desc" ? -1 : 1,
|
103
103
|
"_id": 1
|
104
104
|
};
|
105
|
-
console.log(sort);
|
106
105
|
const pagination = {
|
107
106
|
skip: parseInt(req.query.skip) || 0,
|
108
107
|
limit: parseInt(req.query.limit) || 20
|
@@ -125,7 +124,31 @@ const controllerFactory$5 = (db) => {
|
|
125
124
|
...req.query.owner ? [{ owner: new ObjectId$1(req.query.owner) }] : [],
|
126
125
|
...req.query.member ? [{ "memberships.user": new ObjectId$1(req.query.member), "memberships.role": "member" }] : [],
|
127
126
|
...req.query.subscriber ? [{ "memberships.user": new ObjectId$1(req.query.subscriber), "memberships.role": "subscriber" }] : [],
|
128
|
-
...req.query.postable ? [{
|
127
|
+
...req.query.postable ? [{
|
128
|
+
$or: [{
|
129
|
+
$and: [{
|
130
|
+
types: {
|
131
|
+
$elemMatch: { $eq: "public" }
|
132
|
+
}
|
133
|
+
}, {
|
134
|
+
"memberships.user": new ObjectId$1(req.query.postable)
|
135
|
+
}]
|
136
|
+
}, {
|
137
|
+
$and: [{
|
138
|
+
types: {
|
139
|
+
$elemMatch: {
|
140
|
+
$in: ["exclusive", "hidden"]
|
141
|
+
}
|
142
|
+
}
|
143
|
+
}, {
|
144
|
+
"memberships.user": new ObjectId$1(req.query.postable)
|
145
|
+
}, {
|
146
|
+
"memberships.role": {
|
147
|
+
$ne: "subscriber"
|
148
|
+
}
|
149
|
+
}]
|
150
|
+
}]
|
151
|
+
}] : [],
|
129
152
|
...req.query.types ? [{ types: { $in: req.query.types } }] : [],
|
130
153
|
// Если req.query.types - строка
|
131
154
|
// to remove
|
@@ -789,6 +812,20 @@ var department_model = (mongoose) => {
|
|
789
812
|
default: false
|
790
813
|
}
|
791
814
|
},
|
815
|
+
posts: {
|
816
|
+
read: {
|
817
|
+
type: Boolean,
|
818
|
+
default: false
|
819
|
+
},
|
820
|
+
edit: {
|
821
|
+
type: Boolean,
|
822
|
+
default: false
|
823
|
+
},
|
824
|
+
delete: {
|
825
|
+
type: Boolean,
|
826
|
+
default: false
|
827
|
+
}
|
828
|
+
},
|
792
829
|
gallery: {
|
793
830
|
read: {
|
794
831
|
type: Boolean,
|
@@ -1,7 +1,7 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
3
3
|
const vue = require("vue");
|
4
|
-
const Field = require("../Field/Field.
|
4
|
+
const Field = require("../Field/Field.vue.cjs");
|
5
5
|
const IconArrow = require("../../modules/icons/navigation/IconArrow.vue.cjs");
|
6
6
|
const vueI18n = require("vue-i18n");
|
7
7
|
const _hoisted_1 = { class: "pd-thin radius-extra flex-nowrap flex" };
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { ref, onMounted, watchEffect, openBlock, createElementBlock, createVNode, unref, isRef, createElementVNode, toDisplayString, createCommentVNode } from "vue";
|
2
|
-
import Field from "../Field/Field.
|
2
|
+
import Field from "../Field/Field.vue.js";
|
3
3
|
import _sfc_main$1 from "../../modules/icons/navigation/IconArrow.vue.js";
|
4
4
|
import { useI18n } from "vue-i18n";
|
5
5
|
const _hoisted_1 = { class: "pd-thin radius-extra flex-nowrap flex" };
|
@@ -1,8 +1,8 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
3
3
|
const vue = require("vue");
|
4
|
-
;/* empty css
|
5
|
-
;/* empty css
|
4
|
+
;/* empty css */
|
5
|
+
;/* empty css */
|
6
6
|
;/* empty css */
|
7
7
|
;/* empty css */
|
8
8
|
require("vue-i18n");
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { ref, resolveComponent, openBlock, createElementBlock, createVNode, withCtx, Transition, createBlock, resolveDynamicComponent, createElementVNode } from "vue";
|
2
|
-
/* empty css
|
3
|
-
/* empty css
|
2
|
+
/* empty css */
|
3
|
+
/* empty css */
|
4
4
|
/* empty css */
|
5
5
|
/* empty css */
|
6
6
|
import "vue-i18n";
|
@@ -1,7 +1,7 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
3
3
|
const vue = require("vue");
|
4
|
-
;/* empty css
|
4
|
+
;/* empty css */
|
5
5
|
const vueRouter = require("vue-router");
|
6
6
|
const vueI18n = require("vue-i18n");
|
7
7
|
const auth = require("../../store/auth.cjs");
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { reactive, watch, ref, openBlock, createElementBlock, createElementVNode, toDisplayString, unref, withDirectives, vModelText } from "vue";
|
2
|
-
/* empty css
|
2
|
+
/* empty css */
|
3
3
|
import { useRoute, useRouter } from "vue-router";
|
4
4
|
import { useI18n } from "vue-i18n";
|
5
5
|
import { state as state$1 } from "../../store/auth.js";
|
package/dist/prometheus-framework/src/modules/auth/views/components/pages/EnterPassword.vue.cjs
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
3
3
|
const vue = require("vue");
|
4
|
-
;/* empty css
|
5
|
-
const Field = require("../../../../../components/Field/Field.
|
4
|
+
;/* empty css */
|
5
|
+
const Field = require("../../../../../components/Field/Field.vue.cjs");
|
6
6
|
const Button = require("../../../../../components/Button/Button.vue.cjs");
|
7
7
|
const vueRouter = require("vue-router");
|
8
8
|
const vueI18n = require("vue-i18n");
|
package/dist/prometheus-framework/src/modules/auth/views/components/pages/EnterPassword.vue.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import { ref, openBlock, createElementBlock, createElementVNode, toDisplayString, unref, createVNode, createTextVNode, createCommentVNode, withCtx } from "vue";
|
2
|
-
/* empty css
|
3
|
-
import Field from "../../../../../components/Field/Field.
|
2
|
+
/* empty css */
|
3
|
+
import Field from "../../../../../components/Field/Field.vue.js";
|
4
4
|
import _sfc_main$1 from "../../../../../components/Button/Button.vue.js";
|
5
5
|
import { useRoute, useRouter } from "vue-router";
|
6
6
|
import { useI18n } from "vue-i18n";
|
@@ -1,8 +1,8 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
3
3
|
const vue = require("vue");
|
4
|
-
;/* empty css
|
5
|
-
const Field = require("../../../../../components/Field/Field.
|
4
|
+
;/* empty css */
|
5
|
+
const Field = require("../../../../../components/Field/Field.vue.cjs");
|
6
6
|
const Button = require("../../../../../components/Button/Button.vue.cjs");
|
7
7
|
const vueRouter = require("vue-router");
|
8
8
|
const auth = require("../../store/auth.cjs");
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { ref, onMounted, openBlock, createElementBlock, createElementVNode, createVNode, withCtx } from "vue";
|
2
|
-
/* empty css
|
3
|
-
import Field from "../../../../../components/Field/Field.
|
2
|
+
/* empty css */
|
3
|
+
import Field from "../../../../../components/Field/Field.vue.js";
|
4
4
|
import _sfc_main$1 from "../../../../../components/Button/Button.vue.js";
|
5
5
|
import { useRoute, useRouter } from "vue-router";
|
6
6
|
import { state, actions as actions$1 } from "../../store/auth.js";
|
package/dist/prometheus-framework/src/modules/auth/views/components/pages/ResetPassword.vue.cjs
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
3
3
|
const vue = require("vue");
|
4
|
-
const Tab = require("../../../../../components/Tab/Tab.
|
5
|
-
const Field = require("../../../../../components/Field/Field.
|
4
|
+
const Tab = require("../../../../../components/Tab/Tab.vue.cjs");
|
5
|
+
const Field = require("../../../../../components/Field/Field.vue.cjs");
|
6
6
|
const FieldPhone = require("../../../../../components/FieldPhone/FieldPhone.vue.cjs");
|
7
7
|
const Button = require("../../../../../components/Button/Button.vue.cjs");
|
8
8
|
const vueRouter = require("vue-router");
|
package/dist/prometheus-framework/src/modules/auth/views/components/pages/ResetPassword.vue.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import { ref, openBlock, createElementBlock, createElementVNode, toDisplayString, unref, createVNode, Transition, withCtx, createCommentVNode, createTextVNode } from "vue";
|
2
|
-
import _sfc_main$1 from "../../../../../components/Tab/Tab.
|
3
|
-
import Field from "../../../../../components/Field/Field.
|
2
|
+
import _sfc_main$1 from "../../../../../components/Tab/Tab.vue.js";
|
3
|
+
import Field from "../../../../../components/Field/Field.vue.js";
|
4
4
|
import _sfc_main$2 from "../../../../../components/FieldPhone/FieldPhone.vue.js";
|
5
5
|
import _sfc_main$3 from "../../../../../components/Button/Button.vue.js";
|
6
6
|
import { useRoute, useRouter } from "vue-router";
|
@@ -1,8 +1,8 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
3
3
|
const vue = require("vue");
|
4
|
-
const Tab = require("../../../../../components/Tab/Tab.
|
5
|
-
const Field = require("../../../../../components/Field/Field.
|
4
|
+
const Tab = require("../../../../../components/Tab/Tab.vue.cjs");
|
5
|
+
const Field = require("../../../../../components/Field/Field.vue.cjs");
|
6
6
|
const FieldPhone = require("../../../../../components/FieldPhone/FieldPhone.vue.cjs");
|
7
7
|
const Button = require("../../../../../components/Button/Button.vue.cjs");
|
8
8
|
const vueRouter = require("vue-router");
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { ref, onMounted, resolveComponent, openBlock, createElementBlock, createElementVNode, createTextVNode, toDisplayString, unref, createVNode, withCtx, Transition, withDirectives, vShow } from "vue";
|
2
|
-
import _sfc_main$1 from "../../../../../components/Tab/Tab.
|
3
|
-
import Field from "../../../../../components/Field/Field.
|
2
|
+
import _sfc_main$1 from "../../../../../components/Tab/Tab.vue.js";
|
3
|
+
import Field from "../../../../../components/Field/Field.vue.js";
|
4
4
|
import _sfc_main$2 from "../../../../../components/FieldPhone/FieldPhone.vue.js";
|
5
5
|
import _sfc_main$3 from "../../../../../components/Button/Button.vue.js";
|
6
6
|
import { useRoute, useRouter } from "vue-router";
|
@@ -1,8 +1,8 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
3
3
|
const vue = require("vue");
|
4
|
-
const Tab = require("../../../../../components/Tab/Tab.
|
5
|
-
const Field = require("../../../../../components/Field/Field.
|
4
|
+
const Tab = require("../../../../../components/Tab/Tab.vue.cjs");
|
5
|
+
const Field = require("../../../../../components/Field/Field.vue.cjs");
|
6
6
|
const FieldPhone = require("../../../../../components/FieldPhone/FieldPhone.vue.cjs");
|
7
7
|
const Button = require("../../../../../components/Button/Button.vue.cjs");
|
8
8
|
const vueRouter = require("vue-router");
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { ref, resolveComponent, openBlock, createElementBlock, createElementVNode, toDisplayString, unref, createVNode, Transition, withCtx, withDirectives, vShow, createTextVNode } from "vue";
|
2
|
-
import _sfc_main$1 from "../../../../../components/Tab/Tab.
|
3
|
-
import Field from "../../../../../components/Field/Field.
|
2
|
+
import _sfc_main$1 from "../../../../../components/Tab/Tab.vue.js";
|
3
|
+
import Field from "../../../../../components/Field/Field.vue.js";
|
4
4
|
import _sfc_main$2 from "../../../../../components/FieldPhone/FieldPhone.vue.js";
|
5
5
|
import _sfc_main$3 from "../../../../../components/Button/Button.vue.js";
|
6
6
|
import { useRoute, useRouter } from "vue-router";
|
@@ -0,0 +1,33 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
3
|
+
const auth = require("../store/auth.cjs");
|
4
|
+
const blogposts = require("../../../community/store/blogposts.cjs");
|
5
|
+
const mixins = require("../../../globals/views/mixins/mixins.cjs");
|
6
|
+
const { hasAccess } = mixins.useGlobalMixins();
|
7
|
+
async function requiresEditAccess(to, from, next) {
|
8
|
+
to.params.url;
|
9
|
+
const userId = auth.state.user._id;
|
10
|
+
try {
|
11
|
+
const post = (await blogposts.read({ url: to.params.url }))[0];
|
12
|
+
console.log("post is", post);
|
13
|
+
if (!post) {
|
14
|
+
return next("/404");
|
15
|
+
}
|
16
|
+
if (post.owner.type === "organization") {
|
17
|
+
const isAccess = hasAccess(post.owner.target._id, "posts", "edit", auth.state.accesses);
|
18
|
+
if (!isAccess) {
|
19
|
+
return next("/401");
|
20
|
+
}
|
21
|
+
} else {
|
22
|
+
if (post.creator.target._id !== userId) {
|
23
|
+
return next("/401");
|
24
|
+
}
|
25
|
+
}
|
26
|
+
next();
|
27
|
+
} catch (error) {
|
28
|
+
console.error("Error during post access check:", error);
|
29
|
+
return next("/500");
|
30
|
+
}
|
31
|
+
}
|
32
|
+
exports.requiresEditAccess = requiresEditAccess;
|
33
|
+
//# sourceMappingURL=ownership.validation.cjs.map
|
package/dist/prometheus-framework/src/modules/auth/views/middlewares/ownership.validation.cjs.map
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"ownership.validation.cjs","sources":["../../../../../../../src/modules/auth/views/middlewares/ownership.validation.js"],"sourcesContent":["import * as auth from '@pf/src/modules/auth/views/store/auth'\nimport * as blog from '@pf/src/modules/community/store/blogposts.js';\n\nimport { useGlobalMixins } from \"@pf/src/modules/globals/views/mixins/mixins.js\"\n\nconst { hasAccess } = useGlobalMixins()\n\nasync function requiresEditAccess(to, from, next) {\n const postId = to.params.url; // Предполагается, что `url` является идентификатором поста\n const userId = auth.state.user._id; // Получаем текущего пользователя\n\n try {\n // Получаем данные поста, чтобы проверить его принадлежность к организации или авторство\n const post = (await blog.read({ url: to.params.url }))[0];\n\n console.log('post is', post)\n\n if (!post) {\n return next('/404'); // Если пост не найден, перенаправляем на страницу 404\n }\n\n if (post.owner.type === 'organization') {\n // Если пост принадлежит организации, проверяем права на редактирование через `hasAccess`\n const isAccess = hasAccess(post.owner.target._id, 'posts', 'edit', auth.state.accesses);\n\n if (!isAccess) {\n return next('/401'); // Если у пользователя нет прав на редактирование в организации, перенаправляем на 403\n }\n } else {\n // Если пост не принадлежит организации, проверяем авторство\n if (post.creator.target._id !== userId) {\n return next('/401'); // Если пользователь не является автором, перенаправляем на 403\n }\n }\n\n next(); // Если все проверки прошли, продолжаем\n } catch (error) {\n console.error(\"Error during post access check:\", error);\n return next('/500'); // Если произошла ошибка, перенаправляем на страницу 500\n }\n}\n\nexport {\n requiresEditAccess\n}"],"names":["useGlobalMixins","auth.state","blog.read"],"mappings":";;;;;AAKA,MAAM,EAAE,UAAW,IAAGA,uBAAiB;AAEvC,eAAe,mBAAmB,IAAI,MAAM,MAAM;AACjC,KAAG,OAAO;AACzB,QAAM,SAASC,KAAAA,MAAW,KAAK;AAE/B,MAAI;AAEF,UAAM,QAAQ,MAAMC,UAAS,KAAC,EAAE,KAAK,GAAG,OAAO,IAAG,CAAE,GAAG,CAAC;AAExD,YAAQ,IAAI,WAAW,IAAI;AAE3B,QAAI,CAAC,MAAM;AACT,aAAO,KAAK,MAAM;AAAA,IACnB;AAED,QAAI,KAAK,MAAM,SAAS,gBAAgB;AAEtC,YAAM,WAAW,UAAU,KAAK,MAAM,OAAO,KAAK,SAAS,QAAQD,KAAU,MAAC,QAAQ;AAEtF,UAAI,CAAC,UAAU;AACb,eAAO,KAAK,MAAM;AAAA,MACnB;AAAA,IACP,OAAW;AAEL,UAAI,KAAK,QAAQ,OAAO,QAAQ,QAAQ;AACtC,eAAO,KAAK,MAAM;AAAA,MACnB;AAAA,IACF;AAED;EACD,SAAQ,OAAO;AACd,YAAQ,MAAM,mCAAmC,KAAK;AACtD,WAAO,KAAK,MAAM;AAAA,EACnB;AACH;;"}
|
@@ -0,0 +1,33 @@
|
|
1
|
+
import { state } from "../store/auth.js";
|
2
|
+
import { read } from "../../../community/store/blogposts.js";
|
3
|
+
import { useGlobalMixins } from "../../../globals/views/mixins/mixins.js";
|
4
|
+
const { hasAccess } = useGlobalMixins();
|
5
|
+
async function requiresEditAccess(to, from, next) {
|
6
|
+
to.params.url;
|
7
|
+
const userId = state.user._id;
|
8
|
+
try {
|
9
|
+
const post = (await read({ url: to.params.url }))[0];
|
10
|
+
console.log("post is", post);
|
11
|
+
if (!post) {
|
12
|
+
return next("/404");
|
13
|
+
}
|
14
|
+
if (post.owner.type === "organization") {
|
15
|
+
const isAccess = hasAccess(post.owner.target._id, "posts", "edit", state.accesses);
|
16
|
+
if (!isAccess) {
|
17
|
+
return next("/401");
|
18
|
+
}
|
19
|
+
} else {
|
20
|
+
if (post.creator.target._id !== userId) {
|
21
|
+
return next("/401");
|
22
|
+
}
|
23
|
+
}
|
24
|
+
next();
|
25
|
+
} catch (error) {
|
26
|
+
console.error("Error during post access check:", error);
|
27
|
+
return next("/500");
|
28
|
+
}
|
29
|
+
}
|
30
|
+
export {
|
31
|
+
requiresEditAccess
|
32
|
+
};
|
33
|
+
//# sourceMappingURL=ownership.validation.js.map
|
package/dist/prometheus-framework/src/modules/auth/views/middlewares/ownership.validation.js.map
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"ownership.validation.js","sources":["../../../../../../../src/modules/auth/views/middlewares/ownership.validation.js"],"sourcesContent":["import * as auth from '@pf/src/modules/auth/views/store/auth'\nimport * as blog from '@pf/src/modules/community/store/blogposts.js';\n\nimport { useGlobalMixins } from \"@pf/src/modules/globals/views/mixins/mixins.js\"\n\nconst { hasAccess } = useGlobalMixins()\n\nasync function requiresEditAccess(to, from, next) {\n const postId = to.params.url; // Предполагается, что `url` является идентификатором поста\n const userId = auth.state.user._id; // Получаем текущего пользователя\n\n try {\n // Получаем данные поста, чтобы проверить его принадлежность к организации или авторство\n const post = (await blog.read({ url: to.params.url }))[0];\n\n console.log('post is', post)\n\n if (!post) {\n return next('/404'); // Если пост не найден, перенаправляем на страницу 404\n }\n\n if (post.owner.type === 'organization') {\n // Если пост принадлежит организации, проверяем права на редактирование через `hasAccess`\n const isAccess = hasAccess(post.owner.target._id, 'posts', 'edit', auth.state.accesses);\n\n if (!isAccess) {\n return next('/401'); // Если у пользователя нет прав на редактирование в организации, перенаправляем на 403\n }\n } else {\n // Если пост не принадлежит организации, проверяем авторство\n if (post.creator.target._id !== userId) {\n return next('/401'); // Если пользователь не является автором, перенаправляем на 403\n }\n }\n\n next(); // Если все проверки прошли, продолжаем\n } catch (error) {\n console.error(\"Error during post access check:\", error);\n return next('/500'); // Если произошла ошибка, перенаправляем на страницу 500\n }\n}\n\nexport {\n requiresEditAccess\n}"],"names":["auth.state","blog.read"],"mappings":";;;AAKA,MAAM,EAAE,UAAW,IAAG,gBAAiB;AAEvC,eAAe,mBAAmB,IAAI,MAAM,MAAM;AACjC,KAAG,OAAO;AACzB,QAAM,SAASA,MAAW,KAAK;AAE/B,MAAI;AAEF,UAAM,QAAQ,MAAMC,KAAU,EAAE,KAAK,GAAG,OAAO,IAAG,CAAE,GAAG,CAAC;AAExD,YAAQ,IAAI,WAAW,IAAI;AAE3B,QAAI,CAAC,MAAM;AACT,aAAO,KAAK,MAAM;AAAA,IACnB;AAED,QAAI,KAAK,MAAM,SAAS,gBAAgB;AAEtC,YAAM,WAAW,UAAU,KAAK,MAAM,OAAO,KAAK,SAAS,QAAQD,MAAW,QAAQ;AAEtF,UAAI,CAAC,UAAU;AACb,eAAO,KAAK,MAAM;AAAA,MACnB;AAAA,IACP,OAAW;AAEL,UAAI,KAAK,QAAQ,OAAO,QAAQ,QAAQ;AACtC,eAAO,KAAK,MAAM;AAAA,MACnB;AAAA,IACF;AAED;EACD,SAAQ,OAAO;AACd,YAAQ,MAAM,mCAAmC,KAAK;AACtD,WAAO,KAAK,MAAM;AAAA,EACnB;AACH;"}
|
package/dist/prometheus-framework/src/modules/community/components/blocks/CardBlogpost.vue.cjs
CHANGED
@@ -62,7 +62,9 @@ const _sfc_main = {
|
|
62
62
|
return props.blogpost.content.find((block) => block.type === "Video");
|
63
63
|
});
|
64
64
|
const firstText = vue.computed(() => {
|
65
|
-
return props.blogpost.content.find(
|
65
|
+
return props.blogpost.content.find(
|
66
|
+
(block) => block.type === "Textarea" && block.class !== "h2"
|
67
|
+
);
|
66
68
|
});
|
67
69
|
return (_ctx, _cache) => {
|
68
70
|
var _a;
|
package/dist/prometheus-framework/src/modules/community/components/blocks/CardBlogpost.vue.cjs.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"CardBlogpost.vue.cjs","sources":["../../../../../../../src/modules/community/components/blocks/CardBlogpost.vue"],"sourcesContent":["<template>\n\t<article \n\t\tclass=\"pos-relative bg-light radius-big flex-column flex\"\n\t>\n\t\t<CardHeader \n\t :class=\"{\n\t \t'mn-b-small pd-medium': type !== 'short',\n\t \t'flex-child-order-last flex-child mn-l-small': type === 'short',\n\t }\"\n\t :entity=\"blogpost\"\n\t :entityType=\"'blogpost'\"\n\t :user=\"user\"\n\t :owner=\"blogpost.owner\" \n \t:creator=\"blogpost.creator\"\n \t:date=\"blogpost.createdAt\"\n \t:actions=\"user && user === blogpost.creator.target._id ? [\n { to: { name: 'Edit BlogPost', params: {url: blogpost.url } }, label: 'Edit' }\n ]: null\"\n\t\t/>\n\n\t\n\t\t<section\n\t\t\tclass=\"pd-t-zero pd-b-zero pd-medium\"\n\t\t>\n\t\t\t\n\t\t\t<div v-if=\"type !== 'blogpostPage'\" class=\"cursor-pointer mn-b-thin flex-nowrap flex w-100\">\n\n\t\t\t\t<Text \n\t\t\t\t\tv-if=\"!hideTitle\"\n\t\t\t\t \t:text=\"blogpost.name || ''\" \n\t\t\t\t \t:maxLen=\"80\" \n\t\t\t\t \tclass=\"h3 d-block\"\n\t\t\t\t \t@click=\"router.push({\n\t\t\t\t\t\tname: 'BlogPost', \n\t\t\t\t\t\tparams: { \n\t\t\t\t\t\t\turl: blogpost.url \n\t\t\t\t\t\t}\n\t\t\t\t\t})\"\n\t\t\t\t/>\n\n\t\t\t\t<div \n\t\t\t\t\tv-if=\"blogpost.status === 'draft'\" \n\t\t\t\t\tclass=\"pd-micro t-white uppercase t-semi p-small flex-center flex pd-r-small pd-l-small mn-l-thin w-min bg-second radius-extra\"\n\t\t\t\t>\n\t\t\t\t\t{{blogpost.status}}\n\t\t\t\t</div>\n\t\t\t\t\n\t\t\t</div>\n\t\t\t\n\t\t\t<p \n\t\t\t\tv-if=\"firstText && firstText.content && type !== 'blogpostPage' && !hideDescription\" \n\t\t\t\tclass='mn-b-small t-transp p-big'\n\t\t\t>\n\t\t\t\t{{firstText.content.slice(0,120)}}...\n\t\t\t</p>\n\n\t\t\t<h3 \n\t\t\t\tv-if=\"type === 'blogpostPage' && !hideTitle\" \n\t\t\t\tclass=\"mn-b-small h2\"\n\t\t\t>\n\t\t\t\t{{blogpost.name}}\n\t\t\t</h3>\n\n\t\t\t<slot></slot>\n\n\t\t\t<!-- <Chips \n \tv-if=\"type !== 'short' && blogpost.tags?.length > 0\" \n \t:chips=\"blogpost.tags\"\n \t/> -->\n\n\t\t</section>\n\n\t\t\t<!-- <Image :prop=\"{content:firstImage.content}\" class=\"h-100\"/> -->\n\n\t\t<template\n\t\t\tv-if=\"firstImage && firstImage.content && type !== 'blogpostPage'\"\n\t\t>\n\t\t\t<img loading=\"lazy\" \n\t\t\t\t:src=\"(FILE_SERVER_URL || '') + firstImage.content\" \n\t\t\t\talt=\"Blog post image\" \n\t\t\t\tclass=\"mn-b-medium object-fit-cover w-100 h-min-10r h-100\"\n\t\t\t/>\n\t\t</template>\n\n\t\t<template\n\t\t\tv-if=\"!firstImage?.content && firstVideo && firstVideo.content && type !== 'blogpostPage'\"\n\t\t>\n\t\t\t<!-- <div class=\"flex-center flex\"> -->\n\t <video controls class=\"mn-b-medium object-fit-cover w-100 h-max-20r\">\n\t <source :src=\"firstVideo.content\" type=\"video/mp4\">\n\t Your browser does not support the video tag.\n\t </video>\n\t <!-- </div> -->\n\t\t</template>\n\n\t\t\n\t\t<FooterBlogpost \n\t\t\tclass=\"pd-t-zero pd-medium\" \n\t\t\t:blogpost=\"blogpost\" :user=\"user\"\n\t\t/>\n\t\n\t</article>\n\n</template>\n\n\n<script setup=\"props\">\n\timport CardHeader from '@pf/src/modules/globals/views/components/blocks/CardHeader.vue'\n\timport FooterBlogpost from '@pf/src/modules/community/components/blocks/FooterBlogpost.vue'\t\n\n\timport Image from '@pf/src/modules/constructor/components/elements/Image.vue';\n\n import Text from '@pf/src/components/Text/Text.vue'\n\timport Chips from '@pf/src/components/Chips/Chips.vue'\n\n\timport IconEdit from '@pf/src/modules/icons/navigation/IconEdit.vue'\n\n\timport { computed } from 'vue'\n\n\timport { useRouter } from 'vue-router'\n\n\tconst router = useRouter()\n\n\tconst props = defineProps({\n\t\tblogpost: {\n\t\t\ttype: Object,\n\t\t},\n\t\tuser: {\n\t\t\ttype: String,\n\t\t},\n\t\ttype: {\n\t\t\ttype: String,\n\t\t},\n\t\thideDescription: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false\n\t\t},\n\t\thideTitle: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false\n\t\t}\n\t})\n\n const firstImage = computed(() => {\n\t return props.blogpost.content.find(block => block.type === 'ImageUpload');\n\t});\n\n\tconst firstVideo = computed(() => {\n\t return props.blogpost.content.find(block => block.type === 'Video');\n\t});\n\n\tconst firstText = computed(() => {\n\t return props.blogpost.content.find(block => block.type === 'Textarea');\n\t});\n\n</script>\n\n<style lang=\"scss\">\n</style>\n\n\n"],"names":["useRouter","computed"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyHC,UAAM,SAASA,UAAAA,UAAW;AAE1B,UAAM,QAAQ;AAoBb,UAAM,aAAaC,IAAAA,SAAS,MAAM;AACjC,aAAO,MAAM,SAAS,QAAQ,KAAK,WAAS,MAAM,SAAS,aAAa;AAAA,IAC3E,CAAE;AAED,UAAM,aAAaA,IAAAA,SAAS,MAAM;AAChC,aAAO,MAAM,SAAS,QAAQ,KAAK,WAAS,MAAM,SAAS,OAAO;AAAA,IACrE,CAAE;AAED,UAAM,YAAYA,IAAAA,SAAS,MAAM;AAC/B,aAAO,MAAM,SAAS,QAAQ,
|
1
|
+
{"version":3,"file":"CardBlogpost.vue.cjs","sources":["../../../../../../../src/modules/community/components/blocks/CardBlogpost.vue"],"sourcesContent":["<template>\n\t<article \n\t\tclass=\"pos-relative bg-light radius-big flex-column flex\"\n\t>\n\t\t<CardHeader \n\t :class=\"{\n\t \t'mn-b-small pd-medium': type !== 'short',\n\t \t'flex-child-order-last flex-child mn-l-small': type === 'short',\n\t }\"\n\t :entity=\"blogpost\"\n\t :entityType=\"'blogpost'\"\n\t :user=\"user\"\n\t :owner=\"blogpost.owner\" \n \t:creator=\"blogpost.creator\"\n \t:date=\"blogpost.createdAt\"\n \t:actions=\"user && user === blogpost.creator.target._id ? [\n { to: { name: 'Edit BlogPost', params: {url: blogpost.url } }, label: 'Edit' }\n ]: null\"\n\t\t/>\n\n\t\n\t\t<section\n\t\t\tclass=\"pd-t-zero pd-b-zero pd-medium\"\n\t\t>\n\t\t\t\n\t\t\t<div v-if=\"type !== 'blogpostPage'\" class=\"cursor-pointer mn-b-thin flex-nowrap flex w-100\">\n\n\t\t\t\t<Text \n\t\t\t\t\tv-if=\"!hideTitle\"\n\t\t\t\t \t:text=\"blogpost.name || ''\" \n\t\t\t\t \t:maxLen=\"80\" \n\t\t\t\t \tclass=\"h3 d-block\"\n\t\t\t\t \t@click=\"router.push({\n\t\t\t\t\t\tname: 'BlogPost', \n\t\t\t\t\t\tparams: { \n\t\t\t\t\t\t\turl: blogpost.url \n\t\t\t\t\t\t}\n\t\t\t\t\t})\"\n\t\t\t\t/>\n\n\t\t\t\t<div \n\t\t\t\t\tv-if=\"blogpost.status === 'draft'\" \n\t\t\t\t\tclass=\"pd-micro t-white uppercase t-semi p-small flex-center flex pd-r-small pd-l-small mn-l-thin w-min bg-second radius-extra\"\n\t\t\t\t>\n\t\t\t\t\t{{blogpost.status}}\n\t\t\t\t</div>\n\t\t\t\t\n\t\t\t</div>\n\t\t\t\n\t\t\t<p \n\t\t\t\tv-if=\"firstText && firstText.content && type !== 'blogpostPage' && !hideDescription\" \n\t\t\t\tclass='mn-b-small t-transp p-big'\n\t\t\t>\n\t\t\t\t{{firstText.content.slice(0,120)}}...\n\t\t\t</p>\n\n\t\t\t<h3 \n\t\t\t\tv-if=\"type === 'blogpostPage' && !hideTitle\" \n\t\t\t\tclass=\"mn-b-small h2\"\n\t\t\t>\n\t\t\t\t{{blogpost.name}}\n\t\t\t</h3>\n\n\t\t\t<slot></slot>\n\n\t\t\t<!-- <Chips \n \tv-if=\"type !== 'short' && blogpost.tags?.length > 0\" \n \t:chips=\"blogpost.tags\"\n \t/> -->\n\n\t\t</section>\n\n\t\t\t<!-- <Image :prop=\"{content:firstImage.content}\" class=\"h-100\"/> -->\n\n\t\t<template\n\t\t\tv-if=\"firstImage && firstImage.content && type !== 'blogpostPage'\"\n\t\t>\n\t\t\t<img loading=\"lazy\" \n\t\t\t\t:src=\"(FILE_SERVER_URL || '') + firstImage.content\" \n\t\t\t\talt=\"Blog post image\" \n\t\t\t\tclass=\"mn-b-medium object-fit-cover w-100 h-min-10r h-100\"\n\t\t\t/>\n\t\t</template>\n\n\t\t<template\n\t\t\tv-if=\"!firstImage?.content && firstVideo && firstVideo.content && type !== 'blogpostPage'\"\n\t\t>\n\t\t\t<!-- <div class=\"flex-center flex\"> -->\n\t <video controls class=\"mn-b-medium object-fit-cover w-100 h-max-20r\">\n\t <source :src=\"firstVideo.content\" type=\"video/mp4\">\n\t Your browser does not support the video tag.\n\t </video>\n\t <!-- </div> -->\n\t\t</template>\n\n\t\t\n\t\t<FooterBlogpost \n\t\t\tclass=\"pd-t-zero pd-medium\" \n\t\t\t:blogpost=\"blogpost\" :user=\"user\"\n\t\t/>\n\t\n\t</article>\n\n</template>\n\n\n<script setup=\"props\">\n\timport CardHeader from '@pf/src/modules/globals/views/components/blocks/CardHeader.vue'\n\timport FooterBlogpost from '@pf/src/modules/community/components/blocks/FooterBlogpost.vue'\t\n\n\timport Image from '@pf/src/modules/constructor/components/elements/Image.vue';\n\n import Text from '@pf/src/components/Text/Text.vue'\n\timport Chips from '@pf/src/components/Chips/Chips.vue'\n\n\timport IconEdit from '@pf/src/modules/icons/navigation/IconEdit.vue'\n\n\timport { computed } from 'vue'\n\n\timport { useRouter } from 'vue-router'\n\n\tconst router = useRouter()\n\n\tconst props = defineProps({\n\t\tblogpost: {\n\t\t\ttype: Object,\n\t\t},\n\t\tuser: {\n\t\t\ttype: String,\n\t\t},\n\t\ttype: {\n\t\t\ttype: String,\n\t\t},\n\t\thideDescription: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false\n\t\t},\n\t\thideTitle: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false\n\t\t}\n\t})\n\n const firstImage = computed(() => {\n\t return props.blogpost.content.find(block => block.type === 'ImageUpload');\n\t});\n\n\tconst firstVideo = computed(() => {\n\t return props.blogpost.content.find(block => block.type === 'Video');\n\t});\n\n\tconst firstText = computed(() => {\n\t return props.blogpost.content.find(block => \n\t block.type === 'Textarea' && block.class !== 'h2'\n\t );\n\t});\n\n</script>\n\n<style lang=\"scss\">\n</style>\n\n\n"],"names":["useRouter","computed"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyHC,UAAM,SAASA,UAAAA,UAAW;AAE1B,UAAM,QAAQ;AAoBb,UAAM,aAAaC,IAAAA,SAAS,MAAM;AACjC,aAAO,MAAM,SAAS,QAAQ,KAAK,WAAS,MAAM,SAAS,aAAa;AAAA,IAC3E,CAAE;AAED,UAAM,aAAaA,IAAAA,SAAS,MAAM;AAChC,aAAO,MAAM,SAAS,QAAQ,KAAK,WAAS,MAAM,SAAS,OAAO;AAAA,IACrE,CAAE;AAED,UAAM,YAAYA,IAAAA,SAAS,MAAM;AAC/B,aAAO,MAAM,SAAS,QAAQ;AAAA,QAAK,WACjC,MAAM,SAAS,cAAc,MAAM,UAAU;AAAA,MAClD;AAAA,IACA,CAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/prometheus-framework/src/modules/community/components/blocks/CardBlogpost.vue.js
CHANGED
@@ -60,7 +60,9 @@ const _sfc_main = {
|
|
60
60
|
return props.blogpost.content.find((block) => block.type === "Video");
|
61
61
|
});
|
62
62
|
const firstText = computed(() => {
|
63
|
-
return props.blogpost.content.find(
|
63
|
+
return props.blogpost.content.find(
|
64
|
+
(block) => block.type === "Textarea" && block.class !== "h2"
|
65
|
+
);
|
64
66
|
});
|
65
67
|
return (_ctx, _cache) => {
|
66
68
|
var _a;
|
package/dist/prometheus-framework/src/modules/community/components/blocks/CardBlogpost.vue.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"CardBlogpost.vue.js","sources":["../../../../../../../src/modules/community/components/blocks/CardBlogpost.vue"],"sourcesContent":["<template>\n\t<article \n\t\tclass=\"pos-relative bg-light radius-big flex-column flex\"\n\t>\n\t\t<CardHeader \n\t :class=\"{\n\t \t'mn-b-small pd-medium': type !== 'short',\n\t \t'flex-child-order-last flex-child mn-l-small': type === 'short',\n\t }\"\n\t :entity=\"blogpost\"\n\t :entityType=\"'blogpost'\"\n\t :user=\"user\"\n\t :owner=\"blogpost.owner\" \n \t:creator=\"blogpost.creator\"\n \t:date=\"blogpost.createdAt\"\n \t:actions=\"user && user === blogpost.creator.target._id ? [\n { to: { name: 'Edit BlogPost', params: {url: blogpost.url } }, label: 'Edit' }\n ]: null\"\n\t\t/>\n\n\t\n\t\t<section\n\t\t\tclass=\"pd-t-zero pd-b-zero pd-medium\"\n\t\t>\n\t\t\t\n\t\t\t<div v-if=\"type !== 'blogpostPage'\" class=\"cursor-pointer mn-b-thin flex-nowrap flex w-100\">\n\n\t\t\t\t<Text \n\t\t\t\t\tv-if=\"!hideTitle\"\n\t\t\t\t \t:text=\"blogpost.name || ''\" \n\t\t\t\t \t:maxLen=\"80\" \n\t\t\t\t \tclass=\"h3 d-block\"\n\t\t\t\t \t@click=\"router.push({\n\t\t\t\t\t\tname: 'BlogPost', \n\t\t\t\t\t\tparams: { \n\t\t\t\t\t\t\turl: blogpost.url \n\t\t\t\t\t\t}\n\t\t\t\t\t})\"\n\t\t\t\t/>\n\n\t\t\t\t<div \n\t\t\t\t\tv-if=\"blogpost.status === 'draft'\" \n\t\t\t\t\tclass=\"pd-micro t-white uppercase t-semi p-small flex-center flex pd-r-small pd-l-small mn-l-thin w-min bg-second radius-extra\"\n\t\t\t\t>\n\t\t\t\t\t{{blogpost.status}}\n\t\t\t\t</div>\n\t\t\t\t\n\t\t\t</div>\n\t\t\t\n\t\t\t<p \n\t\t\t\tv-if=\"firstText && firstText.content && type !== 'blogpostPage' && !hideDescription\" \n\t\t\t\tclass='mn-b-small t-transp p-big'\n\t\t\t>\n\t\t\t\t{{firstText.content.slice(0,120)}}...\n\t\t\t</p>\n\n\t\t\t<h3 \n\t\t\t\tv-if=\"type === 'blogpostPage' && !hideTitle\" \n\t\t\t\tclass=\"mn-b-small h2\"\n\t\t\t>\n\t\t\t\t{{blogpost.name}}\n\t\t\t</h3>\n\n\t\t\t<slot></slot>\n\n\t\t\t<!-- <Chips \n \tv-if=\"type !== 'short' && blogpost.tags?.length > 0\" \n \t:chips=\"blogpost.tags\"\n \t/> -->\n\n\t\t</section>\n\n\t\t\t<!-- <Image :prop=\"{content:firstImage.content}\" class=\"h-100\"/> -->\n\n\t\t<template\n\t\t\tv-if=\"firstImage && firstImage.content && type !== 'blogpostPage'\"\n\t\t>\n\t\t\t<img loading=\"lazy\" \n\t\t\t\t:src=\"(FILE_SERVER_URL || '') + firstImage.content\" \n\t\t\t\talt=\"Blog post image\" \n\t\t\t\tclass=\"mn-b-medium object-fit-cover w-100 h-min-10r h-100\"\n\t\t\t/>\n\t\t</template>\n\n\t\t<template\n\t\t\tv-if=\"!firstImage?.content && firstVideo && firstVideo.content && type !== 'blogpostPage'\"\n\t\t>\n\t\t\t<!-- <div class=\"flex-center flex\"> -->\n\t <video controls class=\"mn-b-medium object-fit-cover w-100 h-max-20r\">\n\t <source :src=\"firstVideo.content\" type=\"video/mp4\">\n\t Your browser does not support the video tag.\n\t </video>\n\t <!-- </div> -->\n\t\t</template>\n\n\t\t\n\t\t<FooterBlogpost \n\t\t\tclass=\"pd-t-zero pd-medium\" \n\t\t\t:blogpost=\"blogpost\" :user=\"user\"\n\t\t/>\n\t\n\t</article>\n\n</template>\n\n\n<script setup=\"props\">\n\timport CardHeader from '@pf/src/modules/globals/views/components/blocks/CardHeader.vue'\n\timport FooterBlogpost from '@pf/src/modules/community/components/blocks/FooterBlogpost.vue'\t\n\n\timport Image from '@pf/src/modules/constructor/components/elements/Image.vue';\n\n import Text from '@pf/src/components/Text/Text.vue'\n\timport Chips from '@pf/src/components/Chips/Chips.vue'\n\n\timport IconEdit from '@pf/src/modules/icons/navigation/IconEdit.vue'\n\n\timport { computed } from 'vue'\n\n\timport { useRouter } from 'vue-router'\n\n\tconst router = useRouter()\n\n\tconst props = defineProps({\n\t\tblogpost: {\n\t\t\ttype: Object,\n\t\t},\n\t\tuser: {\n\t\t\ttype: String,\n\t\t},\n\t\ttype: {\n\t\t\ttype: String,\n\t\t},\n\t\thideDescription: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false\n\t\t},\n\t\thideTitle: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false\n\t\t}\n\t})\n\n const firstImage = computed(() => {\n\t return props.blogpost.content.find(block => block.type === 'ImageUpload');\n\t});\n\n\tconst firstVideo = computed(() => {\n\t return props.blogpost.content.find(block => block.type === 'Video');\n\t});\n\n\tconst firstText = computed(() => {\n\t return props.blogpost.content.find(block => block.type === 'Textarea');\n\t});\n\n</script>\n\n<style lang=\"scss\">\n</style>\n\n\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyHC,UAAM,SAAS,UAAW;AAE1B,UAAM,QAAQ;AAoBb,UAAM,aAAa,SAAS,MAAM;AACjC,aAAO,MAAM,SAAS,QAAQ,KAAK,WAAS,MAAM,SAAS,aAAa;AAAA,IAC3E,CAAE;AAED,UAAM,aAAa,SAAS,MAAM;AAChC,aAAO,MAAM,SAAS,QAAQ,KAAK,WAAS,MAAM,SAAS,OAAO;AAAA,IACrE,CAAE;AAED,UAAM,YAAY,SAAS,MAAM;AAC/B,aAAO,MAAM,SAAS,QAAQ,
|
1
|
+
{"version":3,"file":"CardBlogpost.vue.js","sources":["../../../../../../../src/modules/community/components/blocks/CardBlogpost.vue"],"sourcesContent":["<template>\n\t<article \n\t\tclass=\"pos-relative bg-light radius-big flex-column flex\"\n\t>\n\t\t<CardHeader \n\t :class=\"{\n\t \t'mn-b-small pd-medium': type !== 'short',\n\t \t'flex-child-order-last flex-child mn-l-small': type === 'short',\n\t }\"\n\t :entity=\"blogpost\"\n\t :entityType=\"'blogpost'\"\n\t :user=\"user\"\n\t :owner=\"blogpost.owner\" \n \t:creator=\"blogpost.creator\"\n \t:date=\"blogpost.createdAt\"\n \t:actions=\"user && user === blogpost.creator.target._id ? [\n { to: { name: 'Edit BlogPost', params: {url: blogpost.url } }, label: 'Edit' }\n ]: null\"\n\t\t/>\n\n\t\n\t\t<section\n\t\t\tclass=\"pd-t-zero pd-b-zero pd-medium\"\n\t\t>\n\t\t\t\n\t\t\t<div v-if=\"type !== 'blogpostPage'\" class=\"cursor-pointer mn-b-thin flex-nowrap flex w-100\">\n\n\t\t\t\t<Text \n\t\t\t\t\tv-if=\"!hideTitle\"\n\t\t\t\t \t:text=\"blogpost.name || ''\" \n\t\t\t\t \t:maxLen=\"80\" \n\t\t\t\t \tclass=\"h3 d-block\"\n\t\t\t\t \t@click=\"router.push({\n\t\t\t\t\t\tname: 'BlogPost', \n\t\t\t\t\t\tparams: { \n\t\t\t\t\t\t\turl: blogpost.url \n\t\t\t\t\t\t}\n\t\t\t\t\t})\"\n\t\t\t\t/>\n\n\t\t\t\t<div \n\t\t\t\t\tv-if=\"blogpost.status === 'draft'\" \n\t\t\t\t\tclass=\"pd-micro t-white uppercase t-semi p-small flex-center flex pd-r-small pd-l-small mn-l-thin w-min bg-second radius-extra\"\n\t\t\t\t>\n\t\t\t\t\t{{blogpost.status}}\n\t\t\t\t</div>\n\t\t\t\t\n\t\t\t</div>\n\t\t\t\n\t\t\t<p \n\t\t\t\tv-if=\"firstText && firstText.content && type !== 'blogpostPage' && !hideDescription\" \n\t\t\t\tclass='mn-b-small t-transp p-big'\n\t\t\t>\n\t\t\t\t{{firstText.content.slice(0,120)}}...\n\t\t\t</p>\n\n\t\t\t<h3 \n\t\t\t\tv-if=\"type === 'blogpostPage' && !hideTitle\" \n\t\t\t\tclass=\"mn-b-small h2\"\n\t\t\t>\n\t\t\t\t{{blogpost.name}}\n\t\t\t</h3>\n\n\t\t\t<slot></slot>\n\n\t\t\t<!-- <Chips \n \tv-if=\"type !== 'short' && blogpost.tags?.length > 0\" \n \t:chips=\"blogpost.tags\"\n \t/> -->\n\n\t\t</section>\n\n\t\t\t<!-- <Image :prop=\"{content:firstImage.content}\" class=\"h-100\"/> -->\n\n\t\t<template\n\t\t\tv-if=\"firstImage && firstImage.content && type !== 'blogpostPage'\"\n\t\t>\n\t\t\t<img loading=\"lazy\" \n\t\t\t\t:src=\"(FILE_SERVER_URL || '') + firstImage.content\" \n\t\t\t\talt=\"Blog post image\" \n\t\t\t\tclass=\"mn-b-medium object-fit-cover w-100 h-min-10r h-100\"\n\t\t\t/>\n\t\t</template>\n\n\t\t<template\n\t\t\tv-if=\"!firstImage?.content && firstVideo && firstVideo.content && type !== 'blogpostPage'\"\n\t\t>\n\t\t\t<!-- <div class=\"flex-center flex\"> -->\n\t <video controls class=\"mn-b-medium object-fit-cover w-100 h-max-20r\">\n\t <source :src=\"firstVideo.content\" type=\"video/mp4\">\n\t Your browser does not support the video tag.\n\t </video>\n\t <!-- </div> -->\n\t\t</template>\n\n\t\t\n\t\t<FooterBlogpost \n\t\t\tclass=\"pd-t-zero pd-medium\" \n\t\t\t:blogpost=\"blogpost\" :user=\"user\"\n\t\t/>\n\t\n\t</article>\n\n</template>\n\n\n<script setup=\"props\">\n\timport CardHeader from '@pf/src/modules/globals/views/components/blocks/CardHeader.vue'\n\timport FooterBlogpost from '@pf/src/modules/community/components/blocks/FooterBlogpost.vue'\t\n\n\timport Image from '@pf/src/modules/constructor/components/elements/Image.vue';\n\n import Text from '@pf/src/components/Text/Text.vue'\n\timport Chips from '@pf/src/components/Chips/Chips.vue'\n\n\timport IconEdit from '@pf/src/modules/icons/navigation/IconEdit.vue'\n\n\timport { computed } from 'vue'\n\n\timport { useRouter } from 'vue-router'\n\n\tconst router = useRouter()\n\n\tconst props = defineProps({\n\t\tblogpost: {\n\t\t\ttype: Object,\n\t\t},\n\t\tuser: {\n\t\t\ttype: String,\n\t\t},\n\t\ttype: {\n\t\t\ttype: String,\n\t\t},\n\t\thideDescription: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false\n\t\t},\n\t\thideTitle: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false\n\t\t}\n\t})\n\n const firstImage = computed(() => {\n\t return props.blogpost.content.find(block => block.type === 'ImageUpload');\n\t});\n\n\tconst firstVideo = computed(() => {\n\t return props.blogpost.content.find(block => block.type === 'Video');\n\t});\n\n\tconst firstText = computed(() => {\n\t return props.blogpost.content.find(block => \n\t block.type === 'Textarea' && block.class !== 'h2'\n\t );\n\t});\n\n</script>\n\n<style lang=\"scss\">\n</style>\n\n\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyHC,UAAM,SAAS,UAAW;AAE1B,UAAM,QAAQ;AAoBb,UAAM,aAAa,SAAS,MAAM;AACjC,aAAO,MAAM,SAAS,QAAQ,KAAK,WAAS,MAAM,SAAS,aAAa;AAAA,IAC3E,CAAE;AAED,UAAM,aAAa,SAAS,MAAM;AAChC,aAAO,MAAM,SAAS,QAAQ,KAAK,WAAS,MAAM,SAAS,OAAO;AAAA,IACrE,CAAE;AAED,UAAM,YAAY,SAAS,MAAM;AAC/B,aAAO,MAAM,SAAS,QAAQ;AAAA,QAAK,WACjC,MAAM,SAAS,cAAc,MAAM,UAAU;AAAA,MAClD;AAAA,IACA,CAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.cjs
CHANGED
@@ -15,11 +15,11 @@ const organizations = require("../../../organizations/store/organizations.cjs");
|
|
15
15
|
const memberships = require("../../../organizations/store/memberships.cjs");
|
16
16
|
const _hoisted_1 = {
|
17
17
|
style: { "grid-template-columns": "2fr 4fr 2fr" },
|
18
|
-
class: "cols-3 gap-thin pd-thin"
|
18
|
+
class: "cols-3 gap-thin pd-t-zero pd-thin"
|
19
19
|
};
|
20
|
-
const _hoisted_2 = { class: "align-self-start pos-sticky pos-t-0 w-100 bg-light radius-big pd-medium p-medium gap-thin flex-column flex-nowrap flex" };
|
20
|
+
const _hoisted_2 = { class: "align-self-start pos-sticky pos-t-0 w-100 bg-light radius-big pd-medium p-medium gap-thin flex-column mobile:flex-row flex-nowrap flex z-index-2 o-scroll t-nowrap scroll-hide" };
|
21
21
|
const _hoisted_3 = { class: "pos-relative" };
|
22
|
-
const _hoisted_4 = { class: "bg-
|
22
|
+
const _hoisted_4 = { class: "bg-light t-black radius-big pd-medium pos-relative mn-b-thin flex-v-center t-left flex-nowrap flex" };
|
23
23
|
const _hoisted_5 = { class: "pos-relative flex-v-center flex-nowrap flex" };
|
24
24
|
const _hoisted_6 = /* @__PURE__ */ vue.createElementVNode("span", { class: "mn-r-thin" }, "Topics for ", -1);
|
25
25
|
const _hoisted_7 = { class: "align-self-start bg-light radius-big pd-medium" };
|
@@ -81,17 +81,18 @@ const _sfc_main = {
|
|
81
81
|
vue.createVNode(IconFollowing.default, { class: "i-medium mn-r-thin t-transp" }),
|
82
82
|
vue.createTextVNode(" Following ")
|
83
83
|
], 2)) : vue.createCommentVNode("", true),
|
84
|
-
vue.
|
84
|
+
auth.state.user._id ? (vue.openBlock(), vue.createBlock(_component_router_link, {
|
85
|
+
key: 1,
|
85
86
|
to: {
|
86
87
|
name: "Create BlogPost"
|
87
88
|
},
|
88
|
-
class: "button t-medium
|
89
|
+
class: "button t-medium bg-main w-100"
|
89
90
|
}, {
|
90
91
|
default: vue.withCtx(() => [
|
91
92
|
vue.createTextVNode(" Create Post ")
|
92
93
|
]),
|
93
94
|
_: 1
|
94
|
-
})
|
95
|
+
})) : vue.createCommentVNode("", true)
|
95
96
|
]),
|
96
97
|
vue.createElementVNode("section", _hoisted_3, [
|
97
98
|
vue.createElementVNode("header", _hoisted_4, [
|
@@ -102,7 +103,7 @@ const _sfc_main = {
|
|
102
103
|
select: blogposts.state.filter.period,
|
103
104
|
"onUpdate:select": _cache[4] || (_cache[4] = ($event) => blogposts.state.filter.period = $event),
|
104
105
|
placeholder: "all time",
|
105
|
-
class: "t-semi pos-relative w-max bg-main t-black pd-thin radius-medium h3 t-center
|
106
|
+
class: "t-semi pos-relative w-max bg-main t-black pd-thin radius-medium h3 t-center"
|
106
107
|
}, null, 8, ["select"])
|
107
108
|
])
|
108
109
|
]),
|
package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.cjs.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Community.vue.cjs","sources":["../../../../../../../src/modules/community/components/layouts/Community.vue"],"sourcesContent":["<template>\n\t<div style=\"grid-template-columns: 2fr 4fr 2fr;\" class=\"cols-3 gap-thin pd-thin\">\n\n\t\t<ul class=\"align-self-start pos-sticky pos-t-0 w-100 bg-light radius-big pd-medium p-medium gap-thin flex-column flex-nowrap flex\">\n\t\t\t<li \t\n\t\t\t\t:class=\"{'t-black bg-white': route.params.category === 'featured' }\" \t\t\t\t\t\n\t\t\t\t@click=\"() => { blog.state.sort.param = 'createdAt'; router.push({name: 'Blog', params: { category: 'featured' } })}\" \n\t\t\t\tclass=\"cursor-pointer flex-v-center flex t-medium pd-thin radius-extra\"\n\t\t\t>\n\t\t\t\t<IconFeatured class=\"i-medium mn-r-thin t-transp\"/>\n\t\t\t\tFeatured\n\t\t\t</li>\n\t\t\t<li \t\n\t\t\t\t:class=\"{'t-black bg-white': route.params.category === 'popular' }\"\t\t\t\t\t \t\t\t\t\n\t\t\t\t@click=\"() => { blog.state.sort.param = 'views'; router.push({name: 'Blog', params: { category: 'popular' } }) }\" \n\t\t\t\tclass=\"cursor-pointer t-medium flex-v-center flex pd-thin radius-extra\"\n\t\t\t>\t\n\t\t\t\t<IconPopular class=\"i-medium mn-r-thin t-transp\"/>\n\t\t\t\tPopular\n\t\t\t</li>\n\t\t\t<li \t\n\t\t\t\t:class=\"{'t-black bg-white': route.params.category === 'new'}\" \t\t\t\t\t\n\t\t\t\t@click=\"() => { blog.state.sort.param = 'createdAt'; router.push({name: 'Blog', params: { category: 'new' } })}\" \n\t\t\t\tclass=\"cursor-pointer t-medium flex-v-center flex pd-thin radius-extra\"\n\t\t\t>\n\t\t\t\t<IconRecent class=\"i-medium mn-r-thin t-transp\"/>\n\t\t\t\tRecent\n\t\t\t</li>\n\t\t\t<li \t\n\t\t\t\tv-if=\"auth.state.user._id\"\n\t\t\t\t:class=\"{'t-black bg-white': route.params.category === 'following'}\" \t\t\n\t\t\t\t@click=\"() => { blog.state.sort.param = 'createdAt'; router.push({name: 'Blog', params: { category: 'following' } })}\" \n\t\t\t\tclass=\"cursor-pointer t-medium flex-v-center flex pd-thin radius-extra\"\n\t\t\t>\n\t\t\t\t<IconFollowing class=\"i-medium mn-r-thin t-transp\"/>\n\t\t\t\tFollowing\n\t\t\t</li>\n\n\t\t\t<router-link \n\t\t\t\t:to=\"{\n\t\t\t\t\tname: 'Create BlogPost'\n\t\t\t\t}\" \n\t\t\t\tclass=\"button t-medium
|
1
|
+
{"version":3,"file":"Community.vue.cjs","sources":["../../../../../../../src/modules/community/components/layouts/Community.vue"],"sourcesContent":["<template>\n\t<div style=\"grid-template-columns: 2fr 4fr 2fr;\" class=\"cols-3 gap-thin pd-t-zero pd-thin\">\n\n\t\t<ul class=\"align-self-start pos-sticky pos-t-0 w-100 bg-light radius-big pd-medium p-medium gap-thin flex-column mobile:flex-row flex-nowrap flex z-index-2 o-scroll t-nowrap scroll-hide\">\n\t\t\t<li \t\n\t\t\t\t:class=\"{'t-black bg-white': route.params.category === 'featured' }\" \t\t\t\t\t\n\t\t\t\t@click=\"() => { blog.state.sort.param = 'createdAt'; router.push({name: 'Blog', params: { category: 'featured' } })}\" \n\t\t\t\tclass=\"cursor-pointer flex-v-center flex t-medium pd-thin radius-extra\"\n\t\t\t>\n\t\t\t\t<IconFeatured class=\"i-medium mn-r-thin t-transp\"/>\n\t\t\t\tFeatured\n\t\t\t</li>\n\t\t\t<li \t\n\t\t\t\t:class=\"{'t-black bg-white': route.params.category === 'popular' }\"\t\t\t\t\t \t\t\t\t\n\t\t\t\t@click=\"() => { blog.state.sort.param = 'views'; router.push({name: 'Blog', params: { category: 'popular' } }) }\" \n\t\t\t\tclass=\"cursor-pointer t-medium flex-v-center flex pd-thin radius-extra\"\n\t\t\t>\t\n\t\t\t\t<IconPopular class=\"i-medium mn-r-thin t-transp\"/>\n\t\t\t\tPopular\n\t\t\t</li>\n\t\t\t<li \t\n\t\t\t\t:class=\"{'t-black bg-white': route.params.category === 'new'}\" \t\t\t\t\t\n\t\t\t\t@click=\"() => { blog.state.sort.param = 'createdAt'; router.push({name: 'Blog', params: { category: 'new' } })}\" \n\t\t\t\tclass=\"cursor-pointer t-medium flex-v-center flex pd-thin radius-extra\"\n\t\t\t>\n\t\t\t\t<IconRecent class=\"i-medium mn-r-thin t-transp\"/>\n\t\t\t\tRecent\n\t\t\t</li>\n\t\t\t<li \t\n\t\t\t\tv-if=\"auth.state.user._id\"\n\t\t\t\t:class=\"{'t-black bg-white': route.params.category === 'following'}\" \t\t\n\t\t\t\t@click=\"() => { blog.state.sort.param = 'createdAt'; router.push({name: 'Blog', params: { category: 'following' } })}\" \n\t\t\t\tclass=\"cursor-pointer t-medium flex-v-center flex pd-thin radius-extra\"\n\t\t\t>\n\t\t\t\t<IconFollowing class=\"i-medium mn-r-thin t-transp\"/>\n\t\t\t\tFollowing\n\t\t\t</li>\n\n\t\t\t<router-link \n\t\t\t\tv-if=\"auth.state.user._id\"\n\t\t\t\t:to=\"{\n\t\t\t\t\tname: 'Create BlogPost'\n\t\t\t\t}\" \n\t\t\t\tclass=\"button t-medium bg-main w-100\"\n\t\t\t>\n\t\t\t\tCreate Post\n\t\t\t</router-link>\n\t\t</ul>\n\n\t\t<section class=\"pos-relative\">\n\n\t\t\t<header class=\"bg-light t-black radius-big pd-medium pos-relative mn-b-thin flex-v-center t-left flex-nowrap flex\">\n\t \t<h3 class=\"pos-relative flex-v-center flex-nowrap flex\">\n\t \t\t<span class=\"mn-r-thin\">Topics for </span>\n\n\t \t\t<Select \n\t\t :options=\"['today','week','month','year','all time']\"\n\t\t v-model:select=\"blog.state.filter.period\" \n\t\t placeholder=\"all time\"\n\t\t class=\"\n\t\t \tt-semi\n\t\t \tpos-relative \n\t\t \tw-max\n\t\t \tbg-main t-black\n\t\t \tpd-thin\n\t\t \tradius-medium\n\t\t h3\n\t\t \tt-center\n\t\t \"\n\t\t />\n\t \t</h3>\n\t\t\t</header>\n\n\t\t\t<router-view v-slot=\"{ Component, route }\">\n\t\t\t\t<transition name=\"scaleIn\" mode=\"out-in\">\n\t\t\t\t\t<component ref=\"page\" :key=\"route.query\" :is=\"Component\" />\n\t\t\t\t</transition>\n\t\t\t</router-view>\n\n\t\t</section>\n\n\t\t<div class=\"align-self-start bg-light radius-big pd-medium\">\n\t\t\t<div class=\"gap-thin flex-nowrap flex\">\n\t\t\t\t<p class=\"t-medium mn-b-small\">Popular Communities</p>\n\t\t\t\t\n\t\t\t\t<router-link \n\t\t\t\t\tv-if=\"auth.state.user._id\"\n\t\t\t\t\t:to=\"{\n\t\t\t\t\t\tname: 'Create Organization'\n\t\t\t\t\t}\"\n\t\t\t\t\tclass=\"t-medium cursor-pointer hover-scale-1 radius-extra flex-center flex i-medium bg-main\"\n\t\t\t\t>\n\t\t\t\t\t+\n\t\t\t\t</router-link>\n\t\t\t</div>\n\n\n\t\t\t<transition name=\"slide-fade\">\n\t\t\t\t<Feed\n\t\t :states=\"{\n\t\t empty: {\n\t\t title: 'No Organization Found',\n\t\t description: 'Currently, there are no organization available.'\n\t\t }\n\t\t }\"\n\t\t :store=\"{\n\t\t read: (options) => organizations.actions.read(options),\n\t\t state: organizations.state\n\t\t }\"\n\t\t :options=\"{\n\t\t \tuser: auth.state.user._id,\n\t\t\t\t\t\t\tsort: 'numberOfMemberships',\n\t\t\t\t\t\t\tcontain: ['blogposts'],\n\t\t\t\t\t\t\tlimit: 10\n\t\t }\"\n\t\t v-slot=\"{ \n\t\t items \n\t\t }\"\n\t\t >\n\t\t \t<CardOrganization \n\t \t\t\tv-for=\"organization in items\"\n\t \t:key=\"organization._id\" \n\t\t \t:organization=\"organization\"\n\t\t \t:user=\"auth.state.user\"\n\t\t \t:showProducts=\"false\"\n\t\t \t:showRating=\"false\"\n\t\t \t:showFeatured=\"false\"\n\t\t \t:showFollowers=\"false\"\n\t\t\t\t\t\t@updateMembership=\"handleMembershipUpdate\"\n\t\t\t\t\t\tclass=\"mn-b-thin w-100 pd-0 bg-white radius-big o-hidden\"\n\t\t\t />\n\t\t </Feed>\n\t\t\t</transition>\n\t\t</div>\n</div>\n</template>\n\n<script setup=\"props\">\n\timport { computed,onMounted, toRefs,ref } from 'vue'\n import { useRoute,useRouter } from 'vue-router'\n\n\timport Select from '@pf/src/components/Select/Select.vue'\n\timport Feed from '@pf/src/components/Feed/Feed.vue'\n\timport CardOrganization from '@pf/src/modules/organizations/components/blocks/CardOrganization.vue'\n\n\timport IconFeatured from '@pf/src/modules/icons/entities/IconFeatured.vue'\n\timport IconPopular from '@pf/src/modules/icons/entities/IconPopular.vue'\n\timport IconRecent from '@pf/src/modules/icons/entities/IconRecent.vue'\n\timport IconFollowing from '@pf/src/modules/icons/entities/IconFollowing.vue'\n\n \t// Import state\n\timport * as blog from '@pf/src/modules/community/store/blogposts.js';\n\timport * as auth from '@pf/src/modules/auth/views/store/auth'\n\timport * as organizations from '@pf/src/modules/organizations/store/organizations'\n\timport * as memberships from '@pf/src/modules/organizations/store/memberships'\n\n\t// State\n\tconst route = useRoute();\n\tconst router = useRouter();\n\n\tif (route.params.category === 'popular') blog.state.sort.param = 'views'; \n\tif (route.params.category === 'new') blog.state.sort.param = 'createdAt'; \n\n\n\tconst handleMembershipUpdate = ({ membership, status, target }, statusName, statusNumber) => {\n\t memberships.mutations.handleMembershipUpdate(organizations.state.current, membership, status, target, statusName, statusNumber)\n\t};\n\n</script>\n\n<style lang=\"scss\">\n\n</style>\n"],"names":["useRoute","useRouter","blog.state","memberships.mutations","organizations.state"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6JC,UAAM,QAAQA,UAAAA;AACd,UAAM,SAASC,UAAAA;AAEf,QAAI,MAAM,OAAO,aAAa,UAAWC,WAAAA,MAAW,KAAK,QAAQ;AACjE,QAAI,MAAM,OAAO,aAAa,MAAOA,WAAAA,MAAW,KAAK,QAAQ;AAG7D,UAAM,yBAAyB,CAAC,EAAE,YAAY,QAAQ,OAAQ,GAAE,YAAY,iBAAiB;AAC3FC,4BAAsB,uBAAuBC,cAAAA,MAAoB,SAAS,YAAY,QAAQ,QAAQ,YAAY,YAAY;AAAA,IACjI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|