yandere_fe/src/components/account_actions/account_actions.vue

95 lines
2.4 KiB
Vue
Raw Normal View History

2019-10-08 00:21:48 -07:00
<template>
<div class="account-actions">
2020-02-28 08:39:47 -08:00
<Popover
2019-10-08 00:21:48 -07:00
trigger="click"
2020-02-28 08:39:47 -08:00
placement="bottom"
:bound-to="{ x: 'container' }"
2019-10-08 00:21:48 -07:00
>
2020-02-28 08:39:47 -08:00
<div
slot="content"
class="account-tools-popover"
>
2019-10-08 00:21:48 -07:00
<div class="dropdown-menu">
2020-04-21 13:27:51 -07:00
<template v-if="relationship.following">
2019-10-08 00:21:48 -07:00
<button
2020-04-21 13:27:51 -07:00
v-if="relationship.showing_reblogs"
2019-10-08 00:21:48 -07:00
class="btn btn-default dropdown-item"
@click="hideRepeats"
>
{{ $t('user_card.hide_repeats') }}
</button>
<button
2020-04-21 13:27:51 -07:00
v-if="!relationship.showing_reblogs"
2019-10-08 00:21:48 -07:00
class="btn btn-default dropdown-item"
@click="showRepeats"
>
{{ $t('user_card.show_repeats') }}
</button>
<div
role="separator"
class="dropdown-divider"
/>
2019-10-08 00:21:48 -07:00
</template>
<button
2020-04-21 13:27:51 -07:00
v-if="relationship.blocking"
2019-10-08 00:21:48 -07:00
class="btn btn-default btn-block dropdown-item"
@click="unblockUser"
>
2019-10-08 23:04:18 -07:00
{{ $t('user_card.unblock') }}
2019-10-08 00:21:48 -07:00
</button>
<button
v-else
class="btn btn-default btn-block dropdown-item"
@click="blockUser"
>
{{ $t('user_card.block') }}
</button>
<button
class="btn btn-default btn-block dropdown-item"
@click="reportUser"
>
{{ $t('user_card.report') }}
</button>
2020-05-07 06:10:53 -07:00
<button
v-if="pleromaChatMessagesAvailable"
class="btn btn-default btn-block dropdown-item"
@click="openChat"
>
{{ $t('user_card.message') }}
</button>
2019-10-08 00:21:48 -07:00
</div>
</div>
2020-02-28 08:39:47 -08:00
<div
slot="trigger"
class="btn btn-default ellipsis-button"
>
2019-10-08 22:30:48 -07:00
<i class="icon-ellipsis trigger-button" />
2019-10-08 00:21:48 -07:00
</div>
2020-02-28 08:39:47 -08:00
</Popover>
2019-10-08 00:21:48 -07:00
</div>
</template>
<script src="./account_actions.js"></script>
<style lang="scss">
@import '../../_variables.scss';
2019-10-08 23:04:18 -07:00
.account-actions {
margin: 0 .8em;
}
2019-10-08 00:21:48 -07:00
.account-actions button.dropdown-item {
margin-left: 0;
}
2020-02-28 08:39:47 -08:00
2019-10-08 00:21:48 -07:00
.account-actions .trigger-button {
color: $fallback--lightText;
color: var(--lightText, $fallback--lightText);
opacity: .8;
2019-10-08 23:04:18 -07:00
cursor: pointer;
&:hover {
color: $fallback--text;
color: var(--text, $fallback--text);
}
2019-10-08 00:21:48 -07:00
}
</style>