fix media name

This commit is contained in:
lesion 2021-11-11 16:56:08 +01:00
parent e8fe68be30
commit 49982ceb1d
No known key found for this signature in database
GPG key ID: 352918250B012177
2 changed files with 6 additions and 3 deletions

View file

@ -42,7 +42,7 @@
:hint="$t('event.media_description')"
prepend-icon="mdi-camera"
:value='value.image'
@change="v => $emit('input', { image: v, focalpoint: [0, 0] })"
@change="selectMedia"
persistent-hint
accept='image/*')
</template>
@ -79,7 +79,7 @@ export default {
},
methods: {
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
},
async remove () {
@ -87,6 +87,9 @@ export default {
if (!ret) { return }
this.$emit('remove')
},
selectMedia (v) {
this.$emit('input', { image: v, name: v.name, focalpoint: [0, 0] })
},
selectFocal (ev) {
const boundingClientRect = ev.target.getBoundingClientRect()

View file

@ -130,7 +130,7 @@ if (config.firstrun) {
api.put('/event/unconfirm/:event_id', isAuth, eventController.unconfirm)
// get event
api.get('/event/:event_id.:format?', cors, eventController.get)
api.get('/event/:event_slug.:format?', cors, eventController.get)
// export events (rss/ics)
api.get('/export/:type', cors, exportController.export)