@ozdao/prometheus-framework 0.1.30 → 0.1.31
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/BackofficeGallery-02c9721b.mjs +304 -0
- package/dist/BackofficeGallery-1d117a40.js +1 -0
- package/dist/BackofficeReports-cb4b180d.mjs +44 -0
- package/dist/BackofficeReports-d021871f.js +1 -0
- package/dist/Breadcrumbs.vue_vue_type_style_index_0_lang-505c3ca5.js +1 -0
- package/dist/Breadcrumbs.vue_vue_type_style_index_0_lang-b1873cb7.mjs +1945 -0
- package/dist/Button-2ca405bd.js +1 -0
- package/dist/Button-c59d387c.mjs +283 -0
- package/dist/Button.vue_vue_type_style_index_0_lang-0ea8fbf8.js +1 -0
- package/dist/Button.vue_vue_type_style_index_0_lang-4ed993c7.mjs +1 -0
- package/dist/ButtonFollow.vue_vue_type_style_index_0_scoped_0634d4a1_lang-0ea8fbf8.js +1 -0
- package/dist/ButtonFollow.vue_vue_type_style_index_0_scoped_0634d4a1_lang-4ed993c7.mjs +1 -0
- package/dist/CardOrganization-18c1e3fa.mjs +297 -0
- package/dist/CardOrganization-7d679e75.js +1 -0
- package/dist/Chips-2ada5eda.mjs +200 -0
- package/dist/Chips-8d0a1d2c.js +1 -0
- package/dist/Dashboard-239fb7a6.mjs +52 -0
- package/dist/Dashboard-94267906.js +1 -0
- package/dist/EULA-8265b0cf.mjs +4218 -0
- package/dist/EULA-cbb27503.js +1 -0
- package/dist/Feed-66095e66.js +1 -0
- package/dist/Feed-76fc4475.mjs +383 -0
- package/dist/Feed-e55bc6fa.js +1 -0
- package/dist/Feed-ef6c6ca3.mjs +371 -0
- package/dist/IconEdit-c98d3d06.mjs +339 -0
- package/dist/IconEdit-e4d0cc6e.js +1 -0
- package/dist/Image-052a3cc2.mjs +480 -0
- package/dist/Image-c90ee624.js +9 -0
- package/dist/MenuItem-0b249b94.mjs +93 -0
- package/dist/MenuItem-8b70d2cf.js +1 -0
- package/dist/Product-4b58701f.js +7 -0
- package/dist/Product-a6251018.mjs +844 -0
- package/dist/ProductEdit-3ff2af92.js +1 -0
- package/dist/ProductEdit-f901314c.mjs +306 -0
- package/dist/ProfileBlogposts-57931834.mjs +70 -0
- package/dist/ProfileBlogposts-af88ce98.js +1 -0
- package/dist/ProfileEvents-588eadf9.js +1 -0
- package/dist/ProfileEvents-ed7f9603.mjs +62 -0
- package/dist/ProfileOrganizations-7911deec.mjs +219 -0
- package/dist/ProfileOrganizations-ae258581.js +1 -0
- package/dist/Publics-50c0ff6c.js +1 -0
- package/dist/Publics-f34131bf.mjs +45 -0
- package/dist/Select-11ddabf5.mjs +79 -0
- package/dist/Select-3ca5ab39.js +1 -0
- package/dist/Socials-3fe01af1.mjs +275 -0
- package/dist/Socials-b19d0cb1.js +1 -0
- package/dist/addMembersQuantity-ea216f92.mjs +85 -0
- package/dist/addMembersQuantity-f922d82b.js +84 -0
- package/dist/auth-98fe3efb.mjs +612 -0
- package/dist/auth-acbe3ae1.js +7 -0
- package/dist/auth.client.cjs +7 -8
- package/dist/auth.client.js +435 -439
- package/dist/auth.validation-495e9d6d.js +1 -0
- package/dist/auth.validation-e265b496.mjs +23 -0
- package/dist/backoffice.client.cjs +1 -1
- package/dist/backoffice.client.js +55 -28
- package/dist/click-outside-0b0727d1.js +2 -0
- package/dist/click-outside-6101836c.mjs +19 -0
- package/dist/community.client.cjs +1 -1
- package/dist/community.client.js +121 -121
- package/dist/community.server.js +35 -5
- package/dist/community.server.mjs +35 -5
- package/dist/components/Button/Button.vue.d.ts +3 -0
- package/dist/components/Button/Button.vue.d.ts.map +1 -1
- package/dist/components/CardHeader/CardHeader.vue.d.ts +3 -0
- package/dist/components/Dropdown/Dropdown.vue.d.ts +3 -0
- package/dist/components/Dropdown/Dropdown.vue.d.ts.map +1 -1
- package/dist/components/Field/Field.vue.d.ts +1 -1
- package/dist/components/FieldPhone/FieldPhone(script-setup).vue.d.ts +3 -3
- package/dist/components/Popup/Popup.vue.d.ts +2 -1
- package/dist/components/Popup/Popup.vue.d.ts.map +1 -1
- package/dist/components/Select/Select.vue.d.ts +1 -1
- package/dist/components/Select/Select.vue.d.ts.map +1 -1
- package/dist/components/Upload/Upload.vue.d.ts +1 -1
- package/dist/events.client.cjs +2 -2
- package/dist/events.client.js +219 -217
- package/dist/events.server.js +2 -9
- package/dist/events.server.mjs +2 -9
- package/dist/legal.client.cjs +1 -1
- package/dist/legal.client.js +2565 -2545
- package/dist/main.css +1 -1
- package/dist/main.d.ts +1 -1
- package/dist/modules/backoffice/components/pages/Dashboard.vue.d.ts +6 -0
- package/dist/modules/icons/navigation/IconCross.vue.d.ts +4 -0
- package/dist/modules/legal/components/pages/legal/EULA.vue.d.ts +2 -0
- package/dist/modules/organizations/components/elements/ButtonFollow.vue.d.ts +1 -1
- package/dist/modules/organizations/components/elements/ButtonToggleMembership.vue.d.ts +12 -0
- package/dist/modules/organizations/components/sections/DetailsTab.vue.d.ts +2 -58
- package/dist/modules/organizations/components/sections/Feed.vue.d.ts +1 -1
- package/dist/modules/reports/components/pages/BackofficeReports.vue.d.ts +2 -0
- package/dist/modules/reports/components/sections/FormReport.vue.d.ts +75 -0
- package/dist/modules/reports/store/reports.d.ts +41 -0
- package/dist/organizations-a241b21d.js +1 -0
- package/dist/organizations-ea9de495.mjs +122 -0
- package/dist/organizations.client-292e8444.js +3 -0
- package/dist/organizations.client-6fc91683.mjs +3072 -0
- package/dist/organizations.client.cjs +1 -1
- package/dist/organizations.client.js +51 -49
- package/dist/organizations.server.js +20 -28
- package/dist/organizations.server.mjs +20 -28
- package/dist/prometheus-framework.cjs.js +19 -19
- package/dist/prometheus-framework.es.js +1635 -1608
- package/dist/reports-270f69df.js +1 -0
- package/dist/reports-79cd9459.mjs +91 -0
- package/dist/reports.client.cjs +1 -0
- package/dist/reports.client.js +8 -0
- package/dist/reports.server.js +159 -0
- package/dist/reports.server.mjs +160 -0
- package/dist/states.validation-02ba0aee.js +1 -0
- package/dist/states.validation-e5f4fa3a.mjs +13 -0
- package/dist/style.css +1 -1
- package/dist/users.client.cjs +1 -1
- package/dist/users.client.js +286 -242
- package/dist/users.server.js +6 -18
- package/dist/users.server.mjs +6 -18
- package/package.json +9 -1
- package/src/components/Button/Button.vue +66 -60
- package/src/components/CardHeader/CardHeader.vue +51 -50
- package/src/components/Dropdown/Dropdown.vue +28 -12
- package/src/components/FieldPhone/click-outside.js +0 -48
- package/src/components/Popup/Popup.vue +74 -23
- package/src/components/Select/Select.vue +10 -6
- package/src/main.ts +1 -1
- package/src/modules/auth/components/pages/EnterPassword.vue +6 -0
- package/src/modules/auth/router/auth.js +1 -1
- package/src/modules/auth/store/auth.js +1 -1
- package/src/modules/backoffice/components/layouts/Backoffice.vue +3 -3
- package/src/modules/backoffice/components/pages/Dashboard.vue +62 -0
- package/src/modules/backoffice/router/backoffice.js +26 -0
- package/src/modules/community/components/blocks/CardBlogpost.vue +3 -0
- package/src/modules/community/components/layouts/Community.vue +4 -4
- package/src/modules/community/components/pages/CreateBlogPost.vue +27 -28
- package/src/modules/community/components/sections/Comments.vue +4 -2
- package/src/modules/community/components/sections/Feed.vue +1 -1
- package/src/modules/community/controllers/blog.controller.js +22 -3
- package/src/modules/community/controllers/comments.controller.js +23 -5
- package/src/modules/events/components/blocks/CardEvent.vue +4 -0
- package/src/modules/events/components/pages/EditEvent.vue +27 -28
- package/src/modules/events/components/sections/Feed.vue +1 -1
- package/src/modules/events/controllers/events.controller.js +3 -10
- package/src/modules/gallery/components/sections/BackofficeGallery.vue +7 -23
- package/src/modules/icons/navigation/IconCross.vue +22 -0
- package/src/modules/legal/components/pages/Legal.vue +3 -0
- package/src/modules/legal/components/pages/legal/EULA.vue +2148 -0
- package/src/modules/legal/router/legal.js +11 -4
- package/src/modules/middlewares/client/auth.validation.js +14 -0
- package/src/modules/mobile/components/Menu/Menu.vue +1 -1
- package/src/modules/organizations/components/blocks/CardOrganization.vue +1 -1
- package/src/modules/organizations/components/elements/ButtonFollow.vue +9 -7
- package/src/modules/organizations/components/elements/ButtonToggleMembership.vue +101 -0
- package/src/modules/organizations/components/pages/Organization.vue +1 -34
- package/src/modules/organizations/components/sections/DetailsTab.vue +86 -8
- package/src/modules/organizations/controllers/memberships.controller.js +10 -7
- package/src/modules/organizations/controllers/organizations.controller.js +9 -20
- package/src/modules/organizations/controllers/utils/addMembersQuantity.js +21 -0
- package/src/modules/organizations/controllers/utils/addUserStatusFields.js +65 -0
- package/src/modules/organizations/controllers/utils/excludeBlockedMembers.js +18 -0
- package/src/modules/organizations/models/membership.model.js +5 -5
- package/src/modules/organizations/store/memberships.js +6 -6
- package/src/modules/organizations/store/organizations.js +0 -1
- package/src/modules/products/products.server.js +5 -0
- package/src/modules/reports/components/pages/BackofficeReports.vue +67 -0
- package/src/modules/reports/components/sections/FormReport.vue +114 -0
- package/src/modules/reports/controllers/reports.controller.js +67 -0
- package/src/modules/reports/models/report.model.js +58 -0
- package/src/modules/reports/reports.client.js +17 -0
- package/src/modules/reports/reports.server.js +13 -0
- package/src/modules/reports/routes/reports.routes.js +43 -0
- package/src/modules/reports/store/reports.js +118 -0
- package/src/modules/users/components/pages/Profile.vue +57 -10
- package/src/modules/users/controllers/users.controller.js +6 -19
- package/src/styles/base/all.scss +2 -0
- package/src/styles/layout.scss +39 -63
- package/src/styles/theme.scss +0 -1
- package/src/styles/components/popup.scss +0 -55
package/dist/users.server.js
CHANGED
@@ -2,7 +2,11 @@
|
|
2
2
|
const _commonjsHelpers = require("./_commonjsHelpers-3b53548e.js");
|
3
3
|
require("uuid");
|
4
4
|
const require$$1 = require("mongoose");
|
5
|
+
const addMembersQuantity$1 = require("./addMembersQuantity-f922d82b.js");
|
6
|
+
require("mongodb");
|
5
7
|
const ObjectId = require$$1.Types.ObjectId;
|
8
|
+
const addUserStatusFields = addMembersQuantity$1.addUserStatusFields_1;
|
9
|
+
const addMembersQuantity = addMembersQuantity$1.addMembersQuantity_1;
|
6
10
|
const controllerFactory$1 = (db) => {
|
7
11
|
const User = db.user;
|
8
12
|
const read = async (req, res) => {
|
@@ -40,24 +44,8 @@ const controllerFactory$1 = (db) => {
|
|
40
44
|
as: "memberships"
|
41
45
|
}
|
42
46
|
});
|
43
|
-
query.push(
|
44
|
-
|
45
|
-
numberOfMemberships: { $size: "$memberships" }
|
46
|
-
}
|
47
|
-
});
|
48
|
-
query.push({
|
49
|
-
$addFields: {
|
50
|
-
isMember: {
|
51
|
-
$cond: {
|
52
|
-
if: req.query.user,
|
53
|
-
then: {
|
54
|
-
$in: [new ObjectId(req.query.user), "$memberships.user"]
|
55
|
-
},
|
56
|
-
else: "$$REMOVE"
|
57
|
-
}
|
58
|
-
}
|
59
|
-
}
|
60
|
-
});
|
47
|
+
query.push(addMembersQuantity());
|
48
|
+
query.push(addUserStatusFields(req.query.user));
|
61
49
|
query.push({
|
62
50
|
$skip: skip
|
63
51
|
});
|
package/dist/users.server.mjs
CHANGED
@@ -1,7 +1,11 @@
|
|
1
1
|
import { g as getDefaultExportFromCjs } from "./_commonjsHelpers-83b1d755.mjs";
|
2
2
|
import "uuid";
|
3
3
|
import require$$1 from "mongoose";
|
4
|
+
import { a as addUserStatusFields_1, b as addMembersQuantity_1 } from "./addMembersQuantity-ea216f92.mjs";
|
5
|
+
import "mongodb";
|
4
6
|
const ObjectId = require$$1.Types.ObjectId;
|
7
|
+
const addUserStatusFields = addUserStatusFields_1;
|
8
|
+
const addMembersQuantity = addMembersQuantity_1;
|
5
9
|
const controllerFactory$1 = (db) => {
|
6
10
|
const User = db.user;
|
7
11
|
const read = async (req, res) => {
|
@@ -39,24 +43,8 @@ const controllerFactory$1 = (db) => {
|
|
39
43
|
as: "memberships"
|
40
44
|
}
|
41
45
|
});
|
42
|
-
query.push(
|
43
|
-
|
44
|
-
numberOfMemberships: { $size: "$memberships" }
|
45
|
-
}
|
46
|
-
});
|
47
|
-
query.push({
|
48
|
-
$addFields: {
|
49
|
-
isMember: {
|
50
|
-
$cond: {
|
51
|
-
if: req.query.user,
|
52
|
-
then: {
|
53
|
-
$in: [new ObjectId(req.query.user), "$memberships.user"]
|
54
|
-
},
|
55
|
-
else: "$$REMOVE"
|
56
|
-
}
|
57
|
-
}
|
58
|
-
}
|
59
|
-
});
|
46
|
+
query.push(addMembersQuantity());
|
47
|
+
query.push(addUserStatusFields(req.query.user));
|
60
48
|
query.push({
|
61
49
|
$skip: skip
|
62
50
|
});
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@ozdao/prometheus-framework",
|
3
|
-
"version": "0.1.
|
3
|
+
"version": "0.1.31",
|
4
4
|
"description": "Web3 Framework focused on user experience and ease of development.",
|
5
5
|
"author": "OZ DAO <hello@ozdao.dev>",
|
6
6
|
"license": "GPL-3.0-or-later",
|
@@ -132,6 +132,14 @@
|
|
132
132
|
"./modules/legal/client": {
|
133
133
|
"import": "./dist/legal.client.js",
|
134
134
|
"require": "./dist/legal.client.cjs"
|
135
|
+
},
|
136
|
+
"./modules/reports/client": {
|
137
|
+
"import": "./dist/reports.client.js",
|
138
|
+
"require": "./dist/reports.client.cjs"
|
139
|
+
},
|
140
|
+
"./modules/reports/server": {
|
141
|
+
"import": "./dist/reports.server.mjs",
|
142
|
+
"require": "./dist/reports.server.js"
|
135
143
|
}
|
136
144
|
},
|
137
145
|
"browser": {
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<script setup>
|
2
|
-
import { ref
|
2
|
+
import { ref } from 'vue'
|
3
3
|
|
4
4
|
const props = defineProps({
|
5
5
|
submit: {
|
@@ -14,6 +14,10 @@
|
|
14
14
|
type: Number,
|
15
15
|
default: 750
|
16
16
|
},
|
17
|
+
showSucces: {
|
18
|
+
type: Boolean,
|
19
|
+
default: true
|
20
|
+
},
|
17
21
|
validation: {
|
18
22
|
type: Boolean,
|
19
23
|
default: false
|
@@ -26,79 +30,81 @@
|
|
26
30
|
const finished = ref(false);
|
27
31
|
|
28
32
|
async function Submit() {
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
33
|
+
button.value.style['pointer-events'] = 'none';
|
34
|
+
error.value = null;
|
35
|
+
loading.value = true;
|
36
|
+
|
37
|
+
// Функция для сброса состояния кнопки.
|
38
|
+
const resetButton = () => {
|
39
|
+
if (button.value) {
|
40
|
+
button.value.classList.replace('bg-light-main', 'bg-main');
|
41
|
+
button.value.style.pointerEvents = 'auto';
|
42
|
+
loading.value = false;
|
43
|
+
finished.value = false;
|
44
|
+
error.value = null;
|
45
|
+
}
|
46
|
+
};
|
47
|
+
|
48
|
+
try {
|
49
|
+
await props.submit();
|
50
|
+
button.value.classList.replace('bg-main', 'bg-light-main');
|
51
|
+
|
52
|
+
|
53
|
+
loading.value = false;
|
54
|
+
// Используем функцию сброса состояния кнопки здесь.
|
55
|
+
if (props.showSucces) {
|
56
|
+
finished.value = true;
|
57
|
+
setTimeout(resetButton, 500);
|
58
|
+
} else {
|
59
|
+
resetButton();
|
60
|
+
}
|
61
|
+
|
62
|
+
// Если есть callback, мы также установим таймер для его вызова.
|
63
|
+
if (props.callback) setTimeout(() => props.callback(), props.callbackDelay);
|
64
|
+
|
65
|
+
} catch (err) {
|
66
|
+
// Если возникла ошибка, мы изменяем стили и устанавливаем сообщение об ошибке.
|
67
|
+
button.value.classList.replace('bg-main', 'bg-fourth-nano');
|
68
|
+
error.value = '❌';
|
69
|
+
|
70
|
+
// После задержки снова сбрасываем состояние кнопки.
|
71
|
+
setTimeout(() => {
|
72
|
+
resetButton();
|
73
|
+
// Так как класс кнопки был изменен, вернем его в исходное состояние.
|
74
|
+
button.value.classList.replace('bg-fourth-nano', 'bg-main');
|
75
|
+
}, 1330);
|
76
|
+
}
|
66
77
|
}
|
78
|
+
|
67
79
|
</script>
|
68
80
|
|
69
81
|
<template>
|
70
82
|
<button @click.stop="Submit" :disabled="validation" ref="button" class="w-100 bg-main button">
|
71
83
|
<!-- Slot -->
|
72
|
-
<transition
|
84
|
+
<transition name="TransitionTranslateY-small">
|
73
85
|
<span v-if="!loading && !error && !finished">
|
74
86
|
<slot></slot>
|
75
87
|
</span>
|
76
88
|
</transition>
|
77
89
|
<!-- Loading Circle Animation -->
|
78
|
-
<transition
|
79
|
-
<
|
80
|
-
<
|
81
|
-
<
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
</span>
|
89
|
-
</div>
|
90
|
+
<transition name="TransitionTranslateY-small">
|
91
|
+
<span v-if="loading && !error" class="loading">
|
92
|
+
<svg class="i-regular" width="135" height="140" viewBox="0 0 135 140" xmlns="http://www.w3.org/2000/svg" fill="#fff">
|
93
|
+
<rect y="10" width="15" height="120" rx="6"> <animate attributeName="height" begin="0.5s" dur="1s" values="120;110;100;90;80;70;60;50;40;140;120" calcMode="linear" repeatCount="indefinite" /> <animate attributeName="y" begin="0.5s" dur="1s" values="10;15;20;25;30;35;40;45;50;0;10" calcMode="linear" repeatCount="indefinite"/> </rect>
|
94
|
+
<rect x="30" y="10" width="15" height="120" rx="6"> <animate attributeName="height" begin="0.25s" dur="1s" values="120;110;100;90;80;70;60;50;40;140;120" calcMode="linear" repeatCount="indefinite" /> <animate attributeName="y" begin="0.25s" dur="1s" values="10;15;20;25;30;35;40;45;50;0;10" calcMode="linear" repeatCount="indefinite"/> </rect>
|
95
|
+
<rect x="60" width="15" height="140" rx="6"> <animate attributeName="height" begin="0s" dur="1s" values="120;110;100;90;80;70;60;50;40;140;120" calcMode="linear" repeatCount="indefinite" /> <animate attributeName="y" begin="0s" dur="1s" values="10;15;20;25;30;35;40;45;50;0;10" calcMode="linear" repeatCount="indefinite"/> </rect>
|
96
|
+
<rect x="90" y="10" width="15" height="120" rx="6"> <animate attributeName="height" begin="0.25s" dur="1s" values="120;110;100;90;80;70;60;50;40;140;120" calcMode="linear" repeatCount="indefinite" /> <animate attributeName="y" begin="0.25s" dur="1s" values="10;15;20;25;30;35;40;45;50;0;10" calcMode="linear" repeatCount="indefinite"/> </rect>
|
97
|
+
<rect x="120" y="10" width="15" height="120" rx="6"> <animate attributeName="height" begin="0.5s" dur="1s" values="120;110;100;90;80;70;60;50;40;140;120" calcMode="linear" repeatCount="indefinite" /> <animate attributeName="y" begin="0.5s" dur="1s" values="10;15;20;25;30;35;40;45;50;0;10" calcMode="linear" repeatCount="indefinite"/> </rect>
|
98
|
+
</svg>
|
99
|
+
</span>
|
90
100
|
</transition>
|
91
101
|
<!-- Checkmark if finished -->
|
92
|
-
<transition
|
93
|
-
<
|
94
|
-
<span class="p-small t-white">✔</span>
|
95
|
-
</div>
|
102
|
+
<transition name="TransitionTranslateY-small">
|
103
|
+
<span v-if="finished && showSucces" class="loading t-white">✔</span>
|
96
104
|
</transition>
|
97
105
|
<!-- Error if not finished -->
|
98
|
-
<transition
|
99
|
-
<
|
100
|
-
<span>{{ error }}</span>
|
101
|
-
</div>
|
106
|
+
<transition name="TransitionTranslateY-small">
|
107
|
+
<span v-if="error" class="error">{{ error }}</span>
|
102
108
|
</transition>
|
103
109
|
|
104
110
|
</button>
|
@@ -114,7 +120,7 @@
|
|
114
120
|
|
115
121
|
padding: 1rem 1.75rem;
|
116
122
|
border-radius: 3rem;
|
117
|
-
|
123
|
+
|
118
124
|
|
119
125
|
transform: scale(1);
|
120
126
|
opacity: 1;
|
@@ -93,44 +93,55 @@
|
|
93
93
|
class="br-solid br-2px br-white i-thin bg-grey radius-big"
|
94
94
|
/>
|
95
95
|
</div>
|
96
|
-
|
97
|
-
|
98
|
-
|
99
96
|
</div>
|
100
97
|
|
101
|
-
|
102
|
-
|
103
|
-
v-if="type !== 'short'"
|
104
|
-
|
98
|
+
<!-- Report -->
|
99
|
+
<Dropdown
|
100
|
+
v-if="type !== 'short' && user != creator.target._id"
|
101
|
+
:label="'...'"
|
102
|
+
:align="'right'"
|
103
|
+
class="cursor-pointer z-index-2 pd-thin radius-extra "
|
105
104
|
>
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
105
|
+
<section
|
106
|
+
class="bg-black pd-thin radius-small"
|
107
|
+
>
|
108
|
+
<FormReport
|
109
|
+
v-if="user !== creator.target._id"
|
110
|
+
:user="user"
|
111
|
+
:type="entityType"
|
112
|
+
:target="entity._id"
|
113
|
+
:text="'Report'"
|
114
|
+
class="w-100"
|
115
|
+
>
|
116
|
+
<button
|
117
|
+
class="w-100 bg-black br-solid br-1px br-white-transp-20 t-white button-small button"
|
118
|
+
>
|
119
|
+
Report
|
120
|
+
</button>
|
121
|
+
</FormReport>
|
122
|
+
|
123
|
+
<!-- <ButtonToggleMembership
|
124
|
+
v-if="user"
|
125
|
+
:user="user"
|
126
|
+
:type="creator.hidden ? 'organization' : 'user'"
|
127
|
+
:role="'blocked'"
|
128
|
+
:target="creator.hidden ? owner.target._id : creator.target._id"
|
129
|
+
:status="entity.isBlocked"
|
130
|
+
:text="{create: 'Block', remove: 'Unblock'}"
|
131
|
+
@updateMembership="event => {entity.isBlocked = !entity.isBlocked}"
|
132
|
+
class="t-white mn-t-thin bg-red"
|
133
|
+
/> -->
|
134
|
+
</section>
|
135
|
+
</Dropdown>
|
136
|
+
<!-- <FormReport
|
137
|
+
|
112
138
|
>
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
<li>2. Spam or misleading information</li>
|
120
|
-
<li>3. Inappropriate or offensive material</li>
|
121
|
-
<li>4. Unauthorized sharing of personal information</li>
|
122
|
-
</ul>
|
123
|
-
<p class="p-medium mn-small">Our team of moderators will review your report and take appropriate action, which may include removing the content if it is found to be in violation of our policies.</p>
|
124
|
-
|
125
|
-
<Button
|
126
|
-
:submit="onSubmit"
|
127
|
-
:callback="closeReportPopup"
|
128
|
-
class="w-100 bg-black t-white">
|
129
|
-
Report
|
130
|
-
</Button>
|
131
|
-
</div>
|
132
|
-
</Popup>
|
133
|
-
|
139
|
+
<button
|
140
|
+
class="mn-l-small br-solid br-black-transp-10 br-2px bg-transp i-semi cursor-pointer radius-extra"
|
141
|
+
>
|
142
|
+
!
|
143
|
+
</button>
|
144
|
+
</FormReport> -->
|
134
145
|
</div>
|
135
146
|
</div>
|
136
147
|
</header>
|
@@ -143,11 +154,15 @@
|
|
143
154
|
import { useRouter } from 'vue-router'
|
144
155
|
|
145
156
|
import PlaceholderUserpic from '@pf/src/modules/icons/placeholders/PlaceholderUserpic.vue'
|
157
|
+
import FormReport from '@pf/src/modules/reports/components/sections/FormReport.vue'
|
146
158
|
|
147
|
-
import
|
148
|
-
import
|
159
|
+
import Dropdown from "@pf/src/components/Dropdown/Dropdown.vue";
|
160
|
+
import ButtonToggleMembership from '@pf/src/modules/organizations/components/elements/ButtonToggleMembership.vue'
|
149
161
|
|
150
162
|
const props = defineProps([
|
163
|
+
'user',
|
164
|
+
'entity',
|
165
|
+
'entityType',
|
151
166
|
'date',
|
152
167
|
'dateFormatted',
|
153
168
|
'owner',
|
@@ -159,21 +174,7 @@
|
|
159
174
|
|
160
175
|
const router = useRouter()
|
161
176
|
|
162
|
-
// Popup logic
|
163
|
-
const isReportPopup = ref(false)
|
164
177
|
|
165
|
-
function openReportPopup() {
|
166
|
-
isReportPopup.value = true;
|
167
|
-
}
|
168
|
-
function closeReportPopup() {
|
169
|
-
isReportPopup.value = false;
|
170
|
-
}
|
171
|
-
// Popup Logic
|
172
|
-
async function onSubmit() {
|
173
|
-
setTimeout(function() {
|
174
|
-
|
175
|
-
}, 1);
|
176
|
-
}
|
177
178
|
|
178
179
|
function getTimeElapsed(timestamp) {
|
179
180
|
const now = new Date();
|
@@ -1,41 +1,57 @@
|
|
1
1
|
<template>
|
2
|
-
<div class="dropdown
|
2
|
+
<div class="dropdown pos-relative" v-click-outside="clickedOutside" @click.stop="isOpen = !isOpen">
|
3
3
|
{{label}}
|
4
|
+
<transition name="TransitionTranslateY" mode="out-in">
|
5
|
+
<div
|
6
|
+
v-show="isOpen"
|
7
|
+
:style="{ left: align === 'left' ? '0' : 'auto', right: align === 'right' ? '0' : 'auto' }"
|
8
|
+
class="dropdown-content w-15r radius-big"
|
9
|
+
>
|
10
|
+
<slot></slot>
|
11
|
+
</div>
|
12
|
+
</transition>
|
4
13
|
|
5
|
-
<div class="dropdown-content bg-black w-15r radius-big" v-show="isOpen">
|
6
|
-
<slot></slot>
|
7
|
-
</div>
|
8
14
|
</div>
|
9
15
|
</template>
|
10
16
|
|
11
17
|
<script setup>
|
12
|
-
import { ref } from 'vue';
|
18
|
+
import { ref, directive } from 'vue';
|
13
19
|
|
14
|
-
|
20
|
+
import clickOutside from '../FieldPhone/click-outside';
|
21
|
+
|
22
|
+
let vClickOutside = clickOutside
|
23
|
+
|
24
|
+
const props = defineProps({
|
15
25
|
label: {
|
16
26
|
type: String,
|
17
27
|
default: 'Open'
|
28
|
+
},
|
29
|
+
align: {
|
30
|
+
type: String,
|
31
|
+
default: 'left'
|
18
32
|
}
|
19
|
-
|
33
|
+
})
|
20
34
|
|
21
35
|
const isOpen = ref(false);
|
36
|
+
|
37
|
+
function clickedOutside () {
|
38
|
+
isOpen.value = false
|
39
|
+
}
|
22
40
|
</script>
|
23
41
|
|
24
42
|
<style scoped>
|
25
43
|
.dropdown {
|
26
|
-
position: relative;
|
27
44
|
display: inline-block;
|
28
45
|
}
|
29
46
|
|
30
47
|
.dropdown-content {
|
31
|
-
|
48
|
+
display: block;
|
32
49
|
position: absolute;
|
33
50
|
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
|
34
|
-
padding: 12px 16px;
|
35
51
|
z-index: 1;
|
36
52
|
}
|
37
53
|
|
38
|
-
|
54
|
+
/*.dropdown:hover .dropdown-content {
|
39
55
|
display: block;
|
40
|
-
}
|
56
|
+
}*/
|
41
57
|
</style>
|
@@ -1,51 +1,3 @@
|
|
1
|
-
// // Polyfill for Event.path in IE 11: https://stackoverflow.com/a/46093727
|
2
|
-
// function getParents(node, memo) {
|
3
|
-
// const parsedMemo = memo || [];
|
4
|
-
// const { parentNode } = node;
|
5
|
-
|
6
|
-
// if (!parentNode) {
|
7
|
-
// return parsedMemo;
|
8
|
-
// }
|
9
|
-
|
10
|
-
// return getParents(parentNode, parsedMemo.concat(parentNode));
|
11
|
-
// }
|
12
|
-
|
13
|
-
// // Click-outside by BosNaufal: https://github.com/BosNaufal/vue-click-outside
|
14
|
-
// export default {
|
15
|
-
// bind(el, binding, vNode) {
|
16
|
-
// // Provided expression must evaluate to a function.
|
17
|
-
// if (typeof binding.value !== "function") {
|
18
|
-
// const compName = vNode.context.name;
|
19
|
-
// let warn = `[Vue-click-outside:] provided expression ${binding.expression}
|
20
|
-
// is not a function, but has to be`;
|
21
|
-
// if (compName) {
|
22
|
-
// warn += `Found in component ${compName}`;
|
23
|
-
// }
|
24
|
-
// console.warn(warn);
|
25
|
-
// }
|
26
|
-
// // Define Handler and cache it on the element
|
27
|
-
// const { bubble } = binding.modifiers;
|
28
|
-
// const handler = (e) => {
|
29
|
-
// // Fall back to composedPath if e.path is undefined
|
30
|
-
// const path = e.path
|
31
|
-
// || (e.composedPath ? e.composedPath() : false)
|
32
|
-
// || getParents(e.target);
|
33
|
-
// if (bubble || (path.length && !el.contains(path[0]) && el !== path[0])) {
|
34
|
-
// binding.value(e);
|
35
|
-
// }
|
36
|
-
// };
|
37
|
-
// el.__vueClickOutside__ = handler;
|
38
|
-
// // add Event Listeners
|
39
|
-
// document.addEventListener('click', handler);
|
40
|
-
// },
|
41
|
-
// unbind(el) {
|
42
|
-
// // Remove Event Listeners
|
43
|
-
// document.removeEventListener('click', el.__vueClickOutside__);
|
44
|
-
// el.__vueClickOutside__ = null;
|
45
|
-
// },
|
46
|
-
// };
|
47
|
-
|
48
|
-
// https://stackoverflow.com/questions/63869859/detect-click-outside-element-on-vue-3
|
49
1
|
export default {
|
50
2
|
beforeMount(el, binding, vNode) { // (el, binding, vNode)
|
51
3
|
// Provided expression must evaluate to a function.
|
@@ -1,25 +1,23 @@
|
|
1
1
|
<template>
|
2
2
|
|
3
3
|
<teleport to="body" v-if="isPopupOpen">
|
4
|
-
<transition name="
|
5
|
-
<div v-
|
6
|
-
|
7
|
-
<
|
8
|
-
|
9
|
-
|
10
|
-
<
|
11
|
-
<
|
12
|
-
|
13
|
-
|
14
|
-
</
|
15
|
-
|
16
|
-
<slot></slot>
|
17
|
-
</section>
|
4
|
+
<transition name="TransitionTranslateY" appear>
|
5
|
+
<div v-if="isPopupOpen" key="popup-content" class="pd-small popup-wrapper">
|
6
|
+
|
7
|
+
<transition name="TransitionTranslateY" mode="out-in">
|
8
|
+
<section v-if="isPopupOpen" class="pos-relative z-index-4" v-bind="$attrs">
|
9
|
+
<!-- Close Popup -->
|
10
|
+
<button @click="closePopup()" class="pd-regular hover-scale-1 z-index-5 button-close-popup button">
|
11
|
+
<IconCross/>
|
12
|
+
</button>
|
13
|
+
<slot></slot>
|
14
|
+
</section>
|
15
|
+
</transition>
|
18
16
|
|
19
17
|
<div
|
20
18
|
@click="closePopup()"
|
21
|
-
|
22
|
-
|
19
|
+
:class="{'active':isPopupOpen === true}"
|
20
|
+
class="color-overlay z-index-3">
|
23
21
|
</div>
|
24
22
|
</div>
|
25
23
|
</transition>
|
@@ -27,11 +25,12 @@
|
|
27
25
|
</template>
|
28
26
|
|
29
27
|
<script setup>
|
30
|
-
import { watch } from 'vue';
|
28
|
+
import { computed, watch, onMounted, ref, nextTick } from 'vue';
|
31
29
|
// Import libs
|
32
|
-
import { computed, onMounted } from 'vue'
|
33
30
|
import { useRoute, useRouter } from 'vue-router'
|
34
31
|
import { useI18n } from 'vue-i18n'
|
32
|
+
// Icons
|
33
|
+
import IconCross from '@pf/src/modules/icons/navigation/IconCross.vue';
|
35
34
|
// Define props
|
36
35
|
const props = defineProps({
|
37
36
|
isPopupOpen: {
|
@@ -53,16 +52,15 @@ watch(() => props.isPopupOpen, (newVal) => {
|
|
53
52
|
document.body.classList.remove('no-scroll');
|
54
53
|
}
|
55
54
|
});
|
55
|
+
|
56
56
|
// Accessing router and store
|
57
57
|
const route = useRoute()
|
58
58
|
const router = useRouter()
|
59
59
|
// Localization
|
60
60
|
const text = {
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
ru: {
|
65
|
-
}
|
61
|
+
messages: {
|
62
|
+
en: {},
|
63
|
+
ru: {}
|
66
64
|
}
|
67
65
|
}
|
68
66
|
const { t } = useI18n(text)
|
@@ -72,4 +70,57 @@ const { t } = useI18n(text)
|
|
72
70
|
.no-scroll {
|
73
71
|
overflow: hidden;
|
74
72
|
}
|
73
|
+
|
74
|
+
.popup-wrapper {
|
75
|
+
display: flex;
|
76
|
+
position: fixed;
|
77
|
+
|
78
|
+
align-items: center;
|
79
|
+
justify-content: center;
|
80
|
+
|
81
|
+
width: 100%;
|
82
|
+
height: 100%;
|
83
|
+
|
84
|
+
left: 0;
|
85
|
+
top: 0;
|
86
|
+
|
87
|
+
z-index: 40;
|
88
|
+
|
89
|
+
.popup {
|
90
|
+
position: absolute;
|
91
|
+
height: auto;
|
92
|
+
padding: 2rem;
|
93
|
+
min-width: 24rem;
|
94
|
+
border-radius: 2rem;
|
95
|
+
overflow: hidden;
|
96
|
+
|
97
|
+
color: white;
|
98
|
+
background: black;
|
99
|
+
|
100
|
+
z-index: 40;
|
101
|
+
}
|
102
|
+
}
|
103
|
+
|
104
|
+
.color-overlay {
|
105
|
+
display: block;
|
106
|
+
position: fixed;
|
107
|
+
|
108
|
+
left: 0;
|
109
|
+
top: 0;
|
110
|
+
|
111
|
+
width: 100%;
|
112
|
+
height: 100%;
|
113
|
+
|
114
|
+
background: rgba(0,0,0,0.0);
|
115
|
+
pointer-events: none;
|
116
|
+
|
117
|
+
transform: scale(1.5);
|
118
|
+
|
119
|
+
transition: all 0.5s cubic-bezier(.31,.79,.24,.92);
|
120
|
+
|
121
|
+
&.active {
|
122
|
+
background: rgba(#000,0.25);
|
123
|
+
pointer-events: all;
|
124
|
+
}
|
125
|
+
}
|
75
126
|
</style>
|