1
0
mirror of https://github.com/citizenfx/cfx-server-data.git synced 2025-01-09 23:02:56 +08:00

Renamed variables to something better.

This commit is contained in:
GHMatti 2018-09-06 11:02:07 +02:00 committed by GitHub
parent 34542d9293
commit 41e93abb98
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -6,8 +6,8 @@ window.APP = {
style: CONFIG.style, style: CONFIG.style,
showInput: false, showInput: false,
showWindow: false, showWindow: false,
subtrahendSuggestions: [], backingSuggestions: [],
minuendSuggestions: [], removedSuggestions: [],
templates: CONFIG.templates, templates: CONFIG.templates,
message: '', message: '',
messages: [], messages: [],
@ -44,7 +44,7 @@ window.APP = {
}, },
computed: { computed: {
suggestions() { suggestions() {
return this.subtrahendSuggestions.filter((el) => this.minuendSuggestions.indexOf(el.name) <= -1); return this.backingSuggestions.filter((el) => this.removedSuggestions.indexOf(el.name) <= -1);
}, },
}, },
methods: { methods: {
@ -74,14 +74,14 @@ window.APP = {
if (!suggestion.params) { if (!suggestion.params) {
suggestion.params = []; //TODO Move somewhere else suggestion.params = []; //TODO Move somewhere else
} }
if (this.subtrahendSuggestions.find(a => a.name == suggestion.name)) { if (this.backingSuggestions.find(a => a.name == suggestion.name)) {
return; return;
} }
this.subtrahendSuggestions.push(suggestion); this.backingSuggestions.push(suggestion);
}, },
ON_SUGGESTION_REMOVE({ name }) { ON_SUGGESTION_REMOVE({ name }) {
if(this.minuendSuggestions.indexOf(name) <= -1) { if(this.removedSuggestions.indexOf(name) <= -1) {
this.minuendSuggestions.push(name); this.removedSuggestions.push(name);
} }
}, },
ON_TEMPLATE_ADD({ template }) { ON_TEMPLATE_ADD({ template }) {