@ozdao/prometheus-framework 0.2.155 → 0.2.157
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/_virtual/_commonjsHelpers.cjs +1 -1
- package/dist/_virtual/_commonjsHelpers.js +5 -3
- package/dist/_virtual/purify.cjs +1 -0
- package/dist/_virtual/purify.js +4 -0
- package/dist/builder.js +822 -0
- package/dist/builder.mjs +801 -0
- package/dist/{main-D_RRsfEH.mjs → main-Ba3SEUWZ.mjs} +1812 -1774
- package/dist/main-ldzk-jIP.js +92 -0
- package/dist/main.css +1 -1
- package/dist/node_modules/dompurify/dist/purify.cjs +2 -0
- package/dist/node_modules/dompurify/dist/purify.js +531 -0
- package/dist/node_modules/isomorphic-dompurify/browser.cjs +1 -0
- package/dist/node_modules/isomorphic-dompurify/browser.js +7 -0
- package/dist/products.server.js +1 -1
- package/dist/products.server.mjs +1 -1
- package/dist/prometheus-framework/node_modules/uuid/dist/esm-browser/regex.cjs +1 -0
- package/dist/prometheus-framework/node_modules/uuid/dist/esm-browser/regex.js +4 -0
- package/dist/prometheus-framework/node_modules/uuid/dist/esm-browser/rng.cjs +1 -0
- package/dist/prometheus-framework/node_modules/uuid/dist/esm-browser/rng.js +9 -0
- package/dist/prometheus-framework/node_modules/uuid/dist/esm-browser/stringify.cjs +1 -0
- package/dist/prometheus-framework/node_modules/uuid/dist/esm-browser/stringify.js +13 -0
- package/dist/prometheus-framework/node_modules/uuid/dist/esm-browser/v4.cjs +1 -0
- package/dist/prometheus-framework/node_modules/uuid/dist/esm-browser/v4.js +10 -0
- package/dist/prometheus-framework/node_modules/uuid/dist/esm-browser/validate.cjs +1 -0
- package/dist/prometheus-framework/node_modules/uuid/dist/esm-browser/validate.js +7 -0
- package/dist/prometheus-framework/src/components/Feed/Feed.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Feed/Feed.vue.js +1 -1
- package/dist/prometheus-framework/src/components/Field/Field.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Field/Field.vue2.js +47 -30
- package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.js +9 -9
- package/dist/prometheus-framework/src/components/Popup/Popup.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Popup/Popup.vue2.js +10 -10
- package/dist/prometheus-framework/src/modules/auth/components/pages/EnterPassword.vue.js +14 -14
- package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.js +9 -9
- package/dist/prometheus-framework/src/modules/auth/components/pages/ResetPassword.vue.js +11 -11
- package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.js +34 -34
- package/dist/prometheus-framework/src/modules/auth/components/pages/SignUp.vue.js +27 -27
- package/dist/prometheus-framework/src/modules/backoffice/components/layouts/Backoffice.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/backoffice/components/layouts/Backoffice.vue.js +58 -0
- 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 +11 -180
- package/dist/prometheus-framework/src/modules/backoffice/components/partials/Sidebar.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/backoffice/components/partials/Sidebar.vue.js +190 -0
- package/dist/prometheus-framework/src/modules/backoffice/router/backoffice.cjs +1 -1
- package/dist/prometheus-framework/src/modules/backoffice/router/backoffice.js +9 -7
- 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 +48 -43
- package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/BlogPost.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/BlogPost.vue.js +41 -63
- 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 +37 -36
- 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 +5 -5
- 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 +1 -1
- package/dist/prometheus-framework/src/modules/community/router/blogposts.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/router/blogposts.js +3 -0
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Embed.vue.js +13 -13
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.cjs +1 -5
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.js +105 -53
- 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 +92 -98
- package/dist/prometheus-framework/src/modules/constructor/components/sections/Viewer.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/constructor/components/sections/Viewer.vue.js +39 -0
- 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 +1 -1
- package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js +13 -12
- 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 +19 -19
- package/dist/prometheus-framework/src/modules/gallery/components/pages/Gallery.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/gallery/components/pages/Gallery.vue.js +32 -32
- 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 +3 -3
- package/dist/prometheus-framework/src/modules/globals/components/blocks/BlockSearch.vue.js +7 -7
- package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/globals/components/sections/SectionPageTitle.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/globals/components/sections/SectionPageTitle.vue.js +2 -2
- 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/middlewares/client/auth.validation.cjs +1 -1
- package/dist/prometheus-framework/src/modules/middlewares/client/auth.validation.js +13 -15
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderBackoffice.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderBackoffice.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js +2 -2
- 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 +4 -4
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormDelivery.vue.js +8 -8
- 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/orders/orders.client.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/orders.client.js +34 -33
- 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 +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 +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 +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 +1 -1
- 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 +14 -14
- 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 +2 -2
- 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 +10 -10
- 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 +5 -5
- 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 +4 -4
- package/dist/prometheus-framework/src/modules/organizations/router/organizations.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/router/organizations.js +13 -7
- 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 +18 -18
- package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/LeftoverPositions.vue.js +6 -6
- 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 +11 -11
- 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 +17 -17
- 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 +30 -30
- package/dist/prometheus-framework/src/modules/products/components/sections/EditModifications.vue.js +9 -9
- 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/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 +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 +1 -1
- package/dist/prometheus-framework/src/modules/spots/components/layouts/Spots.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/spots/components/pages/SpotEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/spots/components/pages/SpotEdit.vue.js +16 -16
- package/dist/prometheus-framework/src/modules/spots/router/spots.cjs +1 -1
- package/dist/prometheus-framework/src/modules/spots/router/spots.js +4 -0
- 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 +2 -2
- package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.js +22 -22
- package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CardDeposit.vue.js +4 -4
- 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 +17 -17
- 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 +4 -4
- package/dist/prometheus-framework.cjs.js +1 -1
- package/dist/prometheus-framework.es.js +1 -1
- package/dist/style.css +1 -1
- package/dist/{web-3rnOWrQO.mjs → web-CT2tGYho.mjs} +1 -1
- package/dist/{web-C04IcLk4.js → web-DWjMBTNi.js} +1 -1
- package/package.json +3 -2
- package/src/builder/builder.js +14 -0
- package/src/builder/modes/spa.dev.js +100 -0
- package/src/builder/modes/spa.prod.js +59 -0
- package/src/builder/modes/ssr.dev.js +184 -0
- package/src/builder/modes/ssr.prod.js +76 -0
- package/src/builder/ssr/ssr-render-html.js +57 -0
- package/src/builder/ssr/ssr-transform-webpack-stats.js +54 -0
- package/src/builder/templates/page.html +37 -0
- package/src/builder/templates/screen.html +33 -0
- package/src/builder/utils/hot-reload.js +5 -0
- package/src/builder/webpack/index.js +13 -0
- package/src/builder/webpack/webpack.config.base.js +127 -0
- package/src/builder/webpack/webpack.config.client.js +78 -0
- package/src/builder/webpack/webpack.config.server.js +31 -0
- package/src/builder/webpack/webpack.config.spa.js +80 -0
- package/src/builder/webpack/webpack.config.ssr.js +57 -0
- package/src/components/Breadcrumbs/Breadcrumbs.vue +39 -16
- package/src/components/Field/Field.vue +21 -2
- package/src/components/Popup/Popup.vue +2 -2
- package/src/modules/auth/store/auth.js +1 -2
- package/src/modules/backoffice/components/layouts/Backoffice.vue +36 -62
- package/src/modules/backoffice/components/pages/Dashboard.vue +2 -125
- package/src/modules/backoffice/components/partials/Sidebar.vue +176 -0
- package/src/modules/backoffice/router/admin.js +0 -15
- package/src/modules/backoffice/router/backoffice.js +5 -1
- package/src/modules/community/components/blocks/CardBlogpost.vue +6 -1
- package/src/modules/community/components/pages/BlogPost.vue +30 -67
- package/src/modules/community/components/sections/Comments.vue +1 -1
- package/src/modules/community/router/blogposts.js +4 -0
- package/src/modules/constructor/components/elements/Textarea.vue +197 -79
- package/src/modules/constructor/components/sections/Constructor.vue +19 -32
- package/src/modules/constructor/components/sections/Viewer.vue +53 -0
- package/src/modules/gallery/components/pages/Gallery.vue +1 -1
- package/src/modules/globals/components/layouts/Client.vue +21 -7
- package/src/modules/globals/components/layouts/Empty.vue +1 -6
- package/src/modules/globals/components/pages/404.vue +1 -1
- package/src/modules/globals/components/sections/SectionPageTitle.vue +2 -2
- package/src/modules/globals/mixins/mixins.js +129 -97
- package/src/modules/landing/router/landing.js +3 -0
- package/src/modules/marketplace/components/pages/Catalog.vue +1 -1
- package/src/modules/middlewares/client/auth.validation.js +14 -15
- package/src/modules/orders/orders.client.js +4 -2
- package/src/modules/organizations/router/organizations.js +9 -3
- package/src/modules/pages/controllers/factories/pages.factory.js +106 -0
- package/src/modules/pages/controllers/routes/pages.routes.js +24 -0
- package/src/modules/pages/models/page.model.js +18 -11
- package/src/modules/pages/pages.client.js +40 -0
- package/src/modules/pages/pages.server.js +32 -0
- package/src/modules/pages/views/components/blocks/CardPage.vue +123 -0
- package/src/modules/pages/views/components/pages/Page.vue +173 -0
- package/src/modules/pages/views/components/pages/PageEdit.vue +121 -0
- package/src/modules/pages/views/components/pages/Pages.vue +60 -0
- package/src/modules/pages/views/components/partials/SidebarPages.vue +112 -0
- package/src/modules/pages/views/router/pages.backoffice.router.js +46 -0
- package/src/modules/pages/views/router/pages.router.js +25 -0
- package/src/modules/pages/views/store/pages.js +78 -0
- package/src/modules/pages/views/store/pages.store.js +5 -0
- package/src/modules/products/controllers/leftovers.controller.js +1 -1
- package/src/modules/spots/router/spots.js +4 -0
- package/src/styles/base/all.scss +66 -53
- package/dist/index-BshfsiQG.js +0 -220
- package/dist/index-C-8xOJnM.mjs +0 -244
- package/dist/index-C-DW6ra2.js +0 -260
- package/dist/index-CDbtWkBj.js +0 -243
- package/dist/index-D4j29ivg.mjs +0 -261
- package/dist/index-DKtnWDNC.mjs +0 -221
- package/dist/index-DNI4aUP2.js +0 -259
- package/dist/index-Tcyehi73.mjs +0 -260
- package/dist/main-3Vn8SU2y.mjs +0 -14509
- package/dist/main-5IrI2IOV.js +0 -92
- package/dist/main-BFKp44Ze.mjs +0 -14509
- package/dist/main-BF_nMkug.js +0 -92
- package/dist/main-BHr0-Z3t.mjs +0 -14510
- package/dist/main-BY2OvGB9.mjs +0 -14509
- package/dist/main-Bcj0J6tP.mjs +0 -14509
- package/dist/main-By5Tbyui.js +0 -92
- package/dist/main-CEoQQpJV.js +0 -92
- package/dist/main-CI9l9xMs.js +0 -92
- package/dist/main-Ckn0Sslr.js +0 -92
- package/dist/main-DBv451oC.js +0 -92
- package/dist/main-DPg58GOU.mjs +0 -14509
- package/dist/main-DTHFR7H_.mjs +0 -14510
- package/dist/main-DxyAONrm.mjs +0 -14438
- package/dist/main-gY_284gJ.js +0 -92
- package/dist/main-wXdocsbd.js +0 -92
- package/dist/middlewares.server.js +0 -19
- package/dist/middlewares.server.mjs +0 -20
- package/dist/prometheus-framework/src/components/Address/Address.vue.cjs +0 -1
- package/dist/prometheus-framework/src/components/Address/Address.vue.js +0 -89
- package/dist/prometheus-framework/src/components/Button/Button.vue.cjs +0 -1
- package/dist/prometheus-framework/src/components/Button/Button.vue.js +0 -95
- package/dist/prometheus-framework/src/components/Chips/Chips.vue2.cjs +0 -1
- package/dist/prometheus-framework/src/components/Chips/Chips.vue2.js +0 -26
- package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue2.cjs +0 -1
- package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue2.js +0 -57
- package/dist/prometheus-framework/src/components/Field/Field.vue.cjs +0 -1
- package/dist/prometheus-framework/src/components/Field/Field.vue.js +0 -83
- package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue.cjs +0 -1
- package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue.js +0 -127
- package/dist/prometheus-framework/src/components/Menu/Menu.vue.cjs +0 -1
- package/dist/prometheus-framework/src/components/Menu/Menu.vue.js +0 -13
- package/dist/prometheus-framework/src/components/Popup/Popup.vue.cjs +0 -1
- package/dist/prometheus-framework/src/components/Popup/Popup.vue.js +0 -77
- package/dist/prometheus-framework/src/components/Select/Select.vue.cjs +0 -1
- package/dist/prometheus-framework/src/components/Select/Select.vue.js +0 -103
- package/dist/prometheus-framework/src/components/Tab/Tab.vue.cjs +0 -1
- package/dist/prometheus-framework/src/components/Tab/Tab.vue.js +0 -36
- package/dist/prometheus-framework/src/components/Tooltip/Tooltip.vue2.cjs +0 -1
- package/dist/prometheus-framework/src/components/Tooltip/Tooltip.vue2.js +0 -44
- package/dist/prometheus-framework/src/modules/community/components/sections/Feed.vue.cjs +0 -1
- package/dist/prometheus-framework/src/modules/community/components/sections/Feed.vue.js +0 -125
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Bullets.vue.cjs +0 -2
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Bullets.vue.js +0 -47
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Caption.vue.cjs +0 -2
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Caption.vue.js +0 -46
- package/dist/prometheus-framework/src/modules/constructor/components/elements/H2.vue.cjs +0 -4
- package/dist/prometheus-framework/src/modules/constructor/components/elements/H2.vue.js +0 -65
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.cjs +0 -5
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.js +0 -67
- package/dist/prometheus-framework/src/modules/wallet/components/blocks/CardBalanceReplenished.vue.cjs +0 -1
- package/dist/prometheus-framework/src/modules/wallet/components/blocks/CardBalanceReplenished.vue.js +0 -30
- package/dist/prometheus-framework/src/modules/wallet/components/blocks/CardDeposite.vue.cjs +0 -1
- package/dist/prometheus-framework/src/modules/wallet/components/blocks/CardDeposite.vue.js +0 -42
- package/dist/prometheus-framework/src/modules/wallet/components/blocks/CashDeposite.vue.cjs +0 -1
- package/dist/prometheus-framework/src/modules/wallet/components/blocks/CashDeposite.vue.js +0 -26
- package/dist/prometheus-framework/src/modules/wallet/components/blocks/CryptoDeposite.vue.cjs +0 -1
- package/dist/prometheus-framework/src/modules/wallet/components/blocks/CryptoDeposite.vue.js +0 -42
- package/dist/prometheus-framework/src/modules/wallet/localization/Wallet.json.cjs +0 -1
- package/dist/prometheus-framework/src/modules/wallet/localization/Wallet.json.js +0 -26
- package/dist/queryProcessor-g8208K6g.mjs +0 -178
- package/dist/queryProcessor-haY_gPGg.js +0 -177
- package/dist/web-5eyiz9L7.mjs +0 -54
- package/dist/web-BPUCAST-.mjs +0 -54
- package/dist/web-Be96Xqd4.mjs +0 -54
- package/dist/web-BmdKi_fZ.js +0 -1
- package/dist/web-Bqpk8Mpk.js +0 -1
- package/dist/web-BzUFKqzw.js +0 -1
- package/dist/web-CcFPvlkl.js +0 -1
- package/dist/web-CgjTW1bL.js +0 -1
- package/dist/web-Cw0ijzjY.js +0 -1
- package/dist/web-CwTWV4ca.mjs +0 -54
- package/dist/web-DZUec7pP.js +0 -1
- package/dist/web-Dh669DqQ.mjs +0 -54
- package/dist/web-DkWpHYrh.mjs +0 -54
- package/dist/web-Dt2RCU54.js +0 -1
- package/dist/web-krQQeSb6.mjs +0 -54
- package/dist/web-nqFW_Sd1.mjs +0 -54
- package/src/modules/community/controllers/comments.controller.aggr.js +0 -280
- package/src/modules/community/controllers/comments.controller.populate.js +0 -180
- package/src/modules/constructor/components/elements/H2.vue +0 -102
- package/src/modules/pages/components/pages/Page.vue +0 -174
- package/src/modules/pages/components/pages/PageEdit.vue +0 -159
- package/src/modules/pages/components/pages/Pages.vue +0 -108
- package/src/modules/pages/controllers/pages.controller.js +0 -71
- package/src/modules/pages/router/pages.router.js +0 -15
- package/src/modules/pages/routes/pages.routes.js +0 -30
- package/src/modules/pages/store/pages.js +0 -94
@@ -1,174 +0,0 @@
|
|
1
|
-
<template>
|
2
|
-
<div >
|
3
|
-
|
4
|
-
<div class="breadcrumbs section">
|
5
|
-
<router-link to="/">
|
6
|
-
<svg class="home" viewBox="0 0 10 9" fill="none" xmlns="http://www.w3.org/2000/svg">
|
7
|
-
<path fill="rgb(var(--black))" d="M0.494141 4.26391C0.494141 4.48862 0.659906 4.66912 0.928813 4.66912C1.05037 4.66912 1.16825 4.6065 1.27139 4.52177L1.64344 4.20866V7.56448C1.64344 8.13545 1.98971 8.47803 2.5791 8.47803H7.56678C8.15616 8.47803 8.50243 8.13545 8.50243 7.56448V4.19392L8.8929 4.52177C8.99604 4.6065 9.11392 4.66912 9.23916 4.66912C9.48597 4.66912 9.67015 4.5144 9.67015 4.27128C9.67015 4.1313 9.61121 4.01343 9.5007 3.92133L8.50243 3.08146V1.47538C8.50243 1.30961 8.3956 1.1991 8.22984 1.1991H7.63308C7.46732 1.1991 7.35313 1.30961 7.35313 1.47538V2.11634L5.66969 0.70181C5.31606 0.403433 4.85928 0.403433 4.50197 0.70181L0.663589 3.92133C0.553079 4.01711 0.494141 4.14235 0.494141 4.26391ZM6.13752 5.26219C6.13752 5.08906 6.02701 4.97855 5.85387 4.97855H4.31779C4.14097 4.97855 4.02678 5.08906 4.02678 5.26219V7.63447H2.83327C2.60856 7.63447 2.48332 7.50922 2.48332 7.28084V3.5014L4.90349 1.47538C5.01768 1.37592 5.15029 1.37592 5.26817 1.47538L7.66255 3.48298V7.28084C7.66255 7.50922 7.53731 7.63447 7.3126 7.63447H6.13752V5.26219Z"/>
|
8
|
-
</svg>
|
9
|
-
<span>{{t('breadcrumbs.home')}}</span>
|
10
|
-
</router-link>
|
11
|
-
|
12
|
-
|
13
|
-
<svg class="chevron" viewBox="0 0 4 8" fill="none" xmlns="http://www.w3.org/2000/svg">
|
14
|
-
<path d="M4 3.99992C4 3.83673 3.94307 3.70391 3.81025 3.57867L0.899431 0.732369C0.800759 0.629902 0.679317 0.580566 0.531309 0.580566C0.239089 0.580566 0 0.815861 0 1.10808C0 1.25229 0.0607211 1.38512 0.166983 1.49138L2.74763 3.99613L0.166983 6.50846C0.0607211 6.61093 0 6.74375 0 6.89176C0 7.18398 0.239089 7.41928 0.531309 7.41928C0.675522 7.41928 0.800759 7.36994 0.899431 7.26747L3.81025 4.42117C3.94307 4.29594 4 4.15931 4 3.99992Z" fill="rgb(var(--black))"/>
|
15
|
-
</svg>
|
16
|
-
|
17
|
-
<router-link v-if="page" :to="'/pages/' + page.url">
|
18
|
-
<span v-if="$i18n.locale === 'en'">{{page.localization[0].text}}</span>
|
19
|
-
<span v-if="$i18n.locale === 'ru'">{{page.localization[1].text}}</span>
|
20
|
-
<!-- {{$i18n.locale}} -->
|
21
|
-
</router-link >
|
22
|
-
|
23
|
-
</div>
|
24
|
-
|
25
|
-
|
26
|
-
<div class="page-wrapper cols-2-1_3 gap-big section">
|
27
|
-
<ul class="w-100 pd-medium menu-tabs">
|
28
|
-
<p class="mn-b-medium t-semi p-medium">{{ t('information') }}</p>
|
29
|
-
<li v-for="(page,index) in pages" :class="{'product-tab-active':route.params.url === page.url}" class="product-tab">
|
30
|
-
|
31
|
-
<router-link :to="{ name: 'Page', params: { url: page.url}}" >
|
32
|
-
<span v-html="t('pages[' + index + ']')"></span>
|
33
|
-
</router-link>
|
34
|
-
</li>
|
35
|
-
</ul>
|
36
|
-
<section class="page ">
|
37
|
-
<h1 class="mn-b-small">
|
38
|
-
<span>{{ t('title') }}</span>
|
39
|
-
</h1>
|
40
|
-
<hr class="mn-b-semi">
|
41
|
-
<div class="page-content-wrapper">
|
42
|
-
{{t('content')}}
|
43
|
-
</div>
|
44
|
-
|
45
|
-
</section>
|
46
|
-
</div>
|
47
|
-
|
48
|
-
</div>
|
49
|
-
</template>
|
50
|
-
|
51
|
-
<script setup>
|
52
|
-
// Import libs
|
53
|
-
import { computed, onMounted } from 'vue'
|
54
|
-
import { useStore } from '@/store'
|
55
|
-
import { useRoute } from 'vue-router'
|
56
|
-
import { useI18n } from 'vue-i18n'
|
57
|
-
|
58
|
-
import * as marked from 'marked';
|
59
|
-
|
60
|
-
|
61
|
-
// const renderer = {
|
62
|
-
// image(image) {
|
63
|
-
// var imageRequired = require('../../..@/assets/images/cases/' + image)
|
64
|
-
// return `<img src='${imageRequired.default}' />`;
|
65
|
-
// }
|
66
|
-
// };
|
67
|
-
|
68
|
-
// marked.use({ renderer });
|
69
|
-
// Import components
|
70
|
-
// Accessing router and store
|
71
|
-
const text = {
|
72
|
-
locale: 'en',
|
73
|
-
messages: {
|
74
|
-
en: {
|
75
|
-
breadcrumbs: {
|
76
|
-
home: 'Home',
|
77
|
-
store: 'Store',
|
78
|
-
},
|
79
|
-
information: "Information",
|
80
|
-
adress: 'Adress',
|
81
|
-
support: 'Get Online Support',
|
82
|
-
request: 'Contact Number',
|
83
|
-
time: "24 / 7 Seven days a week",
|
84
|
-
copyright: "Weeder, 2022. Proudly created with OZ DAO.",
|
85
|
-
pages: [],
|
86
|
-
},
|
87
|
-
ru: {
|
88
|
-
breadcrumbs: {
|
89
|
-
home: 'Главная',
|
90
|
-
store: 'Store',
|
91
|
-
},
|
92
|
-
information: "Информация",
|
93
|
-
adress: 'Адресс',
|
94
|
-
support: 'Онлайн Поддержка',
|
95
|
-
request: 'Контактный Телефон',
|
96
|
-
time: "24 / 7 без перерывов",
|
97
|
-
copyright: "Weeder, 2022. С гордостью создано OZ DAO.",
|
98
|
-
pages: [],
|
99
|
-
title: '',
|
100
|
-
content: '',
|
101
|
-
}
|
102
|
-
}
|
103
|
-
}
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
const { t, locale } = useI18n(text)
|
108
|
-
const store = useStore()
|
109
|
-
const route = useRoute()
|
110
|
-
// Data prefetching
|
111
|
-
if (route.params.url) {
|
112
|
-
await store.dispatch('pages/fetch', route.params.url)
|
113
|
-
} else {
|
114
|
-
store.commit('pages/init');
|
115
|
-
}
|
116
|
-
|
117
|
-
await store.dispatch('pages/fetchAll')
|
118
|
-
|
119
|
-
const pages = computed(() => store.pages.state.all)
|
120
|
-
console.log(store.pages.state)
|
121
|
-
|
122
|
-
const page = computed(() => store.pages.state.current)
|
123
|
-
|
124
|
-
const content = computed(() => marked(t('content'), { sanitize: true }))
|
125
|
-
|
126
|
-
store.pages.state.all.forEach( page => {
|
127
|
-
page.localization.forEach( localization => {
|
128
|
-
text.messages[localization.locale].pages.push(localization.text)
|
129
|
-
})
|
130
|
-
})
|
131
|
-
|
132
|
-
store.pages.state.current.localization.forEach(localization => {
|
133
|
-
text.messages[localization.locale].title = localization.text
|
134
|
-
})
|
135
|
-
|
136
|
-
store.pages.state.current.localization.forEach(localization => {
|
137
|
-
text.messages[localization.locale].content = localization.content
|
138
|
-
})
|
139
|
-
|
140
|
-
</script>
|
141
|
-
|
142
|
-
<style lang="scss">
|
143
|
-
.menu-tabs {
|
144
|
-
margin-right: 3rem;
|
145
|
-
.product-tab {
|
146
|
-
height: 2.5rem;
|
147
|
-
}
|
148
|
-
}
|
149
|
-
|
150
|
-
.page-wrapper {
|
151
|
-
.router-link-active, .router-link-exact-active {
|
152
|
-
color: rgb(var(--main));
|
153
|
-
}
|
154
|
-
}
|
155
|
-
.page {
|
156
|
-
width: 100%;
|
157
|
-
|
158
|
-
.page-content-wrapper {
|
159
|
-
> * {
|
160
|
-
margin-bottom: 1rem;
|
161
|
-
}
|
162
|
-
}
|
163
|
-
p {
|
164
|
-
opacity: 0.5;
|
165
|
-
}
|
166
|
-
ul {
|
167
|
-
li {
|
168
|
-
list-style-type: circle;
|
169
|
-
// height: 4rem;
|
170
|
-
margin-bottom: 0.5rem;
|
171
|
-
}
|
172
|
-
}
|
173
|
-
}
|
174
|
-
</style>
|
@@ -1,159 +0,0 @@
|
|
1
|
-
<template>
|
2
|
-
<!-- Toolbar -->
|
3
|
-
<section class="br-bot-dark bg-white pd-big">
|
4
|
-
<header class="flex-nojustify flex-bottom flex-nowrap flex">
|
5
|
-
<h1 v-if="route.params.url" class="mn-r-small">Редактировать страницу</h1>
|
6
|
-
<h1 v-else class="mn-r-small">Добавить страницу</h1>
|
7
|
-
|
8
|
-
</header>
|
9
|
-
</section>
|
10
|
-
|
11
|
-
|
12
|
-
<section class="bg-white pd-b-zero pd-big ">
|
13
|
-
<!-- Empty State -->
|
14
|
-
<InputText :obj="'pages'" :prop="'current.name'" :value="page.name" label="Название страницы"/>
|
15
|
-
<InputText :obj="'pages'" :prop="'current.url'" :value="page.url" label="URL"/>
|
16
|
-
<InputText :obj="'pages'" :prop="'current.groups'" :value="page.groups" label="Отобразить в" class="mn-b-big"/>
|
17
|
-
|
18
|
-
<EditCategories
|
19
|
-
:category="page"
|
20
|
-
title="Локализация"
|
21
|
-
obj="pages"
|
22
|
-
prop='current.localization'
|
23
|
-
name="localization"
|
24
|
-
keyname="locale"
|
25
|
-
parname="text"
|
26
|
-
/>
|
27
|
-
|
28
|
-
<EditCategories
|
29
|
-
:category="page"
|
30
|
-
title="Локализация контента"
|
31
|
-
obj="pages"
|
32
|
-
prop='current.localization'
|
33
|
-
name="localization"
|
34
|
-
keyname="locale"
|
35
|
-
parname="content"
|
36
|
-
/>
|
37
|
-
|
38
|
-
</section>
|
39
|
-
|
40
|
-
|
41
|
-
<div class="bg-white pd-t-zero pd-big page-content-edit">
|
42
|
-
<p class="mn-b-small t-semi p-big">Контент страницы</p>
|
43
|
-
<textarea
|
44
|
-
@input="updateInputText('pages', 'current.content', $event)"
|
45
|
-
:value="page.content"
|
46
|
-
placeholder="Не указано"
|
47
|
-
class="mn-b-small input-textarea"
|
48
|
-
/>
|
49
|
-
</div>
|
50
|
-
<section class="pd-big flex">
|
51
|
-
<a @click="onSubmit()" class="button">Сохранить</a>
|
52
|
-
<a v-if="route.params.url" @click="onDelete()" class="t-main bg-white button">Удалить</a>
|
53
|
-
</section>
|
54
|
-
</template>
|
55
|
-
|
56
|
-
|
57
|
-
<script setup>
|
58
|
-
import InputText from '@/components/elements/InputText.vue'
|
59
|
-
import EditCategories from '@pf/src/modules/products/components/blocks/EditCategories.vue'
|
60
|
-
|
61
|
-
import { computed, onMounted, reactive, toRefs } from 'vue'
|
62
|
-
|
63
|
-
import { useRoute,useRouter } from 'vue-router'
|
64
|
-
|
65
|
-
const store = useStore()
|
66
|
-
const route = useRoute()
|
67
|
-
const router = useRouter()
|
68
|
-
|
69
|
-
if (route.params.url) {
|
70
|
-
await store.dispatch('pages/fetch', route.params.url).then(
|
71
|
-
succes => { console.log('succes') },
|
72
|
-
error => {
|
73
|
-
console.log('error')
|
74
|
-
}
|
75
|
-
)
|
76
|
-
} else {
|
77
|
-
store.commit('pages/init');
|
78
|
-
}
|
79
|
-
const page = computed(() => store.state.pages.current)
|
80
|
-
|
81
|
-
function onSubmit() {
|
82
|
-
if (route.params.url) {
|
83
|
-
store.dispatch('pages/update', store.state.pages.current)
|
84
|
-
} else {
|
85
|
-
store.dispatch('pages/create', store.state.pages.current).then(
|
86
|
-
succes => {
|
87
|
-
router.push({name: 'Pages'})
|
88
|
-
},
|
89
|
-
error => {
|
90
|
-
console.log('error')
|
91
|
-
}
|
92
|
-
)
|
93
|
-
}
|
94
|
-
}
|
95
|
-
|
96
|
-
function onDelete() {
|
97
|
-
store.dispatch('pages/delete', store.state.pages.current.url).then(
|
98
|
-
succes => {
|
99
|
-
router.push({name: 'Pages'})
|
100
|
-
},
|
101
|
-
error => {
|
102
|
-
console.log('error')
|
103
|
-
}
|
104
|
-
)
|
105
|
-
}
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
</script>
|
110
|
-
|
111
|
-
<style lang="scss">
|
112
|
-
|
113
|
-
.round-stat {
|
114
|
-
padding: 1rem;
|
115
|
-
border-radius: 5rem;
|
116
|
-
width: 3rem;
|
117
|
-
height: 3rem;
|
118
|
-
display: flex;
|
119
|
-
justify-content: center;
|
120
|
-
align-items: center;
|
121
|
-
border: 1px solid rgba(0,0,0,0.1);
|
122
|
-
|
123
|
-
&-tab {
|
124
|
-
width: 2rem;
|
125
|
-
height: 2rem;
|
126
|
-
}
|
127
|
-
}
|
128
|
-
|
129
|
-
.page-content-edit {
|
130
|
-
textarea {
|
131
|
-
min-height: 16rem;
|
132
|
-
}
|
133
|
-
}
|
134
|
-
|
135
|
-
.order-card {
|
136
|
-
border-radius: 0.25rem;
|
137
|
-
overflow: hidden;
|
138
|
-
box-shadow: 0 8px 8px -8px rgb(36 36 36 / 10%);
|
139
|
-
.order-status {
|
140
|
-
color: black;
|
141
|
-
background: #EEF2F6;
|
142
|
-
width: 100%;
|
143
|
-
padding: 0.75rem 1.5rem;
|
144
|
-
margin: 0;
|
145
|
-
}
|
146
|
-
|
147
|
-
.new {
|
148
|
-
color: white;
|
149
|
-
background: #00ff88;
|
150
|
-
}
|
151
|
-
|
152
|
-
.block {
|
153
|
-
border-radius: 0;
|
154
|
-
border: 0;
|
155
|
-
}
|
156
|
-
}
|
157
|
-
|
158
|
-
|
159
|
-
</style>
|
@@ -1,108 +0,0 @@
|
|
1
|
-
<template>
|
2
|
-
<!-- Toolbar -->
|
3
|
-
<section class="br-bot-dark bg-white pd-big">
|
4
|
-
<header class="flex-nojustify flex-bottom flex-nowrap flex">
|
5
|
-
<h1 class="mn-r-small">Страницы</h1>
|
6
|
-
<router-link :to="'/admin/pages/add'" class="i-regular pd-thin button-delete button"><img src="@/assets/icons/plus-white.svg"></router-link>
|
7
|
-
</header>
|
8
|
-
</section>
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
<section class="cols-1 bg-light pd-big">
|
13
|
-
<!-- Empty State -->
|
14
|
-
<p v-if="pages.length === 0">У вас еще нет страниц</p>
|
15
|
-
<!-- Objects -->
|
16
|
-
<div v-for="page in pages" class="order-card col">
|
17
|
-
|
18
|
-
|
19
|
-
<div class="flex block">
|
20
|
-
<div>
|
21
|
-
<p class="mn-b-thin p-big">
|
22
|
-
{{page.name}}
|
23
|
-
</p>
|
24
|
-
|
25
|
-
<router-link :to="{ name: 'PageEdit', params: { url: page.url}}" class="t-transp">
|
26
|
-
pages/{{page.url}}
|
27
|
-
</router-link>
|
28
|
-
</div>
|
29
|
-
|
30
|
-
<div>
|
31
|
-
<router-link :to="{ name: 'PageEdit', params: { url: page.url}}" class="mn-r-small"> <span class="t-main">Редактировать</span></router-link>
|
32
|
-
<!-- <a @click="store.dispatch('pages/delete', page.url)" class="t-main">Удалить</a> -->
|
33
|
-
</div>
|
34
|
-
</div>
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
</div>
|
39
|
-
</section>
|
40
|
-
</template>
|
41
|
-
|
42
|
-
|
43
|
-
<script setup>
|
44
|
-
|
45
|
-
|
46
|
-
import { computed, onMounted, reactive, toRefs } from 'vue'
|
47
|
-
|
48
|
-
import { useRoute,useRouter } from 'vue-router'
|
49
|
-
|
50
|
-
const store = useStore()
|
51
|
-
const route = useRoute()
|
52
|
-
const router = useRouter()
|
53
|
-
|
54
|
-
await store.dispatch('pages/fetchAll').then(
|
55
|
-
succes => { console.log('sycces') },
|
56
|
-
error => {
|
57
|
-
console.log('eror')
|
58
|
-
}
|
59
|
-
)
|
60
|
-
const pages = computed(() => store.state.pages.all)
|
61
|
-
|
62
|
-
</script>
|
63
|
-
|
64
|
-
<style lang="scss">
|
65
|
-
|
66
|
-
.round-stat {
|
67
|
-
padding: 1rem;
|
68
|
-
border-radius: 5rem;
|
69
|
-
width: 3rem;
|
70
|
-
height: 3rem;
|
71
|
-
display: flex;
|
72
|
-
justify-content: center;
|
73
|
-
align-items: center;
|
74
|
-
border: 1px solid rgba(0,0,0,0.1);
|
75
|
-
|
76
|
-
&-tab {
|
77
|
-
width: 2rem;
|
78
|
-
height: 2rem;
|
79
|
-
}
|
80
|
-
}
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
.order-card {
|
85
|
-
border-radius: 0.25rem;
|
86
|
-
overflow: hidden;
|
87
|
-
box-shadow: 0 8px 8px -8px rgb(36 36 36 / 10%);
|
88
|
-
.order-status {
|
89
|
-
color: black;
|
90
|
-
background: #EEF2F6;
|
91
|
-
width: 100%;
|
92
|
-
padding: 0.75rem 1.5rem;
|
93
|
-
margin: 0;
|
94
|
-
}
|
95
|
-
|
96
|
-
.new {
|
97
|
-
color: white;
|
98
|
-
background: #00ff88;
|
99
|
-
}
|
100
|
-
|
101
|
-
.block {
|
102
|
-
border-radius: 0;
|
103
|
-
border: 0;
|
104
|
-
}
|
105
|
-
}
|
106
|
-
|
107
|
-
|
108
|
-
</style>
|
@@ -1,71 +0,0 @@
|
|
1
|
-
// --------------------------------------------------
|
2
|
-
// Used models
|
3
|
-
// --------------------------------------------------
|
4
|
-
const db = require("../models");
|
5
|
-
const Page = db.page;
|
6
|
-
// --------------------------------------------------
|
7
|
-
// HELPERS
|
8
|
-
// --------------------------------------------------
|
9
|
-
// --------------------------------------------------
|
10
|
-
// METHODS
|
11
|
-
// --------------------------------------------------
|
12
|
-
exports.getAll = (req, res) => {
|
13
|
-
Page.find({}).exec((err, pages) => {
|
14
|
-
// If error
|
15
|
-
if (err) {return res.status(500).send({ message: err }); }
|
16
|
-
// If not found
|
17
|
-
if (!pages) {return res.status(404).send({ message: "PAges not found." }); }
|
18
|
-
// If succes
|
19
|
-
res.status(200).send(pages);
|
20
|
-
});
|
21
|
-
};
|
22
|
-
|
23
|
-
exports.create = (req, res) => {
|
24
|
-
if(req.body.groups.length > 0) { req.body.groups = req.body.groups.split(', ') }
|
25
|
-
else {
|
26
|
-
req.body.groups = []
|
27
|
-
}
|
28
|
-
|
29
|
-
|
30
|
-
Page.create(req.body, (err, page) => {
|
31
|
-
if (err) {return res.status(500).send({ message: err }); }
|
32
|
-
if (!page) {return res.status(404).send({ message: "Something wrong when creaing page." }); }
|
33
|
-
res.status(200).send(page);
|
34
|
-
})
|
35
|
-
};
|
36
|
-
|
37
|
-
exports.get = (req, res) => {
|
38
|
-
Page.findOne({ url: req.params.url }).exec((err, page) => {
|
39
|
-
// If error
|
40
|
-
if (err) {return res.status(500).send({ message: err }); }
|
41
|
-
// If not found
|
42
|
-
if (!page) {return res.status(404).send({ message: "Page not found." }); }
|
43
|
-
// If succes
|
44
|
-
res.status(200).send(page);
|
45
|
-
});
|
46
|
-
};
|
47
|
-
|
48
|
-
exports.update = (req, res) => {
|
49
|
-
if(req.body.groups.length > 0) { req.body.groups = req.body.groups.split(', ') }
|
50
|
-
else {
|
51
|
-
req.body.groups = []
|
52
|
-
}
|
53
|
-
|
54
|
-
Page.findOneAndUpdate({ url: req.params.url }, req.body, { new: true}).exec((err, page) => {
|
55
|
-
// If error
|
56
|
-
if (err) {return res.status(500).send({ message: err }); }
|
57
|
-
// If not found
|
58
|
-
if (!page) {return res.status(404).send({ message: "Page not found." }); }
|
59
|
-
// If succes
|
60
|
-
res.status(200).send(page);
|
61
|
-
});
|
62
|
-
};
|
63
|
-
|
64
|
-
exports.delete = (req, res) => {
|
65
|
-
Page.findOneAndDelete({url: req.params.url}, (err, page) => {
|
66
|
-
if (err) {return res.status(500).send({ message: err }); }
|
67
|
-
if (!page) {return res.status(404).send({ message: "Something wrong when deleteing page." }); }
|
68
|
-
res.status(200).send(page);
|
69
|
-
})
|
70
|
-
};
|
71
|
-
|
@@ -1,15 +0,0 @@
|
|
1
|
-
const pages = [
|
2
|
-
{
|
3
|
-
path: 'pages/:url',
|
4
|
-
name: 'Page',
|
5
|
-
meta: {
|
6
|
-
title: {
|
7
|
-
en: 'Page',
|
8
|
-
ru: 'Страница'
|
9
|
-
}
|
10
|
-
},
|
11
|
-
component: () => import(/* webpackChunkName: 'Page' */ '@pf/src/modules/landing/components/pages/Page.vue')
|
12
|
-
}
|
13
|
-
];
|
14
|
-
|
15
|
-
export default pages;
|
@@ -1,30 +0,0 @@
|
|
1
|
-
const controller = require("../controllers/pages.controller");
|
2
|
-
|
3
|
-
module.exports = function(app) {
|
4
|
-
app.get(
|
5
|
-
"/pages",
|
6
|
-
controller.getAll
|
7
|
-
);
|
8
|
-
|
9
|
-
app.post(
|
10
|
-
"/pages",
|
11
|
-
controller.create
|
12
|
-
);
|
13
|
-
|
14
|
-
app.get(
|
15
|
-
"/pages/:url",
|
16
|
-
controller.get
|
17
|
-
);
|
18
|
-
|
19
|
-
app.post(
|
20
|
-
"/pages/:url",
|
21
|
-
controller.update
|
22
|
-
);
|
23
|
-
|
24
|
-
app.delete(
|
25
|
-
"/pages/:url",
|
26
|
-
controller.delete
|
27
|
-
);
|
28
|
-
|
29
|
-
};
|
30
|
-
|
@@ -1,94 +0,0 @@
|
|
1
|
-
import { reactive, watch } from "vue";
|
2
|
-
import axios from "axios";
|
3
|
-
import { setError } from "@pf/src/modules/globals/store/globals";
|
4
|
-
|
5
|
-
const clientUrl = process.env.API_URL;
|
6
|
-
const $axios = axios.create({ baseURL: clientUrl });
|
7
|
-
|
8
|
-
const state = reactive({
|
9
|
-
all: [],
|
10
|
-
current: {
|
11
|
-
name: "",
|
12
|
-
localization: [],
|
13
|
-
groups: [],
|
14
|
-
url: "",
|
15
|
-
content: "",
|
16
|
-
},
|
17
|
-
});
|
18
|
-
|
19
|
-
const actions = {
|
20
|
-
async fetchAll() {
|
21
|
-
return await $axios.get(`/pages`).then(
|
22
|
-
(pages) => {
|
23
|
-
state.all = pages.data;
|
24
|
-
return Promise.resolve(pages.data);
|
25
|
-
},
|
26
|
-
(error) => {
|
27
|
-
setError(error);
|
28
|
-
return Promise.reject(error);
|
29
|
-
}
|
30
|
-
);
|
31
|
-
},
|
32
|
-
|
33
|
-
async fetch(page) {
|
34
|
-
return await $axios.get(`/pages/` + page).then(
|
35
|
-
(page) => {
|
36
|
-
page.groups = page.groups.toString();
|
37
|
-
state.current = page.data;
|
38
|
-
return Promise.resolve(page.data);
|
39
|
-
},
|
40
|
-
(error) => {
|
41
|
-
setError(error);
|
42
|
-
return Promise.reject(error);
|
43
|
-
}
|
44
|
-
);
|
45
|
-
},
|
46
|
-
|
47
|
-
async create(page) {
|
48
|
-
return await $axios.post(`/pages`, page).then(
|
49
|
-
(page) => {
|
50
|
-
state.all.push(page.data);
|
51
|
-
return Promise.resolve(page.data);
|
52
|
-
},
|
53
|
-
(error) => {
|
54
|
-
setError(error);
|
55
|
-
return Promise.reject(error);
|
56
|
-
}
|
57
|
-
);
|
58
|
-
},
|
59
|
-
|
60
|
-
async update(page) {
|
61
|
-
return await $axios.post(`/pages/` + page.url, page).then(
|
62
|
-
(page) => {
|
63
|
-
state.current = page.data;
|
64
|
-
return Promise.resolve(page.data);
|
65
|
-
},
|
66
|
-
(error) => {
|
67
|
-
setError(error);
|
68
|
-
return Promise.reject(error);
|
69
|
-
}
|
70
|
-
);
|
71
|
-
},
|
72
|
-
|
73
|
-
async delete(url) {
|
74
|
-
return await $axios.delete(`/pages/` + url).then(
|
75
|
-
(page) => {
|
76
|
-
state.all.splice(state.all.findIndex((p) => p.url == url), 1);
|
77
|
-
return Promise.resolve(page.data);
|
78
|
-
},
|
79
|
-
(error) => {
|
80
|
-
setError(error);
|
81
|
-
return Promise.reject(error);
|
82
|
-
}
|
83
|
-
);
|
84
|
-
},
|
85
|
-
};
|
86
|
-
|
87
|
-
const history = [];
|
88
|
-
history.push(state);
|
89
|
-
|
90
|
-
watch(state, (newState) => {
|
91
|
-
history.push(newState);
|
92
|
-
});
|
93
|
-
|
94
|
-
export { state, actions };
|