2019-04-12 19:35:29 +00:00
|
|
|
<template>
|
2020-02-28 16:39:47 +00:00
|
|
|
<Popover
|
2020-12-03 09:57:17 +00:00
|
|
|
class="ExtraButtons"
|
2019-04-12 19:35:29 +00:00
|
|
|
trigger="click"
|
2019-07-11 15:01:12 +00:00
|
|
|
placement="top"
|
2020-11-25 16:33:08 +00:00
|
|
|
:offset="{ y: 5 }"
|
2020-06-16 14:20:36 +00:00
|
|
|
:bound-to="{ x: 'container' }"
|
2020-11-25 16:33:08 +00:00
|
|
|
remove-padding
|
2019-04-12 19:35:29 +00:00
|
|
|
>
|
2021-04-07 19:42:34 +00:00
|
|
|
<template v-slot:content="{close}">
|
2019-05-26 21:13:08 +00:00
|
|
|
<div class="dropdown-menu">
|
2019-07-07 20:02:09 +00:00
|
|
|
<button
|
2019-09-04 18:11:13 +00:00
|
|
|
v-if="canMute && !status.thread_muted"
|
2020-11-24 10:32:42 +00:00
|
|
|
class="button-default dropdown-item dropdown-item-icon"
|
2019-07-07 20:02:09 +00:00
|
|
|
@click.prevent="muteConversation"
|
|
|
|
>
|
2020-10-20 21:31:16 +00:00
|
|
|
<FAIcon
|
|
|
|
fixed-width
|
|
|
|
icon="eye-slash"
|
|
|
|
/><span>{{ $t("status.mute_conversation") }}</span>
|
2019-07-07 20:02:09 +00:00
|
|
|
</button>
|
|
|
|
<button
|
2019-09-04 18:11:13 +00:00
|
|
|
v-if="canMute && status.thread_muted"
|
2020-11-24 10:32:42 +00:00
|
|
|
class="button-default dropdown-item dropdown-item-icon"
|
2019-07-07 20:02:09 +00:00
|
|
|
@click.prevent="unmuteConversation"
|
|
|
|
>
|
2020-10-20 21:31:16 +00:00
|
|
|
<FAIcon
|
|
|
|
fixed-width
|
|
|
|
icon="eye-slash"
|
|
|
|
/><span>{{ $t("status.unmute_conversation") }}</span>
|
2019-07-07 20:02:09 +00:00
|
|
|
</button>
|
2019-07-05 07:17:44 +00:00
|
|
|
<button
|
|
|
|
v-if="!status.pinned && canPin"
|
2020-11-24 10:32:42 +00:00
|
|
|
class="button-default dropdown-item dropdown-item-icon"
|
2019-07-05 07:17:44 +00:00
|
|
|
@click.prevent="pinStatus"
|
2020-05-08 07:46:00 +00:00
|
|
|
@click="close"
|
2019-07-05 07:17:44 +00:00
|
|
|
>
|
2020-10-20 21:31:16 +00:00
|
|
|
<FAIcon
|
|
|
|
fixed-width
|
|
|
|
icon="thumbtack"
|
|
|
|
/><span>{{ $t("status.pin") }}</span>
|
2019-04-12 19:35:29 +00:00
|
|
|
</button>
|
2019-07-05 07:17:44 +00:00
|
|
|
<button
|
|
|
|
v-if="status.pinned && canPin"
|
2020-11-24 10:32:42 +00:00
|
|
|
class="button-default dropdown-item dropdown-item-icon"
|
2019-07-05 07:17:44 +00:00
|
|
|
@click.prevent="unpinStatus"
|
2020-05-08 07:46:00 +00:00
|
|
|
@click="close"
|
2019-07-05 07:17:44 +00:00
|
|
|
>
|
2020-10-20 21:31:16 +00:00
|
|
|
<FAIcon
|
|
|
|
fixed-width
|
|
|
|
icon="thumbtack"
|
|
|
|
/><span>{{ $t("status.unpin") }}</span>
|
2019-04-12 19:35:29 +00:00
|
|
|
</button>
|
2020-07-03 19:45:49 +00:00
|
|
|
<button
|
|
|
|
v-if="!status.bookmarked"
|
2020-11-24 10:32:42 +00:00
|
|
|
class="button-default dropdown-item dropdown-item-icon"
|
2020-07-03 19:45:49 +00:00
|
|
|
@click.prevent="bookmarkStatus"
|
|
|
|
@click="close"
|
|
|
|
>
|
2020-10-20 21:31:16 +00:00
|
|
|
<FAIcon
|
|
|
|
fixed-width
|
|
|
|
:icon="['far', 'bookmark']"
|
|
|
|
/><span>{{ $t("status.bookmark") }}</span>
|
2020-07-03 19:45:49 +00:00
|
|
|
</button>
|
|
|
|
<button
|
|
|
|
v-if="status.bookmarked"
|
2020-11-24 10:32:42 +00:00
|
|
|
class="button-default dropdown-item dropdown-item-icon"
|
2020-07-03 19:45:49 +00:00
|
|
|
@click.prevent="unbookmarkStatus"
|
|
|
|
@click="close"
|
|
|
|
>
|
2020-10-20 21:31:16 +00:00
|
|
|
<FAIcon
|
|
|
|
fixed-width
|
|
|
|
icon="bookmark"
|
|
|
|
/><span>{{ $t("status.unbookmark") }}</span>
|
2020-07-03 19:45:49 +00:00
|
|
|
</button>
|
2019-07-05 07:17:44 +00:00
|
|
|
<button
|
|
|
|
v-if="canDelete"
|
2020-11-24 10:32:42 +00:00
|
|
|
class="button-default dropdown-item dropdown-item-icon"
|
2019-07-05 07:17:44 +00:00
|
|
|
@click.prevent="deleteStatus"
|
2020-05-08 07:46:00 +00:00
|
|
|
@click="close"
|
2019-07-05 07:17:44 +00:00
|
|
|
>
|
2020-10-20 21:31:16 +00:00
|
|
|
<FAIcon
|
|
|
|
fixed-width
|
|
|
|
icon="times"
|
|
|
|
/><span>{{ $t("status.delete") }}</span>
|
2019-04-12 19:35:29 +00:00
|
|
|
</button>
|
2020-03-30 17:39:28 +00:00
|
|
|
<button
|
2020-11-24 10:32:42 +00:00
|
|
|
class="button-default dropdown-item dropdown-item-icon"
|
2020-03-30 17:39:28 +00:00
|
|
|
@click.prevent="copyLink"
|
2020-05-08 07:46:00 +00:00
|
|
|
@click="close"
|
2020-03-30 17:39:28 +00:00
|
|
|
>
|
2020-10-20 21:31:16 +00:00
|
|
|
<FAIcon
|
|
|
|
fixed-width
|
|
|
|
icon="share-alt"
|
|
|
|
/><span>{{ $t("status.copy_link") }}</span>
|
2020-03-30 17:39:28 +00:00
|
|
|
</button>
|
2020-12-03 09:57:17 +00:00
|
|
|
<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>
|
2021-01-12 12:43:21 +00:00
|
|
|
<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>
|
2019-04-12 19:35:29 +00:00
|
|
|
</div>
|
2021-04-07 19:42:34 +00:00
|
|
|
</template>
|
|
|
|
<template v-slot:trigger>
|
|
|
|
<button class="button-unstyled popover-trigger">
|
|
|
|
<FAIcon
|
|
|
|
class="fa-scale-110 fa-old-padding"
|
|
|
|
icon="ellipsis-h"
|
|
|
|
/>
|
|
|
|
</button>
|
|
|
|
</template>
|
2020-02-28 16:39:47 +00:00
|
|
|
</Popover>
|
2019-04-12 19:35:29 +00:00
|
|
|
</template>
|
|
|
|
|
|
|
|
<script src="./extra_buttons.js" ></script>
|
|
|
|
|
|
|
|
<style lang="scss">
|
|
|
|
@import '../../_variables.scss';
|
|
|
|
|
2020-10-19 19:35:46 +00:00
|
|
|
.ExtraButtons {
|
2021-02-03 07:18:44 +00:00
|
|
|
/* override of popover internal stuff */
|
|
|
|
.popover-trigger-button {
|
|
|
|
width: auto;
|
|
|
|
}
|
|
|
|
|
2020-12-03 09:57:17 +00:00
|
|
|
.popover-trigger {
|
|
|
|
position: static;
|
|
|
|
padding: 10px;
|
|
|
|
margin: -10px;
|
2019-04-12 19:35:29 +00:00
|
|
|
|
2020-12-03 09:57:17 +00:00
|
|
|
&:hover .svg-inline--fa {
|
|
|
|
color: $fallback--text;
|
|
|
|
color: var(--text, $fallback--text);
|
|
|
|
}
|
2019-04-12 19:35:29 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
</style>
|