<template lang="pug">
div
+ button(@click="clearHistory()")
+ | {{ st.tr["Clear history"] }}
input#inputChat(
type="text"
:placeholder="st.tr['Chat here']"
const chat = { msg: chatTxt, name: this.st.user.name || "@nonymous" };
this.$emit("mychat", chat);
this.chats.unshift(chat);
+ },
+ clearHistory: function() {
+ this.chats = [];
+ this.$emit("chatcleared");
}
}
};