1
0
mirror of https://git.pleroma.social/sjw/pleroma-fe.git synced 2024-11-12 06:59:01 +01:00
pleroma-fe/src/components/extra_buttons/extra_buttons.vue

159 lines
4.1 KiB
Vue
Raw Normal View History

<template>
2020-02-28 17:39:47 +01:00
<Popover
class="ExtraButtons"
trigger="click"
2019-07-11 17:01:12 +02:00
placement="top"
:offset="{ y: 5 }"
:bound-to="{ x: 'container' }"
remove-padding
>
<div
slot="content"
slot-scope="{close}"
>
2019-05-26 23:13:08 +02:00
<div class="dropdown-menu">
<button
v-if="canMute && !status.thread_muted"
class="button-default dropdown-item dropdown-item-icon"
@click.prevent="muteConversation"
>
2020-10-20 23:31:16 +02:00
<FAIcon
fixed-width
icon="eye-slash"
/><span>{{ $t("status.mute_conversation") }}</span>
</button>
<button
v-if="canMute && status.thread_muted"
class="button-default dropdown-item dropdown-item-icon"
@click.prevent="unmuteConversation"
>
2020-10-20 23:31:16 +02:00
<FAIcon
fixed-width
icon="eye-slash"
/><span>{{ $t("status.unmute_conversation") }}</span>
</button>
2019-07-05 09:17:44 +02:00
<button
v-if="!status.pinned && canPin"
class="button-default dropdown-item dropdown-item-icon"
2019-07-05 09:17:44 +02:00
@click.prevent="pinStatus"
@click="close"
2019-07-05 09:17:44 +02:00
>
2020-10-20 23:31:16 +02:00
<FAIcon
fixed-width
icon="thumbtack"
/><span>{{ $t("status.pin") }}</span>
</button>
2019-07-05 09:17:44 +02:00
<button
v-if="status.pinned && canPin"
class="button-default dropdown-item dropdown-item-icon"
2019-07-05 09:17:44 +02:00
@click.prevent="unpinStatus"
@click="close"
2019-07-05 09:17:44 +02:00
>
2020-10-20 23:31:16 +02:00
<FAIcon
fixed-width
icon="thumbtack"
/><span>{{ $t("status.unpin") }}</span>
</button>
<button
v-if="!status.bookmarked"
class="button-default dropdown-item dropdown-item-icon"
@click.prevent="bookmarkStatus"
@click="close"
>
2020-10-20 23:31:16 +02:00
<FAIcon
fixed-width
:icon="['far', 'bookmark']"
/><span>{{ $t("status.bookmark") }}</span>
</button>
<button
v-if="status.bookmarked"
class="button-default dropdown-item dropdown-item-icon"
@click.prevent="unbookmarkStatus"
@click="close"
>
2020-10-20 23:31:16 +02:00
<FAIcon
fixed-width
icon="bookmark"
/><span>{{ $t("status.unbookmark") }}</span>
</button>
2019-07-05 09:17:44 +02:00
<button
v-if="canDelete"
class="button-default dropdown-item dropdown-item-icon"
2019-07-05 09:17:44 +02:00
@click.prevent="deleteStatus"
@click="close"
2019-07-05 09:17:44 +02:00
>
2020-10-20 23:31:16 +02:00
<FAIcon
fixed-width
icon="times"
/><span>{{ $t("status.delete") }}</span>
</button>
<button
class="button-default dropdown-item dropdown-item-icon"
@click.prevent="copyLink"
@click="close"
>
2020-10-20 23:31:16 +02:00
<FAIcon
fixed-width
icon="share-alt"
/><span>{{ $t("status.copy_link") }}</span>
</button>
<a
v-if="!status.is_local"
class="button-default dropdown-item dropdown-item-icon"
title="Source"
:href="status.external_url"
target="_blank"
>
<FAIcon
fixed-width
icon="external-link-alt"
/><span>{{ $t("status.external_source") }}</span>
</a>
<button
class="button-default dropdown-item dropdown-item-icon"
@click.prevent="reportStatus"
@click="close"
>
<FAIcon
fixed-width
:icon="['far', 'flag']"
/><span>{{ $t("user_card.report") }}</span>
</button>
</div>
</div>
2020-11-24 13:52:01 +01:00
<span
slot="trigger"
class="popover-trigger"
>
<FAIcon
class="fa-scale-110 fa-old-padding"
icon="ellipsis-h"
/>
2020-11-24 13:52:01 +01:00
</span>
2020-02-28 17:39:47 +01:00
</Popover>
</template>
<script src="./extra_buttons.js" ></script>
<style lang="scss">
@import '../../_variables.scss';
.ExtraButtons {
/* override of popover internal stuff */
.popover-trigger-button {
width: auto;
}
.popover-trigger {
position: static;
padding: 10px;
margin: -10px;
&:hover .svg-inline--fa {
color: $fallback--text;
color: var(--text, $fallback--text);
}
}
}
</style>