2019-10-08 16:21:48 +09:00
|
|
|
<template>
|
2020-10-21 04:13:19 +09:00
|
|
|
<div class="AccountActions">
|
2020-02-29 01:39:47 +09:00
|
|
|
<Popover
|
2019-10-08 16:21:48 +09:00
|
|
|
trigger="click"
|
2020-02-29 01:39:47 +09:00
|
|
|
placement="bottom"
|
2020-06-16 23:20:36 +09:00
|
|
|
:bound-to="{ x: 'container' }"
|
2020-11-26 01:33:08 +09:00
|
|
|
remove-padding
|
2019-10-08 16:21:48 +09:00
|
|
|
>
|
2022-07-31 18:35:48 +09:00
|
|
|
<template #content>
|
2019-10-08 16:21:48 +09:00
|
|
|
<div class="dropdown-menu">
|
2020-04-22 05:27:51 +09:00
|
|
|
<template v-if="relationship.following">
|
2019-10-08 16:21:48 +09:00
|
|
|
<button
|
2020-04-22 05:27:51 +09:00
|
|
|
v-if="relationship.showing_reblogs"
|
2020-11-24 19:32:42 +09:00
|
|
|
class="btn button-default dropdown-item"
|
2019-10-08 16:21:48 +09:00
|
|
|
@click="hideRepeats"
|
|
|
|
>
|
|
|
|
{{ $t('user_card.hide_repeats') }}
|
|
|
|
</button>
|
|
|
|
<button
|
2020-04-22 05:27:51 +09:00
|
|
|
v-if="!relationship.showing_reblogs"
|
2020-11-24 19:32:42 +09:00
|
|
|
class="btn button-default dropdown-item"
|
2019-10-08 16:21:48 +09:00
|
|
|
@click="showRepeats"
|
|
|
|
>
|
|
|
|
{{ $t('user_card.show_repeats') }}
|
|
|
|
</button>
|
2019-11-27 09:57:27 +09:00
|
|
|
<div
|
|
|
|
role="separator"
|
|
|
|
class="dropdown-divider"
|
|
|
|
/>
|
2019-10-08 16:21:48 +09:00
|
|
|
</template>
|
2022-08-16 05:19:33 +09:00
|
|
|
<UserListMenu :user="user" />
|
2022-09-16 13:02:58 +09:00
|
|
|
<button
|
|
|
|
v-if="relationship.followed_by"
|
|
|
|
class="btn button-default btn-block dropdown-item"
|
|
|
|
@click="removeUserFromFollowers"
|
|
|
|
>
|
2022-09-18 02:36:34 +09:00
|
|
|
{{ $t('user_card.remove_follower') }}
|
2022-09-16 13:02:58 +09:00
|
|
|
</button>
|
2019-10-08 16:21:48 +09:00
|
|
|
<button
|
2020-04-22 05:27:51 +09:00
|
|
|
v-if="relationship.blocking"
|
2020-11-24 19:32:42 +09:00
|
|
|
class="btn button-default btn-block dropdown-item"
|
2019-10-08 16:21:48 +09:00
|
|
|
@click="unblockUser"
|
|
|
|
>
|
2019-10-09 15:04:18 +09:00
|
|
|
{{ $t('user_card.unblock') }}
|
2019-10-08 16:21:48 +09:00
|
|
|
</button>
|
|
|
|
<button
|
|
|
|
v-else
|
2020-11-24 19:32:42 +09:00
|
|
|
class="btn button-default btn-block dropdown-item"
|
2019-10-08 16:21:48 +09:00
|
|
|
@click="blockUser"
|
|
|
|
>
|
|
|
|
{{ $t('user_card.block') }}
|
|
|
|
</button>
|
|
|
|
<button
|
2020-11-24 19:32:42 +09:00
|
|
|
class="btn button-default btn-block dropdown-item"
|
2019-10-08 16:21:48 +09:00
|
|
|
@click="reportUser"
|
|
|
|
>
|
|
|
|
{{ $t('user_card.report') }}
|
|
|
|
</button>
|
2020-05-07 22:10:53 +09:00
|
|
|
<button
|
|
|
|
v-if="pleromaChatMessagesAvailable"
|
2020-11-24 19:32:42 +09:00
|
|
|
class="btn button-default btn-block dropdown-item"
|
2020-05-07 22:10:53 +09:00
|
|
|
@click="openChat"
|
|
|
|
>
|
|
|
|
{{ $t('user_card.message') }}
|
|
|
|
</button>
|
2019-10-08 16:21:48 +09:00
|
|
|
</div>
|
2021-04-08 04:42:34 +09:00
|
|
|
</template>
|
2022-07-31 18:35:48 +09:00
|
|
|
<template #trigger>
|
2021-04-08 04:42:34 +09:00
|
|
|
<button class="button-unstyled ellipsis-button">
|
|
|
|
<FAIcon
|
|
|
|
class="icon"
|
|
|
|
icon="ellipsis-v"
|
|
|
|
/>
|
|
|
|
</button>
|
|
|
|
</template>
|
2020-02-29 01:39:47 +09:00
|
|
|
</Popover>
|
2022-04-07 03:54:58 +09:00
|
|
|
<teleport to="#modal">
|
2022-03-17 13:06:26 +09:00
|
|
|
<confirm-modal
|
|
|
|
v-if="showingConfirmBlock"
|
|
|
|
:title="$t('user_card.block_confirm_title')"
|
|
|
|
:confirm-text="$t('user_card.block_confirm_accept_button')"
|
|
|
|
:cancel-text="$t('user_card.block_confirm_cancel_button')"
|
|
|
|
@accepted="doBlockUser"
|
|
|
|
@cancelled="hideConfirmBlock"
|
2022-02-10 06:26:30 +09:00
|
|
|
>
|
2022-03-17 13:06:26 +09:00
|
|
|
<i18n
|
|
|
|
path="user_card.block_confirm"
|
|
|
|
tag="span"
|
|
|
|
>
|
|
|
|
<span
|
|
|
|
place="user"
|
|
|
|
v-text="user.screen_name_ui"
|
|
|
|
/>
|
|
|
|
</i18n>
|
|
|
|
</confirm-modal>
|
2022-04-07 03:54:58 +09:00
|
|
|
</teleport>
|
2019-10-08 16:21:48 +09:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script src="./account_actions.js"></script>
|
|
|
|
|
|
|
|
<style lang="scss">
|
2023-01-10 03:02:16 +09:00
|
|
|
@import "../../variables";
|
|
|
|
|
2020-10-21 04:13:19 +09:00
|
|
|
.AccountActions {
|
|
|
|
.ellipsis-button {
|
|
|
|
width: 2.5em;
|
|
|
|
margin: -0.5em 0;
|
|
|
|
padding: 0.5em 0;
|
|
|
|
text-align: center;
|
2020-02-29 01:39:47 +09:00
|
|
|
|
2020-10-21 04:13:19 +09:00
|
|
|
&:not(:hover) .icon {
|
|
|
|
color: $fallback--lightText;
|
|
|
|
color: var(--lightText, $fallback--lightText);
|
|
|
|
}
|
2019-10-09 15:04:18 +09:00
|
|
|
}
|
2019-10-08 16:21:48 +09:00
|
|
|
}
|
|
|
|
</style>
|