2019-04-13 05:35:29 +10:00
|
|
|
<template>
|
2019-07-11 22:31:02 +10:00
|
|
|
<v-popover
|
|
|
|
v-if="enabled"
|
2019-04-13 05:35:29 +10:00
|
|
|
trigger="click"
|
2019-07-11 22:31:02 +10:00
|
|
|
class="extra-button-popover"
|
2019-07-11 22:32:57 +10:00
|
|
|
:container="false"
|
2019-04-13 05:35:29 +10:00
|
|
|
>
|
2019-07-11 22:31:02 +10:00
|
|
|
<div class="popper-wrapper" slot="popover">
|
2019-05-27 07:13:08 +10:00
|
|
|
<div class="dropdown-menu">
|
2019-07-05 17:17:44 +10:00
|
|
|
<button
|
|
|
|
v-if="!status.pinned && canPin"
|
|
|
|
class="dropdown-item dropdown-item-icon"
|
|
|
|
@click.prevent="pinStatus"
|
2019-07-11 22:31:02 +10:00
|
|
|
v-close-popover
|
2019-07-05 17:17:44 +10:00
|
|
|
>
|
|
|
|
<i class="icon-pin" /><span>{{ $t("status.pin") }}</span>
|
2019-04-13 05:35:29 +10:00
|
|
|
</button>
|
2019-07-05 17:17:44 +10:00
|
|
|
<button
|
|
|
|
v-if="status.pinned && canPin"
|
|
|
|
class="dropdown-item dropdown-item-icon"
|
|
|
|
@click.prevent="unpinStatus"
|
2019-07-11 22:31:02 +10:00
|
|
|
v-close-popover
|
2019-07-05 17:17:44 +10:00
|
|
|
>
|
|
|
|
<i class="icon-pin" /><span>{{ $t("status.unpin") }}</span>
|
2019-04-13 05:35:29 +10:00
|
|
|
</button>
|
2019-07-05 17:17:44 +10:00
|
|
|
<button
|
|
|
|
v-if="canDelete"
|
|
|
|
class="dropdown-item dropdown-item-icon"
|
|
|
|
@click.prevent="deleteStatus"
|
2019-07-11 22:31:02 +10:00
|
|
|
v-close-popover
|
2019-07-05 17:17:44 +10:00
|
|
|
>
|
|
|
|
<i class="icon-cancel" /><span>{{ $t("status.delete") }}</span>
|
2019-04-13 05:35:29 +10:00
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
</div>
|
2019-07-11 22:31:02 +10:00
|
|
|
<div class="button-icon">
|
|
|
|
<i class="icon-ellipsis" />
|
2019-04-13 05:35:29 +10:00
|
|
|
</div>
|
2019-07-11 22:31:02 +10:00
|
|
|
</v-popover>
|
2019-04-13 05:35:29 +10:00
|
|
|
</template>
|
|
|
|
|
|
|
|
<script src="./extra_buttons.js" ></script>
|
|
|
|
|
|
|
|
<style lang="scss">
|
|
|
|
@import '../../_variables.scss';
|
2019-05-27 07:13:08 +10:00
|
|
|
@import '../popper/popper.scss';
|
2019-04-13 05:35:29 +10:00
|
|
|
|
|
|
|
.icon-ellipsis {
|
|
|
|
cursor: pointer;
|
|
|
|
|
2019-07-11 22:31:02 +10:00
|
|
|
&:hover,
|
|
|
|
.extra-button-popover.open & {
|
2019-04-27 06:30:04 +10:00
|
|
|
color: $fallback--text;
|
|
|
|
color: var(--text, $fallback--text);
|
2019-04-13 05:35:29 +10:00
|
|
|
}
|
|
|
|
}
|
|
|
|
</style>
|