2019-10-29 07:20:54 +00:00
|
|
|
<template>
|
2019-11-25 18:40:27 +00:00
|
|
|
<div
|
|
|
|
class="chat-bubble user"
|
2020-03-30 06:45:06 +00:00
|
|
|
:style="{ background: widgetColor }"
|
2020-08-11 04:27:42 +00:00
|
|
|
v-html="formatMessage(message, false)"
|
2020-06-15 08:05:52 +00:00
|
|
|
/>
|
2019-10-29 07:20:54 +00:00
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
2019-11-23 18:59:55 +00:00
|
|
|
import messageFormatterMixin from 'shared/mixins/messageFormatterMixin';
|
|
|
|
|
2019-10-29 07:20:54 +00:00
|
|
|
export default {
|
|
|
|
name: 'UserMessageBubble',
|
2019-11-23 18:59:55 +00:00
|
|
|
mixins: [messageFormatterMixin],
|
2019-10-29 07:20:54 +00:00
|
|
|
props: {
|
2020-06-15 08:05:52 +00:00
|
|
|
message: {
|
|
|
|
type: String,
|
|
|
|
default: '',
|
|
|
|
},
|
2019-11-29 12:12:35 +00:00
|
|
|
status: {
|
|
|
|
type: String,
|
|
|
|
default: '',
|
|
|
|
},
|
2020-06-15 08:05:52 +00:00
|
|
|
widgetColor: {
|
|
|
|
type: String,
|
|
|
|
default: '',
|
2020-03-30 06:45:06 +00:00
|
|
|
},
|
|
|
|
},
|
2019-10-29 07:20:54 +00:00
|
|
|
};
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="scss">
|
|
|
|
@import '~widget/assets/scss/variables.scss';
|
|
|
|
@import '~widget/assets/scss/mixins.scss';
|
|
|
|
|
|
|
|
.chat-bubble {
|
|
|
|
@include light-shadow;
|
|
|
|
background: $color-woot;
|
|
|
|
border-radius: $space-two;
|
|
|
|
color: $color-white;
|
|
|
|
display: inline-block;
|
|
|
|
font-size: $font-size-default;
|
|
|
|
line-height: 1.5;
|
2020-05-02 04:17:36 +00:00
|
|
|
padding: $space-slab $space-normal $space-slab $space-normal;
|
2019-11-23 18:59:55 +00:00
|
|
|
text-align: left;
|
2020-06-18 09:47:45 +00:00
|
|
|
word-break: break-word;
|
2019-11-23 18:59:55 +00:00
|
|
|
|
2020-04-10 11:12:37 +00:00
|
|
|
> a {
|
2020-02-20 05:29:43 +00:00
|
|
|
color: $color-primary;
|
2020-02-22 10:02:15 +00:00
|
|
|
word-break: break-all;
|
2019-11-23 18:59:55 +00:00
|
|
|
}
|
2019-10-29 07:20:54 +00:00
|
|
|
|
|
|
|
&.user {
|
|
|
|
border-bottom-right-radius: $space-smaller;
|
2020-02-22 10:02:15 +00:00
|
|
|
|
2020-04-10 11:12:37 +00:00
|
|
|
> a {
|
2020-02-20 05:29:43 +00:00
|
|
|
color: $color-white;
|
|
|
|
}
|
2019-10-29 07:20:54 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
</style>
|