pleroma-fe/src/components/follow_button/follow_button.vue

35 lines
919 B
Vue
Raw Normal View History

2019-10-08 10:21:48 +03:00
<template>
2022-03-17 00:06:26 -04:00
<button
class="btn button-default follow-button"
:class="{ toggled: isPressed }"
:disabled="disabled"
:title="title"
@click="onClick"
>
{{ label }}
2022-04-06 14:54:58 -04:00
<teleport to="#modal">
2022-03-17 00:06:26 -04:00
<confirm-modal
v-if="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"
2022-02-09 15:50:04 -05:00
>
<i18n-t
2024-12-23 04:38:43 +02:00
scope="global"
keypath="user_card.unfollow_confirm"
2022-03-17 00:06:26 -04:00
tag="span"
>
<template #user>
<span
v-text="user.screen_name_ui"
/>
</template>
</i18n-t>
2022-03-17 00:06:26 -04:00
</confirm-modal>
2022-04-06 14:54:58 -04:00
</teleport>
2022-03-17 00:06:26 -04:00
</button>
2019-10-08 10:21:48 +03:00
</template>
<script src="./follow_button.js"></script>