@ozdao/prometheus-framework 0.0.87 → 0.0.89
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/Breadcrumbs.vue_vue_type_style_index_0_lang-300fcb55.js +1 -0
- package/dist/Breadcrumbs.vue_vue_type_style_index_0_lang-afba007a.mjs +1944 -0
- package/dist/ButtonFollow-001c4a65.mjs +130 -0
- package/dist/ButtonFollow-48043cc7.js +1 -0
- package/dist/CardHeader-0677d446.js +1 -0
- package/dist/CardHeader-e361dada.mjs +96 -0
- package/dist/CardOrganization-51309400.js +1 -0
- package/dist/CardOrganization-bacc2ef6.mjs +202 -0
- package/dist/Feed-4b28adc5.mjs +423 -0
- package/dist/Feed-51e4e232.js +1 -0
- package/dist/Feed-5d8d5c21.js +1 -0
- package/dist/Feed-76b2997e.mjs +367 -0
- package/dist/Feed-dc8b66bf.mjs +367 -0
- package/dist/Feed-eeb63363.js +1 -0
- package/dist/IconEdit-3028a3b7.js +1 -0
- package/dist/IconEdit-8df23653.mjs +205 -0
- package/dist/Image-30f04604.js +9 -0
- package/dist/Image-6c7584f5.mjs +477 -0
- package/dist/Image-6ec294f3.mjs +477 -0
- package/dist/Image-9a870c88.js +9 -0
- package/dist/PlaceholderUserpic-10fd9026.js +1 -0
- package/dist/PlaceholderUserpic-eb9820ce.mjs +28 -0
- package/dist/Popup-7c331e1c.js +1 -0
- package/dist/Popup-bdf043ba.mjs +76 -0
- package/dist/Product-1724d88d.mjs +837 -0
- package/dist/Product-a94d8b65.js +7 -0
- package/dist/Product-b233e2a3.js +7 -0
- package/dist/Product-eb00f35e.mjs +837 -0
- package/dist/ProductEdit-57484f1e.mjs +349 -0
- package/dist/ProductEdit-61413d02.mjs +349 -0
- package/dist/ProductEdit-ef301baa.js +1 -0
- package/dist/ProductEdit-fca68ff9.js +1 -0
- package/dist/ProfileBlogposts-6704a38c.js +1 -0
- package/dist/ProfileBlogposts-775b1cfa.mjs +63 -0
- package/dist/ProfileComments-175e42da.js +1 -0
- package/dist/ProfileComments-fd7d66bf.mjs +43 -0
- package/dist/ProfileEvents-1cfe6858.mjs +55 -0
- package/dist/ProfileEvents-4f2a5f00.js +1 -0
- package/dist/ProfileEvents-7a51a9e6.mjs +55 -0
- package/dist/ProfileEvents-d8e16509.js +1 -0
- package/dist/ProfileLikes-20a8a3c9.mjs +43 -0
- package/dist/ProfileLikes-b3b1350a.js +1 -0
- package/dist/ProfileOrganizations-4b866823.mjs +211 -0
- package/dist/ProfileOrganizations-6d3a43e4.js +1 -0
- package/dist/Publics-0e44c61e.mjs +122 -0
- package/dist/Publics-4e1c14fc.js +1 -0
- package/dist/Tab-a243605d.mjs +46 -0
- package/dist/UploadImage-6e312c46.mjs +83 -0
- package/dist/UploadImage-9e7e7468.js +1 -0
- package/dist/auth-2bc18d1e.js +8 -0
- package/dist/auth-fefd15a3.mjs +1503 -0
- package/dist/auth.client.cjs +1 -1
- package/dist/auth.client.js +5 -5
- package/dist/auth.validation-4a617c0b.mjs +20 -0
- package/dist/auth.validation-78a90fed.js +1 -0
- package/dist/community.client.cjs +1 -1
- package/dist/community.client.js +206 -222
- package/dist/components/Field/Field.vue.d.ts.map +1 -1
- package/dist/components/FieldPhone/FieldPhone(script-setup).vue.d.ts +3 -3
- package/dist/components/FieldPhone/FieldPhone.vue.d.ts +1 -1
- package/dist/events.client.cjs +1 -1
- package/dist/events.client.js +332 -312
- package/dist/events.server.js +77 -0
- package/dist/events.server.mjs +77 -0
- package/dist/inputs.validation-14e8e01f.mjs +93 -0
- package/dist/main.css +1 -1
- package/dist/organizations-1581c013.mjs +121 -0
- package/dist/organizations-c455dad7.js +1 -0
- package/dist/organizations.client-040ec107.js +3 -0
- package/dist/organizations.client-686845be.mjs +3179 -0
- package/dist/organizations.client-7937e180.mjs +3037 -0
- package/dist/organizations.client-99bfc474.js +3 -0
- package/dist/organizations.client.cjs +1 -1
- package/dist/organizations.client.js +39 -39
- package/dist/organizations.server.js +7 -3
- package/dist/organizations.server.mjs +7 -3
- package/dist/prometheus-framework.cjs.js +1 -1
- package/dist/prometheus-framework.es.js +3 -2
- package/dist/style.css +1 -1
- package/dist/users.client.cjs +1 -1
- package/dist/users.client.js +265 -256
- package/dist/users.server.js +2 -2
- package/dist/users.server.mjs +2 -2
- package/package.json +1 -1
- package/src/components/Field/Field.vue +2 -1
- package/src/modules/community/components/pages/CreateBlogPost.vue +2 -1
- package/src/modules/events/components/blocks/CardEvent.vue +1 -1
- package/src/modules/events/components/pages/EditEvent.vue +9 -3
- package/src/modules/events/components/pages/Event.vue +43 -4
- package/src/modules/events/middlewares/server/index.js +10 -0
- package/src/modules/events/middlewares/server/verifyEvent.js +60 -0
- package/src/modules/events/routes/events.routes.js +14 -1
- package/src/modules/organizations/components/blocks/Socials.vue +16 -3
- package/src/modules/organizations/components/pages/OrganizationEdit.vue +39 -15
- package/src/modules/organizations/components/sections/DetailsTab.vue +13 -9
- package/src/modules/organizations/controllers/organizations.controller.js +1 -1
- package/src/modules/organizations/models/organization.model.js +6 -2
- package/src/modules/organizations/store/organizations.js +2 -2
- package/src/modules/users/components/pages/Profile.vue +26 -11
- package/src/modules/users/components/pages/ProfileEdit.vue +28 -10
- package/src/modules/users/models/user.model.js +2 -2
- package/src/modules/users/store/users.js +1 -2
package/dist/users.server.js
CHANGED
package/dist/users.server.mjs
CHANGED
package/package.json
CHANGED
@@ -22,6 +22,7 @@
|
|
22
22
|
/>
|
23
23
|
|
24
24
|
<h3 class="mn-small">Date</h3>
|
25
|
+
{{event.date.start}}
|
25
26
|
<Field
|
26
27
|
v-model:field="event.date.start"
|
27
28
|
label="Start"
|
@@ -39,7 +40,7 @@
|
|
39
40
|
/>
|
40
41
|
|
41
42
|
<h3 class="mn-small">Description</h3>
|
42
|
-
<section v-if="event" class="w-100 bg-grey pd-big radius-big">
|
43
|
+
<section v-if="event" class="pd-b-extra w-100 bg-grey pd-big radius-big">
|
43
44
|
<Constructor
|
44
45
|
:content="event.content"
|
45
46
|
@update="update => event.content = update"
|
@@ -127,6 +128,10 @@ onMounted(async () =>{
|
|
127
128
|
if (route.params.url) {
|
128
129
|
const data = await events.read({ user: auth.state.user._id, url: route.params.url });
|
129
130
|
event.value = data.pop();
|
131
|
+
|
132
|
+
event.value.date.start = event.value.date.start.slice(0, 16);
|
133
|
+
event.value.date.end = event.value.date.end.slice(0, 16);
|
134
|
+
|
130
135
|
} else {
|
131
136
|
events.clean();
|
132
137
|
event.value = events.state.current;
|
@@ -151,7 +156,8 @@ onMounted(async () =>{
|
|
151
156
|
|
152
157
|
const dataPublics = await organizations.actions.read({
|
153
158
|
user: auth.state.user._id,
|
154
|
-
postable: auth.state.user._id
|
159
|
+
postable: auth.state.user._id,
|
160
|
+
limit: 100
|
155
161
|
})
|
156
162
|
|
157
163
|
publics.value = dataPublics.map(publicItem => ({
|
@@ -231,7 +237,7 @@ function onSubmit() {
|
|
231
237
|
} else {
|
232
238
|
events.create(event.value)
|
233
239
|
.then(response => {
|
234
|
-
router.push({ name: '
|
240
|
+
router.push({ name: 'Event', params: { url: response.url } });
|
235
241
|
})
|
236
242
|
.catch(error => {
|
237
243
|
console.log(error);
|
@@ -27,10 +27,7 @@
|
|
27
27
|
:owner="event.owner"
|
28
28
|
:user="auth.state.user._id"
|
29
29
|
:type="'normal'"
|
30
|
-
class="mn-medium"
|
31
|
-
:class="{
|
32
|
-
'br-b br-solid br-black-transp-10': index !== event.length - 1
|
33
|
-
}"
|
30
|
+
class="mn-medium bg-grey radius-big"
|
34
31
|
>
|
35
32
|
<ButtonJoin
|
36
33
|
v-if="auth.state.user._id"
|
@@ -41,6 +38,23 @@
|
|
41
38
|
class="mn-small w-100 pd-medium mn-auto"
|
42
39
|
@updateTicket="handleTicketUpdate"
|
43
40
|
/>
|
41
|
+
|
42
|
+
<section>
|
43
|
+
<component
|
44
|
+
v-if="event && event.content"
|
45
|
+
v-for="(block, index) in event.content"
|
46
|
+
:is="ComponentMap[block.type]"
|
47
|
+
:key="index"
|
48
|
+
:index="index"
|
49
|
+
:component="block"
|
50
|
+
:prop="block"
|
51
|
+
:class="block.class"
|
52
|
+
content="content"
|
53
|
+
v-bind="getBlockProps(block)"
|
54
|
+
class="mn-regular"
|
55
|
+
/>
|
56
|
+
</section>
|
57
|
+
|
44
58
|
</CardEvent>
|
45
59
|
|
46
60
|
|
@@ -68,6 +82,8 @@
|
|
68
82
|
import ButtonJoin from '@pf/src/modules/events/components/elements/ButtonJoin.vue';
|
69
83
|
import Comments from '@pf/src/modules/community/components/sections/Comments.vue';
|
70
84
|
|
85
|
+
import Image from '@pf/src/modules/constructor/components/elements/Image.vue';
|
86
|
+
|
71
87
|
import * as events from '@pf/src/modules/events/store/events.js';
|
72
88
|
import * as tickets from '@pf/src/modules/events/store/tickets.js';
|
73
89
|
import * as auth from '@pf/src/modules/auth/store/auth';
|
@@ -80,6 +96,29 @@
|
|
80
96
|
tickets.mutations.handleTicketUpdate(event.value, ticket, hasTicket, targetId);
|
81
97
|
};
|
82
98
|
|
99
|
+
|
100
|
+
const ComponentMap = {
|
101
|
+
'Textarea': 'p',
|
102
|
+
'H2': 'h2',
|
103
|
+
'Bullets': 'p',
|
104
|
+
'Caption': 'p',
|
105
|
+
'ImageUpload': Image
|
106
|
+
};
|
107
|
+
|
108
|
+
function getBlockProps(block) {
|
109
|
+
if (block.type === 'Textarea') {
|
110
|
+
return { innerHTML: block.content, class: "p-medium" };
|
111
|
+
} else if (block.type === 'H2') {
|
112
|
+
return { innerHTML: block.content, class: "h3" };
|
113
|
+
} else if (block.type === 'Caption') {
|
114
|
+
return { innerHTML: block.content };
|
115
|
+
} else if (block.type === 'ImageUpload') {
|
116
|
+
return { src: block.content };
|
117
|
+
}
|
118
|
+
return {};
|
119
|
+
}
|
120
|
+
|
121
|
+
|
83
122
|
const event = ref(null);
|
84
123
|
const isLoading = ref(true);
|
85
124
|
|
@@ -0,0 +1,60 @@
|
|
1
|
+
// middlewareFactory.js
|
2
|
+
const middlewareFactory = (db) => {
|
3
|
+
const Event = db.event; // Изменено с Blogpost на Event
|
4
|
+
|
5
|
+
const checkEventExistOrNot = async (req, res, next) => { // Изменено с checkBlogpostExistOrNot на checkEventExistOrNot
|
6
|
+
try {
|
7
|
+
// Обработка URL
|
8
|
+
const url = req.body.url
|
9
|
+
? req.body.url
|
10
|
+
: req.body.name.toLowerCase().replace(/ /g, '-').replace(/[^\w-]+/g, '');
|
11
|
+
|
12
|
+
// Создание события
|
13
|
+
if (!req.body._id) { // Логика создания события может отличаться от логики создания блога
|
14
|
+
const event = await Event.findOne({ url }); // Изменено с Blogpost на Event
|
15
|
+
if (event) { // Изменено с blogpost на event
|
16
|
+
res.status(400).send({ errorCode: 'EVENT_URL_ALREADY_IN_USE', accessToken: null }); // Изменено с POST_URL_ALREADY_IN_USE на EVENT_URL_ALREADY_IN_USE
|
17
|
+
return;
|
18
|
+
}
|
19
|
+
next();
|
20
|
+
return;
|
21
|
+
}
|
22
|
+
|
23
|
+
// Обновление события
|
24
|
+
const updatingEventId = req.body._id; // Изменено с updatingBlogpostId на updatingEventId
|
25
|
+
const existingEvent = await Event.findById(updatingEventId); // Изменено с Blogpost на Event и с existingBlogpost на existingEvent
|
26
|
+
if (!existingEvent) { // Изменено с existingBlogpost на existingEvent
|
27
|
+
res.status(404).send({ errorCode: 'EVENT_NOT_FOUND', accessToken: null }); // Изменено с BLOGPOST_NOT_FOUND на EVENT_NOT_FOUND
|
28
|
+
return;
|
29
|
+
}
|
30
|
+
if (existingEvent.url !== url) { // Изменено с existingBlogpost на existingEvent
|
31
|
+
const event = await Event.findOne({ url }); // Изменено с Blogpost на Event и с blogpost на event
|
32
|
+
if (event) { // Изменено с blogpost на event
|
33
|
+
res.status(400).send({ errorCode: 'EVENT_URL_ALREADY_IN_USE', accessToken: null }); // Изменено с POST_URL_ALREADY_IN_USE на EVENT_URL_ALREADY_IN_USE
|
34
|
+
return;
|
35
|
+
}
|
36
|
+
}
|
37
|
+
|
38
|
+
next();
|
39
|
+
} catch (err) {
|
40
|
+
console.log(err);
|
41
|
+
res.status(500).send({ message: err });
|
42
|
+
}
|
43
|
+
}
|
44
|
+
|
45
|
+
const checkNameNotEmpty = (req, res, next) => {
|
46
|
+
if (!req.body.name || req.body.name.trim() === '') {
|
47
|
+
res.status(400).send({ errorCode: "NAME_CANNOT_BE_EMPTY", accessToken: null });
|
48
|
+
return;
|
49
|
+
}
|
50
|
+
|
51
|
+
next();
|
52
|
+
};
|
53
|
+
|
54
|
+
return {
|
55
|
+
checkEventExistOrNot, // Изменено с checkBlogpostExistOrNot на checkEventExistOrNot
|
56
|
+
checkNameNotEmpty
|
57
|
+
};
|
58
|
+
};
|
59
|
+
|
60
|
+
module.exports = middlewareFactory;
|
@@ -1,9 +1,15 @@
|
|
1
1
|
// Factories
|
2
2
|
const controllerFactory = require("../controllers/events.controller");
|
3
|
+
// Middlewares
|
4
|
+
const middlewareFactoryGlobal = require('@pf/src/modules/middlewares/server');
|
5
|
+
const middlewareFactoryEvents = require('../middlewares/server');
|
3
6
|
// Routes
|
4
7
|
module.exports = function(app, db) {
|
5
8
|
const controller = controllerFactory(db);
|
6
9
|
|
10
|
+
const { authJwt } = middlewareFactoryGlobal(db);
|
11
|
+
const { verifyEvent } = middlewareFactoryEvents(db);
|
12
|
+
|
7
13
|
app.use(function(req, res, next) {
|
8
14
|
|
9
15
|
res.header(
|
@@ -21,11 +27,19 @@ module.exports = function(app, db) {
|
|
21
27
|
|
22
28
|
app.post(
|
23
29
|
"/api/events/create",
|
30
|
+
[
|
31
|
+
verifyEvent.checkNameNotEmpty,
|
32
|
+
verifyEvent.checkEventExistOrNot,
|
33
|
+
],
|
24
34
|
controller.create
|
25
35
|
);
|
26
36
|
|
27
37
|
app.post(
|
28
38
|
"/api/events/update",
|
39
|
+
[
|
40
|
+
verifyEvent.checkNameNotEmpty,
|
41
|
+
verifyEvent.checkEventExistOrNot,
|
42
|
+
],
|
29
43
|
controller.update
|
30
44
|
);
|
31
45
|
|
@@ -34,4 +48,3 @@ module.exports = function(app, db) {
|
|
34
48
|
controller.delete
|
35
49
|
);
|
36
50
|
};
|
37
|
-
|
@@ -55,12 +55,25 @@ const props = defineProps({
|
|
55
55
|
});
|
56
56
|
|
57
57
|
const socialLinks = computed(() => {
|
58
|
-
const networks = [
|
58
|
+
const networks = [
|
59
|
+
{name: 'telegram', base: 'https://t.me/'},
|
60
|
+
{name: 'facebook', base: 'https://www.facebook.com/'},
|
61
|
+
{name: 'instagram', base: 'https://www.instagram.com/'},
|
62
|
+
{name: 'twitter', base: 'https://twitter.com/'},
|
63
|
+
{name: 'reddit', base: 'https://www.reddit.com/user/'},
|
64
|
+
{name: 'line', base: ''}, // не уверен в базовом URL для Line, добавьте его, если необходимо
|
65
|
+
{name: 'dribbble', base: 'https://dribbble.com/'}
|
66
|
+
];
|
67
|
+
|
59
68
|
return networks
|
60
|
-
.filter(
|
61
|
-
.map(
|
69
|
+
.filter(network => props[network.name])
|
70
|
+
.map(network => ({
|
71
|
+
name: network.name,
|
72
|
+
href: network.base + props[network.name]
|
73
|
+
}));
|
62
74
|
});
|
63
75
|
|
76
|
+
|
64
77
|
function resolveSocialIcon(name) {
|
65
78
|
const icons = {
|
66
79
|
telegram: IconTelegram,
|
@@ -1,9 +1,17 @@
|
|
1
1
|
<template>
|
2
2
|
<div class="for-transition pd-thin">
|
3
|
-
|
4
|
-
|
5
3
|
|
6
|
-
|
4
|
+
<h3 class="mn-small">Type of group</h3>
|
5
|
+
<p class="mn-thin">Public groups are open to everyone, whereas in exclusive groups only members can post. If you wish to make a group private, select 'hidden'.</p>
|
6
|
+
|
7
|
+
<SelectMulti
|
8
|
+
v-model="organization.state.current.types"
|
9
|
+
:options="['public','exclusive','hidden']"
|
10
|
+
:multiple="false"
|
11
|
+
:taggable="false"
|
12
|
+
placeholder="Type to search or add type of organization"
|
13
|
+
class="mn-semi bg-grey pd-medium radius-small"
|
14
|
+
/>
|
7
15
|
|
8
16
|
|
9
17
|
<h3 class="mn-small">Profile</h3>
|
@@ -17,7 +25,7 @@
|
|
17
25
|
<h4>Upload photo</h4>
|
18
26
|
</div>
|
19
27
|
|
20
|
-
|
28
|
+
<Field
|
21
29
|
v-model:field="organization.state.current.profile.name"
|
22
30
|
placeholder="Name of organization"
|
23
31
|
class="mn-thin bg-grey pd-medium radius-small"
|
@@ -25,7 +33,7 @@
|
|
25
33
|
|
26
34
|
<Field
|
27
35
|
v-model:field="organization.state.current.profile.description"
|
28
|
-
placeholder="
|
36
|
+
placeholder="Brief description of your group"
|
29
37
|
class="mn-thin bg-grey pd-medium radius-small"
|
30
38
|
/>
|
31
39
|
<BlockTags
|
@@ -33,17 +41,33 @@
|
|
33
41
|
:tags="organization.state.current.profile.tags"
|
34
42
|
/>
|
35
43
|
|
36
|
-
|
37
|
-
<p class="mn-thin">
|
38
|
-
<SelectMulti
|
39
|
-
v-model="organization.state.current.types"
|
40
|
-
:options="['public','exclusive','hidden']"
|
41
|
-
:multiple="false"
|
42
|
-
:taggable="false"
|
43
|
-
placeholder="Type to search or add type of organization"
|
44
|
-
class="mn-semi bg-grey pd-medium radius-small"
|
45
|
-
/>
|
44
|
+
<h3 class="mn-small">Socials</h3>
|
45
|
+
<p class="mn-thin">Please provide only the username for social media profiles, without full links.</p>
|
46
46
|
|
47
|
+
<Field
|
48
|
+
v-model:field="organization.state.current.socials.instagram"
|
49
|
+
label="Instagram"
|
50
|
+
placeholder=""
|
51
|
+
class="mn-thin bg-grey pd-medium radius-small"
|
52
|
+
/>
|
53
|
+
<Field
|
54
|
+
v-model:field="organization.state.current.socials.twitter"
|
55
|
+
label="Twitter"
|
56
|
+
placeholder=""
|
57
|
+
class="mn-thin bg-grey pd-medium radius-small"
|
58
|
+
/>
|
59
|
+
<Field
|
60
|
+
v-model:field="organization.state.current.socials.facebook"
|
61
|
+
label="Facebook"
|
62
|
+
placeholder=""
|
63
|
+
class="mn-thin bg-grey pd-medium radius-small"
|
64
|
+
/>
|
65
|
+
<Field
|
66
|
+
v-model:field="organization.state.current.socials.telegram"
|
67
|
+
label="Telegram"
|
68
|
+
placeholder=""
|
69
|
+
class="mn-thin bg-grey pd-medium radius-small"
|
70
|
+
/>
|
47
71
|
|
48
72
|
<Button :submit="onSubmit" :callback="redirectTo" class="mn-thin">Save</Button>
|
49
73
|
<!-- <Button :submit="onDelete" :callback="redirectDash" class="mn-thin bg-fourth">Delete</Button> -->
|
@@ -44,15 +44,19 @@
|
|
44
44
|
|
45
45
|
<slot></slot>
|
46
46
|
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
47
|
+
<h4
|
48
|
+
v-if="Object.values(organization.socials).some(value => value)"
|
49
|
+
class="mn-t-small mn-thin"
|
50
|
+
>
|
51
|
+
Find us in socials
|
52
|
+
</h4>
|
53
|
+
|
54
|
+
<Socials
|
55
|
+
:telegram="organization.socials.telegram"
|
56
|
+
:facebook="organization.socials.facebook"
|
57
|
+
:instagram="organization.socials.instagram"
|
58
|
+
:twitter="organization.socials.twitter"
|
59
|
+
/>
|
56
60
|
</section>
|
57
61
|
|
58
62
|
<!-- <h3 class="mn-small">Rating</h3>
|
@@ -6,6 +6,10 @@ module.exports = (mongoose) => {
|
|
6
6
|
ref: 'User',
|
7
7
|
required: true,
|
8
8
|
},
|
9
|
+
official: {
|
10
|
+
type: Boolean,
|
11
|
+
default: false,
|
12
|
+
},
|
9
13
|
// Types of organizations
|
10
14
|
types: {
|
11
15
|
type: Array,
|
@@ -31,9 +35,9 @@ module.exports = (mongoose) => {
|
|
31
35
|
},
|
32
36
|
address: String,
|
33
37
|
},
|
34
|
-
|
38
|
+
socials: {
|
35
39
|
telegram: String,
|
36
|
-
|
40
|
+
twitter: String,
|
37
41
|
facebook: String,
|
38
42
|
instagram: String
|
39
43
|
},
|
@@ -27,7 +27,7 @@ const state = reactive({
|
|
27
27
|
phone: '',
|
28
28
|
address: '',
|
29
29
|
},
|
30
|
-
|
30
|
+
socials: {
|
31
31
|
telegram: '',
|
32
32
|
line: '',
|
33
33
|
facebook: '',
|
@@ -218,7 +218,7 @@ const actions = {
|
|
218
218
|
phone: '',
|
219
219
|
address: '',
|
220
220
|
},
|
221
|
-
|
221
|
+
socials: {
|
222
222
|
telegram: '',
|
223
223
|
line: '',
|
224
224
|
facebook: '',
|
@@ -14,7 +14,7 @@
|
|
14
14
|
/>
|
15
15
|
|
16
16
|
<section
|
17
|
-
class="t-center w-100 mn-semi radius-medium pd-medium bg-grey"
|
17
|
+
class="flex-center flex flex-column t-center w-100 mn-semi radius-medium pd-medium bg-grey"
|
18
18
|
>
|
19
19
|
<IconEdit
|
20
20
|
v-if="route.params._id === auth.state.user._id"
|
@@ -70,14 +70,28 @@
|
|
70
70
|
</p>
|
71
71
|
|
72
72
|
<ButtonFollow
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
73
|
+
v-if="auth.state.user._id && route.params._id && route.params._id !== auth.state.user._id"
|
74
|
+
:type="'user'"
|
75
|
+
:isMember="users.state.current.isMember"
|
76
|
+
:targetId="users.state.current._id"
|
77
|
+
:userId="auth.state.user._id"
|
78
|
+
class="w-min mn-auto"
|
79
|
+
@updateMembership="handleMembershipUpdate"
|
80
|
+
/>
|
81
|
+
|
82
|
+
<h4
|
83
|
+
v-if="Object.values(users.state.current.socials).some(value => value)"
|
84
|
+
class="mn-t-small mn-thin"
|
85
|
+
>
|
86
|
+
Find Me in Socials
|
87
|
+
</h4>
|
88
|
+
<Socials
|
89
|
+
:telegram="users.state.current.socials.telegram"
|
90
|
+
:facebook="users.state.current.socials.facebook"
|
91
|
+
:instagram="users.state.current.socials.instagram"
|
92
|
+
:twitter="users.state.current.socials.twitter"
|
93
|
+
class="mn-r-auto mn-l-auto"
|
94
|
+
/>
|
81
95
|
|
82
96
|
</section>
|
83
97
|
|
@@ -95,7 +109,7 @@
|
|
95
109
|
<span>Posts</span>
|
96
110
|
</MenuItem>
|
97
111
|
</Menu>
|
98
|
-
|
112
|
+
<!--
|
99
113
|
<Menu>
|
100
114
|
<MenuItem @click="router.push({name: 'User Comments', params: {_id: route.params._id}})" class="cursor-pointer">
|
101
115
|
<span>Comments</span>
|
@@ -103,7 +117,7 @@
|
|
103
117
|
<MenuItem @click="router.push({name: 'User Likes', params: {_id: route.params._id}})" class="cursor-pointer">
|
104
118
|
<span>Likes</span>
|
105
119
|
</MenuItem>
|
106
|
-
</Menu>
|
120
|
+
</Menu> -->
|
107
121
|
|
108
122
|
<Menu
|
109
123
|
v-if="auth.state.user._id === route.params._id"
|
@@ -148,6 +162,7 @@ import MenuItem from '@pf/src/modules/mobile/components/Menu/MenuItem.vue'
|
|
148
162
|
import ButtonFollow from '@pf/src/modules/organizations/components/elements/ButtonFollow.vue'
|
149
163
|
// Community Module
|
150
164
|
import Activity from '@pf/src/modules/community/components/blocks/Activity.vue';
|
165
|
+
import Socials from '@pf/src/modules/organizations/components/blocks/Socials.vue'
|
151
166
|
// Users Module
|
152
167
|
import ProfileCompletion from '@pf/src/modules/users/components/sections/ProfileCompletion.vue'
|
153
168
|
// Icons Module
|
@@ -59,6 +59,33 @@
|
|
59
59
|
class="mn-semi bg-grey pd-medium radius-small"
|
60
60
|
:validation="organizationName"
|
61
61
|
/>
|
62
|
+
<h3 class="mn-small">Socials</h3>
|
63
|
+
<p class="mn-thin">Please provide only the username for social media profiles, without full links.</p>
|
64
|
+
|
65
|
+
<Field
|
66
|
+
v-model:field="user.socials.instagram"
|
67
|
+
label="Instagram"
|
68
|
+
placeholder=""
|
69
|
+
class="mn-thin bg-grey pd-medium radius-small"
|
70
|
+
/>
|
71
|
+
<Field
|
72
|
+
v-model:field="user.socials.twitter"
|
73
|
+
label="Twitter"
|
74
|
+
placeholder=""
|
75
|
+
class="mn-thin bg-grey pd-medium radius-small"
|
76
|
+
/>
|
77
|
+
<Field
|
78
|
+
v-model:field="user.socials.facebook"
|
79
|
+
label="Facebook"
|
80
|
+
placeholder=""
|
81
|
+
class="mn-thin bg-grey pd-medium radius-small"
|
82
|
+
/>
|
83
|
+
<Field
|
84
|
+
v-model:field="user.socials.telegram"
|
85
|
+
label="Telegram"
|
86
|
+
placeholder=""
|
87
|
+
class="mn-semi bg-grey pd-medium radius-small"
|
88
|
+
/>
|
62
89
|
<!-- -->
|
63
90
|
<h3 class="mn-small">Account</h3>
|
64
91
|
|
@@ -78,16 +105,7 @@
|
|
78
105
|
label="Email"
|
79
106
|
placeholder="Not specified"
|
80
107
|
class="mn-thin bg-grey pd-medium radius-small"
|
81
|
-
disabled="true"
|
82
|
-
:validation="organizationName"
|
83
|
-
/>
|
84
|
-
|
85
|
-
<Field
|
86
|
-
v-model:field="user.password"
|
87
|
-
label="Password"
|
88
|
-
placeholder="Not specified"
|
89
|
-
class="mn-semi bg-grey pd-medium radius-small"
|
90
|
-
disabled="true"
|
108
|
+
:disabled="true"
|
91
109
|
:validation="organizationName"
|
92
110
|
/>
|
93
111
|
|