fix media name
This commit is contained in:
@@ -42,7 +42,7 @@
|
|||||||
:hint="$t('event.media_description')"
|
:hint="$t('event.media_description')"
|
||||||
prepend-icon="mdi-camera"
|
prepend-icon="mdi-camera"
|
||||||
:value='value.image'
|
:value='value.image'
|
||||||
@change="v => $emit('input', { image: v, focalpoint: [0, 0] })"
|
@change="selectMedia"
|
||||||
persistent-hint
|
persistent-hint
|
||||||
accept='image/*')
|
accept='image/*')
|
||||||
</template>
|
</template>
|
||||||
@@ -79,7 +79,7 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
save () {
|
save () {
|
||||||
this.$emit('input', { url: this.value.url, image: this.value.image, name: this.name || '', focalpoint: [...this.focalpoint] })
|
this.$emit('input', { url: this.value.url, image: this.value.image, name: this.name || this.value.image.name || '', focalpoint: [...this.focalpoint] })
|
||||||
this.openMediaDetails = false
|
this.openMediaDetails = false
|
||||||
},
|
},
|
||||||
async remove () {
|
async remove () {
|
||||||
@@ -87,6 +87,9 @@ export default {
|
|||||||
if (!ret) { return }
|
if (!ret) { return }
|
||||||
this.$emit('remove')
|
this.$emit('remove')
|
||||||
},
|
},
|
||||||
|
selectMedia (v) {
|
||||||
|
this.$emit('input', { image: v, name: v.name, focalpoint: [0, 0] })
|
||||||
|
},
|
||||||
selectFocal (ev) {
|
selectFocal (ev) {
|
||||||
const boundingClientRect = ev.target.getBoundingClientRect()
|
const boundingClientRect = ev.target.getBoundingClientRect()
|
||||||
|
|
||||||
|
|||||||
@@ -130,7 +130,7 @@ if (config.firstrun) {
|
|||||||
api.put('/event/unconfirm/:event_id', isAuth, eventController.unconfirm)
|
api.put('/event/unconfirm/:event_id', isAuth, eventController.unconfirm)
|
||||||
|
|
||||||
// get event
|
// get event
|
||||||
api.get('/event/:event_id.:format?', cors, eventController.get)
|
api.get('/event/:event_slug.:format?', cors, eventController.get)
|
||||||
|
|
||||||
// export events (rss/ics)
|
// export events (rss/ics)
|
||||||
api.get('/export/:type', cors, exportController.export)
|
api.get('/export/:type', cors, exportController.export)
|
||||||
|
|||||||
Reference in New Issue
Block a user