yandere_fe/src/components/extra_buttons/extra_buttons.vue

78 lines
2.1 KiB
Vue
Raw Normal View History

<template>
2020-02-28 08:39:47 -08:00
<Popover
trigger="click"
2019-07-11 08:01:12 -07:00
placement="top"
2019-07-11 05:31:02 -07:00
class="extra-button-popover"
>
2020-02-28 08:39:47 -08:00
<div slot="content">
2019-05-26 14:13:08 -07:00
<div class="dropdown-menu">
<button
v-if="canMute && !status.thread_muted"
class="dropdown-item dropdown-item-icon"
@click.prevent="muteConversation"
>
<i class="icon-eye-off" /><span>{{ $t("status.mute_conversation") }}</span>
</button>
<button
v-if="canMute && status.thread_muted"
class="dropdown-item dropdown-item-icon"
@click.prevent="unmuteConversation"
>
<i class="icon-eye-off" /><span>{{ $t("status.unmute_conversation") }}</span>
</button>
2019-07-05 00:17:44 -07:00
<button
v-if="!status.pinned && canPin"
2019-07-11 08:50:56 -07:00
v-close-popover
2019-07-05 00:17:44 -07:00
class="dropdown-item dropdown-item-icon"
@click.prevent="pinStatus"
>
<i class="icon-pin" /><span>{{ $t("status.pin") }}</span>
</button>
2019-07-05 00:17:44 -07:00
<button
v-if="status.pinned && canPin"
2019-07-11 08:50:56 -07:00
v-close-popover
2019-07-05 00:17:44 -07:00
class="dropdown-item dropdown-item-icon"
@click.prevent="unpinStatus"
>
<i class="icon-pin" /><span>{{ $t("status.unpin") }}</span>
</button>
2019-07-05 00:17:44 -07:00
<button
v-if="canDelete"
2019-07-11 08:50:56 -07:00
v-close-popover
2019-07-05 00:17:44 -07:00
class="dropdown-item dropdown-item-icon"
@click.prevent="deleteStatus"
>
<i class="icon-cancel" /><span>{{ $t("status.delete") }}</span>
</button>
<button
v-close-popover
class="dropdown-item dropdown-item-icon"
@click.prevent="copyLink"
>
<i class="icon-share" /><span>{{ $t("status.copy_link") }}</span>
</button>
</div>
</div>
2020-02-28 08:39:47 -08:00
<i
slot="trigger"
class="icon-ellipsis button-icon"
/>
</Popover>
</template>
<script src="./extra_buttons.js" ></script>
<style lang="scss">
@import '../../_variables.scss';
.icon-ellipsis {
cursor: pointer;
2019-07-11 05:31:02 -07:00
&:hover,
.extra-button-popover.open & {
2019-04-26 13:30:04 -07:00
color: $fallback--text;
color: var(--text, $fallback--text);
}
}
</style>