@ozdao/prometheus-framework 0.2.118 → 0.2.120
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/community.server.js +1 -1
- package/dist/community.server.mjs +1 -1
- package/dist/events.server.js +1 -1
- package/dist/events.server.mjs +1 -1
- package/dist/gallery.server.js +13 -3
- package/dist/gallery.server.mjs +13 -3
- package/dist/main-DL3vRQCi.js +92 -0
- package/dist/main-Ds3Z5x5d.mjs +14206 -0
- package/dist/main.css +1 -1
- package/dist/orders.server.js +1 -1
- package/dist/orders.server.mjs +1 -1
- package/dist/organizations.server.js +1 -1
- package/dist/organizations.server.mjs +1 -1
- package/dist/products.server.js +1 -1
- package/dist/products.server.mjs +1 -1
- package/dist/prometheus-framework/src/components/Button/Button.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Button/Button.vue.js +94 -1
- package/dist/prometheus-framework/src/components/Button/Button.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Button/Button.vue2.js +1 -94
- package/dist/prometheus-framework/src/components/DatePicker/Calendar.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/DatePicker/Calendar.vue2.js +116 -117
- package/dist/prometheus-framework/src/components/Feed/Feed.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Feed/Feed.vue.js +123 -109
- package/dist/prometheus-framework/src/components/Field/Field.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Field/Field.vue.js +84 -1
- package/dist/prometheus-framework/src/components/Field/Field.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Field/Field.vue2.js +1 -84
- package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.js +1 -1
- package/dist/prometheus-framework/src/components/FieldTags/BlockTags.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/FieldTags/BlockTags.vue.js +32 -26
- package/dist/prometheus-framework/src/components/Popup/Popup.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Popup/Popup.vue.js +30 -26
- package/dist/prometheus-framework/src/modules/auth/components/layouts/Auth.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/layouts/Auth.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/auth/components/pages/EnterCode.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/EnterCode.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/EnterPassword.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/EnterPassword.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/auth/components/pages/ResetPassword.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/ResetPassword.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/auth/components/pages/SignUp.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/SignUp.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.js +16 -17
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Embed.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Embed.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/events/components/elements/ButtonJoin.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/elements/ButtonJoin.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.js +44 -69
- package/dist/prometheus-framework/src/modules/gallery/components/blocks/PhotoViewer.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/gallery/components/blocks/PhotoViewer.vue.js +64 -0
- package/dist/prometheus-framework/src/modules/gallery/components/blocks/PhotoViewer.vue2.cjs +1 -0
- package/dist/prometheus-framework/src/modules/gallery/components/blocks/PhotoViewer.vue2.js +1 -0
- package/dist/prometheus-framework/src/modules/gallery/components/pages/Gallery.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/gallery/components/pages/Gallery.vue.js +101 -14
- package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.js +166 -103
- package/dist/prometheus-framework/src/modules/globals/components/blocks/BlockSearch.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/globals/components/blocks/BlockSearch.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/globals/components/elements/ButtonDate.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/globals/components/elements/ButtonDate.vue.js +38 -1
- package/dist/prometheus-framework/src/modules/globals/components/sections/SectionPageTitle.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/globals/components/sections/SectionPageTitle.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/globals/services/globals.store.cjs +1 -1
- package/dist/prometheus-framework/src/modules/globals/services/globals.store.js +21 -21
- package/dist/prometheus-framework/src/modules/icons/skeletons/SkeletonBlogpost.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/icons/skeletons/SkeletonBlogpost.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/icons/skeletons/SkeletonEvent.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/icons/skeletons/SkeletonEvent.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/icons/skeletons/SkeletonEventShort.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/icons/skeletons/SkeletonEventShort.vue.js +5 -5
- package/dist/prometheus-framework/src/modules/icons/skeletons/SkeletonOrganization.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/icons/skeletons/SkeletonOrganization.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormDelivery.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormDelivery.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/elements/ButtonToggleMembership.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/elements/ButtonToggleMembership.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/LeftoverPositions.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/LeftoverPositions.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/ListPositions.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/ListPositions.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/Categories.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/Categories.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/products/components/sections/EditModifications.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/EditModifications.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/products/components/sections/FilterProducts.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/FilterProducts.vue.js +31 -32
- package/dist/prometheus-framework/src/modules/products/components/sections/SectionProduct.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/SectionProduct.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.js +1 -1
- package/dist/prometheus-framework.cjs.js +1 -1
- package/dist/prometheus-framework.es.js +1 -1
- package/dist/queryProcessor-g8208K6g.mjs +178 -0
- package/dist/queryProcessor-haY_gPGg.js +177 -0
- package/dist/style.css +1 -1
- package/dist/wallet.server.js +1 -1
- package/dist/wallet.server.mjs +1 -1
- package/dist/web-B8tq3Fda.mjs +54 -0
- package/dist/web-ByJkgGrt.js +1 -0
- package/package.json +1 -1
- package/src/components/DatePicker/Calendar.vue +82 -55
- package/src/components/Feed/Feed.vue +45 -16
- package/src/components/FieldTags/BlockTags.vue +30 -23
- package/src/components/Popup/Popup.vue +2 -2
- package/src/modules/events/components/pages/Events.vue +2 -48
- package/src/modules/gallery/components/blocks/PhotoViewer.vue +115 -0
- package/src/modules/gallery/components/pages/Gallery.vue +103 -6
- package/src/modules/gallery/components/sections/BackofficeGallery.vue +100 -32
- package/src/modules/gallery/controllers/gallery.controller.js +45 -38
- package/src/modules/gallery/models/photo.model.js +4 -0
- package/src/modules/globals/components/blocks/CardHeader.vue +1 -1
- package/src/modules/globals/components/elements/ButtonDate.vue +37 -43
- package/src/modules/globals/components/layouts/Client.vue +1 -1
- package/src/modules/globals/components/sections/SectionPageTitle.vue +1 -1
- package/src/modules/globals/controllers/utils/queryProcessor.js +21 -2
- package/src/modules/globals/services/globals.store.js +13 -17
- package/src/modules/icons/skeletons/SkeletonBlogpost.vue +1 -1
- package/src/modules/icons/skeletons/SkeletonEvent.vue +1 -1
- package/src/modules/icons/skeletons/SkeletonEventShort.vue +1 -1
- package/src/modules/icons/skeletons/SkeletonOrganization.vue +1 -1
- package/src/modules/products/components/sections/FilterProducts.vue +2 -1
- package/src/modules/gallery/components/sections/GalleryWithCategories.vue +0 -176
@@ -1,6 +1,6 @@
|
|
1
1
|
<template>
|
2
2
|
|
3
|
-
<div v-if="search" class="flex-nowrap flex gap-thin mn-b-thin">
|
3
|
+
<div v-if="search || date || sort" class="flex-nowrap flex gap-thin mn-b-thin">
|
4
4
|
|
5
5
|
<BlockSearch
|
6
6
|
v-if="search"
|
@@ -9,17 +9,19 @@
|
|
9
9
|
@search="updateSearch"
|
10
10
|
/>
|
11
11
|
|
12
|
-
|
12
|
+
<!-- <div class="flex-center flex pd-thin bg-light radius-extra aspect-1x1 h-100">
|
13
13
|
<IconFilter class="w-1r h-auto"/>
|
14
|
-
</div>
|
14
|
+
</div> -->
|
15
15
|
|
16
16
|
<Dropdown
|
17
|
+
v-if="date"
|
17
18
|
:label="{
|
18
|
-
component: ButtonDate
|
19
|
+
component: ButtonDate,
|
20
|
+
props: { date: date }
|
19
21
|
}"
|
20
|
-
:class="
|
21
|
-
class="flex-child flex-child-
|
22
|
-
:align="'right'"
|
22
|
+
:class="date.class || 'bg-light'"
|
23
|
+
class="flex-child flex-child-shrink-0 pd-r-small pd-l-small pd-thin bg-light radius-big"
|
24
|
+
:align="search ? 'right' : 'left'"
|
23
25
|
>
|
24
26
|
|
25
27
|
<Calendar
|
@@ -37,9 +39,9 @@
|
|
37
39
|
props: { order: sort.order },
|
38
40
|
class: 'w-1r'
|
39
41
|
}"
|
40
|
-
:class="
|
42
|
+
:class="sort.class || 'bg-light'"
|
41
43
|
class="radius-extra aspect-1x1 h-100"
|
42
|
-
:align="'right'"
|
44
|
+
:align="search ? 'right' : 'left'"
|
43
45
|
>
|
44
46
|
|
45
47
|
<BlockSorting
|
@@ -181,8 +183,8 @@ let sentinel = ref(null)
|
|
181
183
|
let currentSkip = ref(props.options.skip ? props.options.skip : 0);
|
182
184
|
let currentLimit = ref(props.options.limit ? props.options.limit : 10);
|
183
185
|
|
184
|
-
let sortParam = ref(sort.value?.param || 'createdAt');
|
185
|
-
let sortOrder = ref(sort.value?.order || 'asc');
|
186
|
+
// let sortParam = ref(sort.value?.param || 'createdAt');
|
187
|
+
// let sortOrder = ref(sort.value?.order || 'asc');
|
186
188
|
|
187
189
|
let currentSearch = ref('');
|
188
190
|
|
@@ -203,8 +205,10 @@ const loadMoreItems = async () => {
|
|
203
205
|
skip: currentSkip.value,
|
204
206
|
limit: currentLimit.value,
|
205
207
|
search: currentSearch.value,
|
206
|
-
|
207
|
-
|
208
|
+
dateStart: date.value ? date.value.start : null,
|
209
|
+
dateEnd: date.value ? date.value.end : null,
|
210
|
+
sortParam: sort.value ? sort.value.param : null,
|
211
|
+
sortOrder: sort.value ? sort.value.order : null,
|
208
212
|
...props.options
|
209
213
|
});
|
210
214
|
|
@@ -223,11 +227,14 @@ const loadMoreItems = async () => {
|
|
223
227
|
};
|
224
228
|
|
225
229
|
const fetchItems = async () => {
|
230
|
+
console.log('Date is', date.value)
|
226
231
|
const data = await props.store.read({
|
227
232
|
skip: currentSkip.value,
|
228
233
|
limit: currentLimit.value,
|
229
|
-
|
230
|
-
|
234
|
+
dateStart: date.value ? date.value.start : null,
|
235
|
+
dateEnd: date.value ? date.value.end : null,
|
236
|
+
sortParam: sort.value ? sort.value.param : null,
|
237
|
+
sortOrder: sort.value ? sort.value.order : null,
|
231
238
|
search: currentSearch.value,
|
232
239
|
...props.options
|
233
240
|
});
|
@@ -252,6 +259,27 @@ watch(() => props.external, (newVal, oldVal) => {
|
|
252
259
|
}
|
253
260
|
}, { deep: true });
|
254
261
|
|
262
|
+
watch(() => date.value, (newVal, oldVal) => {
|
263
|
+
if (newVal !== oldVal) {
|
264
|
+
fetchItems();
|
265
|
+
}
|
266
|
+
}, { deep: true });
|
267
|
+
|
268
|
+
watch(() => sort.value?.order, (newVal, oldVal) => {
|
269
|
+
|
270
|
+
if (newVal !== oldVal) {
|
271
|
+
fetchItems();
|
272
|
+
}
|
273
|
+
}, { deep: true });
|
274
|
+
|
275
|
+
watch(() => sort.value?.param, (newVal, oldVal) => {
|
276
|
+
|
277
|
+
if (newVal !== oldVal) {
|
278
|
+
fetchItems();
|
279
|
+
}
|
280
|
+
}, { deep: true });
|
281
|
+
|
282
|
+
|
255
283
|
watch(() => props.options, (newVal, oldVal) => {
|
256
284
|
if (
|
257
285
|
newVal.organization !== oldVal.organization ||
|
@@ -261,7 +289,8 @@ watch(() => props.options, (newVal, oldVal) => {
|
|
261
289
|
newVal.search !== oldVal.search ||
|
262
290
|
newVal.status !== oldVal.status ||
|
263
291
|
newVal.hidden !== oldVal.hidden ||
|
264
|
-
newVal.type !== oldVal.type
|
292
|
+
newVal.type !== oldVal.type ||
|
293
|
+
newVal.tags !== oldVal.tags
|
265
294
|
) {
|
266
295
|
fetchItems();
|
267
296
|
}
|
@@ -17,40 +17,47 @@
|
|
17
17
|
class="mn-b-thin bg-light radius-medium pd-small"
|
18
18
|
/>
|
19
19
|
|
20
|
-
<p class="mn-b-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
<span v-else>You added all suggested tags</span>
|
33
|
-
</p>
|
20
|
+
<p class="p-small mn-b-thin">Suggested:</p>
|
21
|
+
|
22
|
+
<span
|
23
|
+
v-if="filteredSuggestedItems.length > 0"
|
24
|
+
v-for="(tag,index) in filteredSuggestedItems"
|
25
|
+
@click="addTag(tag)"
|
26
|
+
class="cursor-pointer t-medium ti-tag-toDefactor"
|
27
|
+
:class="{'mn-r-micro':index !== filteredSuggestedItems.length - 1}"
|
28
|
+
>
|
29
|
+
{{ tag.text }}
|
30
|
+
</span>
|
31
|
+
<span v-else>You added all suggested tags</span>
|
34
32
|
</div>
|
35
33
|
</template>
|
36
34
|
|
37
35
|
<script setup>
|
38
36
|
import FieldTags from '@pf/src/components/FieldTags/FieldTags.vue'
|
39
|
-
import { ref, computed,
|
37
|
+
import { ref, computed, onMounted } from 'vue';
|
40
38
|
|
41
39
|
const emits = defineEmits(['tags-changed']);
|
42
|
-
const props = defineProps(
|
40
|
+
const props = defineProps({
|
41
|
+
tags: {
|
42
|
+
type: Array
|
43
|
+
},
|
44
|
+
tagsSuggested: {
|
45
|
+
type: Array,
|
46
|
+
default: [
|
47
|
+
{ text: 'story' },
|
48
|
+
{ text: 'news' },
|
49
|
+
{ text: 'guide' },
|
50
|
+
{ text: 'discussion' },
|
51
|
+
{ text: 'photos' },
|
52
|
+
]
|
53
|
+
}
|
54
|
+
});
|
43
55
|
|
44
56
|
const tag = ref('');
|
45
57
|
|
46
58
|
const selectedTags = ref([]);
|
47
|
-
|
48
|
-
|
49
|
-
{ text: 'news' },
|
50
|
-
{ text: 'guide' },
|
51
|
-
{ text: 'discussion' },
|
52
|
-
{ text: 'photos' },
|
53
|
-
]);
|
59
|
+
|
60
|
+
const autocompleteItems = ref(props.tagsSuggested);
|
54
61
|
|
55
62
|
if (props.tags) selectedTags.value = props.tags.map(tag => ({text: tag}))
|
56
63
|
|
@@ -6,8 +6,8 @@
|
|
6
6
|
|
7
7
|
<transition name="TransitionTranslateY" mode="out-in">
|
8
8
|
<section class="pos-relative z-index-4" v-bind="$attrs" :class="$attrs.class">
|
9
|
-
<h4 class="mn-b-small">{{title}}</h4>
|
10
|
-
<IconCross @click="closePopup()" class="cursor-pointer pos-absolute pos-t-0 pos-r-0 mn-t-semi mn-r-semi hover-scale-1 i-
|
9
|
+
<h4 v-if="title" class="mn-b-small">{{title}}</h4>
|
10
|
+
<IconCross :fill="'rgb(var(--white))'" @click="closePopup()" class="cursor-pointer bg-second pd-micro radius-extra pos-absolute pos-t-0 pos-r-0 mn-t-semi mn-r-semi hover-scale-1 i-medium z-index-5"/>
|
11
11
|
<slot></slot>
|
12
12
|
</section>
|
13
13
|
</transition>
|
@@ -9,60 +9,14 @@
|
|
9
9
|
Featured
|
10
10
|
</h2>
|
11
11
|
</header>
|
12
|
+
|
12
13
|
<List
|
13
14
|
:user="auth.state.user._id"
|
14
15
|
class="bg-light mn-b-medium radius-big"
|
15
16
|
:phase="'planned'"
|
16
17
|
/>
|
17
18
|
|
18
|
-
|
19
|
-
<div class="cols-2 gap-medium pd-medium bg-light radius-big">
|
20
|
-
<div class="">
|
21
|
-
<h2
|
22
|
-
class="mn-b-medium"
|
23
|
-
>
|
24
|
-
Finished Events
|
25
|
-
</h2>
|
26
|
-
<List
|
27
|
-
:user="auth.state.user._id"
|
28
|
-
class="bg-white mn-b-medium radius-big"
|
29
|
-
:phase="'finished'"
|
30
|
-
/>
|
31
|
-
</div>
|
32
|
-
|
33
|
-
<div class="">
|
34
|
-
<h2
|
35
|
-
class="mn-b-medium"
|
36
|
-
>
|
37
|
-
Planned
|
38
|
-
</h2>
|
39
|
-
<List
|
40
|
-
:user="auth.state.user._id"
|
41
|
-
class="bg-white mn-b-medium radius-big"
|
42
|
-
:phase="'planned'"
|
43
|
-
/>
|
44
|
-
</div>
|
45
|
-
</div>
|
46
|
-
|
47
|
-
|
48
|
-
<header
|
49
|
-
class="mn-b-medium flex-v-center flex-nowrap flex"
|
50
|
-
>
|
51
|
-
<h2
|
52
|
-
class="mn-r-medium"
|
53
|
-
>
|
54
|
-
All Events
|
55
|
-
</h2>
|
56
|
-
|
57
|
-
<button
|
58
|
-
@click="router.push({name: 'Create Event'})"
|
59
|
-
class="radius-100 i-big hover-scale-1 cursor-pointer t-white bg-second"
|
60
|
-
>
|
61
|
-
+
|
62
|
-
</button>
|
63
|
-
</header>
|
64
|
-
|
65
|
-
<DatePicker
|
19
|
+
<DatePicker
|
66
20
|
v-model:date="events.state.filter.date"
|
67
21
|
:locale="$i18n.locale"
|
68
22
|
class="radius-semi o-hidden bg-light mn-b-thin pd-l-zero pd-r-zero pd-medium"
|
@@ -0,0 +1,115 @@
|
|
1
|
+
<template>
|
2
|
+
<div class="photo-container" @wheel="handleWheel" @mousedown="startDrag" @touchstart="handleTouchStart" @touchmove="handleTouchMove" @touchend="handleTouchEnd">
|
3
|
+
<img :src="photoUrl" :style="imgStyle" ref="image" @load="initialize" />
|
4
|
+
</div>
|
5
|
+
</template>
|
6
|
+
|
7
|
+
<script setup>
|
8
|
+
import { ref, reactive, computed } from 'vue';
|
9
|
+
|
10
|
+
const props = defineProps({
|
11
|
+
photoUrl: String,
|
12
|
+
show: Boolean,
|
13
|
+
});
|
14
|
+
|
15
|
+
const scale = ref(1);
|
16
|
+
const position = reactive({ x: 0, y: 0 });
|
17
|
+
const dragging = ref(false);
|
18
|
+
const startPosition = reactive({ x: 0, y: 0 });
|
19
|
+
const startScale = ref(1);
|
20
|
+
const startDistance = ref(0);
|
21
|
+
|
22
|
+
const imgStyle = computed(() => ({
|
23
|
+
transform: `scale(${scale.value}) translate(${position.x}px, ${position.y}px)`,
|
24
|
+
}));
|
25
|
+
|
26
|
+
const handleWheel = (event) => {
|
27
|
+
event.preventDefault();
|
28
|
+
const delta = event.deltaY > 0 ? -0.1 : 0.1;
|
29
|
+
scale.value = Math.min(Math.max(1, scale.value + delta), 3);
|
30
|
+
};
|
31
|
+
|
32
|
+
const startDrag = (event) => {
|
33
|
+
event.preventDefault();
|
34
|
+
dragging.value = true;
|
35
|
+
startPosition.x = event.type === 'mousedown' ? event.clientX : event.touches[0].clientX;
|
36
|
+
startPosition.y = event.type === 'mousedown' ? event.clientY : event.touches[0].clientY;
|
37
|
+
const move = (moveEvent) => {
|
38
|
+
if (dragging.value) {
|
39
|
+
const currentX = moveEvent.type === 'mousemove' ? moveEvent.clientX : moveEvent.touches[0].clientX;
|
40
|
+
const currentY = moveEvent.type === 'mousemove' ? moveEvent.clientY : moveEvent.touches[0].clientY;
|
41
|
+
position.x += (currentX - startPosition.x) / scale.value;
|
42
|
+
position.y += (currentY - startPosition.y) / scale.value;
|
43
|
+
startPosition.x = currentX;
|
44
|
+
startPosition.y = currentY;
|
45
|
+
}
|
46
|
+
};
|
47
|
+
const endDrag = () => {
|
48
|
+
dragging.value = false;
|
49
|
+
document.removeEventListener('mousemove', move);
|
50
|
+
document.removeEventListener('mouseup', endDrag);
|
51
|
+
document.removeEventListener('touchmove', move);
|
52
|
+
document.removeEventListener('touchend', endDrag);
|
53
|
+
};
|
54
|
+
document.addEventListener('mousemove', move);
|
55
|
+
document.addEventListener('mouseup', endDrag);
|
56
|
+
document.addEventListener('touchmove', move);
|
57
|
+
document.addEventListener('touchend', endDrag);
|
58
|
+
};
|
59
|
+
|
60
|
+
const handleTouchStart = (event) => {
|
61
|
+
if (event.touches.length === 2) {
|
62
|
+
const touch1 = event.touches[0];
|
63
|
+
const touch2 = event.touches[1];
|
64
|
+
const distanceX = Math.abs(touch1.clientX - touch2.clientX);
|
65
|
+
const distanceY = Math.abs(touch1.clientY - touch2.clientY);
|
66
|
+
startDistance.value = Math.sqrt(distanceX ** 2 + distanceY ** 2);
|
67
|
+
startScale.value = scale.value;
|
68
|
+
} else {
|
69
|
+
startDrag(event);
|
70
|
+
}
|
71
|
+
};
|
72
|
+
|
73
|
+
const handleTouchMove = (event) => {
|
74
|
+
if (event.touches.length === 2) {
|
75
|
+
event.preventDefault();
|
76
|
+
const touch1 = event.touches[0];
|
77
|
+
const touch2 = event.touches[1];
|
78
|
+
const distanceX = Math.abs(touch1.clientX - touch2.clientX);
|
79
|
+
const distanceY = Math.abs(touch1.clientY - touch2.clientY);
|
80
|
+
const newDistance = Math.sqrt(distanceX ** 2 + distanceY ** 2);
|
81
|
+
const scaleFactor = newDistance / startDistance.value;
|
82
|
+
scale.value = Math.min(Math.max(1, startScale.value * scaleFactor), 3);
|
83
|
+
}
|
84
|
+
};
|
85
|
+
|
86
|
+
const handleTouchEnd = (event) => {
|
87
|
+
if (event.touches.length === 0) {
|
88
|
+
startDistance.value = 0;
|
89
|
+
}
|
90
|
+
};
|
91
|
+
|
92
|
+
const initialize = () => {
|
93
|
+
scale.value = 1;
|
94
|
+
position.x = 0;
|
95
|
+
position.y = 0;
|
96
|
+
};
|
97
|
+
</script>
|
98
|
+
|
99
|
+
<style scoped>
|
100
|
+
.photo-container {
|
101
|
+
width: 100%;
|
102
|
+
height: 100%;
|
103
|
+
background: black;
|
104
|
+
overflow: hidden;
|
105
|
+
position: relative;
|
106
|
+
cursor: grab;
|
107
|
+
}
|
108
|
+
|
109
|
+
.photo-container img {
|
110
|
+
width: 100%;
|
111
|
+
height: 100%;
|
112
|
+
object-fit: scale-down;
|
113
|
+
transition: transform 0.3s;
|
114
|
+
}
|
115
|
+
</style>
|
@@ -1,15 +1,112 @@
|
|
1
1
|
<template>
|
2
|
-
<div class="
|
3
|
-
<
|
2
|
+
<div class="cols-1 gap-thin pd-thin">
|
3
|
+
<SectionPageTitle
|
4
|
+
:title="$t('gallery.title')"
|
5
|
+
@update:tabs_current="(update) => tab = update"
|
6
|
+
:tabs_current="tab"
|
7
|
+
:tabs="[
|
8
|
+
{ name: 'All', value: 'all' },
|
9
|
+
{ name: 'Place', value: 'place' },
|
10
|
+
{ name: 'Drinks', value: 'drinks' },
|
11
|
+
{ name: 'People', value: 'people' },
|
12
|
+
{ name: 'Events', value: 'events' }
|
13
|
+
]"
|
14
|
+
class="mn-b-small bg-light bg-light radius-big"
|
15
|
+
/>
|
16
|
+
<Popup
|
17
|
+
@close-popup="closePreviewPopup"
|
18
|
+
:isPopupOpen="isOpenPreviewPopup"
|
19
|
+
class="bg-black o-hidden w-100 h-100 radius-big"
|
20
|
+
>
|
21
|
+
<PhotoViewer
|
22
|
+
:photoUrl="selectedPhoto.image"
|
23
|
+
/>
|
24
|
+
</Popup>
|
4
25
|
|
5
|
-
<
|
6
|
-
|
7
|
-
|
26
|
+
<Feed
|
27
|
+
v-model:items="photos"
|
28
|
+
v-model:sort="sort"
|
29
|
+
v-model:date="date"
|
30
|
+
:states="{
|
31
|
+
empty: {
|
32
|
+
title: 'No Photos Found',
|
33
|
+
description: 'Currently, there are no photos in gallery.'
|
34
|
+
},
|
35
|
+
}"
|
36
|
+
:store="{
|
37
|
+
read: (options) => gallery.read(options)
|
38
|
+
}"
|
39
|
+
:options="{
|
40
|
+
limit: 15,
|
41
|
+
status: 'published',
|
42
|
+
...(tab !== 'all' && { tags: tab })
|
43
|
+
}"
|
44
|
+
v-slot="{
|
45
|
+
items
|
46
|
+
}"
|
47
|
+
class="cols-3 gap-thin"
|
48
|
+
>
|
49
|
+
<div v-for="item in items" :key="item._id" class="bg-light radius-medium o-hidden flex-column pos-relative flex-wrap">
|
50
|
+
<div class="w-100 h-100 pos-relative">
|
51
|
+
<img
|
52
|
+
:src="(FILE_SERVER_URL || '') + item.cover"
|
53
|
+
class="w-100 h-100 object-fit-cover bg-black " @click="openPreviewPopup(item)"
|
54
|
+
/>
|
55
|
+
</div>
|
56
|
+
</div>
|
57
|
+
</Feed>
|
8
58
|
</div>
|
9
59
|
</template>
|
10
60
|
|
11
61
|
<script setup>
|
62
|
+
import { ref, onMounted, reactive, computed } from 'vue'
|
63
|
+
|
12
64
|
import Title from '@pf/src/modules/globals/components/sections/Title.vue';
|
13
65
|
|
14
|
-
import
|
66
|
+
import Feed from '@pf/src/components/Feed/Feed.vue'
|
67
|
+
import Popup from '@pf/src/components/Popup/Popup.vue'
|
68
|
+
|
69
|
+
import SectionPageTitle from '@pf/src/modules/globals/components/sections/SectionPageTitle.vue'
|
70
|
+
|
71
|
+
import PhotoViewer from '@pf/src/modules/gallery/components/blocks/PhotoViewer.vue'
|
72
|
+
|
73
|
+
import gallery from '@pf/src/modules/gallery/store/gallery';
|
74
|
+
|
75
|
+
const photos = ref([])
|
76
|
+
|
77
|
+
const tab = ref('all')
|
78
|
+
|
79
|
+
let sort = ref({
|
80
|
+
param: 'createdAt',
|
81
|
+
order: 'desc',
|
82
|
+
options: [{
|
83
|
+
label: 'Date',
|
84
|
+
value: 'createdAt'
|
85
|
+
},{
|
86
|
+
label: 'Popularity',
|
87
|
+
value: 'views'
|
88
|
+
},{
|
89
|
+
label: 'Creator',
|
90
|
+
value: 'creator'
|
91
|
+
}]
|
92
|
+
})
|
93
|
+
// Date
|
94
|
+
let date = ref({
|
95
|
+
start: null,
|
96
|
+
end: null
|
97
|
+
})
|
98
|
+
|
99
|
+
const selectedPhoto = ref(null);
|
100
|
+
|
101
|
+
// Preview Photo
|
102
|
+
const isOpenPreviewPopup = ref(false);
|
103
|
+
function openPreviewPopup(photo) {
|
104
|
+
isOpenPreviewPopup.value = true;
|
105
|
+
selectedPhoto.value = photo;
|
106
|
+
}
|
107
|
+
function closePreviewPopup() {
|
108
|
+
isOpenPreviewPopup.value = false;
|
109
|
+
selectedPhoto.value = null;
|
110
|
+
}
|
111
|
+
|
15
112
|
</script>
|