mirror of
https://github.com/citizenfx/cfx-server-data.git
synced 2025-12-12 06:14:09 +01:00
^1 etc. can now be used by the template AND args
This commit is contained in:
@@ -5,13 +5,8 @@ Vue.component('message', {
|
|||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
textEscaped() {
|
textEscaped() {
|
||||||
let s = '';
|
let s = this.template ? this.template : this.templates[this.templateId];
|
||||||
if (this.template) {
|
s = s.replace(/{(\d+)}/g, (match, number) => {
|
||||||
s = this.colorize(this.template);
|
|
||||||
} else {
|
|
||||||
s = this.colorize(this.templates[this.templateId]);
|
|
||||||
}
|
|
||||||
return s.replace(/{(\d+)}/g, (match, number) => {
|
|
||||||
const argEscaped = this.args[number] != undefined ? this.escape(this.args[number]) : match
|
const argEscaped = this.args[number] != undefined ? this.escape(this.args[number]) : match
|
||||||
if (number == 0 && this.color) {
|
if (number == 0 && this.color) {
|
||||||
//color is deprecated, use templates or ^1 etc.
|
//color is deprecated, use templates or ^1 etc.
|
||||||
@@ -19,6 +14,7 @@ Vue.component('message', {
|
|||||||
}
|
}
|
||||||
return argEscaped;
|
return argEscaped;
|
||||||
});
|
});
|
||||||
|
return this.colorize(s);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|||||||
Reference in New Issue
Block a user