2019-04-12 19:35:29 +00:00
|
|
|
<template>
|
2019-07-11 12:31:02 +00:00
|
|
|
<v-popover
|
2019-08-20 21:00:28 +00:00
|
|
|
v-if="canDelete || canMute || canPin"
|
2019-04-12 19:35:29 +00:00
|
|
|
trigger="click"
|
2019-07-11 15:01:12 +00:00
|
|
|
placement="top"
|
2019-07-11 12:31:02 +00:00
|
|
|
class="extra-button-popover"
|
2019-07-11 15:01:12 +00:00
|
|
|
:offset="5"
|
2019-07-11 12:32:57 +00:00
|
|
|
:container="false"
|
2019-04-12 19:35:29 +00:00
|
|
|
>
|
2019-07-11 15:01:12 +00:00
|
|
|
<div slot="popover">
|
2019-05-26 21:13:08 +00:00
|
|
|
<div class="dropdown-menu">
|
2019-07-07 20:02:09 +00:00
|
|
|
<button
|
2019-08-20 20:55:42 +00:00
|
|
|
v-if="canMute && !status.muted"
|
2019-07-07 20:02:09 +00:00
|
|
|
class="dropdown-item dropdown-item-icon"
|
|
|
|
@click.prevent="muteConversation"
|
|
|
|
>
|
|
|
|
<i class="icon-eye-off" /><span>{{ $t("status.mute_conversation") }}</span>
|
|
|
|
</button>
|
|
|
|
<button
|
2019-08-20 20:55:42 +00:00
|
|
|
v-if="canMute && status.muted"
|
2019-07-07 20:02:09 +00:00
|
|
|
class="dropdown-item dropdown-item-icon"
|
|
|
|
@click.prevent="unmuteConversation"
|
|
|
|
>
|
|
|
|
<i class="icon-eye-off" /><span>{{ $t("status.unmute_conversation") }}</span>
|
|
|
|
</button>
|
2019-07-05 07:17:44 +00:00
|
|
|
<button
|
|
|
|
v-if="!status.pinned && canPin"
|
2019-07-11 15:50:56 +00:00
|
|
|
v-close-popover
|
2019-07-05 07:17:44 +00:00
|
|
|
class="dropdown-item dropdown-item-icon"
|
|
|
|
@click.prevent="pinStatus"
|
|
|
|
>
|
|
|
|
<i class="icon-pin" /><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"
|
2019-07-11 15:50:56 +00:00
|
|
|
v-close-popover
|
2019-07-05 07:17:44 +00:00
|
|
|
class="dropdown-item dropdown-item-icon"
|
|
|
|
@click.prevent="unpinStatus"
|
|
|
|
>
|
|
|
|
<i class="icon-pin" /><span>{{ $t("status.unpin") }}</span>
|
2019-04-12 19:35:29 +00:00
|
|
|
</button>
|
2019-07-05 07:17:44 +00:00
|
|
|
<button
|
|
|
|
v-if="canDelete"
|
2019-07-11 15:50:56 +00:00
|
|
|
v-close-popover
|
2019-07-05 07:17:44 +00:00
|
|
|
class="dropdown-item dropdown-item-icon"
|
|
|
|
@click.prevent="deleteStatus"
|
|
|
|
>
|
|
|
|
<i class="icon-cancel" /><span>{{ $t("status.delete") }}</span>
|
2019-04-12 19:35:29 +00:00
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
</div>
|
2019-07-11 12:31:02 +00:00
|
|
|
<div class="button-icon">
|
|
|
|
<i class="icon-ellipsis" />
|
2019-04-12 19:35:29 +00:00
|
|
|
</div>
|
2019-07-11 12:31:02 +00:00
|
|
|
</v-popover>
|
2019-04-12 19:35:29 +00:00
|
|
|
</template>
|
|
|
|
|
|
|
|
<script src="./extra_buttons.js" ></script>
|
|
|
|
|
|
|
|
<style lang="scss">
|
|
|
|
@import '../../_variables.scss';
|
2019-05-26 21:13:08 +00:00
|
|
|
@import '../popper/popper.scss';
|
2019-04-12 19:35:29 +00:00
|
|
|
|
|
|
|
.icon-ellipsis {
|
|
|
|
cursor: pointer;
|
|
|
|
|
2019-07-11 12:31:02 +00:00
|
|
|
&:hover,
|
|
|
|
.extra-button-popover.open & {
|
2019-04-26 20:30:04 +00:00
|
|
|
color: $fallback--text;
|
|
|
|
color: var(--text, $fallback--text);
|
2019-04-12 19:35:29 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
</style>
|