2024-10-25 11:56:27 +02:00
|
|
|
<template>
|
2024-10-25 12:46:41 +02:00
|
|
|
<div v-html="content" class="waveform">
|
|
|
|
|
</div>
|
2024-10-25 11:56:27 +02:00
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
|
props: {
|
|
|
|
|
event: {
|
|
|
|
|
type: Object,
|
|
|
|
|
default: function () {
|
|
|
|
|
return null;
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
},
|
2024-10-25 12:46:41 +02:00
|
|
|
computed: {
|
|
|
|
|
content() {
|
|
|
|
|
return this.$sanitize(
|
|
|
|
|
this.event ? this.event.getContent().formatted_body : "",
|
|
|
|
|
{
|
|
|
|
|
allowedTags: ["svg", "path"],
|
|
|
|
|
allowedAttributes: {
|
|
|
|
|
'svg': ["viewbox", "fill", "preserveaspectratio", "xmlns"],
|
|
|
|
|
'path': ["d", "style"]
|
2024-10-25 11:56:27 +02:00
|
|
|
}
|
|
|
|
|
}
|
2024-10-25 12:46:41 +02:00
|
|
|
);
|
2024-10-25 11:56:27 +02:00
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
};
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style lang="scss">
|
|
|
|
|
@import "@/assets/css/chat.scss";
|
2024-10-25 12:46:41 +02:00
|
|
|
|
|
|
|
|
.waveform svg {
|
|
|
|
|
width: 100%;
|
|
|
|
|
height: 100%;
|
|
|
|
|
|
|
|
|
|
path {
|
|
|
|
|
stroke: black !important;
|
|
|
|
|
}
|
|
|
|
|
}
|
2024-10-25 11:56:27 +02:00
|
|
|
</style>
|