diff --git a/.eslintrc.js b/.eslintrc.js index 7d090208..3c48baa8 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -21,26 +21,6 @@ module.exports = { 'generator-star-spacing': 0, // allow debugger during development 'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0, - // Webpack 4 update commit, most of these probably should be fixed and removed in a separate MR - // A lot of errors come from .vue files that are now properly linted - 'vue/valid-v-if': 1, - 'vue/use-v-on-exact': 1, - 'vue/no-parsing-error': 1, - 'vue/require-v-for-key': 1, - 'vue/valid-v-for': 1, - 'vue/require-prop-types': 1, - 'vue/no-use-v-if-with-v-for': 1, - 'indent': 1, - 'import/first': 1, - 'object-curly-spacing': 1, - 'prefer-promise-reject-errors': 1, - 'eol-last': 1, - 'no-return-await': 1, - 'no-multi-spaces': 1, - 'no-trailing-spaces': 1, - 'no-unused-expressions': 1, - 'no-mixed-operators': 1, - 'camelcase': 1, - 'no-multiple-empty-lines': 1 + 'vue/require-prop-types': 0 } } diff --git a/src/App.vue b/src/App.vue index 769e075d..758c9fce 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,53 +1,111 @@ diff --git a/src/components/user_card/user_card.js b/src/components/user_card/user_card.js index 7c6ffa89..92cd0e54 100644 --- a/src/components/user_card/user_card.js +++ b/src/components/user_card/user_card.js @@ -23,15 +23,15 @@ export default { computed: { classes () { return [{ - 'user-card-rounded-t': this.rounded === 'top', // set border-top-left-radius and border-top-right-radius - 'user-card-rounded': this.rounded === true, // set border-radius for all sides - 'user-card-bordered': this.bordered === true // set border for all sides + 'user-card-rounded-t': this.rounded === 'top', // set border-top-left-radius and border-top-right-radius + 'user-card-rounded': this.rounded === true, // set border-radius for all sides + 'user-card-bordered': this.bordered === true // set border for all sides }] }, style () { const color = this.$store.state.config.customTheme.colors - ? this.$store.state.config.customTheme.colors.bg // v2 - : this.$store.state.config.colors.bg // v1 + ? this.$store.state.config.customTheme.colors.bg // v2 + : this.$store.state.config.colors.bg // v1 if (color) { const rgb = (typeof color === 'string') ? hex2rgb(color) : color @@ -73,12 +73,12 @@ export default { userHighlightType: { get () { const data = this.$store.state.config.highlight[this.user.screen_name] - return data && data.type || 'disabled' + return (data && data.type) || 'disabled' }, set (type) { const data = this.$store.state.config.highlight[this.user.screen_name] if (type !== 'disabled') { - this.$store.dispatch('setHighlight', { user: this.user.screen_name, color: data && data.color || '#FFFFFF', type }) + this.$store.dispatch('setHighlight', { user: this.user.screen_name, color: (data && data.color) || '#FFFFFF', type }) } else { this.$store.dispatch('setHighlight', { user: this.user.screen_name, color: undefined }) } @@ -110,7 +110,7 @@ export default { followUser () { const store = this.$store this.followRequestInProgress = true - requestFollow(this.user, store).then(({sent}) => { + requestFollow(this.user, store).then(({ sent }) => { this.followRequestInProgress = false this.followRequestSent = sent }) @@ -141,7 +141,7 @@ export default { store.commit('setProfileView', { v }) } }, - linkClicked ({target}) { + linkClicked ({ target }) { if (target.tagName === 'SPAN') { target = target.parentNode } diff --git a/src/components/user_card/user_card.vue b/src/components/user_card/user_card.vue index b4495673..5a5a4881 100644 --- a/src/components/user_card/user_card.vue +++ b/src/components/user_card/user_card.vue @@ -1,134 +1,260 @@ diff --git a/src/components/user_finder/user_finder.vue b/src/components/user_finder/user_finder.vue index a118ffe2..39d49237 100644 --- a/src/components/user_finder/user_finder.vue +++ b/src/components/user_finder/user_finder.vue @@ -1,14 +1,38 @@