@ozdao/prometheus-framework 0.2.117 → 0.2.119
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 +9 -3
- package/dist/gallery.server.mjs +9 -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/Block/Block.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Block/Block.vue.js +1 -1
- package/dist/prometheus-framework/src/components/Button/Button.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Button/Button.vue.js +1 -94
- package/dist/prometheus-framework/src/components/Button/Button.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Button/Button.vue2.js +94 -1
- 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/Dropdown/Dropdown.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue.js +58 -1
- package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue2.js +1 -58
- 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 +1 -84
- package/dist/prometheus-framework/src/components/Field/Field.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Field/Field.vue2.js +84 -1
- 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 +1 -73
- package/dist/prometheus-framework/src/components/Popup/Popup.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Popup/Popup.vue2.js +77 -1
- package/dist/prometheus-framework/src/components/Select/Select.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Select/Select.vue.js +1 -103
- package/dist/prometheus-framework/src/components/Select/Select.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Select/Select.vue2.js +103 -1
- package/dist/prometheus-framework/src/components/Tooltip/Tooltip.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Tooltip/Tooltip.vue.js +1 -45
- package/dist/prometheus-framework/src/components/Tooltip/Tooltip.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Tooltip/Tooltip.vue2.js +45 -1
- 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/layouts/Community.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.js +1 -1
- 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 +3 -3
- 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 +4 -4
- 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 +17 -18
- 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/constructor/components/elements/Textarea.vue.cjs +1 -5
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.js +0 -66
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.cjs +5 -1
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.js +66 -0
- package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.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 +2 -2
- 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 +4 -4
- 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 +3 -3
- 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 +167 -104
- package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.js +2 -2
- 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 +4 -4
- 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/navigation/IconChevronBottom.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/icons/navigation/IconChevronBottom.vue.js +30 -0
- 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/landing/components/sections/SectionGuide.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/landing/components/sections/SectionGuide.vue.js +98 -0
- package/dist/prometheus-framework/src/modules/landing/landing.client.cjs +1 -1
- package/dist/prometheus-framework/src/modules/landing/landing.client.js +6 -4
- 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/OrderBackoffice.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderBackoffice.vue.js +1 -1
- 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 +4 -4
- 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 +3 -3
- 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 +2 -2
- 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/orders/components/sections/FormPayment.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormPayment.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 +4 -4
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.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 +4 -4
- package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.vue.js +1 -1
- 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 +3 -3
- 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 +3 -3
- 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 +5 -5
- 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 +2 -2
- package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.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 +3 -3
- 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 +3 -3
- 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 +3 -3
- 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 +3 -3
- 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 +3 -3
- 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 +3 -3
- 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 +5 -5
- 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/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/landing/landing.client.js +2 -0
- package/src/modules/products/components/sections/FilterProducts.vue +2 -1
- package/src/modules/gallery/components/sections/GalleryWithCategories.vue +0 -176
@@ -1,176 +0,0 @@
|
|
1
|
-
<template>
|
2
|
-
<div>
|
3
|
-
<div class=" pd-medium flex-v-center gap-big flex-nowrap flex pd-t-thin pd-b-thin o-scroll">
|
4
|
-
<a
|
5
|
-
v-for="category in categories"
|
6
|
-
:key="category"
|
7
|
-
@click="filter(category)"
|
8
|
-
class="h3 uppercase"
|
9
|
-
:class="{
|
10
|
-
't-transp': selectedCategory !== category,
|
11
|
-
'pd-thin bg-main radius-small': selectedCategory === category
|
12
|
-
}"
|
13
|
-
>
|
14
|
-
{{ $t('gallery.categories.' + category) }}
|
15
|
-
</a>
|
16
|
-
|
17
|
-
<button v-if="isEditablePath" @click="openModal(null)" class="t-black bg-second button-small button">+</button>
|
18
|
-
</div>
|
19
|
-
|
20
|
-
<div ref="grid" class="pd-medium cols-4 gap-thin">
|
21
|
-
<div
|
22
|
-
v-for="(item, index) in filteredGallery"
|
23
|
-
:key="item.id"
|
24
|
-
:data-id="item.id"
|
25
|
-
>
|
26
|
-
|
27
|
-
<transition name="scaleIn" mode="in-out">
|
28
|
-
<img
|
29
|
-
v-if="!isEditablePath && grid"
|
30
|
-
:src="'https://thecommunephuket.com/photos/' + item.cover"
|
31
|
-
class="w-100 h-100 o-hidden radius-big object-fit-cover"
|
32
|
-
@click="openModal(item.image)"
|
33
|
-
/>
|
34
|
-
</transition>
|
35
|
-
</div>
|
36
|
-
|
37
|
-
<!-- Loader -->
|
38
|
-
<!-- <div v-show="loading" class="loader">Loading...</div> -->
|
39
|
-
<!-- Sentinel -->
|
40
|
-
<div ref="sentinel" class="sentinel"/>
|
41
|
-
|
42
|
-
<div v-show="selectedImage.image !== false && modal === 'modal'" class="modal pd-thin">
|
43
|
-
<div class="modal-content radius-big">
|
44
|
-
<div class="">
|
45
|
-
<span class="close" @click="closeModal">×</span>
|
46
|
-
<img :src="'https://thecommunephuket.com/photos/' + selectedImage.image">
|
47
|
-
</div>
|
48
|
-
</div>
|
49
|
-
</div>
|
50
|
-
|
51
|
-
|
52
|
-
</div>
|
53
|
-
</div>
|
54
|
-
</template>
|
55
|
-
|
56
|
-
<script setup>
|
57
|
-
import { ref, onMounted, reactive, computed } from 'vue'
|
58
|
-
import { useRoute } from 'vue-router'
|
59
|
-
|
60
|
-
import Field from '@pf/src/components/Field/Field.vue'
|
61
|
-
import Button from '@pf/src/components/Button/Button.vue'
|
62
|
-
import Select from '@pf/src/components/Select/Select.vue'
|
63
|
-
import Upload from '@pf/src/components/Upload/Upload.vue'
|
64
|
-
|
65
|
-
import gallery from '@pf/src/modules/gallery/store/gallery';
|
66
|
-
|
67
|
-
|
68
|
-
const route = useRoute()
|
69
|
-
|
70
|
-
const isEditablePath = false
|
71
|
-
|
72
|
-
// Gallery Grid
|
73
|
-
const grid = ref(null)
|
74
|
-
|
75
|
-
const categories = ['all', 'place', 'drinks', 'people', 'events']
|
76
|
-
|
77
|
-
// Pagination
|
78
|
-
let page = 1
|
79
|
-
const limit = 10
|
80
|
-
|
81
|
-
let sentinel = ref(null)
|
82
|
-
let loading = ref(false)
|
83
|
-
|
84
|
-
const filteredGallery = computed(() => {
|
85
|
-
if (selectedCategory.value === 'all') {
|
86
|
-
return state.gallery
|
87
|
-
} else {
|
88
|
-
return state.gallery.filter(item => item.categories.includes(selectedCategory.value))
|
89
|
-
}
|
90
|
-
})
|
91
|
-
|
92
|
-
const loadMore = async () => {
|
93
|
-
loading.value = true
|
94
|
-
await actions.fetchGallery(page, limit)
|
95
|
-
loading.value = false
|
96
|
-
}
|
97
|
-
|
98
|
-
// Popup
|
99
|
-
const modal = ref(null)
|
100
|
-
// Popup
|
101
|
-
const selectedImage = ref({
|
102
|
-
categories: '',
|
103
|
-
size: '',
|
104
|
-
image: false
|
105
|
-
})
|
106
|
-
|
107
|
-
const previewImage = ref(null)
|
108
|
-
|
109
|
-
const openModal = (image) => {
|
110
|
-
if(isEditablePath.value) {
|
111
|
-
// Если мы находимся на пути /account/gallery, открываем редактирование
|
112
|
-
openEditModal(image)
|
113
|
-
} else {
|
114
|
-
// В противном случае открываем просмотр
|
115
|
-
modal.value = "modal"
|
116
|
-
selectedImage.value.image = image
|
117
|
-
disableScroll()
|
118
|
-
}
|
119
|
-
}
|
120
|
-
|
121
|
-
const openEditModal = (image) => {
|
122
|
-
modal.value = "edit-modal"
|
123
|
-
selectedImage.value = image || {
|
124
|
-
categories: '',
|
125
|
-
size: '',
|
126
|
-
image: null
|
127
|
-
}
|
128
|
-
disableScroll()
|
129
|
-
}
|
130
|
-
|
131
|
-
const closeModal = () => {
|
132
|
-
selectedImage.value = {
|
133
|
-
categories: '',
|
134
|
-
size: '',
|
135
|
-
image: false
|
136
|
-
}
|
137
|
-
previewImage.value = null;
|
138
|
-
enableScroll()
|
139
|
-
}
|
140
|
-
|
141
|
-
const disableScroll = () => {
|
142
|
-
document.body.style.overflow = 'hidden'
|
143
|
-
document.documentElement.style.overflow = 'hidden'
|
144
|
-
}
|
145
|
-
|
146
|
-
const enableScroll = () => {
|
147
|
-
document.body.style.overflow = ''
|
148
|
-
document.documentElement.style.overflow = ''
|
149
|
-
}
|
150
|
-
|
151
|
-
|
152
|
-
let selectedCategory = ref('all')
|
153
|
-
|
154
|
-
const filter = (category) => {
|
155
|
-
selectedCategory.value = category
|
156
|
-
}
|
157
|
-
|
158
|
-
onMounted(async () => {
|
159
|
-
await actions.fetchGallery(page, limit)
|
160
|
-
|
161
|
-
if (typeof window !== 'undefined') {
|
162
|
-
const observer = new IntersectionObserver(entries => {
|
163
|
-
if (entries.some(entry => entry.isIntersecting)) {
|
164
|
-
page += 1
|
165
|
-
loadMore()
|
166
|
-
}
|
167
|
-
})
|
168
|
-
|
169
|
-
observer.observe(sentinel.value)
|
170
|
-
}
|
171
|
-
})
|
172
|
-
|
173
|
-
</script>
|
174
|
-
|
175
|
-
<style scoped>
|
176
|
-
</style>
|