projects
/
vchess.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Improvements - untested
[vchess.git]
/
client
/
src
/
components
/
Chat.vue
diff --git
a/client/src/components/Chat.vue
b/client/src/components/Chat.vue
index
f1e1fad
..
7f80767
100644
(file)
--- a/
client/src/components/Chat.vue
+++ b/
client/src/components/Chat.vue
@@
-1,5
+1,7
@@
<template lang="pug">
div
<template lang="pug">
div
+ button(@click="clearHistory()")
+ | {{ st.tr["Clear chat"] }}
input#inputChat(
type="text"
:placeholder="st.tr['Chat here']"
input#inputChat(
type="text"
:placeholder="st.tr['Chat here']"
@@
-51,6
+53,10
@@
export default {
const chat = { msg: chatTxt, name: this.st.user.name || "@nonymous" };
this.$emit("mychat", chat);
this.chats.unshift(chat);
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");
}
}
};
}
}
};