Add message helper

This commit is contained in:
Muhsin 2022-12-21 16:36:27 +05:30
parent a151b86637
commit 5237fee661
4 changed files with 90 additions and 9 deletions

View file

@ -6,7 +6,7 @@
@click="insertMentionNode"
/>
<canned-response
v-if="showCannedMenu && !isPrivate"
v-if="shouldShowCannedResponses"
:search-key="cannedSearchTerm"
@click="insertCannedResponse"
/>
@ -80,7 +80,8 @@ export default {
enableSuggestions: { type: Boolean, default: true },
overrideLineBreaks: { type: Boolean, default: false },
updateSelectionWith: { type: String, default: '' },
enableVariables: { type: Boolean, default: true },
enableVariables: { type: Boolean, default: false },
enableCannedResponses: { type: Boolean, default: true },
},
data() {
return {
@ -104,6 +105,11 @@ export default {
shouldShowVariables() {
return this.enableVariables && this.showVariables && !this.isPrivate;
},
shouldShowCannedResponses() {
return (
this.enableCannedResponses && this.showCannedMenu && !this.isPrivate
);
},
plugins() {
if (!this.enableSuggestions) {
return [];