2019-11-23 18:59:55 +00:00
|
|
|
import MessageFormatter from '../helpers/MessageFormatter';
|
|
|
|
|
|
|
|
export default {
|
|
|
|
methods: {
|
|
|
|
formatMessage(message) {
|
|
|
|
const messageFormatter = new MessageFormatter(message);
|
|
|
|
return messageFormatter.formattedMessage;
|
|
|
|
},
|
2020-04-10 11:12:37 +00:00
|
|
|
truncateMessage(description = '') {
|
|
|
|
if (description.length < 100) {
|
|
|
|
return description;
|
|
|
|
}
|
|
|
|
|
|
|
|
return `${description.slice(0, 97)}...`;
|
|
|
|
},
|
2019-11-23 18:59:55 +00:00
|
|
|
},
|
|
|
|
};
|