2019-04-13 05:35:29 +10:00
|
|
|
<template>
|
|
|
|
<Popper
|
|
|
|
trigger="click"
|
|
|
|
@hide='showDropDown = false'
|
|
|
|
append-to-body
|
2019-05-17 03:45:18 +10:00
|
|
|
v-if="enabled && showPopper"
|
2019-04-13 05:35:29 +10:00
|
|
|
:options="{
|
|
|
|
placement: 'top',
|
|
|
|
modifiers: {
|
|
|
|
arrow: { enabled: true },
|
|
|
|
offset: { offset: '0, 5px' },
|
|
|
|
}
|
|
|
|
}"
|
|
|
|
>
|
|
|
|
<div class="popper-wrapper">
|
2019-05-27 07:13:08 +10:00
|
|
|
<div class="dropdown-menu">
|
2019-04-15 03:18:56 +10:00
|
|
|
<button class="dropdown-item dropdown-item-icon" @click.prevent="pinStatus" v-if="!status.pinned && canPin">
|
2019-04-13 05:35:29 +10:00
|
|
|
<i class="icon-pin"></i><span>{{$t("status.pin")}}</span>
|
|
|
|
</button>
|
2019-04-15 03:18:56 +10:00
|
|
|
<button class="dropdown-item dropdown-item-icon" @click.prevent="unpinStatus" v-if="status.pinned && canPin">
|
2019-04-13 05:35:29 +10:00
|
|
|
<i class="icon-pin"></i><span>{{$t("status.unpin")}}</span>
|
|
|
|
</button>
|
|
|
|
<button class="dropdown-item dropdown-item-icon" @click.prevent="deleteStatus" v-if="canDelete">
|
|
|
|
<i class="icon-cancel"></i><span>{{$t("status.delete")}}</span>
|
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="button-icon" slot="reference" @click="toggleMenu">
|
|
|
|
<i class='icon-ellipsis' :class="{'icon-clicked': showDropDown}"></i>
|
|
|
|
</div>
|
|
|
|
</Popper>
|
|
|
|
</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;
|
|
|
|
|
|
|
|
&:hover, &.icon-clicked {
|
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>
|