@ozdao/prometheus-framework 0.0.79 → 0.0.82
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +4 -0
- package/dist/Breadcrumbs.vue_vue_type_style_index_0_lang-451d2614.mjs +80 -0
- package/dist/Breadcrumbs.vue_vue_type_style_index_0_lang-5ea8b4fa.js +1 -0
- package/dist/Breadcrumbs.vue_vue_type_style_index_0_lang-a477dfc6.mjs +138 -0
- package/dist/Breadcrumbs.vue_vue_type_style_index_0_lang-c6f3a0f0.js +1 -0
- package/dist/ButtonFollow-0d83a04a.mjs +130 -0
- package/dist/ButtonFollow-2ce169ca.js +1 -0
- package/dist/ButtonFollow-c9484003.mjs +130 -0
- package/dist/ButtonFollow-f9c5dc7a.js +1 -0
- package/dist/CardHeader-2d7e5d49.mjs +76 -0
- package/dist/CardHeader-2ef6618e.mjs +96 -0
- package/dist/CardHeader-925a972b.js +1 -0
- package/dist/CardHeader-dff9c71a.js +1 -0
- package/dist/CardOrganization-d462e158.mjs +320 -0
- package/dist/CardOrganization-ffa585a7.js +1 -0
- package/dist/Comments-1aec0e5e.js +1 -0
- package/dist/Comments-641516f8.mjs +76 -0
- package/dist/Comments-b6e32958.js +1 -0
- package/dist/Comments-d2a8fd0f.mjs +76 -0
- package/dist/EditProductImages-11510b66.js +1 -0
- package/dist/EditProductImages-1d4b44a9.mjs +236 -0
- package/dist/EditProductImages-d9228ad0.js +1 -0
- package/dist/EditProductImages-f983f473.mjs +236 -0
- package/dist/EmptyState-34d85f10.mjs +36 -0
- package/dist/EmptyState-7658d7d6.js +1 -0
- package/dist/Feed-55c5907a.js +1 -0
- package/dist/Feed-81d5802e.mjs +355 -0
- package/dist/Feed-932d976d.js +1 -0
- package/dist/Feed-962e009b.js +1 -0
- package/dist/Feed-c93012c7.mjs +346 -0
- package/dist/Feed-ca8e0e22.mjs +423 -0
- package/dist/Feed-d8e33aed.mjs +397 -0
- package/dist/Feed-f4cad6c3.js +1 -0
- package/dist/PlaceholderUserpic-1a6cf257.mjs +28 -0
- package/dist/PlaceholderUserpic-3bf126ee.js +1 -0
- package/dist/PlaceholderUserpic-d64d6dd5.js +1 -0
- package/dist/PlaceholderUserpic-e44ccca8.mjs +28 -0
- package/dist/Popup-70f6a8c0.mjs +76 -0
- package/dist/Popup-9479e39a.js +1 -0
- package/dist/Popup.vue_vue_type_style_index_0_lang-8981c189.mjs +280 -0
- package/dist/Popup.vue_vue_type_style_index_0_lang-931f265a.js +1 -0
- package/dist/Product-19cc3654.js +7 -0
- package/dist/Product-3c64a352.mjs +904 -0
- package/dist/Product-67efba5c.js +7 -0
- package/dist/Product-df622dc0.mjs +837 -0
- package/dist/ProductEdit-04760699.js +1 -0
- package/dist/ProductEdit-177c1f16.mjs +113 -0
- package/dist/ProductEdit-39adf62f.mjs +113 -0
- package/dist/ProductEdit-b98883d8.js +1 -0
- package/dist/ProfileBlogposts-00424109.js +1 -0
- package/dist/ProfileBlogposts-65a7a5e0.mjs +56 -0
- package/dist/ProfileBlogposts-e9a7381e.js +1 -0
- package/dist/ProfileBlogposts-ffa10f34.mjs +63 -0
- package/dist/ProfileComments-08d1670d.mjs +43 -0
- package/dist/ProfileComments-5884d09f.mjs +43 -0
- package/dist/ProfileComments-677731b3.js +1 -0
- package/dist/ProfileComments-730c2f73.js +1 -0
- package/dist/ProfileEvents-858e9471.mjs +55 -0
- package/dist/ProfileEvents-85a88674.mjs +55 -0
- package/dist/ProfileEvents-b5431cd6.js +1 -0
- package/dist/ProfileEvents-b8a76b6e.js +1 -0
- package/dist/ProfileLikes-4a57f637.mjs +43 -0
- package/dist/ProfileLikes-8ccf6815.js +1 -0
- package/dist/ProfileLikes-a78900c0.js +1 -0
- package/dist/ProfileLikes-c32c420b.mjs +43 -0
- package/dist/ProfileOrganizations-1990d0cc.js +1 -0
- package/dist/ProfileOrganizations-5d681498.mjs +202 -0
- package/dist/ProfileOrganizations-c7688210.js +1 -0
- package/dist/ProfileOrganizations-dc7210f1.mjs +214 -0
- package/dist/Publics-122d9fc7.mjs +1078 -0
- package/dist/Publics-889c25fc.js +1 -0
- package/dist/Publics-8bea4201.mjs +44 -0
- package/dist/Publics-aca585c3.js +1 -0
- package/dist/UploadImage-34bc4a3f.mjs +99 -0
- package/dist/UploadImage-74280ea3.mjs +99 -0
- package/dist/UploadImage-75b1a18a.js +1 -0
- package/dist/UploadImage-7c502f96.js +1 -0
- package/dist/auth-18f80fef.mjs +1501 -0
- package/dist/auth-5aa8e90c.js +8 -0
- package/dist/auth-78fd9408.js +8 -0
- package/dist/auth-8b5aac7a.mjs +1502 -0
- package/dist/auth.client.cjs +5 -5
- package/dist/auth.client.js +7 -7
- package/dist/auth.validation-2e8ee994.js +1 -0
- package/dist/auth.validation-69488f55.mjs +20 -0
- package/dist/auth.validation-6bccabd6.mjs +20 -0
- package/dist/auth.validation-a18510e8.js +1 -0
- package/dist/categories-75b7d14b.js +1 -0
- package/dist/categories-86b2d45b.mjs +225 -0
- package/dist/community.client.cjs +7 -9
- package/dist/community.client.js +1545 -591
- package/dist/community.server.js +77 -6
- package/dist/community.server.mjs +78 -7
- package/dist/components/Checkbox/Checkbox.vue.d.ts +1 -1
- package/dist/components/Checkbox/Checkbox.vue.d.ts.map +1 -1
- package/dist/components/Chips/Chips.vue.d.ts +6 -0
- package/dist/components/FieldTags/FieldTags.vue.d.ts +2 -0
- package/dist/components/FieldTags/create-tags.d.ts +21 -0
- package/dist/components/FieldTags/tag-input.vue.d.ts +10 -0
- package/dist/components/FieldTags/vue-tags-input.d.ts +120 -0
- package/dist/components/FieldTags/vue-tags-input.props.d.ts +28 -0
- package/dist/components/SelectMulti/SelectMulti.vue.d.ts +4 -0
- package/dist/components/SelectMulti/SelectMulti.vue.d.ts.map +1 -0
- package/dist/components/SelectMulti/multiselectMixin.d.ts +295 -0
- package/dist/components/SelectMulti/pointerMixin.d.ts +51 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/events.client.cjs +1 -1
- package/dist/events.client.js +14 -14
- package/dist/files.client.cjs +1 -0
- package/dist/files.client.js +1 -0
- package/dist/files.server.js +5 -2
- package/dist/files.server.mjs +5 -2
- package/dist/globals-928eb13c.js +1 -0
- package/dist/globals-96ba60e4.mjs +91 -0
- package/dist/globals.client.cjs +1 -1
- package/dist/globals.client.js +1 -1
- package/dist/inputs.validation-6960f71b.mjs +93 -0
- package/dist/inputs.validation-c53e01a2.js +1 -0
- package/dist/main.css +1 -1
- package/dist/main.d.ts +2 -2
- package/dist/modules/community/components/elements/H2.vue.d.ts +2 -1
- package/dist/modules/community/components/sections/Feed.vue.d.ts +2 -0
- package/dist/modules/orders/components/blocks/CardOrderItem.vue.d.ts +1 -1
- package/dist/modules/organizations/components/blocks/EditArray.vue.d.ts +1 -1
- package/dist/modules/organizations/components/sections/Feed.vue.d.ts +2 -0
- package/dist/organizations-0e9ff7ca.mjs +319 -0
- package/dist/organizations-c77ea9d0.js +1 -0
- package/dist/organizations.client.cjs +2 -2
- package/dist/organizations.client.js +753 -752
- package/dist/organizations.server.js +17 -11
- package/dist/organizations.server.mjs +17 -11
- package/dist/prometheus-framework.cjs.js +19 -19
- package/dist/prometheus-framework.es.js +4026 -2986
- package/dist/style.css +1 -1
- package/dist/users.client.cjs +1 -1
- package/dist/users.client.js +12 -12
- package/package.json +1 -1
- package/src/components/CardHeader/CardHeader.vue +33 -8
- package/src/components/Checkbox/Checkbox.vue +21 -17
- package/src/components/Chips/Chips.vue +28 -0
- package/src/components/FieldTags/FieldTags.vue +193 -0
- package/src/components/FieldTags/create-tags.js +84 -0
- package/src/components/FieldTags/tag-input.vue +55 -0
- package/src/components/FieldTags/vue-tags-input.js +424 -0
- package/src/components/FieldTags/vue-tags-input.props.js +349 -0
- package/src/components/FieldTags/vue-tags-input.scss +148 -0
- package/src/components/SelectMulti/SelectMulti.vue +854 -0
- package/src/components/SelectMulti/index.js +7 -0
- package/src/components/SelectMulti/multiselectMixin.js +725 -0
- package/src/components/SelectMulti/pointerMixin.js +143 -0
- package/src/components/index.ts +1 -0
- package/src/main.ts +9 -6
- package/src/modules/community/components/blocks/CardBlogpost.vue +24 -15
- package/src/modules/community/components/elements/H2.vue +46 -19
- package/src/modules/community/components/elements/ImageUpload.vue +7 -5
- package/src/modules/community/components/pages/BlogPost.vue +31 -36
- package/src/modules/community/components/pages/CreateBlogPost.vue +296 -106
- package/src/modules/community/components/sections/Feed.vue +12 -0
- package/src/modules/community/controllers/blog.controller.js +13 -3
- package/src/modules/community/middlewares/server/index.js +10 -0
- package/src/modules/community/middlewares/server/verifyBlogpost.js +41 -0
- package/src/modules/community/models/blogpost.model.js +14 -4
- package/src/modules/community/routes/blog.routes.js +14 -2
- package/src/modules/community/store/blogposts.js +8 -0
- package/src/modules/events/components/blocks/CardEvent.vue +5 -12
- package/src/modules/files/controllers/files.controller.js +5 -1
- package/src/modules/files/routes/files.routes.js +3 -1
- package/src/modules/globals/store/globals.js +6 -2
- package/src/modules/organizations/components/pages/OrganizationEdit.vue +13 -17
- package/src/modules/organizations/components/sections/Feed.vue +12 -0
- package/src/modules/organizations/controllers/organizations.controller.js +29 -23
- package/src/modules/organizations/store/organizations.js +10 -0
- package/src/modules/users/components/pages/ProfileBlogposts.vue +10 -2
- package/src/modules/users/components/pages/ProfileEdit.vue +1 -1
- package/src/modules/users/components/pages/ProfileOrganizations.vue +1 -1
- package/src/styles/base/all.scss +5 -2
- package/src/styles/base/backgrounds.scss +9 -0
- package/src/styles/config.scss +8 -1
package/README.md
CHANGED
@@ -134,5 +134,9 @@ The framework also encompasses the following modules:
|
|
134
134
|
## Contributing
|
135
135
|
Community contributions are encouraged. For guidelines, see the [contributing guide](https://docs.ozdao.dev/docs/contribution/).
|
136
136
|
|
137
|
+
## Special Thanks
|
138
|
+
For [Sipec][https://github.com/sipec] for his [vue-tags-input](https://github.com/sipec/vue-tags-input)
|
139
|
+
For [VictorNico][https://github.com/VictorNico] for his [vue3-reactive-tel-input](https://github.com/VictorNico/vue3-reactive-tel-input)
|
140
|
+
|
137
141
|
## License
|
138
142
|
Prometheus Framework is licensed under the [GNU GPLv3](https://www.gnu.org/licenses/gpl-3.0.txt).
|
@@ -0,0 +1,80 @@
|
|
1
|
+
import { ref as p, watch as w, computed as S, openBlock as t, createElementBlock as l, Fragment as v, createElementVNode as i, normalizeClass as f, toDisplayString as u, createCommentVNode as r, withModifiers as x, createVNode as b, Transition as h, withCtx as y, renderList as C, unref as B } from "vue";
|
2
|
+
import { _ as M } from "./auth-18f80fef.mjs";
|
3
|
+
const N = {
|
4
|
+
key: 0,
|
5
|
+
class: "t-transp mn-r-small"
|
6
|
+
}, O = ["onClick"], V = ["onClick"], $ = {
|
7
|
+
key: 0,
|
8
|
+
class: "mn-t-thin invalid-feedback"
|
9
|
+
}, z = {
|
10
|
+
__name: "Select",
|
11
|
+
props: {
|
12
|
+
label: String,
|
13
|
+
select: [String, Object],
|
14
|
+
placeholder: { type: String, default: "Please select an item" },
|
15
|
+
options: { type: Array, default: () => [] },
|
16
|
+
validation: Boolean
|
17
|
+
},
|
18
|
+
emits: ["update:select", "focus", "blur"],
|
19
|
+
setup(a, { emit: d }) {
|
20
|
+
const s = a, n = p(s.select), o = p(!1);
|
21
|
+
w(() => s.select, (e) => {
|
22
|
+
n.value = e;
|
23
|
+
});
|
24
|
+
const g = S(() => s.select ? s.options.filter((e) => e !== s.select) : s.options), m = () => {
|
25
|
+
o.value = !o.value, d(o.value ? "focus" : "blur");
|
26
|
+
}, k = (e) => {
|
27
|
+
n.value = e, m(), d("update:select", n.value);
|
28
|
+
};
|
29
|
+
return (e, E) => {
|
30
|
+
var _;
|
31
|
+
return t(), l(v, null, [
|
32
|
+
i("div", {
|
33
|
+
class: f([e.$attrs.class, "flex-nowrap flex"])
|
34
|
+
}, [
|
35
|
+
a.label ? (t(), l("div", N, [
|
36
|
+
i("span", null, u(a.label), 1)
|
37
|
+
])) : r("", !0),
|
38
|
+
i("li", {
|
39
|
+
onClick: x(m, ["stop"]),
|
40
|
+
class: "w-100"
|
41
|
+
}, [
|
42
|
+
i("span", null, u(((_ = n.value) == null ? void 0 : _.name) || n.value || a.placeholder), 1)
|
43
|
+
], 8, O),
|
44
|
+
b(h, {
|
45
|
+
mode: "out-in",
|
46
|
+
name: "fade"
|
47
|
+
}, {
|
48
|
+
default: y(() => [
|
49
|
+
o.value ? (t(), l("ul", {
|
50
|
+
key: 0,
|
51
|
+
class: f([e.$attrs.class, "pos-absolute pos-l-0 z-index-5 w-100 mn-t-big"])
|
52
|
+
}, [
|
53
|
+
(t(!0), l(v, null, C(B(g), (c) => (t(), l("li", null, [
|
54
|
+
c ? (t(), l("span", {
|
55
|
+
key: 0,
|
56
|
+
onClick: (L) => k(c),
|
57
|
+
class: "w-100"
|
58
|
+
}, u(c.name || c), 9, V)) : r("", !0)
|
59
|
+
]))), 256))
|
60
|
+
], 2)) : r("", !0)
|
61
|
+
]),
|
62
|
+
_: 1
|
63
|
+
})
|
64
|
+
], 2),
|
65
|
+
b(h, {
|
66
|
+
mode: "out-in",
|
67
|
+
name: "fade"
|
68
|
+
}, {
|
69
|
+
default: y(() => [
|
70
|
+
a.validation ? (t(), l("div", $, " * " + u(a.validation.message), 1)) : r("", !0)
|
71
|
+
]),
|
72
|
+
_: 1
|
73
|
+
})
|
74
|
+
], 64);
|
75
|
+
};
|
76
|
+
}
|
77
|
+
}, D = /* @__PURE__ */ M(z, [["__scopeId", "data-v-a78dbba1"]]);
|
78
|
+
export {
|
79
|
+
D as S
|
80
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";const e=require("vue"),m=require("./auth-78fd9408.js");const p={key:0,class:"t-transp mn-r-small"},_=["onClick"],k=["onClick"],v={key:0,class:"mn-t-thin invalid-feedback"},f={__name:"Select",props:{label:String,select:[String,Object],placeholder:{type:String,default:"Please select an item"},options:{type:Array,default:()=>[]},validation:Boolean},emits:["update:select","focus","blur"],setup(l,{emit:c}){const n=l,a=e.ref(n.select),o=e.ref(!1);e.watch(()=>n.select,t=>{a.value=t});const u=e.computed(()=>n.select?n.options.filter(t=>t!==n.select):n.options),r=()=>{o.value=!o.value,c(o.value?"focus":"blur")},d=t=>{a.value=t,r(),c("update:select",a.value)};return(t,g)=>{var i;return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",{class:e.normalizeClass([t.$attrs.class,"flex-nowrap flex"])},[l.label?(e.openBlock(),e.createElementBlock("div",p,[e.createElementVNode("span",null,e.toDisplayString(l.label),1)])):e.createCommentVNode("",!0),e.createElementVNode("li",{onClick:e.withModifiers(r,["stop"]),class:"w-100"},[e.createElementVNode("span",null,e.toDisplayString(((i=a.value)==null?void 0:i.name)||a.value||l.placeholder),1)],8,_),e.createVNode(e.Transition,{mode:"out-in",name:"fade"},{default:e.withCtx(()=>[o.value?(e.openBlock(),e.createElementBlock("ul",{key:0,class:e.normalizeClass([t.$attrs.class,"pos-absolute pos-l-0 z-index-5 w-100 mn-t-big"])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(u),s=>(e.openBlock(),e.createElementBlock("li",null,[s?(e.openBlock(),e.createElementBlock("span",{key:0,onClick:y=>d(s),class:"w-100"},e.toDisplayString(s.name||s),9,k)):e.createCommentVNode("",!0)]))),256))],2)):e.createCommentVNode("",!0)]),_:1})],2),e.createVNode(e.Transition,{mode:"out-in",name:"fade"},{default:e.withCtx(()=>[l.validation?(e.openBlock(),e.createElementBlock("div",v," * "+e.toDisplayString(l.validation.message),1)):e.createCommentVNode("",!0)]),_:1})],64)}}},B=m._export_sfc(f,[["__scopeId","data-v-a78dbba1"]]);exports.Select=B;
|
@@ -0,0 +1,138 @@
|
|
1
|
+
import { ref as h, watch as C, computed as S, openBlock as t, createElementBlock as l, Fragment as b, createElementVNode as s, normalizeClass as f, toDisplayString as u, createCommentVNode as v, withModifiers as _, createVNode as g, Transition as x, withCtx as k, renderList as $, unref as B } from "vue";
|
2
|
+
import { _ as A } from "./auth-8b5aac7a.mjs";
|
3
|
+
const O = {
|
4
|
+
key: 0,
|
5
|
+
class: "t-transp mn-r-small"
|
6
|
+
}, I = ["onClick"], M = ["onClick"], N = {
|
7
|
+
key: 0,
|
8
|
+
class: "mn-t-thin invalid-feedback"
|
9
|
+
}, V = {
|
10
|
+
__name: "Select",
|
11
|
+
props: {
|
12
|
+
label: String,
|
13
|
+
select: [String, Object],
|
14
|
+
placeholder: { type: String, default: "Please select an item" },
|
15
|
+
options: { type: Array, default: () => [] },
|
16
|
+
validation: Boolean
|
17
|
+
},
|
18
|
+
emits: ["update:select", "focus", "blur"],
|
19
|
+
setup(e, { emit: o }) {
|
20
|
+
const a = e, c = h(a.select), n = h(!1);
|
21
|
+
C(() => a.select, (i) => {
|
22
|
+
c.value = i;
|
23
|
+
});
|
24
|
+
const r = S(() => a.select ? a.options.filter((i) => i !== a.select) : a.options), d = () => {
|
25
|
+
n.value = !n.value, o(n.value ? "focus" : "blur");
|
26
|
+
}, w = (i) => {
|
27
|
+
c.value = i, d(), o("update:select", c.value);
|
28
|
+
};
|
29
|
+
return (i, P) => {
|
30
|
+
var y;
|
31
|
+
return t(), l(b, null, [
|
32
|
+
s("div", {
|
33
|
+
class: f([i.$attrs.class, "flex-nowrap flex"])
|
34
|
+
}, [
|
35
|
+
e.label ? (t(), l("div", O, [
|
36
|
+
s("span", null, u(e.label), 1)
|
37
|
+
])) : v("", !0),
|
38
|
+
s("li", {
|
39
|
+
onClick: _(d, ["stop"]),
|
40
|
+
class: "w-100"
|
41
|
+
}, [
|
42
|
+
s("span", null, u(((y = c.value) == null ? void 0 : y.name) || c.value || e.placeholder), 1)
|
43
|
+
], 8, I),
|
44
|
+
g(x, {
|
45
|
+
mode: "out-in",
|
46
|
+
name: "fade"
|
47
|
+
}, {
|
48
|
+
default: k(() => [
|
49
|
+
n.value ? (t(), l("ul", {
|
50
|
+
key: 0,
|
51
|
+
class: f([i.$attrs.class, "pos-absolute pos-l-0 z-index-5 w-100 mn-t-big"])
|
52
|
+
}, [
|
53
|
+
(t(!0), l(b, null, $(B(r), (m) => (t(), l("li", null, [
|
54
|
+
m ? (t(), l("span", {
|
55
|
+
key: 0,
|
56
|
+
onClick: (T) => w(m),
|
57
|
+
class: "w-100"
|
58
|
+
}, u(m.name || m), 9, M)) : v("", !0)
|
59
|
+
]))), 256))
|
60
|
+
], 2)) : v("", !0)
|
61
|
+
]),
|
62
|
+
_: 1
|
63
|
+
})
|
64
|
+
], 2),
|
65
|
+
g(x, {
|
66
|
+
mode: "out-in",
|
67
|
+
name: "fade"
|
68
|
+
}, {
|
69
|
+
default: k(() => [
|
70
|
+
e.validation ? (t(), l("div", N, " * " + u(e.validation.message), 1)) : v("", !0)
|
71
|
+
]),
|
72
|
+
_: 1
|
73
|
+
})
|
74
|
+
], 64);
|
75
|
+
};
|
76
|
+
}
|
77
|
+
}, F = /* @__PURE__ */ A(V, [["__scopeId", "data-v-a78dbba1"]]);
|
78
|
+
const j = { class: "flex-v-center flex-nowrap flex" }, z = {
|
79
|
+
key: 0,
|
80
|
+
class: "mn-r-auto t-transp mn-r-small"
|
81
|
+
}, E = ["name", "value", "checked"], L = {
|
82
|
+
__name: "Checkbox",
|
83
|
+
props: {
|
84
|
+
label: String,
|
85
|
+
name: String,
|
86
|
+
value: String,
|
87
|
+
radio: {
|
88
|
+
type: [Array, Boolean, Object],
|
89
|
+
default: () => []
|
90
|
+
}
|
91
|
+
},
|
92
|
+
emits: ["update:radio"],
|
93
|
+
setup(e, { emit: o }) {
|
94
|
+
const a = e, c = (n) => {
|
95
|
+
if (Array.isArray(a.radio)) {
|
96
|
+
let r = [...a.radio];
|
97
|
+
if (n.target.checked)
|
98
|
+
r.push(a.value);
|
99
|
+
else {
|
100
|
+
const d = r.indexOf(a.value);
|
101
|
+
d !== -1 && r.splice(d, 1);
|
102
|
+
}
|
103
|
+
o("update:radio", r);
|
104
|
+
} else
|
105
|
+
typeof a.radio == "boolean" && o("update:radio", n.target.checked);
|
106
|
+
};
|
107
|
+
return (n, r) => (t(), l("label", j, [
|
108
|
+
e.label ? (t(), l("div", z, [
|
109
|
+
s("span", null, u(e.label), 1)
|
110
|
+
])) : v("", !0),
|
111
|
+
s("input", {
|
112
|
+
onChange: c,
|
113
|
+
class: "round radiobutton",
|
114
|
+
type: "checkbox",
|
115
|
+
name: e.name,
|
116
|
+
value: e.value,
|
117
|
+
checked: Array.isArray(e.radio) ? e.radio.includes(e.value) : e.radio
|
118
|
+
}, null, 40, E),
|
119
|
+
s("div", {
|
120
|
+
class: f(["transition-elastic pd-thin h-2r w-4r radius-extra", {
|
121
|
+
"bg-grey": !(Array.isArray(e.radio) ? e.radio.includes(e.value) : e.radio),
|
122
|
+
"bg-main": Array.isArray(e.radio) ? e.radio.includes(e.value) : e.radio
|
123
|
+
}])
|
124
|
+
}, [
|
125
|
+
s("div", {
|
126
|
+
class: f(["transition-linear w-1r h-1r radius-extra h-100 bg-white", {
|
127
|
+
"mn-r-auto": !(Array.isArray(e.radio) ? e.radio.includes(e.value) : e.radio),
|
128
|
+
"mn-l-auto": Array.isArray(e.radio) ? e.radio.includes(e.value) : e.radio
|
129
|
+
}])
|
130
|
+
}, null, 2)
|
131
|
+
], 2)
|
132
|
+
]));
|
133
|
+
}
|
134
|
+
}, R = /* @__PURE__ */ A(L, [["__scopeId", "data-v-f641f618"]]);
|
135
|
+
export {
|
136
|
+
R as C,
|
137
|
+
F as S
|
138
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";const e=require("vue"),u=require("./auth-5aa8e90c.js");const v={key:0,class:"t-transp mn-r-small"},y=["onClick"],k=["onClick"],f={key:0,class:"mn-t-thin invalid-feedback"},h={__name:"Select",props:{label:String,select:[String,Object],placeholder:{type:String,default:"Please select an item"},options:{type:Array,default:()=>[]},validation:Boolean},emits:["update:select","focus","blur"],setup(t,{emit:r}){const a=t,o=e.ref(a.select),l=e.ref(!1);e.watch(()=>a.select,n=>{o.value=n});const c=e.computed(()=>a.select?a.options.filter(n=>n!==a.select):a.options),i=()=>{l.value=!l.value,r(l.value?"focus":"blur")},m=n=>{o.value=n,i(),r("update:select",o.value)};return(n,N)=>{var d;return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",{class:e.normalizeClass([n.$attrs.class,"flex-nowrap flex"])},[t.label?(e.openBlock(),e.createElementBlock("div",v,[e.createElementVNode("span",null,e.toDisplayString(t.label),1)])):e.createCommentVNode("",!0),e.createElementVNode("li",{onClick:e.withModifiers(i,["stop"]),class:"w-100"},[e.createElementVNode("span",null,e.toDisplayString(((d=o.value)==null?void 0:d.name)||o.value||t.placeholder),1)],8,y),e.createVNode(e.Transition,{mode:"out-in",name:"fade"},{default:e.withCtx(()=>[l.value?(e.openBlock(),e.createElementBlock("ul",{key:0,class:e.normalizeClass([n.$attrs.class,"pos-absolute pos-l-0 z-index-5 w-100 mn-t-big"])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(c),s=>(e.openBlock(),e.createElementBlock("li",null,[s?(e.openBlock(),e.createElementBlock("span",{key:0,onClick:S=>m(s),class:"w-100"},e.toDisplayString(s.name||s),9,k)):e.createCommentVNode("",!0)]))),256))],2)):e.createCommentVNode("",!0)]),_:1})],2),e.createVNode(e.Transition,{mode:"out-in",name:"fade"},{default:e.withCtx(()=>[t.validation?(e.openBlock(),e.createElementBlock("div",f," * "+e.toDisplayString(t.validation.message),1)):e.createCommentVNode("",!0)]),_:1})],64)}}},b=u._export_sfc(h,[["__scopeId","data-v-a78dbba1"]]);const g={class:"flex-v-center flex-nowrap flex"},x={key:0,class:"mn-r-auto t-transp mn-r-small"},B=["name","value","checked"],C={__name:"Checkbox",props:{label:String,name:String,value:String,radio:{type:[Array,Boolean,Object],default:()=>[]}},emits:["update:radio"],setup(t,{emit:r}){const a=t,o=l=>{if(Array.isArray(a.radio)){let c=[...a.radio];if(l.target.checked)c.push(a.value);else{const i=c.indexOf(a.value);i!==-1&&c.splice(i,1)}r("update:radio",c)}else typeof a.radio=="boolean"&&r("update:radio",l.target.checked)};return(l,c)=>(e.openBlock(),e.createElementBlock("label",g,[t.label?(e.openBlock(),e.createElementBlock("div",x,[e.createElementVNode("span",null,e.toDisplayString(t.label),1)])):e.createCommentVNode("",!0),e.createElementVNode("input",{onChange:o,class:"round radiobutton",type:"checkbox",name:t.name,value:t.value,checked:Array.isArray(t.radio)?t.radio.includes(t.value):t.radio},null,40,B),e.createElementVNode("div",{class:e.normalizeClass(["transition-elastic pd-thin h-2r w-4r radius-extra",{"bg-grey":!(Array.isArray(t.radio)?t.radio.includes(t.value):t.radio),"bg-main":Array.isArray(t.radio)?t.radio.includes(t.value):t.radio}])},[e.createElementVNode("div",{class:e.normalizeClass(["transition-linear w-1r h-1r radius-extra h-100 bg-white",{"mn-r-auto":!(Array.isArray(t.radio)?t.radio.includes(t.value):t.radio),"mn-l-auto":Array.isArray(t.radio)?t.radio.includes(t.value):t.radio}])},null,2)],2)]))}},E=u._export_sfc(C,[["__scopeId","data-v-f641f618"]]);exports.Checkbox=E;exports.Select=b;
|
@@ -0,0 +1,130 @@
|
|
1
|
+
import { reactive as d, watch as b, openBlock as h, createBlock as y, withCtx as _, createTextVNode as f, toDisplayString as g } from "vue";
|
2
|
+
import { a as w, _ as I, b as M } from "./auth-18f80fef.mjs";
|
3
|
+
import { s as p } from "./globals-f538c0ef.mjs";
|
4
|
+
const l = w.create({
|
5
|
+
baseURL: process.env.API_URL,
|
6
|
+
withCredentials: !0
|
7
|
+
}), i = d({
|
8
|
+
memberships: [],
|
9
|
+
error: null
|
10
|
+
}), u = {
|
11
|
+
async read({ user: r, type: e, target: t, role: s }) {
|
12
|
+
try {
|
13
|
+
const o = await l.get("/api/memberships", { params: { user: r, type: e, target: t, role: s } });
|
14
|
+
return i.error = null, i.memberships = o.data, Promise.resolve(o.data);
|
15
|
+
} catch (o) {
|
16
|
+
return p(o), Promise.reject(o);
|
17
|
+
}
|
18
|
+
},
|
19
|
+
async create(r) {
|
20
|
+
try {
|
21
|
+
const e = await l.post("/api/memberships/create", r);
|
22
|
+
return i.error = null, Promise.resolve(e.data);
|
23
|
+
} catch (e) {
|
24
|
+
return p(e), Promise.reject(e);
|
25
|
+
}
|
26
|
+
},
|
27
|
+
async update(r) {
|
28
|
+
try {
|
29
|
+
const e = await l.post("/api/memberships/update", r);
|
30
|
+
return i.error = null, Promise.resolve(e.data);
|
31
|
+
} catch (e) {
|
32
|
+
return p(e), Promise.reject(e);
|
33
|
+
}
|
34
|
+
},
|
35
|
+
async delete(r) {
|
36
|
+
try {
|
37
|
+
const e = await l.post("/api/memberships/delete", r);
|
38
|
+
return i.error = null, Promise.resolve(e.data);
|
39
|
+
} catch (e) {
|
40
|
+
return p(e), Promise.reject(e);
|
41
|
+
}
|
42
|
+
}
|
43
|
+
}, P = {
|
44
|
+
handleMembershipUpdate(r, e, t) {
|
45
|
+
let s;
|
46
|
+
if (Array.isArray(r) ? s = r.find((o) => o._id === e.target) : typeof r == "object" && r._id === e.target && (s = r), s)
|
47
|
+
if (s.isMember = t, t)
|
48
|
+
s.memberships.push(e), s.numberOfMemberships += 1;
|
49
|
+
else {
|
50
|
+
const o = s.memberships.findIndex((m) => m._id === e._id);
|
51
|
+
o !== -1 && (s.memberships.splice(o, 1), s.numberOfMemberships -= 1);
|
52
|
+
}
|
53
|
+
}
|
54
|
+
};
|
55
|
+
b(i, (r) => {
|
56
|
+
});
|
57
|
+
const S = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
58
|
+
__proto__: null,
|
59
|
+
actions: u,
|
60
|
+
mutations: P,
|
61
|
+
state: i
|
62
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
63
|
+
const v = {
|
64
|
+
__name: "ButtonFollow",
|
65
|
+
props: {
|
66
|
+
type: {
|
67
|
+
type: String,
|
68
|
+
required: !0
|
69
|
+
},
|
70
|
+
userId: {
|
71
|
+
type: String,
|
72
|
+
required: !0
|
73
|
+
},
|
74
|
+
isMember: {
|
75
|
+
type: Boolean,
|
76
|
+
required: !0
|
77
|
+
},
|
78
|
+
targetId: {
|
79
|
+
type: String,
|
80
|
+
required: !0
|
81
|
+
}
|
82
|
+
},
|
83
|
+
emits: ["updateMembership"],
|
84
|
+
setup(r, { emit: e }) {
|
85
|
+
const t = r, s = async () => {
|
86
|
+
t.isMember ? await m(t.targetId) : await o(t.targetId);
|
87
|
+
};
|
88
|
+
async function o(c) {
|
89
|
+
try {
|
90
|
+
const a = {
|
91
|
+
type: t.type,
|
92
|
+
target: c,
|
93
|
+
user: t.userId
|
94
|
+
}, n = await u.create(a);
|
95
|
+
e("updateMembership", { membership: n, isMember: !0, targetId: t.targetId });
|
96
|
+
} catch (a) {
|
97
|
+
throw console.log(a), a;
|
98
|
+
}
|
99
|
+
}
|
100
|
+
async function m(c) {
|
101
|
+
const a = {
|
102
|
+
type: t.type,
|
103
|
+
target: c,
|
104
|
+
user: t.userId
|
105
|
+
};
|
106
|
+
try {
|
107
|
+
const n = await u.delete(a);
|
108
|
+
e("updateMembership", { membership: n, isMember: !1, targetId: t.targetId });
|
109
|
+
} catch (n) {
|
110
|
+
throw console.log(n), n;
|
111
|
+
}
|
112
|
+
}
|
113
|
+
return (c, a) => (h(), y(M, {
|
114
|
+
submit: s,
|
115
|
+
class: "bg-main button-small button"
|
116
|
+
}, {
|
117
|
+
default: _(() => [
|
118
|
+
f(g(r.isMember ? "Unfollow" : "Follow"), 1)
|
119
|
+
]),
|
120
|
+
_: 1
|
121
|
+
}));
|
122
|
+
}
|
123
|
+
}, F = /* @__PURE__ */ I(v, [["__scopeId", "data-v-c50e046c"]]);
|
124
|
+
export {
|
125
|
+
F as B,
|
126
|
+
u as a,
|
127
|
+
S as b,
|
128
|
+
P as m,
|
129
|
+
i as s
|
130
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";const n=require("vue"),b=require("./auth-5aa8e90c.js"),u=require("./globals-928eb13c.js"),p=b.axios.create({baseURL:process.env.API_URL,withCredentials:!0}),a=n.reactive({memberships:[],error:null}),m={async read({user:r,type:e,target:t,role:s}){try{const o=await p.get("/api/memberships",{params:{user:r,type:e,target:t,role:s}});return a.error=null,a.memberships=o.data,Promise.resolve(o.data)}catch(o){return u.setError(o),Promise.reject(o)}},async create(r){try{const e=await p.post("/api/memberships/create",r);return a.error=null,Promise.resolve(e.data)}catch(e){return u.setError(e),Promise.reject(e)}},async update(r){try{const e=await p.post("/api/memberships/update",r);return a.error=null,Promise.resolve(e.data)}catch(e){return u.setError(e),Promise.reject(e)}},async delete(r){try{const e=await p.post("/api/memberships/delete",r);return a.error=null,Promise.resolve(e.data)}catch(e){return u.setError(e),Promise.reject(e)}}},h={handleMembershipUpdate(r,e,t){let s;if(Array.isArray(r)?s=r.find(o=>o._id===e.target):typeof r=="object"&&r._id===e.target&&(s=r),s)if(s.isMember=t,t)s.memberships.push(e),s.numberOfMemberships+=1;else{const o=s.memberships.findIndex(d=>d._id===e._id);o!==-1&&(s.memberships.splice(o,1),s.numberOfMemberships-=1)}}};n.watch(a,r=>{});const y=Object.freeze(Object.defineProperty({__proto__:null,actions:m,mutations:h,state:a},Symbol.toStringTag,{value:"Module"}));const _={__name:"ButtonFollow",props:{type:{type:String,required:!0},userId:{type:String,required:!0},isMember:{type:Boolean,required:!0},targetId:{type:String,required:!0}},emits:["updateMembership"],setup(r,{emit:e}){const t=r,s=async()=>{t.isMember?await d(t.targetId):await o(t.targetId)};async function o(l){try{const i={type:t.type,target:l,user:t.userId},c=await m.create(i);e("updateMembership",{membership:c,isMember:!0,targetId:t.targetId})}catch(i){throw console.log(i),i}}async function d(l){const i={type:t.type,target:l,user:t.userId};try{const c=await m.delete(i);e("updateMembership",{membership:c,isMember:!1,targetId:t.targetId})}catch(c){throw console.log(c),c}}return(l,i)=>(n.openBlock(),n.createBlock(b._sfc_main,{submit:s,class:"bg-main button-small button"},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(r.isMember?"Unfollow":"Follow"),1)]),_:1}))}},g=b._export_sfc(_,[["__scopeId","data-v-c50e046c"]]);exports.ButtonFollow=g;exports.actions=m;exports.memberships=y;exports.mutations=h;exports.state=a;
|
@@ -0,0 +1,130 @@
|
|
1
|
+
import { reactive as d, watch as b, openBlock as h, createBlock as y, withCtx as _, createTextVNode as f, toDisplayString as g } from "vue";
|
2
|
+
import { a as w, _ as I, b as M } from "./auth-8b5aac7a.mjs";
|
3
|
+
import { s as p } from "./globals-96ba60e4.mjs";
|
4
|
+
const l = w.create({
|
5
|
+
baseURL: process.env.API_URL,
|
6
|
+
withCredentials: !0
|
7
|
+
}), i = d({
|
8
|
+
memberships: [],
|
9
|
+
error: null
|
10
|
+
}), u = {
|
11
|
+
async read({ user: r, type: e, target: t, role: s }) {
|
12
|
+
try {
|
13
|
+
const o = await l.get("/api/memberships", { params: { user: r, type: e, target: t, role: s } });
|
14
|
+
return i.error = null, i.memberships = o.data, Promise.resolve(o.data);
|
15
|
+
} catch (o) {
|
16
|
+
return p(o), Promise.reject(o);
|
17
|
+
}
|
18
|
+
},
|
19
|
+
async create(r) {
|
20
|
+
try {
|
21
|
+
const e = await l.post("/api/memberships/create", r);
|
22
|
+
return i.error = null, Promise.resolve(e.data);
|
23
|
+
} catch (e) {
|
24
|
+
return p(e), Promise.reject(e);
|
25
|
+
}
|
26
|
+
},
|
27
|
+
async update(r) {
|
28
|
+
try {
|
29
|
+
const e = await l.post("/api/memberships/update", r);
|
30
|
+
return i.error = null, Promise.resolve(e.data);
|
31
|
+
} catch (e) {
|
32
|
+
return p(e), Promise.reject(e);
|
33
|
+
}
|
34
|
+
},
|
35
|
+
async delete(r) {
|
36
|
+
try {
|
37
|
+
const e = await l.post("/api/memberships/delete", r);
|
38
|
+
return i.error = null, Promise.resolve(e.data);
|
39
|
+
} catch (e) {
|
40
|
+
return p(e), Promise.reject(e);
|
41
|
+
}
|
42
|
+
}
|
43
|
+
}, P = {
|
44
|
+
handleMembershipUpdate(r, e, t) {
|
45
|
+
let s;
|
46
|
+
if (Array.isArray(r) ? s = r.find((o) => o._id === e.target) : typeof r == "object" && r._id === e.target && (s = r), s)
|
47
|
+
if (s.isMember = t, t)
|
48
|
+
s.memberships.push(e), s.numberOfMemberships += 1;
|
49
|
+
else {
|
50
|
+
const o = s.memberships.findIndex((m) => m._id === e._id);
|
51
|
+
o !== -1 && (s.memberships.splice(o, 1), s.numberOfMemberships -= 1);
|
52
|
+
}
|
53
|
+
}
|
54
|
+
};
|
55
|
+
b(i, (r) => {
|
56
|
+
});
|
57
|
+
const S = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
58
|
+
__proto__: null,
|
59
|
+
actions: u,
|
60
|
+
mutations: P,
|
61
|
+
state: i
|
62
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
63
|
+
const v = {
|
64
|
+
__name: "ButtonFollow",
|
65
|
+
props: {
|
66
|
+
type: {
|
67
|
+
type: String,
|
68
|
+
required: !0
|
69
|
+
},
|
70
|
+
userId: {
|
71
|
+
type: String,
|
72
|
+
required: !0
|
73
|
+
},
|
74
|
+
isMember: {
|
75
|
+
type: Boolean,
|
76
|
+
required: !0
|
77
|
+
},
|
78
|
+
targetId: {
|
79
|
+
type: String,
|
80
|
+
required: !0
|
81
|
+
}
|
82
|
+
},
|
83
|
+
emits: ["updateMembership"],
|
84
|
+
setup(r, { emit: e }) {
|
85
|
+
const t = r, s = async () => {
|
86
|
+
t.isMember ? await m(t.targetId) : await o(t.targetId);
|
87
|
+
};
|
88
|
+
async function o(c) {
|
89
|
+
try {
|
90
|
+
const a = {
|
91
|
+
type: t.type,
|
92
|
+
target: c,
|
93
|
+
user: t.userId
|
94
|
+
}, n = await u.create(a);
|
95
|
+
e("updateMembership", { membership: n, isMember: !0, targetId: t.targetId });
|
96
|
+
} catch (a) {
|
97
|
+
throw console.log(a), a;
|
98
|
+
}
|
99
|
+
}
|
100
|
+
async function m(c) {
|
101
|
+
const a = {
|
102
|
+
type: t.type,
|
103
|
+
target: c,
|
104
|
+
user: t.userId
|
105
|
+
};
|
106
|
+
try {
|
107
|
+
const n = await u.delete(a);
|
108
|
+
e("updateMembership", { membership: n, isMember: !1, targetId: t.targetId });
|
109
|
+
} catch (n) {
|
110
|
+
throw console.log(n), n;
|
111
|
+
}
|
112
|
+
}
|
113
|
+
return (c, a) => (h(), y(M, {
|
114
|
+
submit: s,
|
115
|
+
class: "bg-main button-small button"
|
116
|
+
}, {
|
117
|
+
default: _(() => [
|
118
|
+
f(g(r.isMember ? "Unfollow" : "Follow"), 1)
|
119
|
+
]),
|
120
|
+
_: 1
|
121
|
+
}));
|
122
|
+
}
|
123
|
+
}, F = /* @__PURE__ */ I(v, [["__scopeId", "data-v-c50e046c"]]);
|
124
|
+
export {
|
125
|
+
F as B,
|
126
|
+
u as a,
|
127
|
+
S as b,
|
128
|
+
P as m,
|
129
|
+
i as s
|
130
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";const n=require("vue"),b=require("./auth-78fd9408.js"),u=require("./globals-d7a54bb4.js"),p=b.axios.create({baseURL:process.env.API_URL,withCredentials:!0}),a=n.reactive({memberships:[],error:null}),m={async read({user:r,type:e,target:t,role:s}){try{const o=await p.get("/api/memberships",{params:{user:r,type:e,target:t,role:s}});return a.error=null,a.memberships=o.data,Promise.resolve(o.data)}catch(o){return u.setError(o),Promise.reject(o)}},async create(r){try{const e=await p.post("/api/memberships/create",r);return a.error=null,Promise.resolve(e.data)}catch(e){return u.setError(e),Promise.reject(e)}},async update(r){try{const e=await p.post("/api/memberships/update",r);return a.error=null,Promise.resolve(e.data)}catch(e){return u.setError(e),Promise.reject(e)}},async delete(r){try{const e=await p.post("/api/memberships/delete",r);return a.error=null,Promise.resolve(e.data)}catch(e){return u.setError(e),Promise.reject(e)}}},h={handleMembershipUpdate(r,e,t){let s;if(Array.isArray(r)?s=r.find(o=>o._id===e.target):typeof r=="object"&&r._id===e.target&&(s=r),s)if(s.isMember=t,t)s.memberships.push(e),s.numberOfMemberships+=1;else{const o=s.memberships.findIndex(d=>d._id===e._id);o!==-1&&(s.memberships.splice(o,1),s.numberOfMemberships-=1)}}};n.watch(a,r=>{});const y=Object.freeze(Object.defineProperty({__proto__:null,actions:m,mutations:h,state:a},Symbol.toStringTag,{value:"Module"}));const _={__name:"ButtonFollow",props:{type:{type:String,required:!0},userId:{type:String,required:!0},isMember:{type:Boolean,required:!0},targetId:{type:String,required:!0}},emits:["updateMembership"],setup(r,{emit:e}){const t=r,s=async()=>{t.isMember?await d(t.targetId):await o(t.targetId)};async function o(l){try{const i={type:t.type,target:l,user:t.userId},c=await m.create(i);e("updateMembership",{membership:c,isMember:!0,targetId:t.targetId})}catch(i){throw console.log(i),i}}async function d(l){const i={type:t.type,target:l,user:t.userId};try{const c=await m.delete(i);e("updateMembership",{membership:c,isMember:!1,targetId:t.targetId})}catch(c){throw console.log(c),c}}return(l,i)=>(n.openBlock(),n.createBlock(b._sfc_main,{submit:s,class:"bg-main button-small button"},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(r.isMember?"Unfollow":"Follow"),1)]),_:1}))}},g=b._export_sfc(_,[["__scopeId","data-v-c50e046c"]]);exports.ButtonFollow=g;exports.actions=m;exports.memberships=y;exports.mutations=h;exports.state=a;
|
@@ -0,0 +1,76 @@
|
|
1
|
+
import { openBlock as t, createElementBlock as r, createElementVNode as n, withModifiers as w, createCommentVNode as o, createBlock as y, toDisplayString as m, Fragment as b, renderList as x, normalizeStyle as k } from "vue";
|
2
|
+
import { useRouter as p } from "vue-router";
|
3
|
+
import { P as $ } from "./PlaceholderUserpic-1a6cf257.mjs";
|
4
|
+
const v = {
|
5
|
+
key: 0,
|
6
|
+
class: "pd-b-zero"
|
7
|
+
}, M = { class: "w-100 flex-v-center flex-nojustify flex" }, z = ["src"], P = {
|
8
|
+
key: 2,
|
9
|
+
class: "t-semi"
|
10
|
+
}, D = { key: 0 }, F = { key: 1 }, B = { class: "d-block mn-l-auto flex-nowrap flex flex-v-center" }, C = {
|
11
|
+
key: 0,
|
12
|
+
class: "w-4r i-thin"
|
13
|
+
}, E = {
|
14
|
+
style: { position: "absolute", top: "0px", right: "0px" },
|
15
|
+
class: "br-solid br-2px br-white z-index-1 radius-big i-thin bg-second flex flex-center t-white p-small mn-r-small t-semi"
|
16
|
+
}, N = ["src"], j = {
|
17
|
+
__name: "CardHeader",
|
18
|
+
props: [
|
19
|
+
"date",
|
20
|
+
"dateFormatted",
|
21
|
+
"owner",
|
22
|
+
"creator",
|
23
|
+
"members",
|
24
|
+
"membersPhotos",
|
25
|
+
"type"
|
26
|
+
],
|
27
|
+
setup(e) {
|
28
|
+
p();
|
29
|
+
function f(h) {
|
30
|
+
const i = /* @__PURE__ */ new Date(), a = new Date(h), s = Math.abs(i - a), g = Math.floor(s / 1e3), l = Math.floor(g / 60), c = Math.floor(l / 60), d = Math.floor(c / 24), u = Math.floor(d / 7);
|
31
|
+
return u > 0 ? `${u} week${u > 1 ? "s" : ""} ago` : d > 0 ? `${d} day${d > 1 ? "s" : ""} ago` : c > 0 ? `${c} hour${c > 1 ? "s" : ""} ago` : l > 0 ? `${l} minute${l > 1 ? "s" : ""} ago` : "Just now";
|
32
|
+
}
|
33
|
+
return (h, i) => e.owner ? (t(), r("header", v, [
|
34
|
+
n("div", M, [
|
35
|
+
n("div", {
|
36
|
+
onClick: i[0] || (i[0] = w((a) => h.$router.push({
|
37
|
+
name: e.owner.type === "user" ? "User Profile" : "Organization",
|
38
|
+
params: {
|
39
|
+
_id: e.owner.target._id
|
40
|
+
}
|
41
|
+
}), ["stop"])),
|
42
|
+
class: "w-100 flex-nowrap flex-v-center flex"
|
43
|
+
}, [
|
44
|
+
e.owner.target.profile.photo.length > 0 && e.type !== "short" ? (t(), r("img", {
|
45
|
+
key: 0,
|
46
|
+
src: e.owner.target.profile.photo,
|
47
|
+
class: "radius-medium mn-r-thin i-thin"
|
48
|
+
}, null, 8, z)) : o("", !0),
|
49
|
+
!e.owner.target.profile.photo && e.type !== "short" ? (t(), y($, {
|
50
|
+
key: 1,
|
51
|
+
class: "radius-medium mn-r-thin i-thin"
|
52
|
+
})) : o("", !0),
|
53
|
+
e.type !== "short" ? (t(), r("span", P, [
|
54
|
+
n("span", null, m(e.owner.target.profile.name), 1),
|
55
|
+
e.date ? (t(), r("span", D, " · " + m(f(e.date)), 1)) : o("", !0),
|
56
|
+
e.dateFormatted ? (t(), r("span", F, " · " + m(e.dateFormatted), 1)) : o("", !0)
|
57
|
+
])) : o("", !0),
|
58
|
+
n("div", B, [
|
59
|
+
e.members ? (t(), r("div", C, [
|
60
|
+
n("span", E, m(e.members), 1),
|
61
|
+
(t(!0), r(b, null, x(e.membersPhotos.slice(0, 2), (a, s) => (t(), r("img", {
|
62
|
+
key: s,
|
63
|
+
src: a,
|
64
|
+
style: k({ position: "absolute", top: "0px", right: s * 20 + 40 + "%", zIndex: 1 - s }),
|
65
|
+
class: "br-solid br-2px br-white i-thin bg-grey radius-big"
|
66
|
+
}, null, 12, N))), 128))
|
67
|
+
])) : o("", !0)
|
68
|
+
])
|
69
|
+
])
|
70
|
+
])
|
71
|
+
])) : o("", !0);
|
72
|
+
}
|
73
|
+
};
|
74
|
+
export {
|
75
|
+
j as _
|
76
|
+
};
|