@mapomodule/uikit 1.0.0-alpha.4 → 1.0.0-alpha.40
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.
- package/CHANGELOG.md +730 -0
- package/components/ConfirmDialog.vue +12 -16
- package/components/Detail/Detail.vue +406 -272
- package/components/Detail/DetailLangSwitch.vue +7 -2
- package/components/DropArea.vue +63 -56
- package/components/Form/Form.vue +218 -0
- package/components/Form/FormField.vue +213 -0
- package/components/Form/FormGroup.vue +146 -0
- package/components/Form/FormTabs.vue +188 -0
- package/components/Form/defaults.js +91 -0
- package/components/Form/fields/ColorField.vue +79 -0
- package/components/{fields → Form/fields}/DateField.vue +20 -11
- package/components/Form/fields/EnhancedMediaField.vue +224 -0
- package/components/Form/fields/FileField.vue +125 -0
- package/components/Form/fields/FksField.vue +88 -0
- package/components/Form/fields/MediaField.vue +159 -0
- package/components/Form/fields/MediaM2mField.vue +149 -0
- package/components/Form/fields/Repeater.vue +593 -0
- package/components/Form/fields/SeoPreview.vue +89 -0
- package/components/Form/fields/wygEditor/defaults.js +25 -0
- package/components/{fields/TinyMce → Form/fields/wygEditor}/utils/events.js +0 -0
- package/components/{fields/TinyMce → Form/fields/wygEditor}/utils/mapomedia.plugin.js +7 -6
- package/components/{fields/TinyMce → Form/fields/wygEditor}/utils/script.injector.js +0 -0
- package/components/Form/fields/wygEditor/wygEditor.vue +285 -0
- package/components/LangSwitcher.vue +44 -0
- package/components/List/List.vue +119 -42
- package/components/List/ListActions.vue +60 -21
- package/components/List/ListFilters.vue +166 -114
- package/components/List/ListHead.vue +30 -12
- package/components/List/ListQuickEdit.vue +130 -61
- package/components/List/ListTable.vue +292 -80
- package/components/Login.vue +17 -7
- package/components/LogoutButton.vue +42 -28
- package/components/MediaManager/MediaBreadcrumbs.vue +45 -0
- package/components/MediaManager/MediaEditor.vue +282 -121
- package/components/MediaManager/MediaFolders.vue +169 -116
- package/components/MediaManager/MediaGallery.vue +151 -146
- package/components/MediaManager/MediaManager.vue +117 -159
- package/components/MediaManager/MediaManagerDialog.vue +36 -31
- package/components/MediaManager/MediaPreview.vue +203 -0
- package/components/MediaManager/MediaUploader.vue +55 -43
- package/components/SnackBar.vue +5 -7
- package/components/ThemeToggle.vue +13 -0
- package/components/layout/Sidebar/Sidebar.vue +61 -30
- package/components/layout/Sidebar/SidebarList.vue +19 -15
- package/components/layout/Sidebar/SidebarListItem.vue +111 -39
- package/components/layout/Sidebar/SidebarProfile.vue +42 -0
- package/components/layout/Sidebar/SidebarTitle.vue +45 -0
- package/components/layout/Topbar/Topbar.vue +11 -42
- package/components/layout/routebuilder.js +3 -3
- package/defaults/i18n.js +37 -0
- package/defaults/vuetify.js +34 -0
- package/layouts/default.vue +33 -18
- package/layouts/empty.vue +10 -0
- package/module.js +7 -5
- package/package.json +6 -4
- package/pages/index.vue +19 -18
- package/static/{favicon.ico → mapo/favicon.ico} +0 -0
- package/static/mapo/tinymce-skins/mapo-dark/content.inline.min.css +7 -0
- package/static/mapo/tinymce-skins/mapo-dark/content.min.css +7 -0
- package/static/mapo/tinymce-skins/mapo-dark/content.mobile.min.css +7 -0
- package/static/mapo/tinymce-skins/mapo-dark/skin.min.css +7 -0
- package/static/mapo/tinymce-skins/mapo-dark/skin.mobile.min.css +7 -0
- package/static/mapo/tinymce-skins/mapo-light/content.inline.min.css +7 -0
- package/static/mapo/tinymce-skins/mapo-light/content.min.css +7 -0
- package/static/mapo/tinymce-skins/mapo-light/content.mobile.min.css +7 -0
- package/static/mapo/tinymce-skins/mapo-light/skin.min.css +7 -0
- package/static/mapo/tinymce-skins/mapo-light/skin.mobile.min.css +7 -0
- package/translations/en-US.js +134 -0
- package/translations/it-IT.js +136 -0
- package/components/Detail/DetailField.vue +0 -129
- package/components/Detail/defaults.js +0 -50
- package/components/fields/M2mField.vue +0 -95
- package/components/fields/MediaField.vue +0 -195
- package/components/fields/MediaM2mField.vue +0 -238
- package/components/fields/TinyMce/TinyMce.vue +0 -177
- package/components/fields/TinyMce/defaults.js +0 -55
- package/components/layout/Sidebar/SidebarFooter.vue +0 -75
- package/defaults.js +0 -29
- package/layouts/error.vue +0 -45
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
v-if="parentFolders && parentFolders.length"
|
|
4
|
+
class="media-breadcrumbs--wrapper"
|
|
5
|
+
>
|
|
6
|
+
<span class="mx-2 mt-1 d-flex flex-wrap align-center">
|
|
7
|
+
<span class="mb-1">
|
|
8
|
+
<v-icon @click="getRoot({ folder: null })" small>mdi-home</v-icon></span
|
|
9
|
+
>
|
|
10
|
+
<span
|
|
11
|
+
class="media-breadcrumbs--button"
|
|
12
|
+
v-for="(folder, i) in parentFolders"
|
|
13
|
+
:key="i"
|
|
14
|
+
>/<a @click="getRoot({ folder })">{{ folder.slug }}</a>
|
|
15
|
+
</span>
|
|
16
|
+
</span>
|
|
17
|
+
</div>
|
|
18
|
+
</template>
|
|
19
|
+
|
|
20
|
+
<style lang="scss" scoped>
|
|
21
|
+
.media-breadcrumbs--button {
|
|
22
|
+
padding-left: 7px;
|
|
23
|
+
color: grey;
|
|
24
|
+
a {
|
|
25
|
+
margin-left: 7px;
|
|
26
|
+
}
|
|
27
|
+
&:last-child {
|
|
28
|
+
a {
|
|
29
|
+
color: unset;
|
|
30
|
+
cursor: auto;
|
|
31
|
+
pointer-events: none;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
</style>
|
|
36
|
+
|
|
37
|
+
<script>
|
|
38
|
+
import { mapGetters, mapActions } from "vuex";
|
|
39
|
+
|
|
40
|
+
export default {
|
|
41
|
+
name: "MediaBreadcrumbs",
|
|
42
|
+
computed: {...mapGetters("mapo/media", ["parentFolders"])},
|
|
43
|
+
methods: {...mapActions("mapo/media", ["getRoot"])},
|
|
44
|
+
};
|
|
45
|
+
</script>
|
|
@@ -1,163 +1,324 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div v-if="media">
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
<
|
|
12
|
-
:
|
|
13
|
-
:lazy-src="media.thumbnail"
|
|
14
|
-
max-height="300"
|
|
2
|
+
<div v-if="media" class="media-editor--wrapper">
|
|
3
|
+
<div class="img_overlay">
|
|
4
|
+
<v-btn class="img_overlay__button img_overlay__button--back" small icon @click="closeEditor">
|
|
5
|
+
<v-icon>mdi-arrow-left</v-icon>
|
|
6
|
+
</v-btn>
|
|
7
|
+
<v-btn class="img_overlay__button img_overlay__button--href" small icon :href="media.file" target="_blank" >
|
|
8
|
+
<v-icon>mdi-open-in-new</v-icon>
|
|
9
|
+
</v-btn>
|
|
10
|
+
</div>
|
|
11
|
+
<MediaPreview
|
|
12
|
+
:media="media"
|
|
15
13
|
contain
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
<
|
|
32
|
-
<
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
14
|
+
filename
|
|
15
|
+
media-controls
|
|
16
|
+
class="media-editor--preview elevation-2"
|
|
17
|
+
/>
|
|
18
|
+
<v-overlay
|
|
19
|
+
absolute
|
|
20
|
+
v-model="editing"
|
|
21
|
+
@click="editing = false"
|
|
22
|
+
></v-overlay>
|
|
23
|
+
<div class="dialog">
|
|
24
|
+
<div class="dialog__container">
|
|
25
|
+
<v-card flat tile class="dialog__content overflow-y-auto"
|
|
26
|
+
:class="{ 'py-0': !editing }"
|
|
27
|
+
:max-height="editing ? height : '0px'"
|
|
28
|
+
>
|
|
29
|
+
<v-card-text class="flex-grow-0">
|
|
30
|
+
<v-row class="flex-md-row-reverse">
|
|
31
|
+
<v-col md="6" cols="12" class="info-media">
|
|
32
|
+
<table class="text-caption fill-height pb-md-10">
|
|
33
|
+
<tr>
|
|
34
|
+
<td class="pr-3"><b>{{ $t("mapo.fileName") }}:</b></td>
|
|
35
|
+
<td>{{ fileName }}</td>
|
|
36
|
+
</tr>
|
|
37
|
+
<tr>
|
|
38
|
+
<td class="pr-3"><b>{{ $t("mapo.mime") }}:</b></td>
|
|
39
|
+
<td>{{ media.mime_type }}</td>
|
|
40
|
+
</tr>
|
|
41
|
+
<tr>
|
|
42
|
+
<td class="pr-3"><b>{{ $t("mapo.created") }}:</b></td>
|
|
43
|
+
<td>{{ dateCreated }}</td>
|
|
44
|
+
</tr>
|
|
45
|
+
<tr>
|
|
46
|
+
<td class="pr-3"><b>{{ $t("mapo.size") }}:</b></td>
|
|
47
|
+
<td>{{ fileSize }}</td>
|
|
48
|
+
</tr>
|
|
49
|
+
<tr>
|
|
50
|
+
<td class="pr-3"><b>URL:</b></td>
|
|
51
|
+
<td>
|
|
52
|
+
<a :href="media.file" target="_blank">{{ media.file }}</a>
|
|
53
|
+
</td>
|
|
54
|
+
</tr>
|
|
55
|
+
<tr>
|
|
56
|
+
<td class="pr-3"><b>{{ $t("mapo.linkedModels") }}:</b></td>
|
|
57
|
+
<td>
|
|
58
|
+
<ul>
|
|
59
|
+
<li v-for="link in media.links" :key="link.id">
|
|
60
|
+
<b>{{link.model}} (id:{{link.id}})</b> - {{link.name}}
|
|
61
|
+
</li>
|
|
62
|
+
</ul>
|
|
63
|
+
</td>
|
|
64
|
+
</tr>
|
|
65
|
+
</table>
|
|
66
|
+
</v-col>
|
|
67
|
+
<v-col md="6" cols="12">
|
|
68
|
+
<v-row>
|
|
69
|
+
<v-col sm="6" md="12" cols="12">
|
|
70
|
+
<v-text-field
|
|
71
|
+
dense
|
|
72
|
+
v-model="media.name"
|
|
73
|
+
:label="$t('mapo.name')"
|
|
74
|
+
></v-text-field>
|
|
75
|
+
</v-col>
|
|
76
|
+
<v-col sm="6" md="12" cols="12">
|
|
77
|
+
<v-text-field
|
|
78
|
+
dense
|
|
79
|
+
v-model="media.title"
|
|
80
|
+
:label="$t('mapo.titleTag')"
|
|
81
|
+
></v-text-field>
|
|
82
|
+
</v-col>
|
|
83
|
+
<v-col sm="6" md="12" cols="12">
|
|
84
|
+
<v-text-field
|
|
85
|
+
dense
|
|
86
|
+
v-model="media.description"
|
|
87
|
+
:label="$t('mapo.description')"
|
|
88
|
+
></v-text-field>
|
|
89
|
+
</v-col>
|
|
90
|
+
<v-col sm="6" md="12" cols="12">
|
|
91
|
+
<v-text-field
|
|
92
|
+
dense
|
|
93
|
+
v-model="media.alt_text"
|
|
94
|
+
:label="$t('mapo.altTag')"
|
|
95
|
+
></v-text-field>
|
|
96
|
+
</v-col>
|
|
97
|
+
<v-col sm="6" md="12" cols="12" class="d-flex align-center">
|
|
98
|
+
<div class="d-flex flex-column flex-grow-1">
|
|
99
|
+
<v-file-input
|
|
100
|
+
v-model="newFile"
|
|
101
|
+
:accept="accept"
|
|
102
|
+
:label="$t('mapo.mediaEditor.changeFile')"
|
|
103
|
+
show-size
|
|
104
|
+
dense
|
|
105
|
+
prepend-icon
|
|
106
|
+
></v-file-input>
|
|
107
|
+
<v-checkbox
|
|
108
|
+
v-if="newFile"
|
|
109
|
+
v-model="sameUrl"
|
|
110
|
+
:label="$t('mapo.mediaEditor.maintainOldUrl')"
|
|
111
|
+
class="ma-0"
|
|
112
|
+
hide-details
|
|
113
|
+
dense
|
|
114
|
+
></v-checkbox>
|
|
115
|
+
</div>
|
|
116
|
+
<v-img
|
|
117
|
+
v-if="newFile && newFilePreview"
|
|
118
|
+
:src="newFilePreview"
|
|
119
|
+
aspect-ratio="1"
|
|
120
|
+
min-width="70px"
|
|
121
|
+
max-width="110px"
|
|
122
|
+
class="grey lighten-2 ml-3"
|
|
123
|
+
>
|
|
124
|
+
<template v-slot:placeholder>
|
|
125
|
+
<v-row
|
|
126
|
+
class="fill-height ma-0"
|
|
127
|
+
align="center"
|
|
128
|
+
justify="center"
|
|
129
|
+
>
|
|
130
|
+
<v-progress-circular
|
|
131
|
+
indeterminate
|
|
132
|
+
color="grey lighten-5"
|
|
133
|
+
></v-progress-circular>
|
|
134
|
+
</v-row>
|
|
135
|
+
</template>
|
|
136
|
+
</v-img>
|
|
137
|
+
</v-col>
|
|
138
|
+
</v-row>
|
|
139
|
+
</v-col>
|
|
140
|
+
</v-row>
|
|
141
|
+
</v-card-text>
|
|
142
|
+
</v-card>
|
|
143
|
+
<v-btn
|
|
144
|
+
tile
|
|
145
|
+
depressed
|
|
146
|
+
width="100%"
|
|
147
|
+
:class="{ 'pr-0': editing }"
|
|
148
|
+
@click="editing = !editing"
|
|
149
|
+
>
|
|
150
|
+
<span>{{ $t("mapo.edit") }}</span>
|
|
151
|
+
<v-icon :style="rotate">mdi-chevron-up</v-icon>
|
|
152
|
+
<div class="edit_spacer" :class="{ 'flex-grow-1': editing }"></div>
|
|
153
|
+
<v-btn v-if="editing" text tile color="primary" @click="saveMedia">
|
|
154
|
+
{{ $t("mapo.save") }}
|
|
94
155
|
</v-btn>
|
|
95
|
-
<v-btn
|
|
96
|
-
|
|
97
|
-
|
|
156
|
+
<v-btn
|
|
157
|
+
v-if="editing"
|
|
158
|
+
text
|
|
159
|
+
tile
|
|
160
|
+
color="error"
|
|
161
|
+
@click.stop="confirmDelete"
|
|
162
|
+
>
|
|
163
|
+
{{ $t("mapo.delete") }}
|
|
98
164
|
</v-btn>
|
|
99
|
-
</
|
|
100
|
-
</
|
|
101
|
-
</
|
|
102
|
-
</v-container>
|
|
165
|
+
</v-btn>
|
|
166
|
+
</div>
|
|
167
|
+
</div>
|
|
103
168
|
</div>
|
|
104
169
|
</template>
|
|
170
|
+
|
|
105
171
|
<style lang="scss" scoped>
|
|
172
|
+
|
|
173
|
+
.media-editor--wrapper{
|
|
174
|
+
height: 100%;
|
|
175
|
+
display: flex;
|
|
176
|
+
flex-direction: column;
|
|
177
|
+
justify-content: space-between;
|
|
178
|
+
}
|
|
179
|
+
|
|
106
180
|
table tr td:nth-child(2) {
|
|
107
181
|
overflow-wrap: anywhere;
|
|
108
182
|
}
|
|
183
|
+
.dialog {
|
|
184
|
+
position: relative;
|
|
185
|
+
height: 56px;
|
|
186
|
+
z-index: 5;
|
|
187
|
+
&__container {
|
|
188
|
+
position: absolute;
|
|
189
|
+
bottom: 0;
|
|
190
|
+
width: 100%;
|
|
191
|
+
}
|
|
192
|
+
&__content {
|
|
193
|
+
transition-property: max-height, padding;
|
|
194
|
+
transition-duration: 0.3s;
|
|
195
|
+
transition-timing-function: ease-out;
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
.media-editor--preview{
|
|
199
|
+
max-height: calc(100vh - 180px);
|
|
200
|
+
flex-grow: 1;
|
|
201
|
+
@media (max-width: 600px){
|
|
202
|
+
max-height: calc(100vh - 260px);
|
|
203
|
+
min-height: calc(100vh - 260px); }
|
|
204
|
+
}
|
|
205
|
+
.v-dialog .media-editor--preview{
|
|
206
|
+
max-height: calc(100vh - 510px);
|
|
207
|
+
@media (max-width: 600px){
|
|
208
|
+
max-height: calc(100vh - 375px);
|
|
209
|
+
min-height: unset;
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
.edit_spacer {
|
|
213
|
+
flex-grow: 0;
|
|
214
|
+
transition: flex-grow 0.3s ease-out;
|
|
215
|
+
}
|
|
216
|
+
.img_overlay {
|
|
217
|
+
position: relative;
|
|
218
|
+
&__button {
|
|
219
|
+
position: absolute;
|
|
220
|
+
z-index: 1;
|
|
221
|
+
color: #333333 !important;
|
|
222
|
+
background: #e0e0e096;
|
|
223
|
+
top: 30px;
|
|
224
|
+
&--back {
|
|
225
|
+
left: 10px;
|
|
226
|
+
}
|
|
227
|
+
&--href {
|
|
228
|
+
right: 10px;
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
}
|
|
109
232
|
</style>
|
|
110
233
|
<script>
|
|
111
234
|
import { humanFileSize } from "@mapomodule/utils/helpers/formatters";
|
|
235
|
+
import { mapGetters, mapActions } from "vuex"
|
|
112
236
|
|
|
113
237
|
export default {
|
|
114
238
|
name: "MediaEditor",
|
|
115
239
|
data() {
|
|
116
240
|
return {
|
|
117
|
-
media: null
|
|
241
|
+
media: null,
|
|
242
|
+
editing: false,
|
|
243
|
+
newFile: null,
|
|
244
|
+
sameUrl: false,
|
|
118
245
|
};
|
|
119
246
|
},
|
|
120
|
-
props: {
|
|
121
|
-
value: {
|
|
122
|
-
type: Object,
|
|
123
|
-
default: () => null
|
|
124
|
-
}
|
|
125
|
-
},
|
|
126
247
|
computed: {
|
|
248
|
+
...mapGetters("mapo/media", ["editMedia"]),
|
|
127
249
|
fileSize() {
|
|
128
250
|
return this.media && humanFileSize(this.media.size);
|
|
129
251
|
},
|
|
130
252
|
dateCreated() {
|
|
131
253
|
return this.media && new Date(this.media.created).toLocaleString();
|
|
132
254
|
},
|
|
133
|
-
extension() {
|
|
134
|
-
return this.media && this.media.file && this.media.file.split(".").pop();
|
|
135
|
-
},
|
|
136
255
|
fileName() {
|
|
137
256
|
return this.media && this.media.file && this.media.file.split("/").pop();
|
|
138
|
-
}
|
|
257
|
+
},
|
|
258
|
+
rotate() {
|
|
259
|
+
return {
|
|
260
|
+
transform: this.editing ? "rotate(180deg)" : "rotate(0deg)",
|
|
261
|
+
transition: "transform .3s cubic-bezier(0.25, 0.8, 0.5, 1)",
|
|
262
|
+
};
|
|
263
|
+
},
|
|
264
|
+
height() {
|
|
265
|
+
switch (this.$vuetify.breakpoint.name) {
|
|
266
|
+
case "xs":
|
|
267
|
+
return "50vh";
|
|
268
|
+
default:
|
|
269
|
+
return 425;
|
|
270
|
+
}
|
|
271
|
+
},
|
|
272
|
+
accept(){
|
|
273
|
+
switch (this.media.mime_type && this.media.mime_type.split("/")[0]) {
|
|
274
|
+
case "image":
|
|
275
|
+
return "image/*"
|
|
276
|
+
case "video":
|
|
277
|
+
return "video/*"
|
|
278
|
+
case "audio":
|
|
279
|
+
return "audio/*"
|
|
280
|
+
default:
|
|
281
|
+
return "*"
|
|
282
|
+
}
|
|
283
|
+
},
|
|
284
|
+
newFilePreview() {
|
|
285
|
+
return this.newFile.type.startsWith("image/") ? URL.createObjectURL(this.newFile) : null;
|
|
286
|
+
},
|
|
139
287
|
},
|
|
140
288
|
watch: {
|
|
141
|
-
|
|
289
|
+
editMedia(val) {
|
|
142
290
|
this.media = val;
|
|
143
|
-
|
|
291
|
+
this.editing = false;
|
|
292
|
+
this.newFile = null;
|
|
293
|
+
this.sameUrl = false;
|
|
294
|
+
},
|
|
144
295
|
},
|
|
145
296
|
methods: {
|
|
297
|
+
...mapActions("mapo/media", ["closeEditor", "deleteMedia", "updateMedia"]),
|
|
146
298
|
saveMedia() {
|
|
147
|
-
this
|
|
299
|
+
this.updateMedia({
|
|
300
|
+
id: this.media.id,
|
|
301
|
+
name: this.media.name,
|
|
302
|
+
title: this.media.title,
|
|
303
|
+
description: this.media.description,
|
|
304
|
+
alt_text: this.media.alt_text,
|
|
305
|
+
file: this.newFile || undefined,
|
|
306
|
+
same_url: (this.newFile && this.sameUrl) || undefined,
|
|
307
|
+
language_code: this.$i18n.locale
|
|
308
|
+
}).then(() => {
|
|
309
|
+
this.newFile = null;
|
|
310
|
+
this.sameUrl = false;
|
|
311
|
+
});
|
|
148
312
|
},
|
|
149
|
-
|
|
313
|
+
confirmDelete() {
|
|
150
314
|
this.$mapo.$confirm
|
|
151
315
|
.open({
|
|
152
|
-
title: "
|
|
153
|
-
question:
|
|
154
|
-
approveButton: { text: "
|
|
316
|
+
title: this.$t("mapo.delete"),
|
|
317
|
+
question: this.$t("mapo.mediaEditor.confirmDelete"),
|
|
318
|
+
approveButton: { text: this.$t("mapo.delete"), attrs: { color: "red", text: true } },
|
|
155
319
|
})
|
|
156
|
-
.then(res => res && this
|
|
157
|
-
},
|
|
158
|
-
close() {
|
|
159
|
-
this.$emit("input", null);
|
|
320
|
+
.then((res) => res && this.deleteMedia(this.media));
|
|
160
321
|
}
|
|
161
|
-
}
|
|
322
|
+
},
|
|
162
323
|
};
|
|
163
324
|
</script>
|