@ozdao/prometheus-framework 0.1.67 → 0.1.69
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/BackofficeGallery-59a591ab.js +1 -0
- package/dist/BackofficeGallery-be6f69a9.mjs +307 -0
- package/dist/BackofficeReports-06166952.js +1 -0
- package/dist/BackofficeReports-50fd799c.mjs +44 -0
- package/dist/BlockTags-00325fa0.mjs +853 -0
- package/dist/BlockTags-58f95c8a.js +1 -0
- package/dist/ButtonToggleMembership-84d0e018.mjs +90 -0
- package/dist/ButtonToggleMembership-b905812f.js +1 -0
- package/dist/CardBlogpost-1b81b54e.mjs +246 -0
- package/dist/CardBlogpost-7107e04a.js +1 -0
- package/dist/CardOrganization-49ab5190.mjs +234 -0
- package/dist/CardOrganization-e6ac27f1.js +1 -0
- package/dist/CardProduct-4c0cb9a1.js +1 -0
- package/dist/CardProduct-ea0e1f84.mjs +192 -0
- package/dist/Chips-817cf959.js +1 -0
- package/dist/Chips-8c836ba6.mjs +213 -0
- package/dist/Community-8c4e011b.js +1 -0
- package/dist/Community-bd6f0cbb.mjs +131 -0
- package/dist/Dashboard-73b50724.js +1 -0
- package/dist/Dashboard-bc81b5f6.mjs +151 -0
- package/dist/Dropdown-60e3dc6c.js +1 -0
- package/dist/Dropdown-d1c81d45.mjs +169 -0
- package/dist/EditOrder-2b746caf.mjs +221 -0
- package/dist/EditOrder-e632f0cc.js +1 -0
- package/dist/Events-999cc8ed.js +1 -0
- package/dist/Events-ad8bbf27.mjs +134 -0
- package/dist/Feed-35e13c22.mjs +156 -0
- package/dist/Feed-53d96b18.mjs +361 -0
- package/dist/Feed-694a2fad.js +1 -0
- package/dist/Feed-ac4bb6ea.js +1 -0
- package/dist/Feed-d1d01771.js +1 -0
- package/dist/Feed-f7c04014.mjs +124 -0
- package/dist/Image-61cfd52d.js +9 -0
- package/dist/Image-e8be4acc.mjs +480 -0
- package/dist/LeftoverAdd-a268a95c.js +1 -0
- package/dist/LeftoverAdd-e4d93760.mjs +229 -0
- package/dist/Leftovers-6976802d.mjs +135 -0
- package/dist/Leftovers-d8f1d152.js +1 -0
- package/dist/Members-aeb2bca1.mjs +109 -0
- package/dist/Members-b9664e83.js +1 -0
- package/dist/Menu-93d34d9f.js +1 -0
- package/dist/Menu-eaf6b44c.mjs +13 -0
- package/dist/MenuItem-4a5881bd.mjs +85 -0
- package/dist/MenuItem-f35cad93.js +1 -0
- package/dist/Orders-8bc8963c.js +1 -0
- package/dist/Orders-eb262d8c.mjs +75 -0
- package/dist/Organizations-9926aa51.mjs +72 -0
- package/dist/Organizations-c653d814.js +1 -0
- package/dist/Payments-98328000.js +1 -0
- package/dist/Payments-a9066cdf.mjs +11 -0
- package/dist/Popup-0d8e1392.mjs +96 -0
- package/dist/Popup-eb11fa82.js +1 -0
- package/dist/Product-15043af7.mjs +651 -0
- package/dist/Product-82c022a4.js +7 -0
- package/dist/ProductEdit-05da9866.mjs +258 -0
- package/dist/ProductEdit-2f075296.js +1 -0
- package/dist/ProductsBackoffice-8462f626.js +1 -0
- package/dist/ProductsBackoffice-8d0f0ee8.mjs +85 -0
- package/dist/ProfileBlogposts-43855cb9.js +1 -0
- package/dist/ProfileBlogposts-f32170a3.mjs +78 -0
- package/dist/ProfileEvents-54be2d43.mjs +69 -0
- package/dist/ProfileEvents-ab69e27e.js +1 -0
- package/dist/ProfileOrganizations-0787cf34.mjs +72 -0
- package/dist/ProfileOrganizations-eb62dde4.js +1 -0
- package/dist/Publics-8e726d20.mjs +45 -0
- package/dist/Publics-ae589bf1.js +1 -0
- package/dist/Select-95f4701a.js +1 -0
- package/dist/Select-dab17282.mjs +80 -0
- package/dist/Select.vue_vue_type_style_index_0_scoped_dfe03dc2_lang-0ea8fbf8.js +1 -0
- package/dist/Select.vue_vue_type_style_index_0_scoped_dfe03dc2_lang-4ed993c7.mjs +1 -0
- package/dist/Socials-43293869.js +1 -0
- package/dist/Socials-8193477c.mjs +189 -0
- package/dist/UploadImage-0e8e4278.mjs +83 -0
- package/dist/UploadImage-8c71bda6.js +1 -0
- package/dist/UploadImageMultiple-c34a6c6f.mjs +58 -0
- package/dist/UploadImageMultiple-d1316df5.js +1 -0
- package/dist/Wallet-727195d9.mjs +21700 -0
- package/dist/Wallet-f4dda407.js +10 -0
- package/dist/auth-04684a60.js +7 -0
- package/dist/auth-7e39361f.mjs +633 -0
- package/dist/auth.client.cjs +1 -1
- package/dist/auth.client.js +5 -5
- package/dist/auth.server.js +1 -1
- package/dist/auth.server.mjs +1 -1
- package/dist/auth.validation-d614130d.js +1 -0
- package/dist/auth.validation-f4bf1deb.mjs +24 -0
- package/dist/axios-33aeb810.mjs +1435 -0
- package/dist/axios-ceccf20e.js +5 -0
- package/dist/backoffice.client.cjs +1 -1
- package/dist/backoffice.client.js +20 -20
- package/dist/categories-7e17a7eb.js +1 -0
- package/dist/categories-b7f9e8c0.mjs +122 -0
- package/dist/community.client.cjs +1 -1
- package/dist/community.client.js +209 -202
- package/dist/components/Upload/Upload.vue.d.ts.map +1 -1
- package/dist/events.client.cjs +2 -2
- package/dist/events.client.js +24 -27
- package/dist/landing.client.cjs +1 -1
- package/dist/landing.client.js +64 -40
- package/dist/leftovers-86e7d438.mjs +67 -0
- package/dist/leftovers-c9f70579.js +1 -0
- package/dist/legal.client.cjs +1 -1
- package/dist/legal.client.js +6 -7
- package/dist/main.css +1 -1
- package/dist/memberships-559590ad.mjs +68 -0
- package/dist/memberships-58af22e0.js +1 -0
- package/dist/modules/constructor/components/elements/H2.vue.d.ts +1 -1
- package/dist/modules/constructor/components/elements/Textarea.vue.d.ts +1 -1
- package/dist/modules/products/components/sections/EditProductInfo.vue.d.ts +1 -5
- package/dist/orders-1325c51b.js +1 -0
- package/dist/orders-c7cbe706.mjs +85 -0
- package/dist/organizations-71777b32.js +1 -0
- package/dist/organizations-93f7b610.mjs +122 -0
- package/dist/organizations.client-6ca27fb3.js +3 -0
- package/dist/organizations.client-bd63a7b2.mjs +2997 -0
- package/dist/organizations.client.cjs +1 -1
- package/dist/organizations.client.js +56 -61
- package/dist/products-61d83d74.js +1 -0
- package/dist/products-7f1e5a75.mjs +108 -0
- 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 +67 -65
- package/dist/prometheus-framework.cjs.js +21 -21
- package/dist/prometheus-framework.es.js +682 -690
- package/dist/reports-a67b4fb4.js +1 -0
- package/dist/reports-c579b02a.mjs +91 -0
- package/dist/reports.client.cjs +1 -1
- package/dist/reports.client.js +2 -2
- package/dist/states.validation-3b4604bc.mjs +13 -0
- package/dist/states.validation-9b43a097.js +1 -0
- package/dist/style.css +1 -1
- package/dist/users.client.cjs +1 -1
- package/dist/users.client.js +279 -208
- package/package.json +30 -35
- package/src/components/Button/Button.vue +1 -1
- package/src/components/Sidebar/Sidebar.vue +10 -8
- package/src/components/Upload/Upload.vue +8 -28
- package/src/modules/auth/components/pages/SignIn.vue +2 -2
- package/src/modules/auth/controllers/auth.controller.js +1 -1
- package/src/modules/auth/store/auth.js +21 -24
- package/src/modules/backoffice/components/admin/ProductEdit.vue +2 -0
- package/src/modules/constructor/components/sections/Constructor.vue +7 -54
- package/src/modules/gallery/components/pages/Gallery.vue +7 -1
- package/src/modules/gallery/components/sections/GalleryWithCategories.vue +24 -8
- package/src/modules/gallery/gallery.client.js +5 -1
- package/src/modules/marketplace/components/layouts/Marketplace.vue +1 -0
- package/src/modules/organizations/components/pages/Organization.vue +2 -2
- package/src/modules/payments/components/pages/Payments.vue +4 -3
- package/src/modules/products/components/blocks/CardLeftover.vue +0 -1
- package/src/modules/products/components/blocks/CardProduct.vue +15 -1
- package/src/modules/products/components/sections/EditProductInfo.vue +16 -14
- package/src/modules/products/components/sections/FilterProducts.vue +0 -2
- package/src/modules/products/components/sections/SectionProduct.vue +1 -0
- package/src/modules/products/components/sections/SortProducts.vue +2 -0
- package/src/modules/products/store/categories.js +9 -9
- package/src/modules/products/store/leftovers.js +6 -9
- package/src/modules/products/store/products.js +2 -0
- package/src/modules/users/components/pages/Profile.vue +3 -5
- package/src/modules/wallet/components/pages/Wallet.vue +1 -1
- package/src/styles/components/button.scss +253 -0
- package/src/styles/theme.scss +1 -0
- package/src/modules/constructor/components/elements/Audio.vue +0 -82
- package/src/modules/constructor/components/elements/Embed.vue +0 -85
- package/src/modules/globals/mixins/mixins.js +0 -52
- package/src/modules/globals/router/routerGuards.js +0 -28
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";const e=require("vue"),l=require("vue-i18n");const r={key:0,class:"thc"},s={class:"t-bold t-white"},a=e.createElementVNode("p",{class:"t-white h6"},"THC",-1),d={key:0,width:"60",height:"66",viewBox:"0 0 60 66",fill:"none",xmlns:"http://www.w3.org/2000/svg"},u=e.createElementVNode("path",{fill:"#FF0000",stroke:"white","stroke-width":"3",d:"M26 3.3094C28.4752 1.88034 31.5248 1.88034 34 3.3094L53.7128 14.6906C56.188 16.1197 57.7128 18.7607 57.7128 21.6188V44.3812C57.7128 47.2393 56.188 49.8803 53.7128 51.3094L34 62.6906C31.5248 64.1197 28.4752 64.1197 26 62.6906L6.28719 51.3094C3.81198 49.8803 2.28719 47.2393 2.28719 44.3812V21.6188C2.28719 18.7607 3.81198 16.1197 6.28719 14.6906L26 3.3094Z"},null,-1),m=[u],h={key:1,width:"60",height:"66",viewBox:"0 0 60 66",fill:"none",xmlns:"http://www.w3.org/2000/svg"},C=e.createElementVNode("path",{fill:"#FF0099",stroke:"white","stroke-width":"3",d:"M26 3.3094C28.4752 1.88034 31.5248 1.88034 34 3.3094L53.7128 14.6906C56.188 16.1197 57.7128 18.7607 57.7128 21.6188V44.3812C57.7128 47.2393 56.188 49.8803 53.7128 51.3094L34 62.6906C31.5248 64.1197 28.4752 64.1197 26 62.6906L6.28719 51.3094C3.81198 49.8803 2.28719 47.2393 2.28719 44.3812V21.6188C2.28719 18.7607 3.81198 16.1197 6.28719 14.6906L26 3.3094Z"},null,-1),w=[C],g={key:2,width:"60",height:"66",viewBox:"0 0 60 66",fill:"none",xmlns:"http://www.w3.org/2000/svg"},f=e.createElementVNode("path",{fill:"#EB00FF",stroke:"white","stroke-width":"3",d:"M26 3.3094C28.4752 1.88034 31.5248 1.88034 34 3.3094L53.7128 14.6906C56.188 16.1197 57.7128 18.7607 57.7128 21.6188V44.3812C57.7128 47.2393 56.188 49.8803 53.7128 51.3094L34 62.6906C31.5248 64.1197 28.4752 64.1197 26 62.6906L6.28719 51.3094C3.81198 49.8803 2.28719 47.2393 2.28719 44.3812V21.6188C2.28719 18.7607 3.81198 16.1197 6.28719 14.6906L26 3.3094Z"},null,-1),k=[f],p={key:3,width:"60",height:"66",viewBox:"0 0 60 66",fill:"none",xmlns:"http://www.w3.org/2000/svg"},v=e.createElementVNode("path",{fill:"#00FF29",stroke:"white","stroke-width":"3",d:"M26 3.3094C28.4752 1.88034 31.5248 1.88034 34 3.3094L53.7128 14.6906C56.188 16.1197 57.7128 18.7607 57.7128 21.6188V44.3812C57.7128 47.2393 56.188 49.8803 53.7128 51.3094L34 62.6906C31.5248 64.1197 28.4752 64.1197 26 62.6906L6.28719 51.3094C3.81198 49.8803 2.28719 47.2393 2.28719 44.3812V21.6188C2.28719 18.7607 3.81198 16.1197 6.28719 14.6906L26 3.3094Z"},null,-1),V=[v],_={__name:"THC",props:{product:Object},setup(t){return(o,n)=>t.product.information[1]?(e.openBlock(),e.createElementBlock("div",r,[e.createElementVNode("p",s,e.toDisplayString(t.product.information[1].value)+" %",1),a,Number(t.product.information[1].value)>=18?(e.openBlock(),e.createElementBlock("svg",d,m)):e.createCommentVNode("",!0),Number(t.product.information[1].value)<=18&&Number(t.product.information[1].value)>=14?(e.openBlock(),e.createElementBlock("svg",h,w)):e.createCommentVNode("",!0),Number(t.product.information[1].value)<=14&&Number(t.product.information[1].value)>=10?(e.openBlock(),e.createElementBlock("svg",g,k)):e.createCommentVNode("",!0),Number(t.product.information[1].value)<=10?(e.openBlock(),e.createElementBlock("svg",p,V)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)}};const B={class:"price-tag radius-small"},E={key:0,class:"t-transp t-main p-medium line-through price"},i={__name:"Price",props:{product:Object,size:String},setup(t){return(o,n)=>(e.openBlock(),e.createElementBlock("div",B,[e.createElementVNode("p",{class:e.normalizeClass({"t-main":t.product.sale,h4:!t.size,"h5 t-semi pd-thin":t.size==="small","h3 t-semi pd-small":t.size==="big"})},e.toDisplayString(t.product.price)+" "+e.toDisplayString(o.returnCurrency()),3),t.product.sale?(e.openBlock(),e.createElementBlock("p",E,e.toDisplayString(t.product.price/100*(100+t.product.sale))+" "+e.toDisplayString(o.returnCurrency()),1)):e.createCommentVNode("",!0)]))}};const N=["src"],y={key:1,class:"h-100 w-100",style:{"object-fit":"cover"},width:"524",height:"345",viewBox:"0 0 524 345",fill:"none",xmlns:"http://www.w3.org/2000/svg"},L=e.createElementVNode("rect",{width:"524",height:"345",fill:"white"},null,-1),b=e.createElementVNode("rect",{width:"524",height:"345",fill:"white"},null,-1),$=e.createElementVNode("circle",{cx:"262",cy:"172",r:"56",fill:"#00ff88","fill-opacity":"0.1"},null,-1),A=e.createElementVNode("path",{fill:"#00ff88",d:"M229.348 186.819C230.243 191.884 233.393 194.231 238.458 193.273V193.644C238.458 198.832 241.206 201.581 246.364 201.581H291.545C296.733 201.581 299.481 198.74 299.481 193.644V162.576C299.481 157.481 296.733 154.64 291.545 154.64H285.677L284.071 145.653C283.175 140.619 279.995 138.303 274.899 139.198L230.398 147.043C225.302 147.969 223.048 151.15 223.943 156.246L229.348 186.819ZM230.83 186.479L225.456 156.06C224.715 151.86 226.537 149.266 230.737 148.525L275.084 140.712C279.13 140.001 281.848 141.762 282.62 145.993L284.102 154.64H246.364C241.206 154.64 238.458 157.419 238.458 162.576V191.729L238.365 191.76C234.165 192.532 231.571 190.679 230.83 186.479ZM239.971 162.669C239.971 158.376 242.164 156.153 246.456 156.153H291.483C295.59 156.153 297.968 158.376 297.968 162.669V190.093L284.565 177.894C283.145 176.597 281.662 175.856 279.809 175.856C277.987 175.856 276.628 176.566 275.146 177.863L262.052 189.073L257.142 184.565C255.875 183.36 254.764 182.743 253.158 182.743C251.675 182.743 250.656 183.36 249.39 184.503L239.971 193.212V162.669ZM257.636 178.419C261.373 178.419 264.43 175.3 264.43 171.471C264.43 167.734 261.373 164.584 257.636 164.584C253.806 164.584 250.718 167.734 250.718 171.471C250.718 175.3 253.806 178.419 257.636 178.419Z"},null,-1),x=[L,b,$,A],z={class:"pd-medium t-left product-card-content"},S={class:"mn-thin h4"},F={key:1,class:"mn-small t-transp p-small"},D=e.createElementVNode("div",null,null,-1),M={__name:"CardProduct",props:["product"],setup(t){const o=t;return l.useI18n(),e.computed(()=>store.state.favorites.items.filter(function(n,c){if(n._id===o.product._id)return!0})),(n,c)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["radius-big product",t.product.information[2]&&t.product.information[2].value==="AAAA"?"bg-black t-white":"bg-white"])},[e.createElementVNode("div",{class:e.normalizeClass(["o-hidden w-100 h-100 square",t.product.information[2]&&t.product.information[2].value==="AAAA"?"bg-black":"bg-white"])},[t.product.images[0]?(e.openBlock(),e.createElementBlock("img",{key:0,src:(n.FILE_SERVER_URL||"")+t.product.images[0],class:"w-100 h-100"},null,8,N)):(e.openBlock(),e.createElementBlock("svg",y,x)),t.product.information.length>0?(e.openBlock(),e.createBlock(_,{key:2,product:t.product},null,8,["product"])):e.createCommentVNode("",!0)],2),e.createElementVNode("div",z,[t.product.information.length>0?(e.openBlock(),e.createElementBlock("p",{key:0,class:e.normalizeClass(["t-semi h6",t.product.information[2]&&t.product.information[2].value==="AAAA"?"t-violet":"t-main"])},e.toDisplayString(t.product.information[0].value),3)):e.createCommentVNode("",!0),e.createElementVNode("p",S,e.toDisplayString(t.product.name),1),t.product.description&&!t.product.localization?(e.openBlock(),e.createElementBlock("p",F,e.toDisplayString(t.product.description.substring(0,99))+"... ",1)):e.createCommentVNode("",!0),e.createVNode(i,{product:t.product,size:"small",class:e.normalizeClass(t.product.information[2]&&t.product.information[2].value==="AAAA"?"bg-third t-white":"")},null,8,["product","class"])]),D],2))}};exports._sfc_main=M;exports._sfc_main$1=i;
|
@@ -0,0 +1,192 @@
|
|
1
|
+
import { openBlock as i, createElementBlock as o, createElementVNode as e, toDisplayString as c, createCommentVNode as n, normalizeClass as r, computed as u, createBlock as a, createVNode as h } from "vue";
|
2
|
+
import { useI18n as m } from "vue-i18n";
|
3
|
+
const C = {
|
4
|
+
key: 0,
|
5
|
+
class: "thc"
|
6
|
+
}, w = { class: "t-bold t-white" }, f = /* @__PURE__ */ e("p", { class: "t-white h6" }, "THC", -1), g = {
|
7
|
+
key: 0,
|
8
|
+
width: "60",
|
9
|
+
height: "66",
|
10
|
+
viewBox: "0 0 60 66",
|
11
|
+
fill: "none",
|
12
|
+
xmlns: "http://www.w3.org/2000/svg"
|
13
|
+
}, v = /* @__PURE__ */ e("path", {
|
14
|
+
fill: "#FF0000",
|
15
|
+
stroke: "white",
|
16
|
+
"stroke-width": "3",
|
17
|
+
d: "M26 3.3094C28.4752 1.88034 31.5248 1.88034 34 3.3094L53.7128 14.6906C56.188 16.1197 57.7128 18.7607 57.7128 21.6188V44.3812C57.7128 47.2393 56.188 49.8803 53.7128 51.3094L34 62.6906C31.5248 64.1197 28.4752 64.1197 26 62.6906L6.28719 51.3094C3.81198 49.8803 2.28719 47.2393 2.28719 44.3812V21.6188C2.28719 18.7607 3.81198 16.1197 6.28719 14.6906L26 3.3094Z"
|
18
|
+
}, null, -1), _ = [
|
19
|
+
v
|
20
|
+
], L = {
|
21
|
+
key: 1,
|
22
|
+
width: "60",
|
23
|
+
height: "66",
|
24
|
+
viewBox: "0 0 60 66",
|
25
|
+
fill: "none",
|
26
|
+
xmlns: "http://www.w3.org/2000/svg"
|
27
|
+
}, p = /* @__PURE__ */ e("path", {
|
28
|
+
fill: "#FF0099",
|
29
|
+
stroke: "white",
|
30
|
+
"stroke-width": "3",
|
31
|
+
d: "M26 3.3094C28.4752 1.88034 31.5248 1.88034 34 3.3094L53.7128 14.6906C56.188 16.1197 57.7128 18.7607 57.7128 21.6188V44.3812C57.7128 47.2393 56.188 49.8803 53.7128 51.3094L34 62.6906C31.5248 64.1197 28.4752 64.1197 26 62.6906L6.28719 51.3094C3.81198 49.8803 2.28719 47.2393 2.28719 44.3812V21.6188C2.28719 18.7607 3.81198 16.1197 6.28719 14.6906L26 3.3094Z"
|
32
|
+
}, null, -1), k = [
|
33
|
+
p
|
34
|
+
], y = {
|
35
|
+
key: 2,
|
36
|
+
width: "60",
|
37
|
+
height: "66",
|
38
|
+
viewBox: "0 0 60 66",
|
39
|
+
fill: "none",
|
40
|
+
xmlns: "http://www.w3.org/2000/svg"
|
41
|
+
}, b = /* @__PURE__ */ e("path", {
|
42
|
+
fill: "#EB00FF",
|
43
|
+
stroke: "white",
|
44
|
+
"stroke-width": "3",
|
45
|
+
d: "M26 3.3094C28.4752 1.88034 31.5248 1.88034 34 3.3094L53.7128 14.6906C56.188 16.1197 57.7128 18.7607 57.7128 21.6188V44.3812C57.7128 47.2393 56.188 49.8803 53.7128 51.3094L34 62.6906C31.5248 64.1197 28.4752 64.1197 26 62.6906L6.28719 51.3094C3.81198 49.8803 2.28719 47.2393 2.28719 44.3812V21.6188C2.28719 18.7607 3.81198 16.1197 6.28719 14.6906L26 3.3094Z"
|
46
|
+
}, null, -1), V = [
|
47
|
+
b
|
48
|
+
], x = {
|
49
|
+
key: 3,
|
50
|
+
width: "60",
|
51
|
+
height: "66",
|
52
|
+
viewBox: "0 0 60 66",
|
53
|
+
fill: "none",
|
54
|
+
xmlns: "http://www.w3.org/2000/svg"
|
55
|
+
}, A = /* @__PURE__ */ e("path", {
|
56
|
+
fill: "#00FF29",
|
57
|
+
stroke: "white",
|
58
|
+
"stroke-width": "3",
|
59
|
+
d: "M26 3.3094C28.4752 1.88034 31.5248 1.88034 34 3.3094L53.7128 14.6906C56.188 16.1197 57.7128 18.7607 57.7128 21.6188V44.3812C57.7128 47.2393 56.188 49.8803 53.7128 51.3094L34 62.6906C31.5248 64.1197 28.4752 64.1197 26 62.6906L6.28719 51.3094C3.81198 49.8803 2.28719 47.2393 2.28719 44.3812V21.6188C2.28719 18.7607 3.81198 16.1197 6.28719 14.6906L26 3.3094Z"
|
60
|
+
}, null, -1), $ = [
|
61
|
+
A
|
62
|
+
], B = {
|
63
|
+
__name: "THC",
|
64
|
+
props: {
|
65
|
+
product: Object
|
66
|
+
},
|
67
|
+
setup(t) {
|
68
|
+
return (s, l) => t.product.information[1] ? (i(), o("div", C, [
|
69
|
+
e("p", w, c(t.product.information[1].value) + " %", 1),
|
70
|
+
f,
|
71
|
+
Number(t.product.information[1].value) >= 18 ? (i(), o("svg", g, _)) : n("", !0),
|
72
|
+
Number(t.product.information[1].value) <= 18 && Number(t.product.information[1].value) >= 14 ? (i(), o("svg", L, k)) : n("", !0),
|
73
|
+
Number(t.product.information[1].value) <= 14 && Number(t.product.information[1].value) >= 10 ? (i(), o("svg", y, V)) : n("", !0),
|
74
|
+
Number(t.product.information[1].value) <= 10 ? (i(), o("svg", x, $)) : n("", !0)
|
75
|
+
])) : n("", !0);
|
76
|
+
}
|
77
|
+
};
|
78
|
+
const F = { class: "price-tag radius-small" }, N = {
|
79
|
+
key: 0,
|
80
|
+
class: "t-transp t-main p-medium line-through price"
|
81
|
+
}, M = {
|
82
|
+
__name: "Price",
|
83
|
+
props: {
|
84
|
+
product: Object,
|
85
|
+
size: String
|
86
|
+
},
|
87
|
+
setup(t) {
|
88
|
+
return (s, l) => (i(), o("div", F, [
|
89
|
+
e("p", {
|
90
|
+
class: r(
|
91
|
+
{
|
92
|
+
"t-main": t.product.sale,
|
93
|
+
h4: !t.size,
|
94
|
+
"h5 t-semi pd-thin": t.size === "small",
|
95
|
+
"h3 t-semi pd-small": t.size === "big"
|
96
|
+
}
|
97
|
+
)
|
98
|
+
}, c(t.product.price) + " " + c(s.returnCurrency()), 3),
|
99
|
+
t.product.sale ? (i(), o("p", N, c(t.product.price / 100 * (100 + t.product.sale)) + " " + c(s.returnCurrency()), 1)) : n("", !0)
|
100
|
+
]));
|
101
|
+
}
|
102
|
+
};
|
103
|
+
const Z = ["src"], z = {
|
104
|
+
key: 1,
|
105
|
+
class: "h-100 w-100",
|
106
|
+
style: { "object-fit": "cover" },
|
107
|
+
width: "524",
|
108
|
+
height: "345",
|
109
|
+
viewBox: "0 0 524 345",
|
110
|
+
fill: "none",
|
111
|
+
xmlns: "http://www.w3.org/2000/svg"
|
112
|
+
}, H = /* @__PURE__ */ e("rect", {
|
113
|
+
width: "524",
|
114
|
+
height: "345",
|
115
|
+
fill: "white"
|
116
|
+
}, null, -1), E = /* @__PURE__ */ e("rect", {
|
117
|
+
width: "524",
|
118
|
+
height: "345",
|
119
|
+
fill: "white"
|
120
|
+
}, null, -1), P = /* @__PURE__ */ e("circle", {
|
121
|
+
cx: "262",
|
122
|
+
cy: "172",
|
123
|
+
r: "56",
|
124
|
+
fill: "#00ff88",
|
125
|
+
"fill-opacity": "0.1"
|
126
|
+
}, null, -1), j = /* @__PURE__ */ e("path", {
|
127
|
+
fill: "#00ff88",
|
128
|
+
d: "M229.348 186.819C230.243 191.884 233.393 194.231 238.458 193.273V193.644C238.458 198.832 241.206 201.581 246.364 201.581H291.545C296.733 201.581 299.481 198.74 299.481 193.644V162.576C299.481 157.481 296.733 154.64 291.545 154.64H285.677L284.071 145.653C283.175 140.619 279.995 138.303 274.899 139.198L230.398 147.043C225.302 147.969 223.048 151.15 223.943 156.246L229.348 186.819ZM230.83 186.479L225.456 156.06C224.715 151.86 226.537 149.266 230.737 148.525L275.084 140.712C279.13 140.001 281.848 141.762 282.62 145.993L284.102 154.64H246.364C241.206 154.64 238.458 157.419 238.458 162.576V191.729L238.365 191.76C234.165 192.532 231.571 190.679 230.83 186.479ZM239.971 162.669C239.971 158.376 242.164 156.153 246.456 156.153H291.483C295.59 156.153 297.968 158.376 297.968 162.669V190.093L284.565 177.894C283.145 176.597 281.662 175.856 279.809 175.856C277.987 175.856 276.628 176.566 275.146 177.863L262.052 189.073L257.142 184.565C255.875 183.36 254.764 182.743 253.158 182.743C251.675 182.743 250.656 183.36 249.39 184.503L239.971 193.212V162.669ZM257.636 178.419C261.373 178.419 264.43 175.3 264.43 171.471C264.43 167.734 261.373 164.584 257.636 164.584C253.806 164.584 250.718 167.734 250.718 171.471C250.718 175.3 253.806 178.419 257.636 178.419Z"
|
129
|
+
}, null, -1), R = [
|
130
|
+
H,
|
131
|
+
E,
|
132
|
+
P,
|
133
|
+
j
|
134
|
+
], S = { class: "pd-medium t-left product-card-content" }, T = { class: "mn-thin h4" }, I = {
|
135
|
+
key: 1,
|
136
|
+
class: "mn-small t-transp p-small"
|
137
|
+
}, O = /* @__PURE__ */ e("div", null, null, -1), U = {
|
138
|
+
__name: "CardProduct",
|
139
|
+
props: ["product"],
|
140
|
+
setup(t) {
|
141
|
+
const s = t;
|
142
|
+
return m(), u(() => store.state.favorites.items.filter(function(l, d) {
|
143
|
+
if (l._id === s.product._id)
|
144
|
+
return !0;
|
145
|
+
})), (l, d) => (i(), o("div", {
|
146
|
+
class: r([
|
147
|
+
"radius-big product",
|
148
|
+
t.product.information[2] && t.product.information[2].value === "AAAA" ? "bg-black t-white" : "bg-white"
|
149
|
+
])
|
150
|
+
}, [
|
151
|
+
e("div", {
|
152
|
+
class: r([
|
153
|
+
"o-hidden w-100 h-100 square",
|
154
|
+
t.product.information[2] && t.product.information[2].value === "AAAA" ? "bg-black" : "bg-white"
|
155
|
+
])
|
156
|
+
}, [
|
157
|
+
t.product.images[0] ? (i(), o("img", {
|
158
|
+
key: 0,
|
159
|
+
src: (l.FILE_SERVER_URL || "") + t.product.images[0],
|
160
|
+
class: "w-100 h-100"
|
161
|
+
}, null, 8, Z)) : (i(), o("svg", z, R)),
|
162
|
+
t.product.information.length > 0 ? (i(), a(B, {
|
163
|
+
key: 2,
|
164
|
+
product: t.product
|
165
|
+
}, null, 8, ["product"])) : n("", !0)
|
166
|
+
], 2),
|
167
|
+
e("div", S, [
|
168
|
+
t.product.information.length > 0 ? (i(), o("p", {
|
169
|
+
key: 0,
|
170
|
+
class: r([
|
171
|
+
"t-semi h6",
|
172
|
+
t.product.information[2] && t.product.information[2].value === "AAAA" ? "t-violet" : "t-main"
|
173
|
+
])
|
174
|
+
}, c(t.product.information[0].value), 3)) : n("", !0),
|
175
|
+
e("p", T, c(t.product.name), 1),
|
176
|
+
t.product.description && !t.product.localization ? (i(), o("p", I, c(t.product.description.substring(0, 99)) + "... ", 1)) : n("", !0),
|
177
|
+
h(M, {
|
178
|
+
product: t.product,
|
179
|
+
size: "small",
|
180
|
+
class: r(
|
181
|
+
t.product.information[2] && t.product.information[2].value === "AAAA" ? "bg-third t-white" : ""
|
182
|
+
)
|
183
|
+
}, null, 8, ["product", "class"])
|
184
|
+
]),
|
185
|
+
O
|
186
|
+
], 2));
|
187
|
+
}
|
188
|
+
};
|
189
|
+
export {
|
190
|
+
U as _,
|
191
|
+
M as a
|
192
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";const e=require("vue"),k=require("vue-router"),y=require("./Dropdown-60e3dc6c.js");require("./Button.vue_vue_type_style_index_0_lang-0ea8fbf8.js");require("./auth-04684a60.js");require("./memberships-58af22e0.js");const p=require("./axios-ceccf20e.js"),u=require("./globals-928eb13c.js"),w={key:0,class:"pd-b-zero"},b={class:"w-100 flex-v-center flex-nojustify flex"},B={class:"w-100 flex-nowrap flex-v-center flex"},E=["src"],x={key:2,class:"t-semi"},$={key:1},v={key:2},C={class:"d-block mn-l-auto flex-nowrap flex flex-v-center"},V={key:0,class:"w-4r i-thin"},N={style:{position:"absolute",top:"0px",right:"0px"},class:"br-solid br-2px br-white z-index-1 radius-big i-thin bg-second flex flex-center t-white p-small t-semi"},P=["src"],R={class:"bg-black pd-thin radius-small"},S=e.createElementVNode("button",{class:"w-100 bg-black br-solid br-1px br-white-transp-20 t-white button-small button"}," Report ",-1),D={__name:"CardHeader",props:["user","entity","entityType","date","dateFormatted","owner","creator","members","membersPhotos","type"],setup(t){k.useRouter();function o(s){const r=new Date,n=new Date(s),l=Math.abs(r-n),i=Math.floor(l/1e3),a=Math.floor(i/60),d=Math.floor(a/60),m=Math.floor(d/24),f=Math.floor(m/7);return f>0?`${f} week${f>1?"s":""} ago`:m>0?`${m} day${m>1?"s":""} ago`:d>0?`${d} hour${d>1?"s":""} ago`:a>0?`${a} minute${a>1?"s":""} ago`:"Just now"}return(s,r)=>{var n,l;return t.owner?(e.openBlock(),e.createElementBlock("header",w,[e.createElementVNode("div",b,[e.createElementVNode("div",B,[t.owner.target.profile.photo.length>0&&t.type!=="short"?(e.openBlock(),e.createElementBlock("img",{key:0,src:(s.FILE_SERVER_URL||"")+t.owner.target.profile.photo,class:"radius-medium mn-r-thin i-thin",onClick:r[0]||(r[0]=e.withModifiers(i=>s.$router.push({name:t.owner.type==="user"?"User Profile":"Organization",params:{_id:t.owner.target._id}}),["stop"]))},null,8,E)):e.createCommentVNode("",!0),!t.owner.target.profile.photo&&t.type!=="short"?(e.openBlock(),e.createBlock(y.PlaceholderUserpic,{key:1,class:"radius-medium mn-r-thin i-thin",onClick:r[1]||(r[1]=e.withModifiers(i=>s.$router.push({name:t.owner.type==="user"?"User Profile":"Organization",params:{_id:t.owner.target._id}}),["stop"]))})):e.createCommentVNode("",!0),t.type!=="short"?(e.openBlock(),e.createElementBlock("span",x,[e.createElementVNode("span",{onClick:r[2]||(r[2]=e.withModifiers(i=>s.$router.push({name:t.owner.type==="user"?"User Profile":"Organization",params:{_id:t.owner.target._id}}),["stop"]))},e.toDisplayString(t.owner.target.profile.name),1),!t.creator.hidden&&t.owner.target.profile.name!==((n=t.creator.target.profile)==null?void 0:n.name)?(e.openBlock(),e.createElementBlock("span",{key:0,onClick:r[3]||(r[3]=e.withModifiers(i=>s.$router.push({name:"User Profile",params:{_id:t.creator.target._id}}),["stop"]))}," · by "+e.toDisplayString((l=t.creator.target.profile)==null?void 0:l.name),1)):e.createCommentVNode("",!0),t.date?(e.openBlock(),e.createElementBlock("span",$," · "+e.toDisplayString(o(t.date)),1)):e.createCommentVNode("",!0),t.dateFormatted?(e.openBlock(),e.createElementBlock("span",v," · "+e.toDisplayString(t.dateFormatted),1)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",C,[t.members?(e.openBlock(),e.createElementBlock("div",V,[e.createElementVNode("span",N,e.toDisplayString(t.members),1),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.membersPhotos.slice(0,2),(i,a)=>(e.openBlock(),e.createElementBlock("img",{key:a,src:(s.FILE_SERVER_URL||"")+i,style:e.normalizeStyle({position:"absolute",top:"0px",right:a*20+20+"%",zIndex:1-a}),class:"br-solid br-2px br-white i-thin bg-grey radius-big"},null,12,P))),128))])):e.createCommentVNode("",!0)]),t.type!=="short"&&t.user&&t.user!=t.creator.target._id?(e.openBlock(),e.createBlock(y.Dropdown,{key:3,label:"...",align:"right",class:"cursor-pointer z-index-2 pd-thin radius-extra"},{default:e.withCtx(()=>[e.createElementVNode("section",R,[t.user!==t.creator.target._id?(e.openBlock(),e.createBlock(y._sfc_main,{key:0,user:t.user,type:t.entityType,target:t.entity._id,text:"Report",class:"w-100"},{default:e.withCtx(()=>[S]),_:1},8,["user","type","target"])):e.createCommentVNode("",!0)])]),_:1},8,["label"])):e.createCommentVNode("",!0)])])])):e.createCommentVNode("",!0)}}},h=p.axios.create({baseURL:process.env.API_URL,withCredentials:!0}),c=e.reactive({reactions:[],error:null}),g={async read({user:t,type:o,target:s,role:r}){try{const n=await h.get("/api/reactions",{params:{user:t,type:o,target:s,role:r}});return c.error=null,c.reactions=n.data,Promise.resolve(n.data)}catch(n){return u.setError(n),Promise.reject(n)}},async create(t){try{const o=await h.post("/api/reactions/create",t);return c.error=null,Promise.resolve(o.data)}catch(o){return console.log(o),u.setError(o),Promise.reject(o)}},async update(t){try{const o=await h.post("/api/reactions/update",t);return c.error=null,Promise.resolve(o.data)}catch(o){return u.setError(o),Promise.reject(o)}},async delete(t){try{const o=await h.post("/api/reactions/delete",t);return c.error=null,Promise.resolve(o.data)}catch(o){return u.setError(o),Promise.reject(o)}}},M={handleReactionUpdate(t,o,s){let r;if(Array.isArray(t)?r=t.find(n=>n._id===o.target):typeof t=="object"&&t._id===o.target&&(r=t),r)if(r.hasReaction=s,s)r.reactions.push(o),r.numberOfReactions+=1;else{const n=r.reactions.findIndex(l=>l._id===o._id);n!==-1&&(r.reactions.splice(n,1),r.numberOfReactions-=1)}}};e.watch(c,t=>{});const U=Object.freeze(Object.defineProperty({__proto__:null,actions:g,mutations:M,state:c},Symbol.toStringTag,{value:"Module"})),q={class:"flex-v-center gap-thin flex"},z={class:"pd-thin radius-small t-semi bg-main"},j={key:1,class:"pd-thin radius-small t-semi bg-white"},L={__name:"Chips",props:["chips"],setup(t){return(o,s)=>(e.openBlock(),e.createElementBlock("div",q,[t.chips.length?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(t.chips,(r,n)=>(e.openBlock(),e.createElementBlock("div",z,e.toDisplayString(r.text?r.text:r),1))),256)):(e.openBlock(),e.createElementBlock("div",j,e.toDisplayString(t.chips),1))]))}};exports._sfc_main=D;exports._sfc_main$1=L;exports.actions=g;exports.reactions=U;
|
@@ -0,0 +1,213 @@
|
|
1
|
+
import { openBlock as o, createElementBlock as a, createElementVNode as d, withModifiers as g, createCommentVNode as i, createBlock as x, toDisplayString as u, Fragment as v, renderList as $, normalizeStyle as P, withCtx as k, reactive as R, watch as E } from "vue";
|
2
|
+
import { useRouter as U } from "vue-router";
|
3
|
+
import { P as z, D as C, _ as j } from "./Dropdown-d1c81d45.mjs";
|
4
|
+
import "./Button.vue_vue_type_style_index_0_lang-4ed993c7.mjs";
|
5
|
+
import "./auth-7e39361f.mjs";
|
6
|
+
import "./memberships-559590ad.mjs";
|
7
|
+
import { a as M } from "./axios-33aeb810.mjs";
|
8
|
+
import { s as b } from "./globals-96ba60e4.mjs";
|
9
|
+
const L = {
|
10
|
+
key: 0,
|
11
|
+
class: "pd-b-zero"
|
12
|
+
}, O = { class: "w-100 flex-v-center flex-nojustify flex" }, S = { class: "w-100 flex-nowrap flex-v-center flex" }, D = ["src"], F = {
|
13
|
+
key: 2,
|
14
|
+
class: "t-semi"
|
15
|
+
}, I = { key: 1 }, A = { key: 2 }, T = { class: "d-block mn-l-auto flex-nowrap flex flex-v-center" }, V = {
|
16
|
+
key: 0,
|
17
|
+
class: "w-4r i-thin"
|
18
|
+
}, B = {
|
19
|
+
style: {
|
20
|
+
position: "absolute",
|
21
|
+
top: "0px",
|
22
|
+
right: "0px"
|
23
|
+
},
|
24
|
+
class: "br-solid br-2px br-white z-index-1 radius-big i-thin bg-second flex flex-center t-white p-small t-semi"
|
25
|
+
}, N = ["src"], H = { class: "bg-black pd-thin radius-small" }, J = /* @__PURE__ */ d("button", { class: "w-100 bg-black br-solid br-1px br-white-transp-20 t-white button-small button" }, " Report ", -1), oe = {
|
26
|
+
__name: "CardHeader",
|
27
|
+
props: [
|
28
|
+
"user",
|
29
|
+
"entity",
|
30
|
+
"entityType",
|
31
|
+
"date",
|
32
|
+
"dateFormatted",
|
33
|
+
"owner",
|
34
|
+
"creator",
|
35
|
+
"members",
|
36
|
+
"membersPhotos",
|
37
|
+
"type"
|
38
|
+
],
|
39
|
+
setup(e) {
|
40
|
+
U();
|
41
|
+
function r(n) {
|
42
|
+
const t = /* @__PURE__ */ new Date(), s = new Date(n), h = Math.abs(t - s), c = Math.floor(h / 1e3), l = Math.floor(c / 60), f = Math.floor(l / 60), y = Math.floor(f / 24), p = Math.floor(y / 7);
|
43
|
+
return p > 0 ? `${p} week${p > 1 ? "s" : ""} ago` : y > 0 ? `${y} day${y > 1 ? "s" : ""} ago` : f > 0 ? `${f} hour${f > 1 ? "s" : ""} ago` : l > 0 ? `${l} minute${l > 1 ? "s" : ""} ago` : "Just now";
|
44
|
+
}
|
45
|
+
return (n, t) => {
|
46
|
+
var s, h;
|
47
|
+
return e.owner ? (o(), a("header", L, [
|
48
|
+
d("div", O, [
|
49
|
+
d("div", S, [
|
50
|
+
e.owner.target.profile.photo.length > 0 && e.type !== "short" ? (o(), a("img", {
|
51
|
+
key: 0,
|
52
|
+
src: (n.FILE_SERVER_URL || "") + e.owner.target.profile.photo,
|
53
|
+
class: "radius-medium mn-r-thin i-thin",
|
54
|
+
onClick: t[0] || (t[0] = g((c) => n.$router.push({
|
55
|
+
name: e.owner.type === "user" ? "User Profile" : "Organization",
|
56
|
+
params: {
|
57
|
+
_id: e.owner.target._id
|
58
|
+
}
|
59
|
+
}), ["stop"]))
|
60
|
+
}, null, 8, D)) : i("", !0),
|
61
|
+
!e.owner.target.profile.photo && e.type !== "short" ? (o(), x(z, {
|
62
|
+
key: 1,
|
63
|
+
class: "radius-medium mn-r-thin i-thin",
|
64
|
+
onClick: t[1] || (t[1] = g((c) => n.$router.push({
|
65
|
+
name: e.owner.type === "user" ? "User Profile" : "Organization",
|
66
|
+
params: {
|
67
|
+
_id: e.owner.target._id
|
68
|
+
}
|
69
|
+
}), ["stop"]))
|
70
|
+
})) : i("", !0),
|
71
|
+
e.type !== "short" ? (o(), a("span", F, [
|
72
|
+
d("span", {
|
73
|
+
onClick: t[2] || (t[2] = g((c) => n.$router.push({
|
74
|
+
name: e.owner.type === "user" ? "User Profile" : "Organization",
|
75
|
+
params: {
|
76
|
+
_id: e.owner.target._id
|
77
|
+
}
|
78
|
+
}), ["stop"]))
|
79
|
+
}, u(e.owner.target.profile.name), 1),
|
80
|
+
!e.creator.hidden && e.owner.target.profile.name !== ((s = e.creator.target.profile) == null ? void 0 : s.name) ? (o(), a("span", {
|
81
|
+
key: 0,
|
82
|
+
onClick: t[3] || (t[3] = g((c) => n.$router.push({
|
83
|
+
name: "User Profile",
|
84
|
+
params: {
|
85
|
+
_id: e.creator.target._id
|
86
|
+
}
|
87
|
+
}), ["stop"]))
|
88
|
+
}, " · by " + u((h = e.creator.target.profile) == null ? void 0 : h.name), 1)) : i("", !0),
|
89
|
+
e.date ? (o(), a("span", I, " · " + u(r(e.date)), 1)) : i("", !0),
|
90
|
+
e.dateFormatted ? (o(), a("span", A, " · " + u(e.dateFormatted), 1)) : i("", !0)
|
91
|
+
])) : i("", !0),
|
92
|
+
d("div", T, [
|
93
|
+
e.members ? (o(), a("div", V, [
|
94
|
+
d("span", B, u(e.members), 1),
|
95
|
+
(o(!0), a(v, null, $(e.membersPhotos.slice(0, 2), (c, l) => (o(), a("img", {
|
96
|
+
key: l,
|
97
|
+
src: (n.FILE_SERVER_URL || "") + c,
|
98
|
+
style: P({
|
99
|
+
position: "absolute",
|
100
|
+
top: "0px",
|
101
|
+
right: l * 20 + 20 + "%",
|
102
|
+
zIndex: 1 - l
|
103
|
+
}),
|
104
|
+
class: "br-solid br-2px br-white i-thin bg-grey radius-big"
|
105
|
+
}, null, 12, N))), 128))
|
106
|
+
])) : i("", !0)
|
107
|
+
]),
|
108
|
+
e.type !== "short" && e.user && e.user != e.creator.target._id ? (o(), x(C, {
|
109
|
+
key: 3,
|
110
|
+
label: "...",
|
111
|
+
align: "right",
|
112
|
+
class: "cursor-pointer z-index-2 pd-thin radius-extra"
|
113
|
+
}, {
|
114
|
+
default: k(() => [
|
115
|
+
d("section", H, [
|
116
|
+
e.user !== e.creator.target._id ? (o(), x(j, {
|
117
|
+
key: 0,
|
118
|
+
user: e.user,
|
119
|
+
type: e.entityType,
|
120
|
+
target: e.entity._id,
|
121
|
+
text: "Report",
|
122
|
+
class: "w-100"
|
123
|
+
}, {
|
124
|
+
default: k(() => [
|
125
|
+
J
|
126
|
+
]),
|
127
|
+
_: 1
|
128
|
+
}, 8, ["user", "type", "target"])) : i("", !0)
|
129
|
+
])
|
130
|
+
]),
|
131
|
+
_: 1
|
132
|
+
}, 8, ["label"])) : i("", !0)
|
133
|
+
])
|
134
|
+
])
|
135
|
+
])) : i("", !0);
|
136
|
+
};
|
137
|
+
}
|
138
|
+
}, w = M.create({
|
139
|
+
baseURL: process.env.API_URL,
|
140
|
+
withCredentials: !0
|
141
|
+
}), m = R({
|
142
|
+
reactions: [],
|
143
|
+
error: null
|
144
|
+
}), q = {
|
145
|
+
async read({ user: e, type: r, target: n, role: t }) {
|
146
|
+
try {
|
147
|
+
const s = await w.get("/api/reactions", { params: { user: e, type: r, target: n, role: t } });
|
148
|
+
return m.error = null, m.reactions = s.data, Promise.resolve(s.data);
|
149
|
+
} catch (s) {
|
150
|
+
return b(s), Promise.reject(s);
|
151
|
+
}
|
152
|
+
},
|
153
|
+
async create(e) {
|
154
|
+
try {
|
155
|
+
const r = await w.post("/api/reactions/create", e);
|
156
|
+
return m.error = null, Promise.resolve(r.data);
|
157
|
+
} catch (r) {
|
158
|
+
return console.log(r), b(r), Promise.reject(r);
|
159
|
+
}
|
160
|
+
},
|
161
|
+
async update(e) {
|
162
|
+
try {
|
163
|
+
const r = await w.post("/api/reactions/update", e);
|
164
|
+
return m.error = null, Promise.resolve(r.data);
|
165
|
+
} catch (r) {
|
166
|
+
return b(r), Promise.reject(r);
|
167
|
+
}
|
168
|
+
},
|
169
|
+
async delete(e) {
|
170
|
+
try {
|
171
|
+
const r = await w.post("/api/reactions/delete", e);
|
172
|
+
return m.error = null, Promise.resolve(r.data);
|
173
|
+
} catch (r) {
|
174
|
+
return b(r), Promise.reject(r);
|
175
|
+
}
|
176
|
+
}
|
177
|
+
}, G = {
|
178
|
+
handleReactionUpdate(e, r, n) {
|
179
|
+
let t;
|
180
|
+
if (Array.isArray(e) ? t = e.find((s) => s._id === r.target) : typeof e == "object" && e._id === r.target && (t = e), t)
|
181
|
+
if (t.hasReaction = n, n)
|
182
|
+
t.reactions.push(r), t.numberOfReactions += 1;
|
183
|
+
else {
|
184
|
+
const s = t.reactions.findIndex((h) => h._id === r._id);
|
185
|
+
s !== -1 && (t.reactions.splice(s, 1), t.numberOfReactions -= 1);
|
186
|
+
}
|
187
|
+
}
|
188
|
+
};
|
189
|
+
E(m, (e) => {
|
190
|
+
});
|
191
|
+
const ne = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
192
|
+
__proto__: null,
|
193
|
+
actions: q,
|
194
|
+
mutations: G,
|
195
|
+
state: m
|
196
|
+
}, Symbol.toStringTag, { value: "Module" })), K = { class: "flex-v-center gap-thin flex" }, Q = { class: "pd-thin radius-small t-semi bg-main" }, W = {
|
197
|
+
key: 1,
|
198
|
+
class: "pd-thin radius-small t-semi bg-white"
|
199
|
+
}, ae = {
|
200
|
+
__name: "Chips",
|
201
|
+
props: ["chips"],
|
202
|
+
setup(e) {
|
203
|
+
return (r, n) => (o(), a("div", K, [
|
204
|
+
e.chips.length ? (o(!0), a(v, { key: 0 }, $(e.chips, (t, s) => (o(), a("div", Q, u(t.text ? t.text : t), 1))), 256)) : (o(), a("div", W, u(e.chips), 1))
|
205
|
+
]));
|
206
|
+
}
|
207
|
+
};
|
208
|
+
export {
|
209
|
+
oe as _,
|
210
|
+
q as a,
|
211
|
+
ae as b,
|
212
|
+
ne as r
|
213
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),v=require("./CardBlogpost-7107e04a.js"),$=require("./auth-04684a60.js"),D=require("vue-router"),P=require("./_plugin-vue_export-helper-f246444f.js");require("./axios-ceccf20e.js");require("./globals-928eb13c.js");require("vue-i18n");require("./Chips-817cf959.js");require("./Dropdown-60e3dc6c.js");require("./Popup-eb11fa82.js");require("./Popup.vue_vue_type_style_index_0_lang-0ea8fbf8.js");require("./Button-7643c9aa.js");require("./Button.vue_vue_type_style_index_0_lang-0ea8fbf8.js");require("./Select-95f4701a.js");require("./Select.vue_vue_type_style_index_0_scoped_dfe03dc2_lang-0ea8fbf8.js");require("./reports-a67b4fb4.js");require("./click-outside-0b0727d1.js");require("./memberships-58af22e0.js");require("./IconEdit-c0469b45.js");var j={};(function(i){Object.defineProperties(i,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});var e=t;const h={class:"flex-nowrap flex-v-center flex pd-medium bg-white"},N={key:0,class:"t-left mn-r-small w-33"},y={class:"w-100"},k=["value","placeholder"],b=e.defineComponent({__name:"Field",props:{label:{default:"Label"},placeholder:{default:"Enter something here"},field:{default:null},validation:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(l,{emit:n}){const a=l,o=e.ref(a.field);return(m,d)=>(e.openBlock(),e.createElementBlock("div",h,[l.label?(e.openBlock(),e.createElementBlock("div",N,[e.createElementVNode("label",null,e.toDisplayString(l.label),1)])):e.createCommentVNode("",!0),e.createElementVNode("div",y,[e.createElementVNode("input",{onInput:d[0]||(d[0]=g=>{var c;return o.value=n("update:modelValue",(c=g.target)==null?void 0:c.value)}),type:"text",class:"w-100",value:l.field,placeholder:l.placeholder},null,40,k)])]))}}),r={class:"input-wrapper"},f={class:"t-transp p-small"},u={key:0,class:"flex-nojustify flex-v-center flex-nowrap flex w-100"},_={key:1,class:"w-100"},B=["onClick"],V={__name:"Select",props:["obj","label","prop","value","options","content","textarea","placeholder","size"],setup(l){const n=l,a=e.ref(null),o=e.ref(!1);e.ref("Please select an item");let m=e.computed(()=>{if(n.prop[n.content]){var c=n.options.indexOf(n.prop[n.content]),p=n.options.map(s=>s);return c!=-1&&p.splice(c,1),p}else return n.options});n.prop[n.content]&&(a.value=n.prop[n.content]);function d(){o.value=!o.value}function g(c,p,s){var E=s;a.value=E,o.value=!o.value,c[p]=E}return(c,p)=>(e.openBlock(),e.createElementBlock("div",r,[e.createElementVNode("span",f,e.toDisplayString(l.label),1),e.createElementVNode("li",{onClick:p[0]||(p[0]=e.withModifiers(s=>d(),["stop"])),class:e.normalizeClass([{"input-small":l.size==="small"},"pd-small flex-center flex-nowrap flex bg-grey input-select input"])},[a.value?(e.openBlock(),e.createElementBlock("span",u,[e.createElementVNode("span",null,e.toDisplayString(a.value.name?a.value.name:a.value),1)])):(e.openBlock(),e.createElementBlock("span",_,e.toDisplayString(l.placeholder?l.placeholder:"Please select"),1))],2),o.value?(e.openBlock(),e.createElementBlock("ul",{key:0,class:e.normalizeClass([{"dropdown-small":l.size==="small"},"bg-grey dropdown-menu"])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(m),s=>(e.openBlock(),e.createElementBlock("li",{class:e.normalizeClass([{"input-small":l.size==="small"},"pd-small bg-grey input-select input"])},[s?(e.openBlock(),e.createElementBlock("span",{key:0,onClick:E=>g(l.prop,l.content,s),class:"flex-nojustify flex-v-center flex-nowrap flex w-100"},[e.createElementVNode("span",null,e.toDisplayString(s.name?s.name:s),1)],8,B)):e.createCommentVNode("",!0)],2))),256))],2)):e.createCommentVNode("",!0)]))}},C=["disabled"],x={key:0},q={key:0,class:"loading"},S=e.createElementVNode("span",null,[e.createElementVNode("svg",{class:"i-default",width:"135",height:"140",viewBox:"0 0 135 140",xmlns:"http://www.w3.org/2000/svg",fill:"#fff"},[e.createElementVNode("rect",{y:"10",width:"15",height:"120",rx:"6"},[e.createElementVNode("animate",{attributeName:"height",begin:"0.5s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),e.createTextVNode(),e.createElementVNode("animate",{attributeName:"y",begin:"0.5s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})]),e.createElementVNode("rect",{x:"30",y:"10",width:"15",height:"120",rx:"6"},[e.createElementVNode("animate",{attributeName:"height",begin:"0.25s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),e.createTextVNode(),e.createElementVNode("animate",{attributeName:"y",begin:"0.25s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})]),e.createElementVNode("rect",{x:"60",width:"15",height:"140",rx:"6"},[e.createElementVNode("animate",{attributeName:"height",begin:"0s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),e.createTextVNode(),e.createElementVNode("animate",{attributeName:"y",begin:"0s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})]),e.createElementVNode("rect",{x:"90",y:"10",width:"15",height:"120",rx:"6"},[e.createElementVNode("animate",{attributeName:"height",begin:"0.25s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),e.createTextVNode(),e.createElementVNode("animate",{attributeName:"y",begin:"0.25s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})]),e.createElementVNode("rect",{x:"120",y:"10",width:"15",height:"120",rx:"6"},[e.createElementVNode("animate",{attributeName:"height",begin:"0.5s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),e.createTextVNode(),e.createElementVNode("animate",{attributeName:"y",begin:"0.5s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})])])],-1),M=[S],T={key:0,class:"h4 loading"},I=e.createElementVNode("span",{class:"t-white"},"✔",-1),L=[I],z={key:0,class:"error"},w=e.defineComponent({__name:"Button",props:{submit:{type:Function,default:async()=>{console.log("Button click.")}},callback:{type:Function,default:async()=>{console.log("Button callback.")}},validation:{type:Boolean,default:!1}},setup(l){const n=l,a=e.ref(null),o=e.ref(null),m=e.ref(!1),d=e.ref(!1);async function g(){a.value.style["pointer-events"]="none",o.value=null,m.value=!0;try{await n.submit(),a.value.classList.add("bg-light-blue"),a.value.classList.remove("bg-blue"),m.value=!1,d.value=!0,setTimeout(()=>n.callback(),750)}catch{a.value.classList.add("bg-light-red"),a.value.classList.remove("bg-blue"),o.value="❌",setTimeout(()=>{a.value.classList.add("bg-blue"),a.value.classList.remove("bg-light-red"),a.value.style.pointerEvents="auto",m.value=!1,d.value=!1,o.value=null},1e3)}}return(c,p)=>(e.openBlock(),e.createElementBlock("button",{onClick:g,disabled:l.validation,ref_key:"button",ref:a,class:"w-100 t-white bg-blue button"},[e.createVNode(e.Transition,{mode:"out-in",name:"fadeIn"},{default:e.withCtx(()=>[!m.value&&!o.value&&!d.value?(e.openBlock(),e.createElementBlock("span",x,[e.renderSlot(c.$slots,"default")])):e.createCommentVNode("",!0)]),_:3}),e.createVNode(e.Transition,{mode:"out-in",name:"fadeIn"},{default:e.withCtx(()=>[m.value&&!o.value?(e.openBlock(),e.createElementBlock("div",q,M)):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{mode:"out-in",name:"fadeIn"},{default:e.withCtx(()=>[d.value?(e.openBlock(),e.createElementBlock("div",T,L)):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{mode:"out-in",name:"fadeIn"},{default:e.withCtx(()=>[o.value?(e.openBlock(),e.createElementBlock("div",z,[e.createElementVNode("span",null,e.toDisplayString(o.value),1)])):e.createCommentVNode("",!0)]),_:1})],8,C))}});var F={install:l=>{l.component("Field",b),l.component("Button",w),l.component("Select",V)}};i.Button=w,i.Field=b,i.Select=V,i.default=F})(j);const O=i=>(t.pushScopeId("data-v-faeb0fe0"),i=i(),t.popScopeId(),i),A={class:"flex-v-center flex-nowrap flex mn-medium"},R=O(()=>t.createElementVNode("h3",{class:"mn-r-medium"},"Blog",-1)),H={class:""},U={class:"flex-nowrap flex pd-t-zero pd-b-zero pd-big"},G=["onClick"],J=["onClick"],K={__name:"Community",async setup(i){let e,h;const N=D.useRouter();[e,h]=t.withAsyncContext(()=>v.read()),await e,h(),console.log(v.state),t.ref({title:"",content:"",categories:[]});const y=async r=>{window.confirm("Are you sure you want to delete this post?")&&(console.log(r),await v.remove(r))};let k=t.ref("all");const b=t.computed(()=>k.value==="all"?v.state.all:v.state.all.filter(r=>r.categories.includes(k.value)));return t.computed(()=>{for(let r of b.value)if(r.blocks&&r.blocks.length>0){const f=r.blocks.find(u=>u.type.name==="ImageUpload");if(f)return f.content}return null}),(r,f)=>(t.openBlock(),t.createElementBlock("div",null,[t.createElementVNode("div",A,[R,t.createElementVNode("button",{onClick:f[0]||(f[0]=u=>t.unref(N).push({name:"Create BlogPost"})),class:"t-white bg-second button-small button"},"+")]),t.createElementVNode("div",H,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(b),u=>(t.openBlock(),t.createBlock(v._sfc_main,{key:u._id,blogpost:u,owner:$.state.user._id,class:"mn-medium"},{default:t.withCtx(()=>[t.createElementVNode("div",U,[t.createElementVNode("button",{class:"mn-r-thin button-small w-100 button",onClick:_=>r.$router.push({path:"/community/posts/"+u.url+"/edit"})},"Edit",8,G),t.createElementVNode("button",{class:"button-small w-100 button",onClick:_=>y(u._id)},"Delete",8,J)])]),_:2},1032,["blogpost","owner"]))),128))])]))}},Q=P._export_sfc(K,[["__scopeId","data-v-faeb0fe0"]]);exports.default=Q;
|
@@ -0,0 +1,131 @@
|
|
1
|
+
import q, { withAsyncContext as R, ref as B, computed as C, openBlock as w, createElementBlock as S, createElementVNode as f, unref as M, Fragment as U, renderList as G, createBlock as H, withCtx as J, pushScopeId as K, popScopeId as Q } from "vue";
|
2
|
+
import { r as W, s as E, _ as X, a as Y } from "./CardBlogpost-1b81b54e.mjs";
|
3
|
+
import { s as Z } from "./auth-7e39361f.mjs";
|
4
|
+
import { useRouter as ee } from "vue-router";
|
5
|
+
import { _ as te } from "./_plugin-vue_export-helper-dad06003.mjs";
|
6
|
+
import "./axios-33aeb810.mjs";
|
7
|
+
import "./globals-96ba60e4.mjs";
|
8
|
+
import "vue-i18n";
|
9
|
+
import "./Chips-8c836ba6.mjs";
|
10
|
+
import "./Dropdown-d1c81d45.mjs";
|
11
|
+
import "./Popup-0d8e1392.mjs";
|
12
|
+
import "./Popup.vue_vue_type_style_index_0_lang-4ed993c7.mjs";
|
13
|
+
import "./Button-9e1a9284.mjs";
|
14
|
+
import "./Button.vue_vue_type_style_index_0_lang-4ed993c7.mjs";
|
15
|
+
import "./Select-dab17282.mjs";
|
16
|
+
import "./Select.vue_vue_type_style_index_0_scoped_dfe03dc2_lang-4ed993c7.mjs";
|
17
|
+
import "./reports-c579b02a.mjs";
|
18
|
+
import "./click-outside-6101836c.mjs";
|
19
|
+
import "./memberships-559590ad.mjs";
|
20
|
+
import "./IconEdit-9edfd74d.mjs";
|
21
|
+
var le = {};
|
22
|
+
(function(r) {
|
23
|
+
Object.defineProperties(r, { __esModule: { value: !0 }, [Symbol.toStringTag]: { value: "Module" } });
|
24
|
+
var e = q;
|
25
|
+
const g = { class: "flex-nowrap flex-v-center flex pd-medium bg-white" }, k = { key: 0, class: "t-left mn-r-small w-33" }, y = { class: "w-100" }, h = ["value", "placeholder"], v = e.defineComponent({ __name: "Field", props: { label: { default: "Label" }, placeholder: { default: "Enter something here" }, field: { default: null }, validation: { type: Boolean, default: !1 } }, emits: ["update:modelValue"], setup(t, { emit: a }) {
|
26
|
+
const l = t, n = e.ref(l.field);
|
27
|
+
return (d, u) => (e.openBlock(), e.createElementBlock("div", g, [t.label ? (e.openBlock(), e.createElementBlock("div", k, [e.createElementVNode("label", null, e.toDisplayString(t.label), 1)])) : e.createCommentVNode("", !0), e.createElementVNode("div", y, [e.createElementVNode("input", { onInput: u[0] || (u[0] = (b) => {
|
28
|
+
var i;
|
29
|
+
return n.value = a("update:modelValue", (i = b.target) == null ? void 0 : i.value);
|
30
|
+
}), type: "text", class: "w-100", value: t.field, placeholder: t.placeholder }, null, 40, h)])]));
|
31
|
+
} }), o = { class: "input-wrapper" }, p = { class: "t-transp p-small" }, c = { key: 0, class: "flex-nojustify flex-v-center flex-nowrap flex w-100" }, _ = { key: 1, class: "w-100" }, T = ["onClick"], V = { __name: "Select", props: ["obj", "label", "prop", "value", "options", "content", "textarea", "placeholder", "size"], setup(t) {
|
32
|
+
const a = t, l = e.ref(null), n = e.ref(!1);
|
33
|
+
e.ref("Please select an item");
|
34
|
+
let d = e.computed(() => {
|
35
|
+
if (a.prop[a.content]) {
|
36
|
+
var i = a.options.indexOf(a.prop[a.content]), m = a.options.map((s) => s);
|
37
|
+
return i != -1 && m.splice(i, 1), m;
|
38
|
+
} else
|
39
|
+
return a.options;
|
40
|
+
});
|
41
|
+
a.prop[a.content] && (l.value = a.prop[a.content]);
|
42
|
+
function u() {
|
43
|
+
n.value = !n.value;
|
44
|
+
}
|
45
|
+
function b(i, m, s) {
|
46
|
+
var N = s;
|
47
|
+
l.value = N, n.value = !n.value, i[m] = N;
|
48
|
+
}
|
49
|
+
return (i, m) => (e.openBlock(), e.createElementBlock("div", o, [e.createElementVNode("span", p, e.toDisplayString(t.label), 1), e.createElementVNode("li", { onClick: m[0] || (m[0] = e.withModifiers((s) => u(), ["stop"])), class: e.normalizeClass([{ "input-small": t.size === "small" }, "pd-small flex-center flex-nowrap flex bg-grey input-select input"]) }, [l.value ? (e.openBlock(), e.createElementBlock("span", c, [e.createElementVNode("span", null, e.toDisplayString(l.value.name ? l.value.name : l.value), 1)])) : (e.openBlock(), e.createElementBlock("span", _, e.toDisplayString(t.placeholder ? t.placeholder : "Please select"), 1))], 2), n.value ? (e.openBlock(), e.createElementBlock("ul", { key: 0, class: e.normalizeClass([{ "dropdown-small": t.size === "small" }, "bg-grey dropdown-menu"]) }, [(e.openBlock(!0), e.createElementBlock(e.Fragment, null, e.renderList(e.unref(d), (s) => (e.openBlock(), e.createElementBlock("li", { class: e.normalizeClass([{ "input-small": t.size === "small" }, "pd-small bg-grey input-select input"]) }, [s ? (e.openBlock(), e.createElementBlock("span", { key: 0, onClick: (N) => b(t.prop, t.content, s), class: "flex-nojustify flex-v-center flex-nowrap flex w-100" }, [e.createElementVNode("span", null, e.toDisplayString(s.name ? s.name : s), 1)], 8, T)) : e.createCommentVNode("", !0)], 2))), 256))], 2)) : e.createCommentVNode("", !0)]));
|
50
|
+
} }, I = ["disabled"], L = { key: 0 }, $ = { key: 0, class: "loading" }, z = e.createElementVNode("span", null, [e.createElementVNode("svg", { class: "i-default", width: "135", height: "140", viewBox: "0 0 135 140", xmlns: "http://www.w3.org/2000/svg", fill: "#fff" }, [e.createElementVNode("rect", { y: "10", width: "15", height: "120", rx: "6" }, [e.createElementVNode("animate", { attributeName: "height", begin: "0.5s", dur: "1s", values: "120;110;100;90;80;70;60;50;40;140;120", calcMode: "linear", repeatCount: "indefinite" }), e.createTextVNode(), e.createElementVNode("animate", { attributeName: "y", begin: "0.5s", dur: "1s", values: "10;15;20;25;30;35;40;45;50;0;10", calcMode: "linear", repeatCount: "indefinite" })]), e.createElementVNode("rect", { x: "30", y: "10", width: "15", height: "120", rx: "6" }, [e.createElementVNode("animate", { attributeName: "height", begin: "0.25s", dur: "1s", values: "120;110;100;90;80;70;60;50;40;140;120", calcMode: "linear", repeatCount: "indefinite" }), e.createTextVNode(), e.createElementVNode("animate", { attributeName: "y", begin: "0.25s", dur: "1s", values: "10;15;20;25;30;35;40;45;50;0;10", calcMode: "linear", repeatCount: "indefinite" })]), e.createElementVNode("rect", { x: "60", width: "15", height: "140", rx: "6" }, [e.createElementVNode("animate", { attributeName: "height", begin: "0s", dur: "1s", values: "120;110;100;90;80;70;60;50;40;140;120", calcMode: "linear", repeatCount: "indefinite" }), e.createTextVNode(), e.createElementVNode("animate", { attributeName: "y", begin: "0s", dur: "1s", values: "10;15;20;25;30;35;40;45;50;0;10", calcMode: "linear", repeatCount: "indefinite" })]), e.createElementVNode("rect", { x: "90", y: "10", width: "15", height: "120", rx: "6" }, [e.createElementVNode("animate", { attributeName: "height", begin: "0.25s", dur: "1s", values: "120;110;100;90;80;70;60;50;40;140;120", calcMode: "linear", repeatCount: "indefinite" }), e.createTextVNode(), e.createElementVNode("animate", { attributeName: "y", begin: "0.25s", dur: "1s", values: "10;15;20;25;30;35;40;45;50;0;10", calcMode: "linear", repeatCount: "indefinite" })]), e.createElementVNode("rect", { x: "120", y: "10", width: "15", height: "120", rx: "6" }, [e.createElementVNode("animate", { attributeName: "height", begin: "0.5s", dur: "1s", values: "120;110;100;90;80;70;60;50;40;140;120", calcMode: "linear", repeatCount: "indefinite" }), e.createTextVNode(), e.createElementVNode("animate", { attributeName: "y", begin: "0.5s", dur: "1s", values: "10;15;20;25;30;35;40;45;50;0;10", calcMode: "linear", repeatCount: "indefinite" })])])], -1), F = [z], D = { key: 0, class: "h4 loading" }, P = e.createElementVNode("span", { class: "t-white" }, "✔", -1), j = [P], A = { key: 0, class: "error" }, x = e.defineComponent({ __name: "Button", props: { submit: { type: Function, default: async () => {
|
51
|
+
console.log("Button click.");
|
52
|
+
} }, callback: { type: Function, default: async () => {
|
53
|
+
console.log("Button callback.");
|
54
|
+
} }, validation: { type: Boolean, default: !1 } }, setup(t) {
|
55
|
+
const a = t, l = e.ref(null), n = e.ref(null), d = e.ref(!1), u = e.ref(!1);
|
56
|
+
async function b() {
|
57
|
+
l.value.style["pointer-events"] = "none", n.value = null, d.value = !0;
|
58
|
+
try {
|
59
|
+
await a.submit(), l.value.classList.add("bg-light-blue"), l.value.classList.remove("bg-blue"), d.value = !1, u.value = !0, setTimeout(() => a.callback(), 750);
|
60
|
+
} catch {
|
61
|
+
l.value.classList.add("bg-light-red"), l.value.classList.remove("bg-blue"), n.value = "❌", setTimeout(() => {
|
62
|
+
l.value.classList.add("bg-blue"), l.value.classList.remove("bg-light-red"), l.value.style.pointerEvents = "auto", d.value = !1, u.value = !1, n.value = null;
|
63
|
+
}, 1e3);
|
64
|
+
}
|
65
|
+
}
|
66
|
+
return (i, m) => (e.openBlock(), e.createElementBlock("button", { onClick: b, disabled: t.validation, ref_key: "button", ref: l, class: "w-100 t-white bg-blue button" }, [e.createVNode(e.Transition, { mode: "out-in", name: "fadeIn" }, { default: e.withCtx(() => [!d.value && !n.value && !u.value ? (e.openBlock(), e.createElementBlock("span", L, [e.renderSlot(i.$slots, "default")])) : e.createCommentVNode("", !0)]), _: 3 }), e.createVNode(e.Transition, { mode: "out-in", name: "fadeIn" }, { default: e.withCtx(() => [d.value && !n.value ? (e.openBlock(), e.createElementBlock("div", $, F)) : e.createCommentVNode("", !0)]), _: 1 }), e.createVNode(e.Transition, { mode: "out-in", name: "fadeIn" }, { default: e.withCtx(() => [u.value ? (e.openBlock(), e.createElementBlock("div", D, j)) : e.createCommentVNode("", !0)]), _: 1 }), e.createVNode(e.Transition, { mode: "out-in", name: "fadeIn" }, { default: e.withCtx(() => [n.value ? (e.openBlock(), e.createElementBlock("div", A, [e.createElementVNode("span", null, e.toDisplayString(n.value), 1)])) : e.createCommentVNode("", !0)]), _: 1 })], 8, I));
|
67
|
+
} });
|
68
|
+
var O = { install: (t) => {
|
69
|
+
t.component("Field", v), t.component("Button", x), t.component("Select", V);
|
70
|
+
} };
|
71
|
+
r.Button = x, r.Field = v, r.Select = V, r.default = O;
|
72
|
+
})(le);
|
73
|
+
const ae = (r) => (K("data-v-faeb0fe0"), r = r(), Q(), r), ne = { class: "flex-v-center flex-nowrap flex mn-medium" }, oe = /* @__PURE__ */ ae(() => /* @__PURE__ */ f("h3", { class: "mn-r-medium" }, "Blog", -1)), re = { class: "" }, ie = { class: "flex-nowrap flex pd-t-zero pd-b-zero pd-big" }, se = ["onClick"], ce = ["onClick"], ue = {
|
74
|
+
__name: "Community",
|
75
|
+
async setup(r) {
|
76
|
+
let e, g;
|
77
|
+
const k = ee();
|
78
|
+
[e, g] = R(() => W()), await e, g(), console.log(E), B({
|
79
|
+
title: "",
|
80
|
+
content: "",
|
81
|
+
categories: []
|
82
|
+
});
|
83
|
+
const y = async (o) => {
|
84
|
+
window.confirm("Are you sure you want to delete this post?") && (console.log(o), await Y(o));
|
85
|
+
};
|
86
|
+
let h = B("all");
|
87
|
+
const v = C(() => h.value === "all" ? E.all : E.all.filter((o) => o.categories.includes(h.value)));
|
88
|
+
return C(() => {
|
89
|
+
for (let o of v.value)
|
90
|
+
if (o.blocks && o.blocks.length > 0) {
|
91
|
+
const p = o.blocks.find((c) => c.type.name === "ImageUpload");
|
92
|
+
if (p)
|
93
|
+
return p.content;
|
94
|
+
}
|
95
|
+
return null;
|
96
|
+
}), (o, p) => (w(), S("div", null, [
|
97
|
+
f("div", ne, [
|
98
|
+
oe,
|
99
|
+
f("button", {
|
100
|
+
onClick: p[0] || (p[0] = (c) => M(k).push({ name: "Create BlogPost" })),
|
101
|
+
class: "t-white bg-second button-small button"
|
102
|
+
}, "+")
|
103
|
+
]),
|
104
|
+
f("div", re, [
|
105
|
+
(w(!0), S(U, null, G(M(v), (c) => (w(), H(X, {
|
106
|
+
key: c._id,
|
107
|
+
blogpost: c,
|
108
|
+
owner: Z.user._id,
|
109
|
+
class: "mn-medium"
|
110
|
+
}, {
|
111
|
+
default: J(() => [
|
112
|
+
f("div", ie, [
|
113
|
+
f("button", {
|
114
|
+
class: "mn-r-thin button-small w-100 button",
|
115
|
+
onClick: (_) => o.$router.push({ path: "/community/posts/" + c.url + "/edit" })
|
116
|
+
}, "Edit", 8, se),
|
117
|
+
f("button", {
|
118
|
+
class: "button-small w-100 button",
|
119
|
+
onClick: (_) => y(c._id)
|
120
|
+
}, "Delete", 8, ce)
|
121
|
+
])
|
122
|
+
]),
|
123
|
+
_: 2
|
124
|
+
}, 1032, ["blogpost", "owner"]))), 128))
|
125
|
+
])
|
126
|
+
]));
|
127
|
+
}
|
128
|
+
}, Te = /* @__PURE__ */ te(ue, [["__scopeId", "data-v-faeb0fe0"]]);
|
129
|
+
export {
|
130
|
+
Te as default
|
131
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),i=require("./Menu-93d34d9f.js"),r=require("./MenuItem-f35cad93.js"),o=require("vue-router");require("./_plugin-vue_export-helper-f246444f.js");const u={class:""},c=e.createElementVNode("h1",{class:"mn-small"},"Your Backoffice",-1),l=e.createElementVNode("span",null," Organizations ",-1),d=e.createElementVNode("span",null," Events ",-1),f=e.createElementVNode("span",null," Community ",-1),m=e.createElementVNode("span",null," Products ",-1),_=e.createElementVNode("span",null," Leftovers ",-1),p=e.createElementVNode("span",null," Orders ",-1),k=e.createElementVNode("span",null," Payments ",-1),C=e.createElementVNode("span",null," Gallery ",-1),N=e.createElementVNode("span",null," Reports ",-1),V={__name:"Dashboard",props:{favorites:Array},setup(v){const s=o.useRoute(),n=o.useRouter();return(h,t)=>(e.openBlock(),e.createElementBlock("div",u,[c,e.createVNode(i._sfc_main,{class:"bg-grey"},{default:e.withCtx(()=>[e.createVNode(r._sfc_main,{onClick:t[0]||(t[0]=a=>e.unref(n).push({name:"Backoffice Organizations",params:{_id:e.unref(s).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[l]),_:1}),e.createVNode(r._sfc_main,{onClick:t[1]||(t[1]=a=>e.unref(n).push({name:"Backoffice Events",params:{_id:e.unref(s).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[d]),_:1}),e.createVNode(r._sfc_main,{onClick:t[2]||(t[2]=a=>e.unref(n).push({name:"Backoffice Community",params:{_id:e.unref(s).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[f]),_:1}),e.createVNode(r._sfc_main,{onClick:t[3]||(t[3]=a=>e.unref(n).push({name:"Backoffice Products",params:{_id:e.unref(s).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[m]),_:1}),e.createVNode(r._sfc_main,{onClick:t[4]||(t[4]=a=>e.unref(n).push({name:"Backoffice Leftovers",params:{_id:e.unref(s).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[_]),_:1}),e.createVNode(r._sfc_main,{onClick:t[5]||(t[5]=a=>e.unref(n).push({name:"Backoffice Orders",params:{_id:e.unref(s).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[p]),_:1}),e.createVNode(r._sfc_main,{onClick:t[6]||(t[6]=a=>e.unref(n).push({name:"Backoffice Payments",params:{_id:e.unref(s).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[k]),_:1}),e.createVNode(r._sfc_main,{onClick:t[7]||(t[7]=a=>e.unref(n).push({name:"Backoffice Gallery",params:{_id:e.unref(s).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[C]),_:1}),e.createVNode(r._sfc_main,{onClick:t[8]||(t[8]=a=>e.unref(n).push({name:"Backoffice Reports",params:{_id:e.unref(s).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[N]),_:1})]),_:1})]))}};exports.default=V;
|