From 0eed2ccca8a0980c161bb5a52b211c507e0ffef5 Mon Sep 17 00:00:00 2001 From: lain Date: Tue, 18 Jun 2019 20:28:31 +0000 Subject: Feature/polls attempt 2 --- src/components/status/status.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'src/components/status/status.js') diff --git a/src/components/status/status.js b/src/components/status/status.js index ea4c2b9d..d2452935 100644 --- a/src/components/status/status.js +++ b/src/components/status/status.js @@ -1,6 +1,7 @@ import Attachment from '../attachment/attachment.vue' import FavoriteButton from '../favorite_button/favorite_button.vue' import RetweetButton from '../retweet_button/retweet_button.vue' +import Poll from '../poll/poll.vue' import ExtraButtons from '../extra_buttons/extra_buttons.vue' import PostStatusForm from '../post_status_form/post_status_form.vue' import UserCard from '../user_card/user_card.vue' @@ -8,6 +9,7 @@ import UserAvatar from '../user_avatar/user_avatar.vue' import Gallery from '../gallery/gallery.vue' import LinkPreview from '../link-preview/link-preview.vue' import AvatarList from '../avatar_list/avatar_list.vue' +import Timeago from '../timeago/timeago.vue' import generateProfileLink from 'src/services/user_profile_link_generator/user_profile_link_generator' import fileType from 'src/services/file_type/file_type.service' import { highlightClass, highlightStyle } from '../../services/user_highlighter/user_highlighter.js' @@ -216,8 +218,8 @@ const Status = { if (!this.status.summary) return '' const decodedSummary = unescape(this.status.summary) const behavior = typeof this.$store.state.config.subjectLineBehavior === 'undefined' - ? this.$store.state.instance.subjectLineBehavior - : this.$store.state.config.subjectLineBehavior + ? this.$store.state.instance.subjectLineBehavior + : this.$store.state.config.subjectLineBehavior const startsWithRe = decodedSummary.match(/^re[: ]/i) if (behavior !== 'noop' && startsWithRe || behavior === 'masto') { return decodedSummary @@ -285,11 +287,13 @@ const Status = { RetweetButton, ExtraButtons, PostStatusForm, + Poll, UserCard, UserAvatar, Gallery, LinkPreview, - AvatarList + AvatarList, + Timeago }, methods: { visibilityIcon (visibility) { @@ -377,7 +381,7 @@ const Status = { this.preview = find(statuses, { 'id': targetId }) // or if we have to fetch it if (!this.preview) { - this.$store.state.api.backendInteractor.fetchStatus({id}).then((status) => { + this.$store.state.api.backendInteractor.fetchStatus({ id }).then((status) => { this.preview = status }) } -- cgit v1.2.3-70-g09d2 From 020c6d1bcfaf67ccb9ecdab13a39a1ddea868bb6 Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Sun, 7 Jul 2019 00:54:17 +0300 Subject: all the manual fixes --- .eslintrc.js | 22 +---------------- src/components/attachment/attachment.vue | 2 ++ src/components/basic_user_card/basic_user_card.vue | 2 ++ src/components/chat_panel/chat_panel.vue | 2 +- src/components/conversation/conversation.js | 1 + src/components/font_control/font_control.vue | 1 + src/components/gallery/gallery.vue | 3 ++- .../instance_specific_panel.vue | 2 ++ .../interface_language_switcher.vue | 1 + src/components/link-preview/link-preview.vue | 2 +- src/components/media_modal/media_modal.vue | 2 +- src/components/media_upload/media_upload.vue | 2 +- src/components/notification/notification.vue | 2 ++ src/components/poll/poll.vue | 2 +- src/components/poll/poll_form.vue | 1 + .../post_status_form/post_status_form.vue | 3 ++- src/components/registration/registration.vue | 7 +++++- src/components/shadow_control/shadow_control.vue | 1 + src/components/status/status.js | 2 +- src/components/status/status.vue | 28 ++++++++++++---------- src/components/style_switcher/style_switcher.vue | 2 ++ .../terms_of_service_panel.vue | 2 ++ src/components/user_card/user_card.js | 4 ++-- src/components/user_card/user_card.vue | 4 ++++ src/components/user_settings/mfa_backup_codes.vue | 5 +++- .../who_to_follow_panel/who_to_follow_panel.vue | 1 + src/modules/auth_flow.js | 1 + src/modules/users.js | 8 +++---- .../backend_interactor_service.js | 6 +++++ test/unit/karma.conf.js | 4 ++-- .../entity_normalizer/entity_normalizer.spec.js | 6 ----- 31 files changed, 74 insertions(+), 57 deletions(-) (limited to 'src/components/status/status.js') 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/components/attachment/attachment.vue b/src/components/attachment/attachment.vue index 55d81691..108dc36e 100644 --- a/src/components/attachment/attachment.vue +++ b/src/components/attachment/attachment.vue @@ -97,8 +97,10 @@ diff --git a/src/components/basic_user_card/basic_user_card.vue b/src/components/basic_user_card/basic_user_card.vue index 8ad0da2d..568e9359 100644 --- a/src/components/basic_user_card/basic_user_card.vue +++ b/src/components/basic_user_card/basic_user_card.vue @@ -25,11 +25,13 @@ :title="user.name" class="basic-user-card-user-name" > + +
diff --git a/src/components/conversation/conversation.js b/src/components/conversation/conversation.js index cc0b0b41..a2b3aeab 100644 --- a/src/components/conversation/conversation.js +++ b/src/components/conversation/conversation.js @@ -86,6 +86,7 @@ const conversation = { }, replies () { let i = 1 + // eslint-disable-next-line camelcase return reduce(this.conversation, (result, { id, in_reply_to_status_id }) => { /* eslint-disable camelcase */ const irid = in_reply_to_status_id diff --git a/src/components/font_control/font_control.vue b/src/components/font_control/font_control.vue index 87644628..61f0384b 100644 --- a/src/components/font_control/font_control.vue +++ b/src/components/font_control/font_control.vue @@ -35,6 +35,7 @@ >