From 3b7aaae2b366abe1162c22a29918336c4210446f Mon Sep 17 00:00:00 2001 From: Tusooa Zhu Date: Wed, 9 Feb 2022 16:26:30 -0500 Subject: Add confirmation for blocking --- src/components/account_actions/account_actions.vue | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'src/components/account_actions/account_actions.vue') diff --git a/src/components/account_actions/account_actions.vue b/src/components/account_actions/account_actions.vue index 973a5935..dfe1f706 100644 --- a/src/components/account_actions/account_actions.vue +++ b/src/components/account_actions/account_actions.vue @@ -74,6 +74,24 @@ + + + + + -- cgit v1.2.3-70-g09d2 From 39e4746f615970001839309e06a0f13d9613b175 Mon Sep 17 00:00:00 2001 From: Tusooa Zhu Date: Thu, 17 Mar 2022 00:06:26 -0400 Subject: Use portal for modals --- src/components/account_actions/account_actions.vue | 36 +++++++------- src/components/confirm_modal/confirm_modal.js | 5 -- src/components/confirm_modal/confirm_modal.vue | 1 - src/components/desktop_nav/desktop_nav.vue | 22 +++++---- src/components/extra_buttons/extra_buttons.vue | 22 +++++---- src/components/follow_button/follow_button.vue | 56 +++++++++++----------- src/components/mobile_nav/mobile_nav.vue | 22 +++++---- src/components/retweet_button/retweet_button.vue | 22 +++++---- src/components/user_card/user_card.vue | 36 +++++++------- 9 files changed, 114 insertions(+), 108 deletions(-) (limited to 'src/components/account_actions/account_actions.vue') diff --git a/src/components/account_actions/account_actions.vue b/src/components/account_actions/account_actions.vue index dfe1f706..273aac69 100644 --- a/src/components/account_actions/account_actions.vue +++ b/src/components/account_actions/account_actions.vue @@ -74,24 +74,26 @@ - - + - - - + + + + + diff --git a/src/components/confirm_modal/confirm_modal.js b/src/components/confirm_modal/confirm_modal.js index bb5e9d97..96ddc118 100644 --- a/src/components/confirm_modal/confirm_modal.js +++ b/src/components/confirm_modal/confirm_modal.js @@ -11,12 +11,7 @@ const ConfirmModal = { components: { DialogModal }, - data: { - }, props: { - showing: { - type: Boolean - }, title: { type: String }, diff --git a/src/components/confirm_modal/confirm_modal.vue b/src/components/confirm_modal/confirm_modal.vue index 59e46dc1..5b5014c5 100644 --- a/src/components/confirm_modal/confirm_modal.vue +++ b/src/components/confirm_modal/confirm_modal.vue @@ -1,6 +1,5 @@ diff --git a/src/components/extra_buttons/extra_buttons.vue b/src/components/extra_buttons/extra_buttons.vue index 293f6d68..4641947a 100644 --- a/src/components/extra_buttons/extra_buttons.vue +++ b/src/components/extra_buttons/extra_buttons.vue @@ -165,16 +165,18 @@ /> - - {{ $t('status.delete_confirm') }} - + + + {{ $t('status.delete_confirm') }} + + diff --git a/src/components/follow_button/follow_button.vue b/src/components/follow_button/follow_button.vue index 4fc2233a..5c799406 100644 --- a/src/components/follow_button/follow_button.vue +++ b/src/components/follow_button/follow_button.vue @@ -1,33 +1,33 @@ diff --git a/src/components/mobile_nav/mobile_nav.vue b/src/components/mobile_nav/mobile_nav.vue index 0f23b7ac..6b6b8f21 100644 --- a/src/components/mobile_nav/mobile_nav.vue +++ b/src/components/mobile_nav/mobile_nav.vue @@ -88,16 +88,18 @@ ref="sideDrawer" :logout="logout" /> - - {{ $t('login.logout_confirm') }} - + + + {{ $t('login.logout_confirm') }} + + diff --git a/src/components/retweet_button/retweet_button.vue b/src/components/retweet_button/retweet_button.vue index 38d4dc3f..9ed24bd5 100644 --- a/src/components/retweet_button/retweet_button.vue +++ b/src/components/retweet_button/retweet_button.vue @@ -59,16 +59,18 @@ > {{ status.repeat_num }} - - {{ $t('status.repeat_confirm') }} - + + + {{ $t('status.repeat_confirm') }} + + diff --git a/src/components/user_card/user_card.vue b/src/components/user_card/user_card.vue index fac900a9..5a848ead 100644 --- a/src/components/user_card/user_card.vue +++ b/src/components/user_card/user_card.vue @@ -314,24 +314,26 @@ :handle-links="true" /> - - + - - - + + + + + -- cgit v1.2.3-70-g09d2 From dc04c8cbd48dd8dcfc6b1937663e57983d38562a Mon Sep 17 00:00:00 2001 From: Tusooa Zhu Date: Wed, 6 Apr 2022 14:54:58 -0400 Subject: Use vue3 teleport instead of portal --- src/components/account_actions/account_actions.vue | 4 ++-- src/components/desktop_nav/desktop_nav.vue | 4 ++-- src/components/extra_buttons/extra_buttons.vue | 4 ++-- src/components/follow_button/follow_button.vue | 4 ++-- src/components/mobile_nav/mobile_nav.vue | 4 ++-- src/components/retweet_button/retweet_button.vue | 4 ++-- src/components/user_card/user_card.vue | 4 ++-- 7 files changed, 14 insertions(+), 14 deletions(-) (limited to 'src/components/account_actions/account_actions.vue') diff --git a/src/components/account_actions/account_actions.vue b/src/components/account_actions/account_actions.vue index 273aac69..fc303271 100644 --- a/src/components/account_actions/account_actions.vue +++ b/src/components/account_actions/account_actions.vue @@ -74,7 +74,7 @@ - + - + diff --git a/src/components/desktop_nav/desktop_nav.vue b/src/components/desktop_nav/desktop_nav.vue index 18630385..92622cf9 100644 --- a/src/components/desktop_nav/desktop_nav.vue +++ b/src/components/desktop_nav/desktop_nav.vue @@ -76,7 +76,7 @@ - + {{ $t('login.logout_confirm') }} - + diff --git a/src/components/extra_buttons/extra_buttons.vue b/src/components/extra_buttons/extra_buttons.vue index 4641947a..c1c15c0f 100644 --- a/src/components/extra_buttons/extra_buttons.vue +++ b/src/components/extra_buttons/extra_buttons.vue @@ -165,7 +165,7 @@ /> - + {{ $t('status.delete_confirm') }} - + diff --git a/src/components/follow_button/follow_button.vue b/src/components/follow_button/follow_button.vue index 5c799406..b4567348 100644 --- a/src/components/follow_button/follow_button.vue +++ b/src/components/follow_button/follow_button.vue @@ -7,7 +7,7 @@ @click="onClick" > {{ label }} - + - + diff --git a/src/components/mobile_nav/mobile_nav.vue b/src/components/mobile_nav/mobile_nav.vue index 6b6b8f21..6d826622 100644 --- a/src/components/mobile_nav/mobile_nav.vue +++ b/src/components/mobile_nav/mobile_nav.vue @@ -88,7 +88,7 @@ ref="sideDrawer" :logout="logout" /> - + {{ $t('login.logout_confirm') }} - + diff --git a/src/components/retweet_button/retweet_button.vue b/src/components/retweet_button/retweet_button.vue index 9ed24bd5..134fcb36 100644 --- a/src/components/retweet_button/retweet_button.vue +++ b/src/components/retweet_button/retweet_button.vue @@ -59,7 +59,7 @@ > {{ status.repeat_num }} - + {{ $t('status.repeat_confirm') }} - + diff --git a/src/components/user_card/user_card.vue b/src/components/user_card/user_card.vue index 5a848ead..856ed54b 100644 --- a/src/components/user_card/user_card.vue +++ b/src/components/user_card/user_card.vue @@ -314,7 +314,7 @@ :handle-links="true" /> - + - + -- cgit v1.2.3-70-g09d2 From ec957d41620fecc5103474f1b07bbb96f5cae446 Mon Sep 17 00:00:00 2001 From: Tusooa Zhu Date: Sat, 9 Apr 2022 23:26:27 -0400 Subject: Make confirm dialogs work with vue-i18n 9 --- src/components/account_actions/account_actions.vue | 15 ++++++++------- src/components/follow_button/follow_button.vue | 15 ++++++++------- src/components/user_card/user_card.vue | 15 ++++++++------- 3 files changed, 24 insertions(+), 21 deletions(-) (limited to 'src/components/account_actions/account_actions.vue') diff --git a/src/components/account_actions/account_actions.vue b/src/components/account_actions/account_actions.vue index fc303271..161bab09 100644 --- a/src/components/account_actions/account_actions.vue +++ b/src/components/account_actions/account_actions.vue @@ -83,15 +83,16 @@ @accepted="doBlockUser" @cancelled="hideConfirmBlock" > - - - + + diff --git a/src/components/follow_button/follow_button.vue b/src/components/follow_button/follow_button.vue index b4567348..e421c15b 100644 --- a/src/components/follow_button/follow_button.vue +++ b/src/components/follow_button/follow_button.vue @@ -16,15 +16,16 @@ @accepted="doUnfollow" @cancelled="hideConfirmUnfollow" > - - - + + diff --git a/src/components/user_card/user_card.vue b/src/components/user_card/user_card.vue index 856ed54b..01882aa8 100644 --- a/src/components/user_card/user_card.vue +++ b/src/components/user_card/user_card.vue @@ -323,15 +323,16 @@ @accepted="doMuteUser" @cancelled="hideConfirmMute" > - - - + + -- cgit v1.2.3-70-g09d2 From ce8101e60a1dc1a768f793a34fb6e9cca70b4858 Mon Sep 17 00:00:00 2001 From: Tusooa Zhu Date: Tue, 27 Sep 2022 18:47:50 -0400 Subject: Add remove follower confirmation --- src/components/account_actions/account_actions.js | 20 +++++++++++++++- src/components/account_actions/account_actions.vue | 21 +++++++++++++++++ src/components/follow_card/follow_card.vue | 1 + .../remove_follower_button.js | 27 ++++++++++++++++++++-- .../remove_follower_button.vue | 21 +++++++++++++++++ src/components/settings_modal/tabs/general_tab.vue | 5 ++++ src/i18n/en.json | 5 ++++ src/modules/config.js | 1 + src/modules/instance.js | 1 + 9 files changed, 99 insertions(+), 3 deletions(-) (limited to 'src/components/account_actions/account_actions.vue') diff --git a/src/components/account_actions/account_actions.js b/src/components/account_actions/account_actions.js index 7dec0c3d..acd93e06 100644 --- a/src/components/account_actions/account_actions.js +++ b/src/components/account_actions/account_actions.js @@ -18,7 +18,8 @@ const AccountActions = { ], data () { return { - showingConfirmBlock: false + showingConfirmBlock: false, + showingConfirmRemoveFollower: false } }, components: { @@ -34,6 +35,12 @@ const AccountActions = { hideConfirmBlock () { this.showingConfirmBlock = false }, + showConfirmRemoveUserFromFollowers () { + this.showingConfirmRemoveFollower = true + }, + hideConfirmRemoveUserFromFollowers () { + this.showingConfirmRemoveFollower = false + }, showRepeats () { this.$store.dispatch('showReblogs', this.user.id) }, @@ -55,7 +62,15 @@ const AccountActions = { this.$store.dispatch('unblockUser', this.user.id) }, removeUserFromFollowers () { + if (!this.shouldConfirmRemoveUserFromFollowers) { + this.doRemoveUserFromFollowers() + } else { + this.showConfirmRemoveUserFromFollowers() + } + }, + doRemoveUserFromFollowers () { this.$store.dispatch('removeUserFromFollowers', this.user.id) + this.hideConfirmRemoveUserFromFollowers() }, reportUser () { this.$store.dispatch('openUserReportingModal', { userId: this.user.id }) @@ -71,6 +86,9 @@ const AccountActions = { shouldConfirmBlock () { return this.$store.getters.mergedConfig.modalOnBlock }, + shouldConfirmRemoveUserFromFollowers () { + return this.$store.getters.mergedConfig.modalOnRemoveUserFromFollowers + }, ...mapState({ pleromaChatMessagesAvailable: state => state.instance.pleromaChatMessagesAvailable }) diff --git a/src/components/account_actions/account_actions.vue b/src/components/account_actions/account_actions.vue index 161bab09..ce19291a 100644 --- a/src/components/account_actions/account_actions.vue +++ b/src/components/account_actions/account_actions.vue @@ -95,6 +95,27 @@ + + + + + + + diff --git a/src/components/follow_card/follow_card.vue b/src/components/follow_card/follow_card.vue index eff69fb2..bdb6b809 100644 --- a/src/components/follow_card/follow_card.vue +++ b/src/components/follow_card/follow_card.vue @@ -24,6 +24,7 @@ />