Revert "hasMedia / mediaPreview webp"

This reverts commit 6d03d7828c.
This commit is contained in:
lesion 2022-05-02 16:26:24 +02:00
parent 49326d6b8a
commit c25b4ce08e
No known key found for this signature in database
GPG key ID: 352918250B012177

View file

@ -11,15 +11,12 @@
@mouseup='handleStop' @touchend='handleStop' @mouseup='handleStop' @touchend='handleStop'
) )
div.focalPoint(:style="{ top, left }") div.focalPoint(:style="{ top, left }")
picture(v-if='hasMedia') img(v-if='mediaPreview' :src='mediaPreview')
source(:srcset='mediaPreview("webp")')
img(:src='mediaPreview("jpg")')
v-col.col-12.col-sm-4 v-col.col-12.col-sm-4
p {{$t('event.choose_focal_point')}} p {{$t('event.choose_focal_point')}}
picture(v-if='hasMedia') img.mediaPreview.d-none.d-sm-block(v-if='mediaPreview'
source(:srcset='mediaPreview("webp")') :src='mediaPreview' :style="{ 'object-position': position }")
img.mediaPreview.d-none.d-sm-block(:src='mediaPreview("jpg")' :style="{ 'object-position': position }")
v-textarea.mt-4(type='text' v-textarea.mt-4(type='text'
label='Alternative text' label='Alternative text'
@ -32,12 +29,12 @@
v-btn(text @click='openMediaDetails=false' color='warning') Cancel v-btn(text @click='openMediaDetails=false' color='warning') Cancel
v-btn(text color='primary' @click='save') Save v-btn(text color='primary' @click='save') Save
h3.mb-3.font-weight-regular(v-if='hasMedia') {{$t('common.media')}} h3.mb-3.font-weight-regular(v-if='mediaPreview') {{$t('common.media')}}
v-card-actions(v-if='hasMedia') v-card-actions(v-if='mediaPreview')
v-spacer v-spacer
v-btn(text color='primary' @click='openMediaDetails = true') {{$t('common.edit')}} v-btn(text color='primary' @click='openMediaDetails = true') {{$t('common.edit')}}
v-btn(text color='error' @click='remove') {{$t('common.remove')}} v-btn(text color='error' @click='remove') {{$t('common.remove')}}
div.col-12.ml-3(v-if='hasMedia') div.col-12.ml-3(v-if='mediaPreview')
picture picture
source(:srcset='mediaPreview("webp")') source(:srcset='mediaPreview("webp")')
img.mediaPreview(:src='mediaPreview("jpg")' :style="{ 'object-position': savedPosition }") img.mediaPreview(:src='mediaPreview("jpg")' :style="{ 'object-position': savedPosition }")
@ -70,9 +67,6 @@ export default {
} }
}, },
computed: { computed: {
hasMedia () {
return (this.value.url || this.value.image)
},
top () { top () {
return ((this.focalpoint[1] + 1) * 50) + '%' return ((this.focalpoint[1] + 1) * 50) + '%'
}, },