mirror of
https://framagit.org/les/gancio.git
synced 2025-01-31 16:42:22 +01:00
fix media name
This commit is contained in:
parent
e8fe68be30
commit
49982ceb1d
2 changed files with 6 additions and 3 deletions
|
@ -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()
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue