client lint first pass

This commit is contained in:
Matteo Pagliazzi
2019-10-11 20:35:49 +02:00
parent 07cffe9e16
commit a625e83b53
104 changed files with 1053 additions and 893 deletions

View File

@@ -787,23 +787,6 @@ export default {
})),
};
},
watch: {
editing () {
if (this.editing) this.modalPage = 2;
},
startingPage () {
if (!this.$store.state.avatarEditorOptions.startingPage) return;
this.activeTopPage = this.$store.state.avatarEditorOptions.startingPage;
this.activeSubPage = this.$store.state.avatarEditorOptions.subpage;
this.$store.state.avatarEditorOptions.startingPage = '';
this.$store.state.avatarEditorOptions.subpage = '';
},
},
mounted () {
if (this.editing) this.modalPage = 2;
// Buy modal is global, so we listen at root. I'd like to not
this.$root.$on('buyModal::boughtItem', this.backgroundPurchased);
},
computed: {
...mapState({ user: 'user.data' }),
@@ -858,6 +841,23 @@ export default {
return ownedBackgrounds;
},
},
watch: {
editing () {
if (this.editing) this.modalPage = 2;
},
startingPage () {
if (!this.$store.state.avatarEditorOptions.startingPage) return;
this.activeTopPage = this.$store.state.avatarEditorOptions.startingPage;
this.activeSubPage = this.$store.state.avatarEditorOptions.subpage;
this.$store.state.avatarEditorOptions.startingPage = '';
this.$store.state.avatarEditorOptions.subpage = '';
},
},
mounted () {
if (this.editing) this.modalPage = 2;
// Buy modal is global, so we listen at root. I'd like to not
this.$root.$on('buyModal::boughtItem', this.backgroundPurchased);
},
methods: {
purchase (type, key) {
this.$store.dispatch('shops:purchase', {
@@ -923,7 +923,7 @@ export default {
ownsSet (type, set) {
let setOwnedByUser = false;
for (let key in set) {
for (let key of Object.keys(set)) {
const value = set[key];
if (type === 'background') key = value.key;
if (this.user.purchased[type][key]) setOwnedByUser = true;
@@ -933,7 +933,7 @@ export default {
},
setKeys (type, _set) {
return map(_set, (v, k) => {
if (type === 'background') k = v.key;
if (type === 'background') k = v.key; // eslint-disable-line no-param-reassign
return `${type}.${k}`;
}).join(',');
},