6fe5484119
- Allowing the ability to upload more common file types like zip, Docx etc - Fallback for image bubble when the image URL isn't available fixes: #3270 Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com> Co-authored-by: Nithin David <1277421+nithindavid@users.noreply.github.com>
36 lines
627 B
Vue
36 lines
627 B
Vue
<template>
|
|
<div class="image message-text__wrap">
|
|
<img :src="url" @click="onClick" @error="onImgError()" />
|
|
<woot-modal :full-width="true" :show.sync="show" :on-close="onClose">
|
|
<img :src="url" class="modal-image" />
|
|
</woot-modal>
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
export default {
|
|
components: {},
|
|
props: {
|
|
url: {
|
|
type: String,
|
|
required: true,
|
|
},
|
|
},
|
|
data() {
|
|
return {
|
|
show: false,
|
|
};
|
|
},
|
|
methods: {
|
|
onClose() {
|
|
this.show = false;
|
|
},
|
|
onClick() {
|
|
this.show = true;
|
|
},
|
|
onImgError() {
|
|
this.$emit('error');
|
|
},
|
|
},
|
|
};
|
|
</script>
|