2019-04-12 19:35:29 +00:00
|
|
|
<template>
|
|
|
|
<Popper
|
2019-07-05 07:17:44 +00:00
|
|
|
v-if="enabled && showPopper"
|
2019-04-12 19:35:29 +00:00
|
|
|
trigger="click"
|
|
|
|
append-to-body
|
|
|
|
:options="{
|
|
|
|
placement: 'top',
|
|
|
|
modifiers: {
|
|
|
|
arrow: { enabled: true },
|
|
|
|
offset: { offset: '0, 5px' },
|
|
|
|
}
|
|
|
|
}"
|
2019-07-05 07:17:44 +00:00
|
|
|
@hide="showDropDown = false"
|
2019-04-12 19:35:29 +00:00
|
|
|
>
|
|
|
|
<div class="popper-wrapper">
|
2019-05-26 21:13:08 +00:00
|
|
|
<div class="dropdown-menu">
|
2019-07-05 07:17:44 +00:00
|
|
|
<button
|
|
|
|
v-if="!status.pinned && canPin"
|
|
|
|
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"
|
|
|
|
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"
|
|
|
|
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-05 07:17:44 +00:00
|
|
|
<div
|
|
|
|
slot="reference"
|
|
|
|
class="button-icon"
|
|
|
|
@click="toggleMenu"
|
|
|
|
>
|
|
|
|
<i
|
|
|
|
class="icon-ellipsis"
|
|
|
|
:class="{'icon-clicked': showDropDown}"
|
|
|
|
/>
|
2019-04-12 19:35:29 +00:00
|
|
|
</div>
|
|
|
|
</Popper>
|
|
|
|
</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;
|
|
|
|
|
|
|
|
&:hover, &.icon-clicked {
|
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>
|