@ozdao/prometheus-framework 0.2.130 → 0.2.132
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.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.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/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/layouts/Auth.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/layouts/Auth.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/auth/components/pages/EnterCode.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/EnterCode.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/EnterPassword.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/EnterPassword.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/auth/components/pages/ResetPassword.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/ResetPassword.vue.js +31 -31
- package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.js +32 -32
- package/dist/prometheus-framework/src/modules/auth/components/pages/SignUp.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/SignUp.vue.js +20 -20
- 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/backoffice/components/pages/Dashboard.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.js +1 -1
- 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 +55 -72
- 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 +87 -77
- 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/Community.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.js +3 -3
- 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 +29 -30
- 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/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/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.cjs +1 -1
- 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/elements/ButtonJoin.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/elements/ButtonJoin.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js +2 -2
- 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 +2 -2
- package/dist/prometheus-framework/src/modules/gallery/components/pages/Gallery.vue.js +21 -21
- 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 +30 -30
- 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/BlockSearch.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/globals/components/blocks/BlockSearch.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.js +18 -18
- 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 +3 -3
- 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/OrderCreateBackoffice.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js +3 -3
- 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 +3 -3
- 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 +9 -9
- 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/orders/components/sections/FormPayment.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormPayment.vue.js +1 -1
- 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/elements/ButtonToggleMembership.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/elements/ButtonToggleMembership.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/organizations/components/pages/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 +113 -86
- package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationBackoffice.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationBackoffice.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js +37 -36
- package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.vue.js +10 -10
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.js +3 -3
- 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 +5 -5
- 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/CardPosition.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.js +2 -2
- 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.js +12 -12
- 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/Categories.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/Categories.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 +3 -3
- 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 +2 -2
- 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 +2 -2
- 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/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 +3 -3
- 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/products/components/sections/SectionProduct.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/SectionProduct.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/spots/components/blocks/CardSpot.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/spots/components/blocks/CardSpot.vue.js +5 -5
- 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.cjs +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.js +33 -33
- 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/users/components/pages/ProfileEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.js +2 -2
- 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 +158 -81
- 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
@@ -3,7 +3,7 @@
|
|
3
3
|
class="pos-relative bg-light radius-big flex-column flex"
|
4
4
|
>
|
5
5
|
|
6
|
-
<router-link
|
6
|
+
<!-- <router-link
|
7
7
|
v-if="user && user === blogpost.creator.target._id"
|
8
8
|
:to="{
|
9
9
|
name: 'Edit BlogPost',
|
@@ -11,6 +11,7 @@
|
|
11
11
|
url: blogpost.url
|
12
12
|
}
|
13
13
|
}"
|
14
|
+
|
14
15
|
class="
|
15
16
|
cursor-pointer
|
16
17
|
pos-absolute pos-t-regular pos-r-regular
|
@@ -21,7 +22,7 @@
|
|
21
22
|
class="i-regular"
|
22
23
|
classes="fill-white"
|
23
24
|
/>
|
24
|
-
</router-link>
|
25
|
+
</router-link> -->
|
25
26
|
|
26
27
|
<CardHeader
|
27
28
|
:class="{
|
@@ -34,6 +35,9 @@
|
|
34
35
|
:owner="blogpost.owner"
|
35
36
|
:creator="blogpost.creator"
|
36
37
|
:date="blogpost.createdAt"
|
38
|
+
:actions="user && user === blogpost.creator.target._id ? [
|
39
|
+
{ to: { name: 'Edit BlogPost', params: {url: blogpost.url } }, label: 'Edit' }
|
40
|
+
]: null"
|
37
41
|
/>
|
38
42
|
|
39
43
|
|
@@ -1,8 +1,16 @@
|
|
1
1
|
<template>
|
2
2
|
<footer class="t-semi br-top-dark flex-nowrap flex-nojustify flex">
|
3
|
-
|
4
|
-
|
5
|
-
|
3
|
+
<router-link :to="{
|
4
|
+
name: 'BlogPost',
|
5
|
+
params: {
|
6
|
+
url: blogpost.url
|
7
|
+
}
|
8
|
+
}"
|
9
|
+
class="font-second cursor-pointer hover-bg-white pd-l-thin pd-r-thin radius-big">
|
10
|
+
👁️ {{blogpost.views}}
|
11
|
+
</router-link>
|
12
|
+
|
13
|
+
<div class="hover-bg-white pd-l-thin pd-r-thin radius-big cursor-pointer">
|
6
14
|
<div class="cursor-pointer" @click="addReaction('like')" v-if="!isReacted">
|
7
15
|
👍 {{reactionsCount }}
|
8
16
|
</div>
|
@@ -10,8 +18,16 @@
|
|
10
18
|
👍 {{reactionsCount }}
|
11
19
|
</div>
|
12
20
|
</div>
|
13
|
-
<
|
14
|
-
|
21
|
+
<router-link :to="{
|
22
|
+
name: 'BlogPost',
|
23
|
+
hash: '#comments',
|
24
|
+
params: {
|
25
|
+
url: blogpost.url
|
26
|
+
}
|
27
|
+
}"
|
28
|
+
class="font-second cursor-pointer hover-bg-white pd-l-thin pd-r-thin radius-big">
|
29
|
+
💬 {{ blogpost.numberOfComments }}
|
30
|
+
</router-link>
|
15
31
|
</footer>
|
16
32
|
</template>
|
17
33
|
|
@@ -4,7 +4,7 @@
|
|
4
4
|
<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">
|
5
5
|
<li
|
6
6
|
:class="{'t-black bg-white': route.params.category === 'featured' }"
|
7
|
-
@click="router.push({name: 'Blog', params: { category: 'featured' } })"
|
7
|
+
@click="() => { blog.state.sort.param = 'createdAt'; router.push({name: 'Blog', params: { category: 'featured' } })}"
|
8
8
|
class="cursor-pointer flex-v-center flex t-medium pd-thin radius-extra"
|
9
9
|
>
|
10
10
|
<IconFeatured class="i-medium mn-r-thin t-transp"/>
|
@@ -12,7 +12,7 @@
|
|
12
12
|
</li>
|
13
13
|
<li
|
14
14
|
:class="{'t-black bg-white': route.params.category === 'popular' }"
|
15
|
-
@click="router.push({name: 'Blog', params: { category: 'popular' } })"
|
15
|
+
@click="() => { blog.state.sort.param = 'views'; router.push({name: 'Blog', params: { category: 'popular' } }) }"
|
16
16
|
class="cursor-pointer t-medium flex-v-center flex pd-thin radius-extra"
|
17
17
|
>
|
18
18
|
<IconPopular class="i-medium mn-r-thin t-transp"/>
|
@@ -20,16 +20,16 @@
|
|
20
20
|
</li>
|
21
21
|
<li
|
22
22
|
:class="{'t-black bg-white': route.params.category === 'new'}"
|
23
|
-
@click="router.push({name: 'Blog', params: { category: 'new' } })"
|
23
|
+
@click="() => { blog.state.sort.param = 'createdAt'; router.push({name: 'Blog', params: { category: 'new' } })}"
|
24
24
|
class="cursor-pointer t-medium flex-v-center flex pd-thin radius-extra"
|
25
25
|
>
|
26
26
|
<IconRecent class="i-medium mn-r-thin t-transp"/>
|
27
27
|
Recent
|
28
|
-
|
28
|
+
</li>
|
29
29
|
<li
|
30
30
|
v-if="auth.state.user._id"
|
31
31
|
:class="{'t-black bg-white': route.params.category === 'following'}"
|
32
|
-
@click="router.push({name: 'Blog', params: { category: 'following' } })"
|
32
|
+
@click="() => { blog.state.sort.param = 'createdAt'; router.push({name: 'Blog', params: { category: 'following' } })}"
|
33
33
|
class="cursor-pointer t-medium flex-v-center flex pd-thin radius-extra"
|
34
34
|
>
|
35
35
|
<IconFollowing class="i-medium mn-r-thin t-transp"/>
|
@@ -49,13 +49,13 @@
|
|
49
49
|
<section class="pos-relative">
|
50
50
|
|
51
51
|
<header class="bg-main t-black radius-big pd-medium pos-relative mn-b-thin flex-v-center t-left flex-nowrap flex">
|
52
|
-
<
|
53
|
-
<span class="mn-r-
|
52
|
+
<h3 class="pos-relative flex-v-center flex-nowrap flex">
|
53
|
+
<span class="mn-r-thin">Topics for </span>
|
54
54
|
|
55
55
|
<Select
|
56
|
-
:options="['today','week','month','year']"
|
56
|
+
:options="['today','week','month','year','all time']"
|
57
57
|
v-model:select="blog.state.filter.period"
|
58
|
-
placeholder="
|
58
|
+
placeholder="all time"
|
59
59
|
class="
|
60
60
|
t-semi
|
61
61
|
pos-relative
|
@@ -63,14 +63,14 @@
|
|
63
63
|
bg-main t-black
|
64
64
|
pd-thin
|
65
65
|
radius-medium
|
66
|
-
|
66
|
+
h3
|
67
67
|
t-center
|
68
68
|
br-solid
|
69
69
|
br-2px
|
70
70
|
br-black-transp-10
|
71
71
|
"
|
72
72
|
/>
|
73
|
-
</
|
73
|
+
</h3>
|
74
74
|
</header>
|
75
75
|
|
76
76
|
<router-view v-slot="{ Component, route }">
|
@@ -160,6 +160,10 @@
|
|
160
160
|
const route = useRoute();
|
161
161
|
const router = useRouter();
|
162
162
|
|
163
|
+
if (route.params.category === 'popular') blog.state.sort.param = 'views';
|
164
|
+
if (route.params.category === 'new') blog.state.sort.param = 'createdAt';
|
165
|
+
|
166
|
+
|
163
167
|
const handleMembershipUpdate = ({ membership, status, target }, statusName, statusNumber) => {
|
164
168
|
memberships.mutations.handleMembershipUpdate(organizations.state.current, membership, status, target, statusName, statusNumber)
|
165
169
|
};
|
@@ -1,58 +1,50 @@
|
|
1
1
|
<template>
|
2
|
-
<section>
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
<!-- <Feed
|
2
|
+
<section class="bg-white">
|
3
|
+
<Feed
|
4
|
+
v-model:sort="blog.state.sort"
|
7
5
|
:showLoadMore="false"
|
8
6
|
:states="{
|
9
7
|
empty: {
|
10
|
-
title: 'No
|
11
|
-
description: 'Currently, there are no
|
12
|
-
}
|
8
|
+
title: 'No Blog Posts Found',
|
9
|
+
description: 'Currently, there are no posts available in this blog. Please check back later.'
|
10
|
+
},
|
13
11
|
}"
|
14
12
|
:store="{
|
15
|
-
read: (options) => blog.read(options)
|
16
|
-
state: blog.state.all
|
13
|
+
read: (options) => blog.read(options)
|
17
14
|
}"
|
18
15
|
:options="{
|
19
|
-
|
20
|
-
|
16
|
+
limit: 15,
|
17
|
+
category: route.params.category,
|
18
|
+
period: route.query.period,
|
19
|
+
status: 'published',
|
21
20
|
user: auth.state.user._id,
|
22
|
-
|
21
|
+
following: route.params.category === 'following' ? auth.state.user._id : null,
|
23
22
|
}"
|
24
23
|
v-slot="{
|
25
24
|
items
|
26
25
|
}"
|
27
|
-
class="
|
26
|
+
class="mobile:w-50 desktop:w-100 tablet:w-75 row-1 gap-thin"
|
28
27
|
>
|
29
28
|
<CardBlogpost
|
30
|
-
v-for="
|
31
|
-
:key="
|
32
|
-
:blogpost="
|
33
|
-
:user="user"
|
34
|
-
class="mn-b-medium"
|
35
|
-
:class="`div${index}`"
|
29
|
+
v-for="item in items"
|
30
|
+
:key="item._id"
|
31
|
+
:blogpost="item"
|
32
|
+
:user="auth.state.user._id"
|
33
|
+
class="h-max-40r mn-b-medium"
|
36
34
|
/>
|
37
35
|
</Feed>
|
38
|
-
|
39
|
-
-->
|
40
|
-
<Feed
|
41
|
-
:category="route.params.category"
|
42
|
-
:user="auth.state.user._id"
|
43
|
-
:period="route.query.period"
|
44
|
-
:following="route.params.category === 'following' ? auth.state.user._id : null"
|
45
|
-
/>
|
46
36
|
</section>
|
47
37
|
</template>
|
48
38
|
|
49
39
|
|
50
40
|
<script setup="props">
|
51
|
-
import { computed, onMounted, watch } from 'vue';
|
41
|
+
import { ref, computed, onMounted, watch } from 'vue';
|
52
42
|
import { useRoute, useRouter } from 'vue-router';
|
53
43
|
|
54
44
|
import Breadcrumbs from '@pf/src/components/Breadcrumbs/Breadcrumbs.vue';
|
55
|
-
import Feed from '@pf/src/
|
45
|
+
import Feed from '@pf/src/components/Feed/Feed.vue'
|
46
|
+
|
47
|
+
import CardBlogpost from '@pf/src/modules/community/components/blocks/CardBlogpost.vue';
|
56
48
|
|
57
49
|
// Import state
|
58
50
|
import * as blog from '@pf/src/modules/community/store/blogposts.js';
|
@@ -65,7 +57,7 @@
|
|
65
57
|
// if (!route.params.category) {
|
66
58
|
// route.params.category = 'popular'
|
67
59
|
// }
|
68
|
-
|
60
|
+
|
69
61
|
onMounted(() => {
|
70
62
|
|
71
63
|
if (route.query) {
|
@@ -73,7 +65,7 @@
|
|
73
65
|
|
74
66
|
const newFilterValue = {
|
75
67
|
tags: query.tags ? query.tags.split(',') : [],
|
76
|
-
period: query.period ? query.period :
|
68
|
+
period: query.period ? query.period : null,
|
77
69
|
};
|
78
70
|
|
79
71
|
// проверяем наличие категории в route.params и добавляем ее в фильтр
|
@@ -83,6 +75,7 @@
|
|
83
75
|
|
84
76
|
blog.state.filter = newFilterValue;
|
85
77
|
}
|
78
|
+
|
86
79
|
});
|
87
80
|
|
88
81
|
watch(() => blog.state.filter, (newFilterValue, oldFilterValue) => {
|
@@ -10,18 +10,18 @@
|
|
10
10
|
<div
|
11
11
|
class="w-full h-full"
|
12
12
|
>
|
13
|
-
<Textarea
|
13
|
+
<!-- <Textarea
|
14
14
|
v-if="post"
|
15
15
|
:prop="post"
|
16
|
-
|
16
|
+
:setFocus="true"
|
17
17
|
content="name"
|
18
18
|
placeholder="Enter post title"
|
19
19
|
class="h2"
|
20
|
-
/>
|
20
|
+
/> -->
|
21
21
|
</div>
|
22
22
|
|
23
23
|
<Constructor
|
24
|
-
|
24
|
+
v-if="post"
|
25
25
|
:content="post.content"
|
26
26
|
@update="update => post.content = update"
|
27
27
|
/>
|
@@ -38,8 +38,7 @@
|
|
38
38
|
</section>
|
39
39
|
</transition>
|
40
40
|
|
41
|
-
<Popup
|
42
|
-
title="Добавить участника"
|
41
|
+
<Popup
|
43
42
|
@close-popup="closePublicationPopup"
|
44
43
|
:isPopupOpen="isPublicationPopup"
|
45
44
|
class="w-m-33r t-left pd-big bg-white radius-big"
|
@@ -49,6 +48,7 @@
|
|
49
48
|
<BlockTags
|
50
49
|
@tags-changed="newTags => post.tags = newTags"
|
51
50
|
:tags="post.tags"
|
51
|
+
class="mn-b-small"
|
52
52
|
/>
|
53
53
|
|
54
54
|
<h5 class="mn-b-thin">Add source:</h5>
|
@@ -154,13 +154,6 @@ onMounted(async () =>{
|
|
154
154
|
name: post.value.owner.target.profile.name,
|
155
155
|
photo: post.value.owner.target.profile.photo
|
156
156
|
}
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
console.log(dataPublics)
|
161
|
-
|
162
|
-
|
163
|
-
|
164
157
|
})
|
165
158
|
// /////////////////////////////////////////
|
166
159
|
// Publication Form
|
@@ -206,6 +199,7 @@ function onDrafts() {
|
|
206
199
|
if (selectedTags.value.length > 0) selectedTags.value.map(tag => (tag.text))
|
207
200
|
|
208
201
|
post.value.status = "draft"
|
202
|
+
post.value.name = post.value.content[0].content
|
209
203
|
|
210
204
|
if (route.params.url) {
|
211
205
|
blog.update(post.value)
|
@@ -237,8 +231,7 @@ function onSubmit() {
|
|
237
231
|
if (!selectedOrganization.value) post.value.organization = post.value.creator
|
238
232
|
|
239
233
|
post.value.status = "published"
|
240
|
-
|
241
|
-
console.log(post.value)
|
234
|
+
post.value.name = post.value.content[0].content
|
242
235
|
|
243
236
|
if (route.params.url) {
|
244
237
|
blog.update(post.value)
|
@@ -0,0 +1,123 @@
|
|
1
|
+
<template>
|
2
|
+
<div>
|
3
|
+
<CardHeader
|
4
|
+
class="mn-b-thin"
|
5
|
+
:entity="comment"
|
6
|
+
:entityType="'comment'"
|
7
|
+
:user="owner"
|
8
|
+
:owner="{target: comment.user}"
|
9
|
+
:creator="{target: comment.user}"
|
10
|
+
:date="comment.createdAt"
|
11
|
+
/>
|
12
|
+
<div class="pd-t-zero">
|
13
|
+
<p class="p-big">{{ comment.content }}</p>
|
14
|
+
</div>
|
15
|
+
|
16
|
+
<div class="mn-t-thin flex-v-center flex-nowrap flex gap-small">
|
17
|
+
|
18
|
+
<button
|
19
|
+
v-if="totalReplies > 0"
|
20
|
+
@click="toggleChildren"
|
21
|
+
class="t-second cursor-pointer t-medium font-second"
|
22
|
+
>
|
23
|
+
{{ isExpanded ? 'Hide' : totalReplies + (totalReplies === 1 ? ' reply' : ' replies') }}
|
24
|
+
</button>
|
25
|
+
|
26
|
+
<button
|
27
|
+
v-if="owner"
|
28
|
+
class="font-second cursor-pointer t-transp t-medium"
|
29
|
+
@click="showReplyForm = true"
|
30
|
+
>
|
31
|
+
Reply
|
32
|
+
</button>
|
33
|
+
|
34
|
+
</div>
|
35
|
+
|
36
|
+
<div v-if="showReplyForm" class="mn-l-medium mn-t-small bg-white w-100 radius-small pd-small reply-form">
|
37
|
+
<textarea class="w-100" v-model="replyContent"></textarea>
|
38
|
+
<div class="mn-l-auto gap-thin flex-nowrap flex">
|
39
|
+
<button class="bg-grey-transp-25 button" @click="submitReply">Cancel</button>
|
40
|
+
<button class="bg-main button" @click="submitReply">Send</button>
|
41
|
+
</div>
|
42
|
+
</div>
|
43
|
+
|
44
|
+
<div v-if="isExpanded && comment.children && comment.children.length" class="br-solid br-l br-grey-transp-25">
|
45
|
+
<Comment
|
46
|
+
v-for="childComment in comment.children"
|
47
|
+
:key="childComment._id"
|
48
|
+
:comment="childComment"
|
49
|
+
:target="target"
|
50
|
+
:owner="owner"
|
51
|
+
@reply="handleReply"
|
52
|
+
@load-more="handleLoadMore"
|
53
|
+
class="mn-l-medium mn-t-small "
|
54
|
+
/>
|
55
|
+
</div>
|
56
|
+
|
57
|
+
</div>
|
58
|
+
</template>
|
59
|
+
|
60
|
+
<script setup>
|
61
|
+
import { ref, computed } from 'vue';
|
62
|
+
|
63
|
+
import Comment from './Comment.vue';
|
64
|
+
|
65
|
+
import CardHeader from '@pf/src/modules/globals/components/blocks/CardHeader.vue'
|
66
|
+
|
67
|
+
const props = defineProps({
|
68
|
+
comment: {
|
69
|
+
type: Object,
|
70
|
+
required: true
|
71
|
+
},
|
72
|
+
target: {
|
73
|
+
type: String,
|
74
|
+
required: true
|
75
|
+
},
|
76
|
+
owner: {
|
77
|
+
type: String,
|
78
|
+
required: true
|
79
|
+
}
|
80
|
+
});
|
81
|
+
|
82
|
+
const emit = defineEmits(['reply', 'load-more']);
|
83
|
+
|
84
|
+
const showReplyForm = ref(false);
|
85
|
+
const replyContent = ref('');
|
86
|
+
const isExpanded = ref(shouldBeExpanded(props.comment.depth))
|
87
|
+
|
88
|
+
function shouldBeExpanded(depth) {
|
89
|
+
return depth % 3 < 2
|
90
|
+
}
|
91
|
+
|
92
|
+
const totalReplies = computed(() => {
|
93
|
+
function countReplies(comment) {
|
94
|
+
if (!comment.children || comment.children.length === 0) {
|
95
|
+
return 0
|
96
|
+
}
|
97
|
+
return comment.children.length + comment.children.reduce((sum, child) => sum + countReplies(child), 0)
|
98
|
+
}
|
99
|
+
return countReplies(props.comment)
|
100
|
+
})
|
101
|
+
|
102
|
+
const toggleChildren = () => {
|
103
|
+
isExpanded.value = !isExpanded.value
|
104
|
+
}
|
105
|
+
|
106
|
+
const submitReply = () => {
|
107
|
+
emit('reply', props.comment._id, replyContent.value);
|
108
|
+
replyContent.value = '';
|
109
|
+
showReplyForm.value = false;
|
110
|
+
};
|
111
|
+
|
112
|
+
const handleReply = (parentId, content) => {
|
113
|
+
emit('reply', parentId, content);
|
114
|
+
};
|
115
|
+
|
116
|
+
const loadMoreChildren = () => {
|
117
|
+
emit('load-more', props.comment._id, props.comment.depth + 1);
|
118
|
+
};
|
119
|
+
|
120
|
+
const handleLoadMore = (commentId, depth) => {
|
121
|
+
emit('load-more', commentId, depth);
|
122
|
+
};
|
123
|
+
</script>
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<template>
|
2
|
-
<div>
|
2
|
+
<div id="comments">
|
3
3
|
<div>
|
4
4
|
<h3 class="mn-b-small">{{ comments.length }} comments</h3>
|
5
5
|
|
@@ -15,21 +15,17 @@
|
|
15
15
|
</div>
|
16
16
|
</div>
|
17
17
|
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
:
|
23
|
-
:
|
24
|
-
:
|
25
|
-
|
26
|
-
|
27
|
-
|
18
|
+
<Comment
|
19
|
+
v-for="comment in comments"
|
20
|
+
:key="comment._id"
|
21
|
+
:comment="comment"
|
22
|
+
:target="target"
|
23
|
+
:type="type"
|
24
|
+
:owner="owner"
|
25
|
+
@reply="handleReply"
|
26
|
+
@load-more="loadMoreChildren"
|
27
|
+
class="comment mn-b-small radius-big pd-medium bg-light"
|
28
28
|
/>
|
29
|
-
<div class="pd-t-zero">
|
30
|
-
<p class="p-big">{{ comment.content }}</p>
|
31
|
-
</div>
|
32
|
-
</div>
|
33
29
|
</div>
|
34
30
|
</template>
|
35
31
|
|
@@ -37,19 +33,94 @@
|
|
37
33
|
import { ref } from 'vue';
|
38
34
|
import axios from 'axios';
|
39
35
|
|
40
|
-
import
|
36
|
+
import Comment from './Comment.vue';
|
41
37
|
|
42
|
-
const props = defineProps([
|
38
|
+
const props = defineProps([
|
39
|
+
'target',
|
40
|
+
'owner',
|
41
|
+
'type'
|
42
|
+
])
|
43
43
|
|
44
44
|
const $axios = axios.create({ baseURL: process.env.API_URL });
|
45
45
|
const comments = ref([]);
|
46
46
|
const commentContent = ref('');
|
47
47
|
|
48
48
|
const fetchComments = async () => {
|
49
|
-
|
50
|
-
|
49
|
+
try {
|
50
|
+
const response = await axios.get('/comments/read', {
|
51
|
+
params: {
|
52
|
+
target: props.target,
|
53
|
+
type: props.type,
|
54
|
+
user: props.owner,
|
55
|
+
maxDepth: 2
|
56
|
+
}
|
57
|
+
});
|
58
|
+
comments.value = response.data;
|
59
|
+
} catch (error) {
|
60
|
+
console.error('Error fetching comments:', error);
|
61
|
+
}
|
51
62
|
};
|
52
63
|
|
64
|
+
const handleReply = async (parentId, content) => {
|
65
|
+
try {
|
66
|
+
const response = await axios.post('/comments/create', {
|
67
|
+
content,
|
68
|
+
target: props.target,
|
69
|
+
type: props.type,
|
70
|
+
user: props.owner,
|
71
|
+
parent: parentId
|
72
|
+
});
|
73
|
+
|
74
|
+
const newComment = response.data;
|
75
|
+
|
76
|
+
// Обновляем дерево комментариев
|
77
|
+
updateCommentTree(comments.value, parentId, newComment);
|
78
|
+
} catch (error) {
|
79
|
+
console.error('Error posting reply:', error);
|
80
|
+
}
|
81
|
+
};
|
82
|
+
|
83
|
+
const loadMoreChildren = async (commentId, depth) => {
|
84
|
+
try {
|
85
|
+
const response = await axios.get('/comments/read', {
|
86
|
+
params: {
|
87
|
+
target: props.target,
|
88
|
+
type: props.type,
|
89
|
+
user: props.owner,
|
90
|
+
parentId: commentId,
|
91
|
+
depth: depth,
|
92
|
+
maxDepth: 10
|
93
|
+
}
|
94
|
+
});
|
95
|
+
|
96
|
+
// Обновляем дерево комментариев
|
97
|
+
updateCommentTree(comments.value, commentId, response.data, response.data.hasMore, true);
|
98
|
+
} catch (error) {
|
99
|
+
console.error('Error loading more comments:', error);
|
100
|
+
}
|
101
|
+
};
|
102
|
+
|
103
|
+
const updateCommentTree = (comments, parentId, newData, hasMore, isLoadMore = false) => {
|
104
|
+
for (let i = 0; i < comments.length; i++) {
|
105
|
+
if (comments[i]._id === parentId) {
|
106
|
+
if (isLoadMore) {
|
107
|
+
// Для загрузки дополнительных комментариев, добавляем их к существующим
|
108
|
+
comments[i].children = [...comments[i].children, ...newData];
|
109
|
+
comments[i].hasMore = hasMore;
|
110
|
+
} else {
|
111
|
+
// Для нового комментария, добавляем его в начало списка дочерних
|
112
|
+
comments[i].children.push(newData);
|
113
|
+
}
|
114
|
+
return true;
|
115
|
+
}
|
116
|
+
if (comments[i].children && updateCommentTree(comments[i].children, parentId, newData, hasMore, isLoadMore)) {
|
117
|
+
return true;
|
118
|
+
}
|
119
|
+
}
|
120
|
+
return false;
|
121
|
+
};
|
122
|
+
|
123
|
+
|
53
124
|
const submitComment = async () => {
|
54
125
|
if (!commentContent.value) {
|
55
126
|
return;
|
@@ -6,10 +6,9 @@
|
|
6
6
|
Discover Our
|
7
7
|
<router-link
|
8
8
|
:to="{ name:'Blog' }"
|
9
|
-
class="transition-ease-in hover-bg-black hover-t-white transition-timing-1 hover-scale-0 bg-main cursor-pointer pd-thin mn-l-thin radius-extra flex flex-v-center"
|
9
|
+
class="transition-ease-in hover-bg-black hover-t-white transition-timing-1 hover-scale-0 bg-main cursor-pointer pd-thin pd-r-small pd-l-small mn-l-thin radius-extra flex flex-v-center"
|
10
10
|
>
|
11
11
|
<b>Community</b>
|
12
|
-
<IconArrow class="mn-l-thin radius-extra bg-white i-big"/>
|
13
12
|
</router-link>
|
14
13
|
</h2>
|
15
14
|
|
@@ -21,7 +20,8 @@
|
|
21
20
|
skip: 0,
|
22
21
|
limit: 8,
|
23
22
|
user: auth.state.user._id,
|
24
|
-
period: 'year'
|
23
|
+
period: 'year',
|
24
|
+
category: 'featured'
|
25
25
|
}"
|
26
26
|
:text="{
|
27
27
|
messages: {
|
@@ -54,9 +54,6 @@
|
|
54
54
|
import Feed from '@pf/src/components/Feed/Feed.vue'
|
55
55
|
import Slider from '@pf/src/components/Slider/Slider.vue'
|
56
56
|
|
57
|
-
import IconArrow from '@pf/src/modules/icons/navigation/IconArrow.vue'
|
58
|
-
|
59
|
-
|
60
57
|
import CardBlogpost from '@pf/src/modules/community/components/blocks/CardBlogpost.vue';
|
61
58
|
// Import state
|
62
59
|
import * as blog from '@pf/src/modules/community/store/blogposts.js';
|
@@ -58,7 +58,7 @@ const controllerFactory = (db) => {
|
|
58
58
|
queryProcessorGlobals.getOwnerUserLookupStage(),
|
59
59
|
queryProcessorGlobals.getOwnerOrganizationLookupStage(),
|
60
60
|
queryProcessorGlobals.getAddFieldsCreatorOwnerStage(),
|
61
|
-
{ $sample: { size: Number(req.query.limit) } }
|
61
|
+
// { $sample: { size: Number(req.query.limit) } },
|
62
62
|
]
|
63
63
|
|
64
64
|
try {
|