diff --git a/resources/[system]/chat/html/App.js b/resources/[system]/chat/html/App.js index 6a7b8b1..e0552ae 100644 --- a/resources/[system]/chat/html/App.js +++ b/resources/[system]/chat/html/App.js @@ -3,6 +3,7 @@ window.APP = { name: 'app', data() { return { + style: CONFIG.style, showInput: false, showWindow: false, suggestions: [], diff --git a/resources/[system]/chat/html/Message.js b/resources/[system]/chat/html/Message.js index 19ea51f..a83e65e 100644 --- a/resources/[system]/chat/html/Message.js +++ b/resources/[system]/chat/html/Message.js @@ -5,13 +5,8 @@ Vue.component('message', { }, computed: { textEscaped() { - let s = ''; - if (this.template) { - s = this.colorize(this.template); - } else { - s = this.colorize(this.templates[this.templateId]); - } - return s.replace(/{(\d+)}/g, (match, number) => { + let s = this.template ? this.template : this.templates[this.templateId]; + s = s.replace(/{(\d+)}/g, (match, number) => { const argEscaped = this.args[number] != undefined ? this.escape(this.args[number]) : match if (number == 0 && this.color) { //color is deprecated, use templates or ^1 etc. @@ -19,6 +14,7 @@ Vue.component('message', { } return argEscaped; }); + return this.colorize(s); }, }, methods: { diff --git a/resources/[system]/chat/html/config.default.js b/resources/[system]/chat/html/config.default.js index 5715853..a517381 100644 --- a/resources/[system]/chat/html/config.default.js +++ b/resources/[system]/chat/html/config.default.js @@ -8,4 +8,9 @@ window.CONFIG = { }, fadeTimeout: 7000, suggestionLimit: 5, + style: { + background: 'rgba(52, 73, 94, 0.7)', + width: '38%', + height: '240px', + } }; diff --git a/resources/[system]/chat/html/index.html b/resources/[system]/chat/html/index.html index 8cd6659..de5ced8 100644 --- a/resources/[system]/chat/html/index.html +++ b/resources/[system]/chat/html/index.html @@ -21,7 +21,7 @@