@ozdao/martyrs 0.2.591 → 0.2.592

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/dist/auth.server.js +7 -0
  2. package/dist/martyrs/src/components/EditImages/{EditImages.vue2.js → EditImages.vue.js} +2 -2
  3. package/dist/martyrs/src/components/EditImages/EditImages.vue.js.map +1 -0
  4. package/dist/martyrs/src/modules/auth/locales/en.js +2 -1
  5. package/dist/martyrs/src/modules/auth/locales/en.js.map +1 -1
  6. package/dist/martyrs/src/modules/auth/locales/ru.js +2 -1
  7. package/dist/martyrs/src/modules/auth/locales/ru.js.map +1 -1
  8. package/dist/martyrs/src/modules/auth/views/components/pages/SignUp.vue.js +7 -11
  9. package/dist/martyrs/src/modules/auth/views/components/pages/SignUp.vue.js.map +1 -1
  10. package/dist/martyrs/src/modules/auth/views/store/auth.js +10 -2
  11. package/dist/martyrs/src/modules/auth/views/store/auth.js.map +1 -1
  12. package/dist/martyrs/src/modules/core/core.client.js +3 -3
  13. package/dist/martyrs/src/modules/core/core.client.js.map +1 -1
  14. package/dist/martyrs/src/modules/core/views/components/elements/OnlineIndicator.vue.js +1 -1
  15. package/dist/martyrs/src/modules/core/views/components/elements/OnlineIndicator.vue.js.map +1 -1
  16. package/dist/martyrs/src/modules/core/views/components/icons/IconMenu.vue.js +44 -0
  17. package/dist/martyrs/src/modules/core/views/components/icons/IconMenu.vue.js.map +1 -0
  18. package/dist/martyrs/src/modules/core/views/components/partials/Header.vue.js +44 -50
  19. package/dist/martyrs/src/modules/core/views/components/partials/Header.vue.js.map +1 -1
  20. package/dist/martyrs/src/modules/events/components/pages/EditEvent.vue.js +1 -1
  21. package/dist/martyrs/src/modules/gallery/components/sections/BackofficeGallery.vue.js +1 -1
  22. package/dist/martyrs/src/modules/products/components/pages/ProductEdit.vue.js +1 -1
  23. package/dist/martyrs/src/modules/products/components/sections/EditVariants.vue.js +1 -1
  24. package/dist/style.css +17 -53
  25. package/package.json +5 -2
  26. package/src/modules/TASKS.MD +30 -1
  27. package/src/modules/auth/controllers/routes/auth.routes.js +9 -0
  28. package/src/modules/auth/locales/en.js +2 -1
  29. package/src/modules/auth/locales/ru.js +2 -1
  30. package/src/modules/auth/views/components/pages/SignUp.vue +2 -5
  31. package/src/modules/auth/views/store/auth.js +13 -3
  32. package/src/modules/core/core.client.js +2 -2
  33. package/src/modules/core/views/components/elements/OnlineIndicator.vue +1 -1
  34. package/src/modules/core/views/components/icons/IconMenu.vue +82 -0
  35. package/src/modules/core/views/components/partials/Header.vue +167 -305
  36. package/dist/martyrs/src/components/EditImages/EditImages.vue2.js.map +0 -1
  37. package/src/modules/PROCESS.md +0 -0
@@ -0,0 +1,82 @@
1
+ <script setup>
2
+ defineProps({
3
+ active: {
4
+ type: Boolean,
5
+ default: false,
6
+ },
7
+ theme: {
8
+ type: String,
9
+ default: 'light',
10
+ },
11
+ });
12
+
13
+ const emit = defineEmits(['click']);
14
+ </script>
15
+
16
+ <template>
17
+ <button
18
+ class="cursor-pointer mobile-only icon-menu"
19
+ aria-label="menu"
20
+ :class="{ 'icon-menu_active': active }"
21
+ @click="emit('click')"
22
+ >
23
+ <span
24
+ class="no-events"
25
+ :class="{
26
+ 'bg-black': theme === 'light',
27
+ 'bg-white': theme === 'dark',
28
+ }"
29
+ >
30
+ <span class="icon-menu__before" :class="{ 'bg-black': theme === 'light', 'bg-white': theme === 'dark' }"></span>
31
+ <span class="icon-menu__after" :class="{ 'bg-black': theme === 'light', 'bg-white': theme === 'dark' }"></span>
32
+ </span>
33
+ </button>
34
+ </template>
35
+
36
+ <style lang="scss">
37
+ .icon-menu {
38
+ display: block;
39
+ width: 2rem;
40
+ height: 2rem;
41
+ border-radius: 50%;
42
+ position: relative;
43
+ }
44
+
45
+ .icon-menu span,
46
+ .icon-menu__before,
47
+ .icon-menu__after {
48
+ position: absolute;
49
+ top: 50%;
50
+ margin-top: -1px;
51
+ left: 50%;
52
+ margin-left: -10px;
53
+ width: 20px;
54
+ height: 2px;
55
+ }
56
+
57
+ .icon-menu__before,
58
+ .icon-menu__after {
59
+ display: block;
60
+ transition: 0.2s;
61
+ }
62
+
63
+ .icon-menu__before {
64
+ transform: translateY(-5px);
65
+ }
66
+
67
+ .icon-menu__after {
68
+ transform: translateY(5px);
69
+ }
70
+
71
+ .icon-menu_active .icon-menu__before {
72
+ transform: rotate(-35deg);
73
+ width: 10px;
74
+ transform-origin: left bottom;
75
+ }
76
+
77
+ .icon-menu_active .icon-menu__after {
78
+ transform: rotate(35deg);
79
+ width: 10px;
80
+ transform-origin: left top;
81
+ }
82
+ </style>
@@ -1,318 +1,180 @@
1
1
  <script setup="props">
2
- import { computed, onMounted, toRefs, ref, inject } from 'vue'
3
-
4
- import { useRouter,useRoute } from 'vue-router'
5
- import { useI18n } from 'vue-i18n'
6
-
7
- import { useStore } from '@martyrs/src/modules/core/views/store/core.store.js'
8
- import * as shopcart from '@martyrs/src/modules/orders/store/shopcart.js'
9
- import * as auth from '@martyrs/src/modules/auth/views/store/auth.js'
10
-
11
- const store = useStore()
12
-
13
- // Globasls Component
14
-
15
- import NotificationBadge from '@martyrs/src/modules/notifications/components/elements/NotificationBadge.vue';
16
- // import Navigation from '@martyrs/src/modules/core/views/components/partials/Navigation.vue'
17
- // Martyrs Component
18
- import Button from '@martyrs/src/components/Button/Button.vue'
19
- import Select from '@martyrs/src/components/Select/Select.vue'
20
- import Checkbox from '@martyrs/src/components/Checkbox/Checkbox.vue'
21
- // Icons module
22
- import IconShopcart from '@martyrs/src/modules/icons/entities/IconShopcart.vue'
23
- import IconProfile from '@martyrs/src/modules/icons/entities/IconProfile.vue'
24
- import IconSearch from '@martyrs/src/modules/icons/navigation/IconSearch.vue';
25
- // Props
26
- const props = defineProps({
27
- theme: {
28
- type: String,
29
- default: "light"
30
- },
31
- logotype: {
32
- type: Object
33
- },
34
- location: {
35
- type: Boolean,
36
- default: true
37
- },
38
- theme_switcher: {
39
- type: Boolean,
40
- default: true
41
- },
42
- headerClass: {
43
- type: [String, Array, Object],
44
- default: null
45
- },
46
- });
47
- // Accessing state
48
- const router = useRouter()
49
- const route = useRoute()
50
- // Localization
51
- const { t } = useI18n()
52
- // const search = computed(() => store.products.state.search)
53
-
54
- function openLocationPopup() {
55
- store.core.state.isOpenLocationPopup = true;
56
- }
57
- /////////////////////////////
58
- // MOUNTED
59
- /////////////////////////////
60
- onMounted(() => {
61
- shopcart.actions.setShopcart()
62
- });
2
+ import { computed, onMounted, ref } from 'vue';
3
+
4
+ import { useRouter, useRoute } from 'vue-router';
5
+ import { useI18n } from 'vue-i18n';
6
+ import { useStore } from '@martyrs/src/modules/core/views/store/core.store.js';
7
+
8
+ import * as shopcart from '@martyrs/src/modules/orders/store/shopcart.js';
9
+ import * as auth from '@martyrs/src/modules/auth/views/store/auth.js';
10
+
11
+ import NotificationBadge from '@martyrs/src/modules/notifications/components/elements/NotificationBadge.vue';
12
+ // Martyrs Component
13
+ import Button from '@martyrs/src/components/Button/Button.vue';
14
+ import Select from '@martyrs/src/components/Select/Select.vue';
15
+ import Checkbox from '@martyrs/src/components/Checkbox/Checkbox.vue';
16
+ // Icons module
17
+ import IconShopcart from '@martyrs/src/modules/icons/entities/IconShopcart.vue';
18
+ import IconProfile from '@martyrs/src/modules/icons/entities/IconProfile.vue';
19
+ import IconSearch from '@martyrs/src/modules/icons/navigation/IconSearch.vue';
20
+ import IconMenu from '@martyrs/src/modules/core/views/components/icons/IconMenu.vue';
21
+ // Props
22
+ const props = defineProps({
23
+ theme: {
24
+ type: String,
25
+ default: 'light',
26
+ },
27
+ logotype: {
28
+ type: Object,
29
+ },
30
+ location: {
31
+ type: Boolean,
32
+ default: true,
33
+ },
34
+ theme_switcher: {
35
+ type: Boolean,
36
+ default: true,
37
+ },
38
+ headerClass: {
39
+ type: [String, Array, Object],
40
+ default: null,
41
+ },
42
+ });
43
+ const router = useRouter();
44
+ const route = useRoute();
45
+ const store = useStore();
46
+ const i18n = useI18n();
47
+
48
+ const { t, locale, availableLocales } = i18n;
49
+
50
+ const localeOptions = computed(() => {
51
+ const names = i18n.localeNames || {};
52
+
53
+ return availableLocales.map(code => ({
54
+ code,
55
+ name: names[code] || code.toUpperCase(),
56
+ }));
57
+ });
58
+ // const search = computed(() => store.products.state.search)
59
+
60
+ function openLocationPopup() {
61
+ store.core.state.isOpenLocationPopup = true;
62
+ }
63
+ /////////////////////////////
64
+ // MOUNTED
65
+ /////////////////////////////
66
+ onMounted(() => {
67
+ shopcart.actions.setShopcart();
68
+ });
63
69
  </script>
64
70
 
65
71
  <template>
66
- <header
67
- id="header"
68
- class="
69
- pd-thin
70
- gap-micro
71
- flex-justify-between
72
- flex-nowrap
73
- flex
74
- h-4r
75
- w-100
76
- z-index-2
77
- "
78
- :class="[
79
- headerClass ?? {
80
- 'pos-relative pos-t-0 br-b-1px t-black br-light': theme === 'light',
81
- 'pos-relative pos-t-0 br-b-1px t-white br-dark': theme === 'dark'
82
- }
83
- ]"
84
- >
85
- <div class="flex-nowrap flex-v-center flex-justify-start flex gap-micro ">
86
- <!-- MENU -->
87
- <button
88
- aria-label="menu"
89
- @click="() => store.core.state.isOpenSidebar = !store.core.state.isOpenSidebar"
90
- class="cursor-pointer mobile-only menu-btn"
91
- :class="{
92
- 'menu-btn_active': store.core.state.isOpenSidebar
93
- }"
94
- >
95
- <span
96
- class="no-events"
97
- :class="{
98
- 'bg-black': theme === 'light',
99
- 'bg-white': theme === 'dark'
100
- }"
101
- >
102
- <span class="menu-btn__before" :class="{ 'bg-black': theme === 'light', 'bg-white': theme === 'dark' }"></span>
103
- <span class="menu-btn__after" :class="{ 'bg-black': theme === 'light', 'bg-white': theme === 'dark' }"></span>
104
- </span>
105
- </button>
106
-
107
- <!-- LOGO -->
108
- <component
109
- v-if="logotype"
110
- :is="logotype"
111
- @click="router.push({ path: '/' })"
112
- :theme="theme"
113
- class="cursor-pointer h-2r"
114
- />
115
-
116
- <button
117
- v-if="location"
118
- aria-label="button_location"
119
- class="
120
- cursor-pointer
121
- bg-transparent
122
- pd-micro
123
- radius-extra
124
- uppercase
125
- fw-semi
126
-
127
- br-2px
128
- ease-linear
129
- ws-nowrap
130
-
131
- "
132
- :class="{
133
- 'fill-black br-black t-black hover:bg-black hover:t-white hover:fill-white': theme === 'light',
134
- 'fill-white br-white t-white hover:bg-white hover:t-black hover:fill-black': theme === 'dark'
135
- }"
136
- @click="openLocationPopup()"
137
- >
138
- <svg class="i-small" :fill="'inherit'" xmlns="http://www.w3.org/2000/svg" width="50" height="67" viewBox="0 0 50 67" fill="none">
139
- <path d="M25 0C11.207 0 0 11.207 0 25C0 38.793 20.832 66.668 25 66.668C29.168 66.668 50 38.793 50 25C50 11.207 38.793 0 25 0ZM25 33.332C20.418 33.332 16.668 29.582 16.668 25C16.668 20.418 20.418 16.668 25 16.668C29.582 16.668 33.332 20.418 33.332 25C33.332 29.582 29.582 33.332 25 33.332Z" :fill="'inherit'"/>
140
- </svg>
141
- {{store.core.state.position?.country ? store.core.state.position.country : 'World'}}
142
- </button>
143
- </div>
144
-
145
- <slot></slot>
146
-
147
- <div class="flex-justify-end flex-v-center flex-nowrap flex gap-micro">
148
- <Button
149
- v-if="router.hasRoute('Search') && route.meta.header_search"
150
- aria-label="search"
151
- class="pd-zero bg-transparent"
152
- :class="route.meta.header_search_class"
153
- :submit="() => router.push({name: 'Search'})"
154
- :showSucces="false"
155
- :showLoader="false"
156
- >
157
- <IconSearch
158
- class="i-medium"
159
- :fill="theme === 'light' ? 'rgb(var(--black))' : 'rgb(var(--white))'"
160
- />
161
- </Button>
162
-
163
- <Button
164
- aria-label="shopcart"
165
- :submit="a => shopcart.actions.toggleShopcart()"
166
- :counter="shopcart.getters.cartTotalAmount"
167
- :showSucces="false"
168
- :showLoader="false"
169
- class="pd-zero mn-r-micro"
170
- >
171
- <IconShopcart
172
- class="i-medium"
173
- :fill="theme === 'light' ? 'rgb(var(--black))' : 'rgb(var(--white))'"
174
- />
175
- <!-- <div class="w-max p-small pos-absolute pos-t-100 pos-r-0">Product Added to Shopcart</div> -->
176
- </Button>
177
-
178
-
179
- <NotificationBadge
180
- v-if="auth.state.user._id"
181
- :fill="theme === 'light' ? 'rgb(var(--black))' : 'rgb(var(--white))'"
182
- />
183
-
184
- <Button
185
- aria-label="profile"
186
- class="pd-zero bg-transparent"
187
- :submit="
188
- auth.state.access.status === false
189
- ?
190
- a => router.push({name: 'Sign In'})
191
- :
192
- a => router.push({ name: 'User Profile', params: { _id: auth.state.user._id }})
193
- "
194
- :showSucces="false"
195
- :showLoader="false"
196
- >
197
- <IconProfile
198
- class="i-medium"
199
- :fill="theme === 'light' ? 'rgb(var(--black))' : 'rgb(var(--white))'"
200
- />
201
- </Button>
202
-
203
- <Select
204
- v-if="$i18n.availableLocales.length > 1"
205
- v-model:select="$i18n.locale"
206
- :options="$i18n.availableLocales"
207
- :property="'value'"
208
- class="pos-relative flex flex-column gap-small uppercase pd-thin fw-semi radius-thin"
209
- :class="{
210
- 'bg-light t-black': theme === 'light',
211
- 'bg-dark t-white': theme === 'dark'
212
- }"
213
- />
214
- </div>
215
- </header>
216
-
72
+ <header
73
+ class="pd-thin gap-micro flex-justify-between flex-nowrap flex h-4r w-100 z-index-2"
74
+ id="header"
75
+ :class="[
76
+ headerClass ?? {
77
+ 'pos-relative pos-t-0 br-b-1px t-black br-light': theme === 'light',
78
+ 'pos-relative pos-t-0 br-b-1px t-white br-dark': theme === 'dark',
79
+ },
80
+ ]"
81
+ >
82
+ <div class="flex-nowrap flex-v-center flex-justify-start flex gap-micro">
83
+ <IconMenu
84
+ :active="store.core.state.isOpenSidebar"
85
+ :theme="theme"
86
+ @click="store.core.state.isOpenSidebar = !store.core.state.isOpenSidebar"
87
+ />
88
+
89
+ <!-- LOGO -->
90
+ <component class="cursor-pointer h-2r" v-if="logotype" :is="logotype" @click="router.push({ path: '/' })" :theme="theme" />
91
+
92
+ <button
93
+ class="cursor-pointer bg-transparent pd-micro radius-extra uppercase fw-semi br-2px ease-linear ws-nowrap"
94
+ v-if="location"
95
+ aria-label="button_location"
96
+ :class="{
97
+ 'fill-black br-black t-black hover:bg-black hover:t-white hover:fill-white': theme === 'light',
98
+ 'fill-white br-white t-white hover:bg-white hover:t-black hover:fill-black': theme === 'dark',
99
+ }"
100
+ @click="openLocationPopup()"
101
+ >
102
+ <svg class="i-small" :fill="'inherit'" xmlns="http://www.w3.org/2000/svg" width="50" height="67" viewBox="0 0 50 67" fill="none">
103
+ <path
104
+ d="M25 0C11.207 0 0 11.207 0 25C0 38.793 20.832 66.668 25 66.668C29.168 66.668 50 38.793 50 25C50 11.207 38.793 0 25 0ZM25 33.332C20.418 33.332 16.668 29.582 16.668 25C16.668 20.418 20.418 16.668 25 16.668C29.582 16.668 33.332 20.418 33.332 25C33.332 29.582 29.582 33.332 25 33.332Z"
105
+ :fill="'inherit'"
106
+ />
107
+ </svg>
108
+ {{ store.core.state.position?.country ? store.core.state.position.country : 'World' }}
109
+ </button>
110
+ </div>
111
+
112
+ <slot></slot>
113
+
114
+ <div class="flex-justify-end flex-v-center flex-nowrap flex gap-micro">
115
+ <Button
116
+ class="pd-zero bg-transparent"
117
+ v-if="router.hasRoute('Search') && route.meta.header_search"
118
+ aria-label="search"
119
+ :class="route.meta.header_search_class"
120
+ :submit="() => router.push({ name: 'Search' })"
121
+ :showSucces="false"
122
+ :showLoader="false"
123
+ >
124
+ <IconSearch class="i-medium" :fill="theme === 'light' ? 'rgb(var(--black))' : 'rgb(var(--white))'" />
125
+ </Button>
126
+
127
+ <Button class="pd-zero mn-r-micro" aria-label="shopcart" :submit="a => shopcart.actions.toggleShopcart()" :counter="shopcart.getters.cartTotalAmount" :showSucces="false" :showLoader="false">
128
+ <IconShopcart class="i-medium" :fill="theme === 'light' ? 'rgb(var(--black))' : 'rgb(var(--white))'" />
129
+ <!-- <div class="w-max p-small pos-absolute pos-t-100 pos-r-0">Product Added to Shopcart</div> -->
130
+ </Button>
131
+
132
+ <NotificationBadge v-if="auth.state.user._id" :fill="theme === 'light' ? 'rgb(var(--black))' : 'rgb(var(--white))'" />
133
+
134
+ <Button
135
+ class="pd-zero bg-transparent"
136
+ aria-label="profile"
137
+ :submit="auth.state.access.status === false ? a => router.push({ name: 'Sign In' }) : a => router.push({ name: 'User Profile', params: { _id: auth.state.user._id } })"
138
+ :showSucces="false"
139
+ :showLoader="false"
140
+ >
141
+ <IconProfile class="i-medium" :fill="theme === 'light' ? 'rgb(var(--black))' : 'rgb(var(--white))'" />
142
+ </Button>
143
+
144
+ <Select
145
+ class="pos-relative flex flex-column gap-small ws-nowrap pd-thin fw-semi radius-thin"
146
+ v-if="localeOptions.length > 1"
147
+ v-model:select="locale"
148
+ :options="localeOptions"
149
+ :property="'code'"
150
+ :value="'name'"
151
+ :class="{
152
+ 'bg-light t-black': theme === 'light',
153
+ 'bg-dark t-white': theme === 'dark',
154
+ }"
155
+ />
156
+ </div>
157
+ </header>
217
158
  </template>
218
159
 
219
160
  <style lang="scss">
220
161
  #header {
221
- transition:
222
- transform 0.3s cubic-bezier(0.08, 0.75, 0.77, 1.03),
223
- margin-top 0.3s cubic-bezier(0.08, 0.75, 0.77, 1.03),
224
- background 0.3s ease,
225
- border-color 0.3s ease,
226
- backdrop-filter 0.3s ease;
162
+ transition:
163
+ transform 0.3s cubic-bezier(0.08, 0.75, 0.77, 1.03),
164
+ margin-top 0.3s cubic-bezier(0.08, 0.75, 0.77, 1.03),
165
+ background 0.3s ease,
166
+ border-color 0.3s ease,
167
+ backdrop-filter 0.3s ease;
227
168
 
228
- &.header--hidden {
229
- transform: translateY(-100%);
230
- margin-top: -4rem;
231
- }
169
+ &.header--hidden {
170
+ transform: translateY(-100%);
171
+ margin-top: -4rem;
172
+ }
232
173
  }
233
174
 
234
175
  .location-button {
235
- &:hover {
236
- box-shadow: inset 0 0 0 2px rgb(var(--main));
237
- }
238
- }
239
-
240
- .menu-btn {
241
- display: block;
242
- width: 2rem;
243
- height: 2rem;
244
- border-radius: 50%;
245
- position: relative;
246
- }
247
- .menu-btn span,
248
- .menu-btn__before,
249
- .menu-btn__after {
250
- position: absolute;
251
- top: 50%;
252
- margin-top: -1px;
253
- left: 50%;
254
- margin-left: -10px;
255
- width: 20px;
256
- height: 2px;
176
+ &:hover {
177
+ box-shadow: inset 0 0 0 2px rgb(var(--main));
178
+ }
257
179
  }
258
- .menu-btn__before,
259
- .menu-btn__after {
260
- display: block;
261
- transition: 0.2s;
262
- }
263
- .menu-btn__before {
264
- transform: translateY(-5px);
265
- }
266
- .menu-btn__after {
267
- transform: translateY(5px);
268
- }
269
- .menu-btn_active .menu-btn__before {
270
- transform: rotate(-35deg);
271
- width: 10px;
272
- transform-origin: left bottom;
273
- }
274
- .menu-btn_active .menu-btn__after {
275
- transform: rotate(35deg);
276
- width: 10px;
277
- transform-origin: left top;
278
- }
279
-
280
- .menu-btn_active span:before {
281
- transform: rotate(-35deg);
282
- width: 10px;
283
- transform-origin: left bottom;
284
- }
285
- .menu-btn_active span:after {
286
- transform: rotate(35deg);
287
- width: 10px;
288
- transform-origin: left top;
289
- }
290
-
291
- .menu-block {
292
- display: flex;
293
- justify-content: center;
294
- align-items: center;
295
- }
296
- .menu-nav {
297
- background-color: #fff;
298
- height: 50px;
299
-
300
- }
301
- .menu-nav__link {
302
- display: inline-block;
303
- text-decoration: none;
304
- color: #fff;
305
- margin-right: 20px;
306
- }
307
- .menu-nav__link {
308
- transition: 0.5s;
309
- transform-origin: right center;
310
- transform: translateX(50%);
311
- opacity: 0;
312
- }
313
- .menu-nav__link_active {
314
- transform: translateX(0%);
315
- opacity: 1;
316
- }
317
-
318
- </style>
180
+ </style>
@@ -1 +0,0 @@
1
- {"version":3,"file":"EditImages.vue2.js","sources":["../../../../../src/components/EditImages/EditImages.vue"],"sourcesContent":["<template>\n\t<div class=\"flex-nowrap flex gap-small\">\n <VueDraggableNext v-if=\"localImages.length > 0\" class=\"gap-small flex dragArea list-group w-full\" v-model=\"localImages\" @change=\"emitChanges\">\n\t\t\t<div v-for=\"(image, index) in localImages\" class=\"pos-relative\">\n\t\t\t\t<img loading=\"lazy\" class=\"i-extra object-fit-contain bg-black-transp-5 pd-nano radius-small o-hidden\" :src=\"(FILE_SERVER_URL || '') + image\" />\n\t\t\t\t\n <IconCross \n @click=\"deleteImage(index)\" \n class=\"cursor-pointer pos-absolute t-center flex-center flex radius-extra i-medium bg-red pos-t-10-negative pos-r-10-negative pd-micro\"\n />\n\t\t\t</div>\n\t\t</VueDraggableNext>\n <div\n v-if=\"localImages.length > 0\" \n class=\"i-extra uppercase flex-center flex radius-small o-hidden br-main br-2px pd-small\"\n >\n <UploadImageMultiple \n @update:images=\"onImagesUpdate\"\n text=\"Add\"\n :options=\"{\n showText: false\n }\"\n :uploadPath=\"'photos'\"\n class=\"radius-big\"\n />\n </div>\n\n\n\t\t<UploadImageMultiple \t\n v-if=\"localImages.length < 1\" \n @update:images=\"onImagesUpdate\"\n :uploadPath=\"props.uploadPath\"\n :text=\"props.text\"\n :options=\"props.options\"\n class=\"w-100 pd-medium\"\n />\n\t</div>\t\n</template>\n\n<script setup>\nimport { ref, defineProps, watchEffect } from 'vue';\nimport { VueDraggableNext } from 'vue-draggable-next'\nimport UploadImageMultiple from \"@martyrs/src/components/UploadImageMultiple/UploadImageMultiple.vue\";\nimport IconCross from '@martyrs/src/modules/icons/navigation/IconCross.vue';\n\nconst props = defineProps({\n images: Array,\n text: Object,\n options: Object,\n uploadPath: {\n type: Object,\n default: 'unsorted'\n }\n});\n\nconst emit = defineEmits(['update:images'])\n\nconst localImages = ref([...props.images])\n\nwatchEffect(() => {\n localImages.value = [...props.images]; // Обновление localImages при изменении props.images\n});\n\nconst emitChanges = () => {\n emit('update:images', localImages.value)\n}\n\nconst onImagesUpdate = (newImages) => {\n localImages.value = [...localImages.value, ...newImages]\n emitChanges()\n}\n\nconst deleteImage = (index) => {\n localImages.value.splice(index, 1)\n emitChanges()\n}\n</script>\n\n<style lang=\"scss\">\n// Your styles here\n</style>\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AA6CA,UAAM,QAAQ;AAUd,UAAM,OAAO;AAEb,UAAM,cAAc,IAAI,CAAC,GAAG,MAAM,MAAM,CAAC;AAEzC,gBAAY,MAAM;AAChB,kBAAY,QAAQ,CAAC,GAAG,MAAM,MAAM;AAAA,IACtC,CAAC;AAED,UAAM,cAAc,MAAM;AACxB,WAAK,iBAAiB,YAAY,KAAK;AAAA,IACzC;AAEA,UAAM,iBAAiB,CAAC,cAAc;AACpC,kBAAY,QAAQ,CAAC,GAAG,YAAY,OAAO,GAAG,SAAS;AACvD,kBAAW;AAAA,IACb;AAEA,UAAM,cAAc,CAAC,UAAU;AAC7B,kBAAY,MAAM,OAAO,OAAO,CAAC;AACjC,kBAAW;AAAA,IACb;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
File without changes