mirror of
https://github.com/thelounge/thelounge
synced 2024-11-15 16:48:04 +00:00
19 lines
414 B
Vue
19 lines
414 B
Vue
<script>
|
|
const parse = require("../js/libs/handlebars/parse");
|
|
|
|
export default {
|
|
name: "ParsedMessage",
|
|
functional: true,
|
|
props: {
|
|
text: String,
|
|
message: Object,
|
|
},
|
|
render(createElement, context) {
|
|
if (typeof context.props.text !== "undefined") {
|
|
return parse(createElement, context.props.text);
|
|
}
|
|
|
|
return parse(createElement, context.props.message.text, context.props.message);
|
|
},
|
|
};
|
|
</script>
|