2019-04-12 21:35:29 +02:00
|
|
|
<template>
|
2020-02-28 17:39:47 +01:00
|
|
|
<Popover
|
2019-04-12 21:35:29 +02:00
|
|
|
trigger="click"
|
2019-07-11 17:01:12 +02:00
|
|
|
placement="top"
|
2019-07-11 14:31:02 +02:00
|
|
|
class="extra-button-popover"
|
2020-06-16 16:20:36 +02:00
|
|
|
:bound-to="{ x: 'container' }"
|
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"
|
2019-07-07 22:02:09 +02:00
|
|
|
class="dropdown-item dropdown-item-icon"
|
|
|
|
@click.prevent="muteConversation"
|
|
|
|
>
|
2020-10-19 21:35:46 +02:00
|
|
|
<FAIcon size="md" 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"
|
2019-07-07 22:02:09 +02:00
|
|
|
class="dropdown-item dropdown-item-icon"
|
|
|
|
@click.prevent="unmuteConversation"
|
|
|
|
>
|
2020-10-19 21:35:46 +02:00
|
|
|
<FAIcon size="md" 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"
|
|
|
|
class="dropdown-item dropdown-item-icon"
|
|
|
|
@click.prevent="pinStatus"
|
2020-05-08 09:46:00 +02:00
|
|
|
@click="close"
|
2019-07-05 09:17:44 +02:00
|
|
|
>
|
2020-10-19 21:35:46 +02:00
|
|
|
<FAIcon size="md" 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"
|
|
|
|
class="dropdown-item dropdown-item-icon"
|
|
|
|
@click.prevent="unpinStatus"
|
2020-05-08 09:46:00 +02:00
|
|
|
@click="close"
|
2019-07-05 09:17:44 +02:00
|
|
|
>
|
2020-10-19 21:35:46 +02:00
|
|
|
<FAIcon size="md" 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"
|
|
|
|
class="dropdown-item dropdown-item-icon"
|
|
|
|
@click.prevent="bookmarkStatus"
|
|
|
|
@click="close"
|
|
|
|
>
|
2020-10-19 21:35:46 +02:00
|
|
|
<FAIcon size="md" fixed-width :icon="['far', 'bookmark']" /><span>{{ $t("status.bookmark") }}</span>
|
2020-07-03 21:45:49 +02:00
|
|
|
</button>
|
|
|
|
<button
|
|
|
|
v-if="status.bookmarked"
|
|
|
|
class="dropdown-item dropdown-item-icon"
|
|
|
|
@click.prevent="unbookmarkStatus"
|
|
|
|
@click="close"
|
|
|
|
>
|
2020-10-19 21:35:46 +02:00
|
|
|
<FAIcon size="md" 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"
|
|
|
|
class="dropdown-item dropdown-item-icon"
|
|
|
|
@click.prevent="deleteStatus"
|
2020-05-08 09:46:00 +02:00
|
|
|
@click="close"
|
2019-07-05 09:17:44 +02:00
|
|
|
>
|
2020-10-19 21:35:46 +02:00
|
|
|
<FAIcon size="md" 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
|
|
|
|
class="dropdown-item dropdown-item-icon"
|
|
|
|
@click.prevent="copyLink"
|
2020-05-08 09:46:00 +02:00
|
|
|
@click="close"
|
2020-03-30 19:39:28 +02:00
|
|
|
>
|
2020-10-19 21:35:46 +02:00
|
|
|
<FAIcon size="md" fixed-width icon="share-alt" /><span>{{ $t("status.copy_link") }}</span>
|
2020-03-30 19:39:28 +02:00
|
|
|
</button>
|
2019-04-12 21:35:29 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
2020-10-19 21:35:46 +02:00
|
|
|
<span slot="trigger">
|
|
|
|
<FAIcon
|
|
|
|
class="ExtraButtons button-icon"
|
|
|
|
icon="ellipsis-h"
|
|
|
|
size="md"
|
|
|
|
/>
|
|
|
|
</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 {
|
2019-04-12 21:35:29 +02:00
|
|
|
cursor: pointer;
|
2020-10-19 21:35:46 +02:00
|
|
|
position: static;
|
2019-04-12 21:35:29 +02:00
|
|
|
|
2019-07-11 14:31:02 +02:00
|
|
|
&:hover,
|
|
|
|
.extra-button-popover.open & {
|
2019-04-26 22:30:04 +02:00
|
|
|
color: $fallback--text;
|
|
|
|
color: var(--text, $fallback--text);
|
2019-04-12 21:35:29 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
</style>
|