diff options
| author | Tusooa Zhu <tusooa@kazv.moe> | 2022-02-09 15:50:04 -0500 |
|---|---|---|
| committer | tusooa <tusooa@kazv.moe> | 2023-01-20 23:39:07 -0500 |
| commit | a0b886459bf5e146b8b7654d97ba8838bfac29de (patch) | |
| tree | 82b483354714690482b841b8e82ce33a6d848294 /src/components/follow_button/follow_button.vue | |
| parent | 4d175235f1bc72c369c5e5fc8ed1997b384c0b83 (diff) | |
Add confirmation for following
Diffstat (limited to 'src/components/follow_button/follow_button.vue')
| -rw-r--r-- | src/components/follow_button/follow_button.vue | 38 |
1 files changed, 29 insertions, 9 deletions
diff --git a/src/components/follow_button/follow_button.vue b/src/components/follow_button/follow_button.vue index 965d5256..4fc2233a 100644 --- a/src/components/follow_button/follow_button.vue +++ b/src/components/follow_button/follow_button.vue @@ -1,13 +1,33 @@ <template> - <button - class="btn button-default follow-button" - :class="{ toggled: isPressed }" - :disabled="disabled" - :title="title" - @click="onClick" - > - {{ label }} - </button> + <div> + <button + class="btn button-default follow-button" + :class="{ toggled: isPressed }" + :disabled="disabled" + :title="title" + @click="onClick" + > + {{ label }} + </button> + <confirm-modal + :showing="showingConfirmUnfollow" + :title="$t('user_card.unfollow_confirm_title')" + :confirm-text="$t('user_card.unfollow_confirm_accept_button')" + :cancel-text="$t('user_card.unfollow_confirm_cancel_button')" + @accepted="doUnfollow" + @cancelled="hideConfirmUnfollow" + > + <i18n + path="user_card.unfollow_confirm" + tag="span" + > + <span + place="user" + v-text="user.screen_name_ui" + /> + </i18n> + </confirm-modal> + </div> </template> <script src="./follow_button.js"></script> |
