@ozdao/prometheus-framework 0.1.69 → 0.1.72
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/auth.server.js +1 -1
- package/dist/auth.server.mjs +1 -1
- package/dist/components/Upload/Upload.vue.d.ts.map +1 -1
- package/dist/main.css +1 -1
- package/dist/modules/constructor/components/elements/H2.vue.d.ts +1 -1
- package/dist/modules/constructor/components/elements/Textarea.vue.d.ts +1 -1
- package/dist/modules/events/components/sections/Feed.vue.d.ts +1 -1
- package/dist/modules/products/components/sections/EditProductInfo.vue.d.ts +5 -1
- package/dist/prometheus-framework/src/components/Popup/Popup.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Popup/Popup.vue.js +72 -2
- package/dist/prometheus-framework/src/components/Popup/Popup.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Popup/Popup.vue2.js +2 -72
- package/dist/prometheus-framework/src/modules/auth/auth.client.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/auth.client.js +27 -24
- package/dist/prometheus-framework/src/modules/backoffice/backoffice.client.cjs +1 -1
- package/dist/prometheus-framework/src/modules/backoffice/backoffice.client.js +5 -2
- package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/community/community.client.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/community.client.js +33 -30
- 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 +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 +1 -1
- 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 +24 -21
- package/dist/prometheus-framework/src/modules/events/events.client.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/events.client.js +21 -18
- package/dist/prometheus-framework/src/modules/gallery/gallery.client.cjs +1 -1
- package/dist/prometheus-framework/src/modules/gallery/gallery.client.js +7 -4
- package/dist/prometheus-framework/src/modules/globals/globals.client.cjs +1 -1
- package/dist/prometheus-framework/src/modules/globals/globals.client.js +9 -6
- package/dist/prometheus-framework/src/modules/icons/icons.client.cjs +1 -1
- package/dist/prometheus-framework/src/modules/icons/icons.client.js +49 -46
- package/dist/prometheus-framework/src/modules/icons/socials/facebook.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/icons/socials/instagram.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/icons/socials/linkedin.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/icons/socials/linkedin.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/icons/socials/reddit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/icons/socials/telegram.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/icons/socials/twitter.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/icons/socials/twitter.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/landing/landing.client.cjs +1 -1
- package/dist/prometheus-framework/src/modules/landing/landing.client.js +5 -2
- 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 +1 -1
- package/dist/prometheus-framework/src/modules/legal/legal.client.cjs +1 -1
- package/dist/prometheus-framework/src/modules/legal/legal.client.js +14 -10
- package/dist/prometheus-framework/src/modules/middlewares/middlewares.client.cjs +1 -1
- package/dist/prometheus-framework/src/modules/middlewares/middlewares.client.js +8 -1
- package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue.js +11 -2
- package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue2.js +2 -11
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/Socials.vue.js +9 -9
- 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 +1 -1
- 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 +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.js +1 -1
- 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 +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 +1 -1
- 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 +9 -9
- package/dist/prometheus-framework/src/modules/organizations/organizations.client.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/organizations.client.js +61 -58
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardProduct.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardProduct.vue.js +1 -1
- 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/elements/THC.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/elements/THC.vue.js +2 -78
- package/dist/prometheus-framework/src/modules/products/components/elements/THC.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/elements/THC.vue2.js +78 -2
- 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 +1 -1
- 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/reports/reports.client.cjs +1 -1
- package/dist/prometheus-framework/src/modules/reports/reports.client.js +7 -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 +1 -1
- package/dist/prometheus-framework/src/modules/users/users.client.cjs +1 -1
- package/dist/prometheus-framework/src/modules/users/users.client.js +11 -8
- package/dist/prometheus-framework.cjs.js +21 -21
- package/dist/prometheus-framework.es.js +705 -687
- package/dist/style.css +1 -1
- package/package.json +40 -39
- package/src/components/Button/Button.vue +1 -1
- package/src/components/Search/Search.vue +1 -1
- package/src/components/Sidebar/Sidebar.vue +8 -10
- package/src/components/Status/Status.vue +1 -1
- package/src/components/Upload/Upload.vue +28 -8
- package/src/{main.ts → main.js} +1 -2
- package/src/modules/auth/auth.client.js +1 -1
- package/src/modules/auth/controllers/auth.controller.js +1 -1
- package/src/modules/auth/store/auth.js +24 -21
- package/src/modules/backoffice/backoffice.client.js +1 -1
- package/src/modules/backoffice/components/admin/Backcalls.vue +1 -1
- package/src/modules/backoffice/components/admin/Categories.vue +1 -1
- package/src/modules/backoffice/components/admin/CategoryEdit.vue +1 -1
- package/src/modules/backoffice/components/admin/Dashboard.vue +1 -1
- package/src/modules/backoffice/components/admin/FastOrders.vue +1 -1
- package/src/modules/backoffice/components/admin/PageEdit.vue +1 -1
- package/src/modules/backoffice/components/admin/Pages.vue +1 -1
- package/src/modules/backoffice/components/admin/ProductEdit.vue +0 -2
- package/src/modules/backoffice/components/admin/User.vue +1 -1
- package/src/modules/backoffice/components/admin/Users.vue +1 -1
- package/src/modules/community/community.client.js +1 -1
- package/src/modules/constructor/components/elements/Audio.vue +82 -0
- package/src/modules/constructor/components/elements/Embed.vue +85 -0
- package/src/modules/constructor/components/sections/Constructor.vue +54 -7
- package/src/modules/events/components/pages/Events.vue +2 -2
- package/src/modules/events/events.client.js +1 -1
- package/src/modules/gallery/components/pages/Gallery.vue +1 -7
- package/src/modules/gallery/components/sections/GalleryWithCategories.vue +8 -24
- package/src/modules/gallery/gallery.client.js +2 -6
- package/src/modules/globals/globals.client.js +1 -1
- package/src/modules/globals/mixins/mixins.js +52 -0
- package/src/modules/globals/router/routerGuards.js +28 -0
- package/src/modules/icons/icons.client.js +1 -1
- package/src/modules/landing/landing.client.js +1 -1
- package/src/modules/legal/legal.client.js +1 -1
- package/src/modules/marketplace/components/layouts/Marketplace.vue +0 -1
- package/src/modules/middlewares/middlewares.client.js +1 -1
- package/src/modules/orders/components/blocks/Positions.vue +1 -1
- package/src/modules/orders/components/pages/ViewOrder.vue +1 -1
- package/src/modules/organizations/components/pages/Organization.vue +2 -2
- package/src/modules/organizations/organizations.client.js +1 -1
- package/src/modules/payments/components/pages/Payments.vue +3 -4
- package/src/modules/products/components/blocks/CardLeftover.vue +1 -0
- package/src/modules/products/components/blocks/CardProduct.vue +1 -15
- package/src/modules/products/components/sections/EditProductInfo.vue +14 -16
- package/src/modules/products/components/sections/FilterProducts.vue +2 -0
- package/src/modules/products/components/sections/ProductInformationSection.vue +2 -5
- package/src/modules/products/components/sections/SectionProduct.vue +0 -1
- package/src/modules/products/components/sections/SortProducts.vue +0 -2
- package/src/modules/products/store/categories.js +9 -9
- package/src/modules/products/store/leftovers.js +9 -6
- package/src/modules/products/store/products.js +0 -2
- package/src/modules/reports/reports.client.js +1 -1
- package/src/modules/users/components/pages/Profile.vue +5 -3
- package/src/modules/users/users.client.js +1 -1
- package/src/modules/wallet/components/pages/Wallet.vue +1 -1
- package/src/styles/theme.scss +0 -1
- package/src/styles/components/button.scss +0 -253
- /package/src/components/{index.ts → index.js} +0 -0
package/src/{main.ts → main.js}
RENAMED
@@ -1,4 +1,3 @@
|
|
1
|
-
import type { App } from 'vue';
|
2
1
|
|
3
2
|
// Define Styles
|
4
3
|
// ------------------------------------- //
|
@@ -29,7 +28,7 @@ import {
|
|
29
28
|
} from './components';
|
30
29
|
|
31
30
|
export default {
|
32
|
-
install: (app
|
31
|
+
install: (app) => {
|
33
32
|
app.component('Address', () => import('./components/Address/Address.vue'));
|
34
33
|
app.component('Button', () => import('./components/Button/Button.vue'));
|
35
34
|
app.component('Checkbox', () => import('./components/Checkbox/Checkbox.vue'));
|
@@ -41,7 +41,7 @@ const controllerFactory = (db) => {
|
|
41
41
|
|
42
42
|
let user = await User.findOne(query).populate('roles').exec();
|
43
43
|
|
44
|
-
if ((type === 'email' || type === 'phone')
|
44
|
+
if ((type === 'email' || type === 'phone')) {
|
45
45
|
|
46
46
|
const passwordIsValid = bcrypt.compareSync(req.body.password, user.password);
|
47
47
|
|
@@ -27,27 +27,27 @@
|
|
27
27
|
},
|
28
28
|
});
|
29
29
|
|
30
|
-
async function initialize() {
|
31
|
-
|
30
|
+
// async function initialize() {
|
31
|
+
// const userCookie = await getCookie('user');
|
32
32
|
|
33
|
-
|
34
|
-
|
33
|
+
// if (userCookie) {
|
34
|
+
// const {_id, email, phone, roles, accessToken} = userCookie;
|
35
35
|
|
36
|
-
|
37
|
-
|
36
|
+
// Object.assign(state.user, {_id, email, phone});
|
37
|
+
// Object.assign(state.access, {token: accessToken, roles, status: !!accessToken});
|
38
38
|
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
}
|
39
|
+
// $axios.interceptors.request.use((config) => {
|
40
|
+
// if (accessToken) {
|
41
|
+
// config.headers['x-access-token'] = accessToken;
|
42
|
+
// }
|
43
|
+
// return config;
|
44
|
+
// }, (error) => {
|
45
|
+
// return Promise.reject(error);
|
46
|
+
// });
|
47
|
+
// }
|
48
|
+
// }
|
49
49
|
|
50
|
-
initialize();
|
50
|
+
// initialize();
|
51
51
|
|
52
52
|
const actions = {
|
53
53
|
async login (user, type) {
|
@@ -214,10 +214,13 @@
|
|
214
214
|
|
215
215
|
function getCookie(name) {
|
216
216
|
if (process.env.MOBILE_APP) {
|
217
|
-
return CapacitorCookies.getCookie({
|
218
|
-
|
219
|
-
|
220
|
-
})
|
217
|
+
// return CapacitorCookies.getCookie({
|
218
|
+
// url: process.env.API_URL,
|
219
|
+
// key: name
|
220
|
+
// })
|
221
|
+
// .then(response => JSON.parse(response.value));
|
222
|
+
const cookie = Cookies.get(name);
|
223
|
+
return cookie ? JSON.parse(cookie) : null;
|
221
224
|
} else {
|
222
225
|
// Для веб-версии
|
223
226
|
const cookie = Cookies.get(name);
|
@@ -69,7 +69,7 @@
|
|
69
69
|
import EditFilters from '@/components/blocks/EditFilters.vue'
|
70
70
|
// Import libs
|
71
71
|
import { computed, onMounted } from 'vue'
|
72
|
-
|
72
|
+
|
73
73
|
import { useRoute } from 'vue-router'
|
74
74
|
// Accessing router and store
|
75
75
|
const store = useStore()
|
@@ -59,7 +59,7 @@
|
|
59
59
|
import EditCategories from '@pf/src/modules/products/components/blocks/EditCategories.vue'
|
60
60
|
|
61
61
|
import { computed, onMounted, reactive, toRefs } from 'vue'
|
62
|
-
|
62
|
+
|
63
63
|
import { useRoute,useRouter } from 'vue-router'
|
64
64
|
|
65
65
|
const store = useStore()
|
@@ -61,7 +61,6 @@
|
|
61
61
|
<script setup>
|
62
62
|
// Import libs
|
63
63
|
import { reactive, computed, onMounted, toRefs } from 'vue'
|
64
|
-
import { useStore } from 'vuex'
|
65
64
|
import { useRoute, useRouter } from 'vue-router'
|
66
65
|
// Import components
|
67
66
|
import EditProductInfo from '@/components/sections/product/EditProductInfo.vue';
|
@@ -71,7 +70,6 @@
|
|
71
70
|
import EditModifications from '@/components/sections/product/EditModifications.vue';
|
72
71
|
|
73
72
|
// Accessing router and store
|
74
|
-
const store = useStore()
|
75
73
|
const route = useRoute()
|
76
74
|
const router = useRouter()
|
77
75
|
|
@@ -0,0 +1,82 @@
|
|
1
|
+
<template>
|
2
|
+
<div
|
3
|
+
class="mn-thin w-100 pd-medium bg-white radius-medium">
|
4
|
+
|
5
|
+
<div
|
6
|
+
v-if="prop.content"
|
7
|
+
v-html="prop.content"
|
8
|
+
class="flex-center flex"
|
9
|
+
/>
|
10
|
+
|
11
|
+
<div
|
12
|
+
class=""
|
13
|
+
v-else
|
14
|
+
>
|
15
|
+
<Upload
|
16
|
+
v-model:field="embedCode"
|
17
|
+
@file-change="onComponentClick"
|
18
|
+
type="file"
|
19
|
+
:placeholder="'Enter embed code'"
|
20
|
+
class="
|
21
|
+
w-100
|
22
|
+
br-solid
|
23
|
+
br-1px
|
24
|
+
br-black-transp-10
|
25
|
+
pd-medium
|
26
|
+
radius-small
|
27
|
+
mn-thin
|
28
|
+
"
|
29
|
+
/>
|
30
|
+
<button
|
31
|
+
@click="onComponentClick"
|
32
|
+
class="button-small button"
|
33
|
+
>
|
34
|
+
Save
|
35
|
+
</button>
|
36
|
+
</div>
|
37
|
+
<!-- <button v-if="prop.content" @click="editEmbedCode">Edit Embed Code</button> -->
|
38
|
+
</div>
|
39
|
+
</template>
|
40
|
+
|
41
|
+
<script setup>
|
42
|
+
import { ref } from 'vue';
|
43
|
+
|
44
|
+
import Upload from '@pf/src/components/Upload/Upload.vue'
|
45
|
+
|
46
|
+
const embedCode = ref(null);
|
47
|
+
|
48
|
+
const props = defineProps([
|
49
|
+
'label',
|
50
|
+
'value',
|
51
|
+
'prop'
|
52
|
+
]);
|
53
|
+
|
54
|
+
const emit = defineEmits(['input', 'updateBlock']);
|
55
|
+
|
56
|
+
function isValidEmbedCode(code) {
|
57
|
+
const allowedSources = [/youtube\.com/, /soundcloud\.com/, /vimeo\.com/];
|
58
|
+
return allowedSources.some(pattern => pattern.test(code));
|
59
|
+
}
|
60
|
+
|
61
|
+
function onComponentClick(file) {
|
62
|
+
embedCode.value = file
|
63
|
+
if (embedCode.value && isValidEmbedCode(embedCode.value)) {
|
64
|
+
emit('input', embedCode.value);
|
65
|
+
emit('updateBlock', props.prop, { content: embedCode.value });
|
66
|
+
} else {
|
67
|
+
alert('Invalid embed code or source not allowed.');
|
68
|
+
}
|
69
|
+
}
|
70
|
+
|
71
|
+
function editEmbedCode() {
|
72
|
+
let embedInput = prompt('Edit embed code:', prop.content);
|
73
|
+
if (embedInput && isValidEmbedCode(embedInput)) {
|
74
|
+
embedCode.value = embedInput;
|
75
|
+
emit('input', embedCode.value);
|
76
|
+
emit('updateBlock', props.prop, { content: embedCode.value });
|
77
|
+
} else {
|
78
|
+
alert('Invalid embed code or source not allowed.');
|
79
|
+
}
|
80
|
+
}
|
81
|
+
</script>
|
82
|
+
|
@@ -0,0 +1,85 @@
|
|
1
|
+
<template>
|
2
|
+
<div
|
3
|
+
class="mn-thin w-100 pd-medium bg-white radius-medium">
|
4
|
+
|
5
|
+
<div
|
6
|
+
v-if="prop.content"
|
7
|
+
v-html="prop.content"
|
8
|
+
class="flex-center flex"
|
9
|
+
/>
|
10
|
+
|
11
|
+
<div
|
12
|
+
class=""
|
13
|
+
v-else
|
14
|
+
>
|
15
|
+
<Field
|
16
|
+
v-model:field="embedCode"
|
17
|
+
type="textarea"
|
18
|
+
:placeholder="'Paste your embed code here'"
|
19
|
+
class="
|
20
|
+
w-100
|
21
|
+
br-solid
|
22
|
+
br-1px
|
23
|
+
br-black-transp-10
|
24
|
+
pd-medium
|
25
|
+
radius-small
|
26
|
+
mn-thin
|
27
|
+
"
|
28
|
+
/>
|
29
|
+
<div class="flex-v-center flex-nowrap flex gap-small">
|
30
|
+
|
31
|
+
<p class="t-center">Embeds from youtube.com, vimeo.com, soundcloud.com are allowed</p>
|
32
|
+
<button
|
33
|
+
@click="onComponentClick"
|
34
|
+
class="button-small button"
|
35
|
+
>
|
36
|
+
Save
|
37
|
+
</button>
|
38
|
+
</div>
|
39
|
+
</div>
|
40
|
+
<!-- <button v-if="prop.content" @click="editEmbedCode">Edit Embed Code</button> -->
|
41
|
+
</div>
|
42
|
+
</template>
|
43
|
+
|
44
|
+
<script setup>
|
45
|
+
import { ref } from 'vue';
|
46
|
+
|
47
|
+
import Field from '@pf/src/components/Field/Field.vue'
|
48
|
+
|
49
|
+
const embedCode = ref(null);
|
50
|
+
|
51
|
+
const props = defineProps([
|
52
|
+
'label',
|
53
|
+
'value',
|
54
|
+
'prop'
|
55
|
+
]);
|
56
|
+
|
57
|
+
const emit = defineEmits(['input', 'updateBlock']);
|
58
|
+
|
59
|
+
function isValidEmbedCode(code) {
|
60
|
+
const allowedSources = [/youtube\.com/, /soundcloud\.com/, /vimeo\.com/];
|
61
|
+
return allowedSources.some(pattern => pattern.test(code));
|
62
|
+
}
|
63
|
+
|
64
|
+
function onComponentClick() {
|
65
|
+
|
66
|
+
if (embedCode.value && isValidEmbedCode(embedCode.value)) {
|
67
|
+
emit('input', embedCode.value);
|
68
|
+
emit('updateBlock', props.prop, { content: embedCode.value });
|
69
|
+
} else {
|
70
|
+
alert('Invalid embed code or source not allowed.');
|
71
|
+
}
|
72
|
+
}
|
73
|
+
|
74
|
+
function editEmbedCode() {
|
75
|
+
let embedInput = prompt('Edit embed code:', prop.content);
|
76
|
+
if (embedInput && isValidEmbedCode(embedInput)) {
|
77
|
+
embedCode.value = embedInput;
|
78
|
+
emit('input', embedCode.value);
|
79
|
+
emit('updateBlock', props.prop, { content: embedCode.value });
|
80
|
+
} else {
|
81
|
+
alert('Invalid embed code or source not allowed.');
|
82
|
+
}
|
83
|
+
}
|
84
|
+
</script>
|
85
|
+
|
@@ -36,17 +36,60 @@ a<template>
|
|
36
36
|
<transition name="fade">
|
37
37
|
<div
|
38
38
|
v-if="showControls === index"
|
39
|
-
class="pos-absolute
|
39
|
+
class="pos-absolute z-index-4 i-semi"
|
40
|
+
style="right: calc(100% + 0.5rem); top: calc(50% - 1.125rem);"
|
40
41
|
@mousedown.prevent="startDragging = true"
|
41
42
|
>
|
42
|
-
<button
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
43
|
+
<button
|
44
|
+
@click="showMenu = !showMenu"
|
45
|
+
class="mn-small cursor-pointer w-100 i-semi bg-white radius-thin"
|
46
|
+
>
|
47
|
+
{{ block.content ? '...' : '+' }}
|
48
|
+
</button>
|
49
|
+
|
50
|
+
<div
|
51
|
+
v-if="showMenu"
|
52
|
+
class="z-index-5 radius-thin pd-thin bg-white w-max mn-small flex-nowrap flex-column flex"
|
53
|
+
>
|
54
|
+
<span
|
55
|
+
@click="handleDeleteBlock(block)"
|
56
|
+
class="mn-thin w-max t-red bg-white button-small button"
|
57
|
+
>
|
58
|
+
Remove
|
59
|
+
</span>
|
60
|
+
<span
|
61
|
+
@click="handleAddBlock('ImageUpload', '', index)"
|
62
|
+
class="mn-thin w-max t-black bg-white button-small button"
|
63
|
+
>
|
64
|
+
Add Image
|
65
|
+
</span>
|
66
|
+
<span
|
67
|
+
@click="handleAddBlock('H2', '', index)"
|
68
|
+
class="w-max button-small t-black bg-white button"
|
69
|
+
>
|
70
|
+
Add Title
|
71
|
+
</span>
|
72
|
+
<span
|
73
|
+
@click="handleAddBlock('Embed', '', index)"
|
74
|
+
class="w-max button-small t-black bg-white button"
|
75
|
+
>
|
76
|
+
Add Embed
|
77
|
+
</span>
|
78
|
+
<!-- <span
|
79
|
+
@click="handleAddBlock('Audio', '', index)"
|
80
|
+
class="w-max button-small t-black bg-white button"
|
81
|
+
>
|
82
|
+
Add Audio
|
83
|
+
</span> -->
|
84
|
+
|
47
85
|
</div>
|
86
|
+
|
87
|
+
|
48
88
|
</div>
|
49
89
|
</transition>
|
90
|
+
|
91
|
+
|
92
|
+
|
50
93
|
</div>
|
51
94
|
</VueDraggableNext>
|
52
95
|
</section>
|
@@ -59,6 +102,8 @@ import H2 from '../elements/H2.vue';
|
|
59
102
|
import Caption from '../elements/Caption.vue';
|
60
103
|
import Bullets from '../elements/Bullets.vue';
|
61
104
|
import ImageUpload from '../elements/ImageUpload.vue';
|
105
|
+
import Embed from '../elements/Embed.vue';
|
106
|
+
import Audio from '../elements/Audio.vue';
|
62
107
|
|
63
108
|
import { ref, watchEffect, computed, emit } from 'vue';
|
64
109
|
import { VueDraggableNext } from 'vue-draggable-next';
|
@@ -76,7 +121,9 @@ const ComponentMap = {
|
|
76
121
|
'H2': H2,
|
77
122
|
'Bullets': Bullets,
|
78
123
|
'Caption': Caption,
|
79
|
-
'ImageUpload': ImageUpload
|
124
|
+
'ImageUpload': ImageUpload,
|
125
|
+
'Embed': Embed,
|
126
|
+
'Audio': Audio
|
80
127
|
};
|
81
128
|
|
82
129
|
function handleAddBlock(type = 'Textarea', content = '', index, data) {
|
@@ -9,13 +9,7 @@
|
|
9
9
|
</template>
|
10
10
|
|
11
11
|
<script setup>
|
12
|
-
/////////////////////////////
|
13
|
-
// COMPONENT DEPENDENCIES
|
14
|
-
/////////////////////////////
|
15
|
-
import { onMounted } from 'vue'
|
16
|
-
import { gsap } from "gsap/dist/gsap";
|
17
|
-
import { ScrollTrigger } from "gsap/dist/ScrollTrigger";
|
18
|
-
|
19
12
|
import Title from '@pf/src/modules/globals/components/sections/Title.vue';
|
13
|
+
|
20
14
|
import GalleryWithCategories from '@pf/src/modules/gallery/components/sections/GalleryWithCategories.vue';
|
21
15
|
</script>
|
@@ -16,7 +16,6 @@
|
|
16
16
|
</div>
|
17
17
|
|
18
18
|
<div ref="grid" class="pd-medium cols-4 gap-thin">
|
19
|
-
<!-- :class="['grid-item pd-small', item.size.value, ...item.categories]" -->
|
20
19
|
<div
|
21
20
|
v-for="(item, index) in filteredGallery"
|
22
21
|
:key="item.id"
|
@@ -30,26 +29,6 @@
|
|
30
29
|
class="w-100 h-100 o-hidden radius-medium object-fit-cover"
|
31
30
|
@click="openModal(item.image)"
|
32
31
|
/>
|
33
|
-
<!-- <div class="pd-small radius-small bg-white" v-else>
|
34
|
-
<img :src="'/photos/' + item.cover" class="w-100 radius-small mn-small h-10r object-fit-cover " @click="openModal(item)" />
|
35
|
-
|
36
|
-
<p class="t-black p-small mn-small">
|
37
|
-
<span class="uppercase t-transp ">Size</span>
|
38
|
-
<br>
|
39
|
-
<span class="pd-2px radius-big d-inline-block bg-grey">{{item.size.name}}</span>
|
40
|
-
</p>
|
41
|
-
|
42
|
-
<p class="t-black p-small mn-small uppe">
|
43
|
-
<span class="uppercase t-transp">Categories</span>
|
44
|
-
<br>
|
45
|
-
<span class="pd-2px radius-big d-inline-block bg-grey t-semi" v-for="category in item.categories">{{category}}</span>
|
46
|
-
</p>
|
47
|
-
|
48
|
-
<div class="flex-nowrap flex">
|
49
|
-
<button class="mn-r-thin button-small w-100 button" @click="editPhoto(item)">Edit</button>
|
50
|
-
<button class="button-small w-100 button" @click="deletePhoto(item._id)">Delete</button>
|
51
|
-
</div>
|
52
|
-
</div> -->
|
53
32
|
</transition>
|
54
33
|
</div>
|
55
34
|
|
@@ -70,6 +49,7 @@
|
|
70
49
|
</transition>
|
71
50
|
|
72
51
|
<transition name="modal">
|
52
|
+
|
73
53
|
<div v-if="selectedImage.image !== false && modal === 'edit-modal'" class="flex-v-center flex m modal pd-big">
|
74
54
|
<div class="modal-content radius-small pd-medium bg-white">
|
75
55
|
<span class="close" @click="closeModal">×</span>
|
@@ -129,11 +109,15 @@
|
|
129
109
|
|
130
110
|
<script setup>
|
131
111
|
import { ref, onMounted, reactive, computed } from 'vue'
|
132
|
-
import { Button, Field, Select, Upload } from '@ozdao/prometheus-framework'
|
133
|
-
import { state, actions } from '@pf/src/modules/gallery/store/gallery';
|
134
|
-
|
135
112
|
import { useRoute } from 'vue-router'
|
136
113
|
|
114
|
+
import Field from '@pf/src/components/Field/Field.vue'
|
115
|
+
import Button from '@pf/src/components/Button/Button.vue'
|
116
|
+
import Select from '@pf/src/components/Select/Select.vue'
|
117
|
+
import Upload from '@pf/src/components/Upload/Upload.vue'
|
118
|
+
|
119
|
+
import { state, actions } from '@pf/src/modules/gallery/store/gallery';
|
120
|
+
|
137
121
|
const route = useRoute()
|
138
122
|
|
139
123
|
const isEditablePath = false
|
@@ -1,14 +1,10 @@
|
|
1
|
-
import * as galleryStore from './store/gallery.
|
1
|
+
import * as galleryStore from './store/gallery.js';
|
2
2
|
|
3
3
|
// Importing Vue Router routes from the router directory
|
4
4
|
import galleryRouter from './router/gallery.router.js';
|
5
5
|
|
6
|
-
import galleryPage from './components/pages/Gallery.vue'
|
7
|
-
|
8
6
|
// Exporting components, store modules, and routes
|
9
|
-
export {
|
7
|
+
export default {
|
10
8
|
galleryStore,
|
11
9
|
galleryRouter,
|
12
|
-
filesStore,
|
13
|
-
filesRoutes
|
14
10
|
};
|
@@ -7,7 +7,7 @@ import * as globalStore from './store/globals.js';
|
|
7
7
|
// Since you didn't specify routes for the client, assuming there are none at this time
|
8
8
|
|
9
9
|
// Exporting localization methods, Vuex store
|
10
|
-
export {
|
10
|
+
export default {
|
11
11
|
getBrowserLocale,
|
12
12
|
VueI18n,
|
13
13
|
globalStore
|
@@ -0,0 +1,52 @@
|
|
1
|
+
// mixins.js
|
2
|
+
export const globalMixins = {
|
3
|
+
methods: {
|
4
|
+
returnCurrency() {
|
5
|
+
const currency = '฿'
|
6
|
+
return currency
|
7
|
+
},
|
8
|
+
formatPrice(number) {
|
9
|
+
const currency = this.returnCurrency();
|
10
|
+
let formattedNumber = number.toFixed(2).replace('.', ',').replace(/\B(?=(\d{3})+(?!\d))/g, ' ');
|
11
|
+
return `${formattedNumber} ${currency}`;
|
12
|
+
},
|
13
|
+
formatDate(d) {
|
14
|
+
var fixedDate = new Date(d);
|
15
|
+
var yyyy = fixedDate.getFullYear().toString();
|
16
|
+
var mm = (fixedDate.getMonth() + 1).toString();
|
17
|
+
var dd = fixedDate.getDate().toString();
|
18
|
+
var hh = fixedDate.getHours().toString();
|
19
|
+
var minmin = fixedDate.getMinutes().toString();
|
20
|
+
|
21
|
+
return yyyy + '.' + (mm[1] ? mm : "0" + mm[0]) + '.' + (dd[1] ? dd : "0" + dd[0]) + " в " + (hh[1] ? hh : "0" + hh[0]) + ':' + (minmin[1] ? minmin : "0" + minmin[0]);
|
22
|
+
},
|
23
|
+
normalizeUrlParam(param) {
|
24
|
+
if (!param) param = ''
|
25
|
+
|
26
|
+
return param
|
27
|
+
.toLowerCase()
|
28
|
+
.replace(/ /g, '-')
|
29
|
+
.replace(/[^a-z0-9-]/g, '');
|
30
|
+
},
|
31
|
+
getMarketplaceLink(categories, country, state, city) {
|
32
|
+
categories = []
|
33
|
+
|
34
|
+
let country_normalized = this.normalizeUrlParam(country);
|
35
|
+
let state_normalized = this.normalizeUrlParam(state);
|
36
|
+
let city_normalized = this.normalizeUrlParam(city);
|
37
|
+
let base = `/marketplace/${country_normalized || ''}${state_normalized ? `/${state_normalized}` : ''}${city_normalized ? `/${city_normalized}` : ''}`;
|
38
|
+
|
39
|
+
if (categories.length) {
|
40
|
+
base += `?categories=${categories.join(",")}`;
|
41
|
+
}
|
42
|
+
|
43
|
+
return base;
|
44
|
+
},
|
45
|
+
getSpotsLink(country, state, city) {
|
46
|
+
let country_normalized = this.normalizeUrlParam(country);
|
47
|
+
let state_normalized = this.normalizeUrlParam(state);
|
48
|
+
let city_normalized = this.normalizeUrlParam(city);
|
49
|
+
return `/spots/${country_normalized || ''}${state_normalized ? `/${state_normalized}` : ''}${city_normalized ? `/${city_normalized}` : ''}`;
|
50
|
+
},
|
51
|
+
}
|
52
|
+
}
|