From 433ea02a18c0328b8079a40657220633c09e363a Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Sun, 18 Apr 2021 14:58:02 +0300 Subject: Changed some of TabSwitcher's internals for easier Vue3 migration --- src/components/user_profile/user_profile.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/components/user_profile') diff --git a/src/components/user_profile/user_profile.js b/src/components/user_profile/user_profile.js index c0b55a6c..c5ccf747 100644 --- a/src/components/user_profile/user_profile.js +++ b/src/components/user_profile/user_profile.js @@ -3,7 +3,7 @@ import UserCard from '../user_card/user_card.vue' import FollowCard from '../follow_card/follow_card.vue' import Timeline from '../timeline/timeline.vue' import Conversation from '../conversation/conversation.vue' -import TabSwitcher from 'src/components/tab_switcher/tab_switcher.js' +import TabSwitcher from 'src/components/tab_switcher/tab_switcher.jsx' import List from '../list/list.vue' import withLoadMore from '../../hocs/with_load_more/with_load_more' import { library } from '@fortawesome/fontawesome-svg-core' -- cgit v1.2.3-70-g09d2 From caed89f0ae64217602a2832bbf2b5df9b66c0999 Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Sun, 25 Apr 2021 13:44:50 +0300 Subject: destroyed -> unmounted --- src/components/bookmark_timeline/bookmark_timeline.js | 2 +- src/components/chat/chat.js | 2 +- src/components/media_modal/media_modal.js | 2 +- src/components/mobile_post_status_button/mobile_post_status_button.js | 2 +- src/components/poll/poll.js | 2 +- src/components/popover/popover.js | 2 +- .../public_and_external_timeline/public_and_external_timeline.js | 2 +- src/components/public_timeline/public_timeline.js | 2 +- src/components/tag_timeline/tag_timeline.js | 2 +- src/components/timeago/timeago.vue | 2 +- src/components/timeline/timeline.js | 2 +- src/components/user_profile/user_profile.js | 2 +- 12 files changed, 12 insertions(+), 12 deletions(-) (limited to 'src/components/user_profile') diff --git a/src/components/bookmark_timeline/bookmark_timeline.js b/src/components/bookmark_timeline/bookmark_timeline.js index 64b69e5d..5ac43d90 100644 --- a/src/components/bookmark_timeline/bookmark_timeline.js +++ b/src/components/bookmark_timeline/bookmark_timeline.js @@ -9,7 +9,7 @@ const Bookmarks = { components: { Timeline }, - destroyed () { + unmounted () { this.$store.commit('clearTimeline', { timeline: 'bookmarks' }) } } diff --git a/src/components/chat/chat.js b/src/components/chat/chat.js index b54f5fb2..aef11712 100644 --- a/src/components/chat/chat.js +++ b/src/components/chat/chat.js @@ -57,7 +57,7 @@ const Chat = { }) this.setChatLayout() }, - destroyed () { + unmounted () { window.removeEventListener('scroll', this.handleScroll) window.removeEventListener('resize', this.handleLayoutChange) this.unsetChatLayout() diff --git a/src/components/media_modal/media_modal.js b/src/components/media_modal/media_modal.js index e7384c93..38d66160 100644 --- a/src/components/media_modal/media_modal.js +++ b/src/components/media_modal/media_modal.js @@ -98,7 +98,7 @@ const MediaModal = { document.addEventListener('keyup', this.handleKeyupEvent) document.addEventListener('keydown', this.handleKeydownEvent) }, - destroyed () { + unmounted () { window.removeEventListener('popstate', this.hide) document.removeEventListener('keyup', this.handleKeyupEvent) document.removeEventListener('keydown', this.handleKeydownEvent) diff --git a/src/components/mobile_post_status_button/mobile_post_status_button.js b/src/components/mobile_post_status_button/mobile_post_status_button.js index 366ea89c..293b85fd 100644 --- a/src/components/mobile_post_status_button/mobile_post_status_button.js +++ b/src/components/mobile_post_status_button/mobile_post_status_button.js @@ -29,7 +29,7 @@ const MobilePostStatusButton = { } window.addEventListener('resize', this.handleOSK) }, - destroyed () { + unmounted () { if (this.autohideFloatingPostButton) { this.deactivateFloatingPostButtonAutohide() } diff --git a/src/components/poll/poll.js b/src/components/poll/poll.js index 98db5582..4611a95c 100644 --- a/src/components/poll/poll.js +++ b/src/components/poll/poll.js @@ -17,7 +17,7 @@ export default { } this.$store.dispatch('trackPoll', this.pollId) }, - destroyed () { + unmounted () { this.$store.dispatch('untrackPoll', this.pollId) }, computed: { diff --git a/src/components/popover/popover.js b/src/components/popover/popover.js index bc6cd8e7..849846f5 100644 --- a/src/components/popover/popover.js +++ b/src/components/popover/popover.js @@ -178,7 +178,7 @@ const Popover = { created () { document.addEventListener('click', this.onClickOutside) }, - destroyed () { + unmounted () { document.removeEventListener('click', this.onClickOutside) this.hidePopover() } diff --git a/src/components/public_and_external_timeline/public_and_external_timeline.js b/src/components/public_and_external_timeline/public_and_external_timeline.js index cbd4491b..bfcce6ae 100644 --- a/src/components/public_and_external_timeline/public_and_external_timeline.js +++ b/src/components/public_and_external_timeline/public_and_external_timeline.js @@ -9,7 +9,7 @@ const PublicAndExternalTimeline = { created () { this.$store.dispatch('startFetchingTimeline', { timeline: 'publicAndExternal' }) }, - destroyed () { + unmounted () { this.$store.dispatch('stopFetchingTimeline', 'publicAndExternal') } } diff --git a/src/components/public_timeline/public_timeline.js b/src/components/public_timeline/public_timeline.js index 66c40d3a..30693544 100644 --- a/src/components/public_timeline/public_timeline.js +++ b/src/components/public_timeline/public_timeline.js @@ -9,7 +9,7 @@ const PublicTimeline = { created () { this.$store.dispatch('startFetchingTimeline', { timeline: 'public' }) }, - destroyed () { + unmounted () { this.$store.dispatch('stopFetchingTimeline', 'public') } diff --git a/src/components/tag_timeline/tag_timeline.js b/src/components/tag_timeline/tag_timeline.js index 400c6a4b..bda61ae0 100644 --- a/src/components/tag_timeline/tag_timeline.js +++ b/src/components/tag_timeline/tag_timeline.js @@ -18,7 +18,7 @@ const TagTimeline = { this.$store.dispatch('startFetchingTimeline', { timeline: 'tag', tag: this.tag }) } }, - destroyed () { + unmounted () { this.$store.dispatch('stopFetchingTimeline', 'tag') } } diff --git a/src/components/timeago/timeago.vue b/src/components/timeago/timeago.vue index 55a2dd94..bed29020 100644 --- a/src/components/timeago/timeago.vue +++ b/src/components/timeago/timeago.vue @@ -31,7 +31,7 @@ export default { created () { this.refreshRelativeTimeObject() }, - destroyed () { + unmounted () { clearTimeout(this.interval) }, methods: { diff --git a/src/components/timeline/timeline.js b/src/components/timeline/timeline.js index 44f749c3..b5a45926 100644 --- a/src/components/timeline/timeline.js +++ b/src/components/timeline/timeline.js @@ -122,7 +122,7 @@ const Timeline = { window.addEventListener('keydown', this.handleShortKey) setTimeout(this.determineVisibleStatuses, 250) }, - destroyed () { + unmounted () { window.removeEventListener('scroll', this.handleScroll) window.removeEventListener('keydown', this.handleShortKey) if (typeof document.hidden !== 'undefined') document.removeEventListener('visibilitychange', this.handleVisibilityChange, false) diff --git a/src/components/user_profile/user_profile.js b/src/components/user_profile/user_profile.js index c5ccf747..8aa67765 100644 --- a/src/components/user_profile/user_profile.js +++ b/src/components/user_profile/user_profile.js @@ -46,7 +46,7 @@ const UserProfile = { this.load(routeParams.name || routeParams.id) this.tab = get(this.$route, 'query.tab', defaultTabKey) }, - destroyed () { + unmounted () { this.stopFetching() }, computed: { -- cgit v1.2.3-70-g09d2 From 8d46fd78c7ada7600afe7b74932a6f2380964592 Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Wed, 7 Apr 2021 22:42:34 +0300 Subject: migrate to v-slot --- src/components/account_actions/account_actions.vue | 25 ++--- src/components/chat_list/chat_list.vue | 5 +- src/components/chat_message/chat_message.vue | 32 +++--- .../domain_mute_card/domain_mute_card.vue | 4 +- src/components/extra_buttons/extra_buttons.vue | 24 ++--- .../moderation_tools/moderation_tools.vue | 25 ++--- .../notifications/notification_filters.vue | 8 +- src/components/popover/popover.js | 2 +- src/components/react_button/react_button.vue | 28 +++--- src/components/selectable_list/selectable_list.vue | 7 +- .../settings_modal/helpers/modified_indicator.vue | 16 +-- src/components/settings_modal/settings_modal.vue | 28 +++--- .../settings_modal/tabs/mutes_and_blocks_tab.vue | 73 ++++++-------- src/components/status_popover/status_popover.vue | 8 +- .../timeline/timeline_quick_settings.vue | 109 +++++++++++---------- src/components/timeline_menu/timeline_menu.vue | 43 ++++---- src/components/user_card/user_card.vue | 6 +- .../user_list_popover/user_list_popover.vue | 59 ++++++----- src/components/user_profile/user_profile.vue | 10 +- .../user_reporting_modal/user_reporting_modal.vue | 5 +- 20 files changed, 238 insertions(+), 279 deletions(-) (limited to 'src/components/user_profile') diff --git a/src/components/account_actions/account_actions.vue b/src/components/account_actions/account_actions.vue index ab5d1d29..1e31151c 100644 --- a/src/components/account_actions/account_actions.vue +++ b/src/components/account_actions/account_actions.vue @@ -6,10 +6,7 @@ :bound-to="{ x: 'container' }" remove-padding > -