From 9108737d55300d8a4f822ba94335d8b53f04854d Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Sun, 7 Apr 2019 20:33:11 +0300 Subject: Webpack 4, ESLint with Vue, Node-sass, updated dependencies overall. New linting. --- src/components/settings/settings.vue | 723 ++++++++++++++++++++++------------- 1 file changed, 448 insertions(+), 275 deletions(-) (limited to 'src/components/settings/settings.vue') diff --git a/src/components/settings/settings.vue b/src/components/settings/settings.vue index 6ee103c7..226bdf1f 100644 --- a/src/components/settings/settings.vue +++ b/src/components/settings/settings.vue @@ -1,302 +1,476 @@ diff --git a/src/components/conversation/conversation.js b/src/components/conversation/conversation.js index 9ceab32d..69058bf6 100644 --- a/src/components/conversation/conversation.js +++ b/src/components/conversation/conversation.js @@ -94,8 +94,8 @@ const conversation = { }, replies () { let i = 1 - /* eslint-disable camelcase */ - return reduce(this.conversation, (result, { id, in_reply_to_status_id }) => { + return reduce(this.conversation, (result, {id, in_reply_to_status_id}) => { + /* eslint-disable camelcase */ const irid = in_reply_to_status_id /* eslint-enable camelcase */ if (irid) { @@ -127,8 +127,8 @@ const conversation = { methods: { fetchConversation () { if (this.status) { - this.$store.state.api.backendInteractor.fetchConversation({ id: this.status.id }) - .then(({ ancestors, descendants }) => { + this.$store.state.api.backendInteractor.fetchConversation({id: this.status.id}) + .then(({ancestors, descendants}) => { this.$store.dispatch('addNewStatuses', { statuses: ancestors }) this.$store.dispatch('addNewStatuses', { statuses: descendants }) set(this, 'converationStatusIds', [].concat( @@ -139,7 +139,7 @@ const conversation = { .then(() => this.setHighlight(this.statusId)) } else { const id = this.$route.params.id - this.$store.state.api.backendInteractor.fetchStatus({ id }) + this.$store.state.api.backendInteractor.fetchStatus({id}) .then((status) => this.$store.dispatch('addNewStatuses', { statuses: [status] })) .then(() => this.fetchConversation()) } diff --git a/src/components/conversation/conversation.vue b/src/components/conversation/conversation.vue index 1973edae..c39a3ed9 100644 --- a/src/components/conversation/conversation.vue +++ b/src/components/conversation/conversation.vue @@ -1,33 +1,24 @@ diff --git a/src/components/delete_button/delete_button.js b/src/components/delete_button/delete_button.js index cac7a89d..f2920666 100644 --- a/src/components/delete_button/delete_button.js +++ b/src/components/delete_button/delete_button.js @@ -10,7 +10,7 @@ const DeleteButton = { }, computed: { currentUser () { return this.$store.state.users.currentUser }, - canDelete () { return (this.currentUser && this.currentUser.rights.delete_others_notice) || this.status.user.id === this.currentUser.id } + canDelete () { return this.currentUser && this.currentUser.rights.delete_others_notice || this.status.user.id === this.currentUser.id } } } diff --git a/src/components/delete_button/delete_button.vue b/src/components/delete_button/delete_button.vue index 1f6e54bb..f4c91cfd 100644 --- a/src/components/delete_button/delete_button.vue +++ b/src/components/delete_button/delete_button.vue @@ -1,10 +1,7 @@ diff --git a/src/components/dm_timeline/dm_timeline.vue b/src/components/dm_timeline/dm_timeline.vue index c4e4d070..f03da4d3 100644 --- a/src/components/dm_timeline/dm_timeline.vue +++ b/src/components/dm_timeline/dm_timeline.vue @@ -1,9 +1,5 @@ diff --git a/src/components/emoji-input/emoji-input.js b/src/components/emoji-input/emoji-input.js index 64932f0e..a5bb6eaf 100644 --- a/src/components/emoji-input/emoji-input.js +++ b/src/components/emoji-input/emoji-input.js @@ -23,8 +23,7 @@ const EmojiInput = { if (matchedEmoji.length <= 0) { return false } - // eslint-disable-next-line camelcase - return map(take(matchedEmoji, 5), ({ shortcode, image_url, utf }, index) => ({ + return map(take(matchedEmoji, 5), ({shortcode, image_url, utf}, index) => ({ shortcode: `:${shortcode}:`, utf: utf || '', // eslint-disable-next-line camelcase @@ -99,7 +98,7 @@ const EmojiInput = { onInput (e) { this.$emit('input', e.target.value) }, - setCaret ({ target: { selectionStart } }) { + setCaret ({target: {selectionStart}}) { this.caret = selectionStart } } diff --git a/src/components/emoji-input/emoji-input.vue b/src/components/emoji-input/emoji-input.vue index 6a3be036..338b77cd 100644 --- a/src/components/emoji-input/emoji-input.vue +++ b/src/components/emoji-input/emoji-input.vue @@ -9,13 +9,13 @@ @input="onInput" @click="setCaret" @keyup="setCaret" - @keydown.exact="onKeydown" - @keydown.down.exact="cycleForward" - @keydown.up.exact="cycleBackward" - @keydown.shift.tab.exact="cycleBackward" - @keydown.tab.exact="cycleForward" - @keydown.enter.exact="replaceEmoji" - > + @keydown="onKeydown" + @keydown.down="cycleForward" + @keydown.up="cycleBackward" + @keydown.shift.tab="cycleBackward" + @keydown.tab="cycleForward" + @keydown.enter="replaceEmoji" + /> +
- + - {{ emoji.utf }} - {{ emoji.shortcode }} + {{emoji.utf}} + {{emoji.shortcode}}
diff --git a/src/components/export_import/export_import.vue b/src/components/export_import/export_import.vue index 20c6f569..451a2668 100644 --- a/src/components/export_import/export_import.vue +++ b/src/components/export_import/export_import.vue @@ -1,27 +1,12 @@ diff --git a/src/components/friends_timeline/friends_timeline.vue b/src/components/friends_timeline/friends_timeline.vue index 01a56812..66c0c058 100644 --- a/src/components/friends_timeline/friends_timeline.vue +++ b/src/components/friends_timeline/friends_timeline.vue @@ -1,9 +1,5 @@ diff --git a/src/components/gallery/gallery.vue b/src/components/gallery/gallery.vue index e8e441db..ea525c95 100644 --- a/src/components/gallery/gallery.vue +++ b/src/components/gallery/gallery.vue @@ -1,22 +1,13 @@ diff --git a/src/components/instance_specific_panel/instance_specific_panel.vue b/src/components/instance_specific_panel/instance_specific_panel.vue index 64ce4f8a..a7b74667 100644 --- a/src/components/instance_specific_panel/instance_specific_panel.vue +++ b/src/components/instance_specific_panel/instance_specific_panel.vue @@ -1,11 +1,9 @@ diff --git a/src/components/link-preview/link-preview.vue b/src/components/link-preview/link-preview.vue index 493774c2..64b1a58b 100644 --- a/src/components/link-preview/link-preview.vue +++ b/src/components/link-preview/link-preview.vue @@ -1,25 +1,13 @@