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