polish
This commit is contained in:
parent
d3f99d6133
commit
5d74c67648
17 changed files with 101 additions and 212 deletions
|
|
@ -1,6 +1,6 @@
|
|||
const Bubble =
|
||||
{
|
||||
props: ["category", "text", "blob", "modifier", "child"],
|
||||
props: ["category", "text", "html", "blob", "modifier", "child"],
|
||||
|
||||
setup(props)
|
||||
{
|
||||
|
|
@ -9,7 +9,7 @@ const Bubble =
|
|||
}
|
||||
|
||||
Vue.onMounted(() => {
|
||||
document.getElementById("messenger").dispatchEvent(new CustomEvent('adjust-scroll'));
|
||||
document.dispatchEvent(new CustomEvent("scroll"));
|
||||
});
|
||||
|
||||
return { getUrl };
|
||||
|
|
@ -18,13 +18,13 @@ const Bubble =
|
|||
template: `
|
||||
<div :class="'bubble ' + modifier + '-bubble ' + modifier +'-'+ child">
|
||||
|
||||
<p v-if="category=='text/plain'">{{ text }}</p>
|
||||
<p v-if="category=='text'">{{ text }}</p>
|
||||
|
||||
<p v-else-if="category=='audio/L16'">{{ text }}</p>
|
||||
<p v-else-if="category=='audio'">{{ text }}</p>
|
||||
|
||||
<div v-else-if="category=='text/html'" v-html="text"></div>
|
||||
<div v-else-if="category=='html'" v-html="html"></div>
|
||||
|
||||
<img v-else-if="category.startsWith('image/')" :src="getUrl()" />
|
||||
<img v-else-if="category == 'image'" :src="getUrl()" />
|
||||
|
||||
<a v-else :href="getUrl()">{{ text }}</a>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue