2019-04-12 19:35:29 +00:00
|
|
|
<template>
|
2020-02-28 16:39:47 +00:00
|
|
|
<Popover
|
2020-12-03 09:57:17 +00:00
|
|
|
class="ExtraButtons"
|
2019-04-12 19:35:29 +00:00
|
|
|
trigger="click"
|
2019-07-11 15:01:12 +00:00
|
|
|
placement="top"
|
2020-11-25 16:33:08 +00:00
|
|
|
:offset="{ y: 5 }"
|
2020-06-16 14:20:36 +00:00
|
|
|
:bound-to="{ x: 'container' }"
|
2020-11-25 16:33:08 +00:00
|
|
|
remove-padding
|
2022-01-16 06:01:19 +00:00
|
|
|
@show="onShow"
|
|
|
|
@close="onClose"
|
2019-04-12 19:35:29 +00:00
|
|
|
>
|
2022-07-31 09:35:48 +00:00
|
|
|
<template #content="{close}">
|
2019-05-26 21:13:08 +00:00
|
|
|
<div class="dropdown-menu">
|
2019-07-07 20:02:09 +00:00
|
|
|
<button
|
2019-09-04 18:11:13 +00:00
|
|
|
v-if="canMute && !status.thread_muted"
|
2020-11-24 10:32:42 +00:00
|
|
|
class="button-default dropdown-item dropdown-item-icon"
|
2019-07-07 20:02:09 +00:00
|
|
|
@click.prevent="muteConversation"
|
|
|
|
>
|
2020-10-20 21:31:16 +00:00
|
|
|
<FAIcon
|
|
|
|
fixed-width
|
|
|
|
icon="eye-slash"
|
|
|
|
/><span>{{ $t("status.mute_conversation") }}</span>
|
2019-07-07 20:02:09 +00:00
|
|
|
</button>
|
|
|
|
<button
|
2019-09-04 18:11:13 +00:00
|
|
|
v-if="canMute && status.thread_muted"
|
2020-11-24 10:32:42 +00:00
|
|
|
class="button-default dropdown-item dropdown-item-icon"
|
2019-07-07 20:02:09 +00:00
|
|
|
@click.prevent="unmuteConversation"
|
|
|
|
>
|
2020-10-20 21:31:16 +00:00
|
|
|
<FAIcon
|
|
|
|
fixed-width
|
|
|
|
icon="eye-slash"
|
|
|
|
/><span>{{ $t("status.unmute_conversation") }}</span>
|
2019-07-07 20:02:09 +00:00
|
|
|
</button>
|
2019-07-05 07:17:44 +00:00
|
|
|
<button
|
|
|
|
v-if="!status.pinned && canPin"
|
2020-11-24 10:32:42 +00:00
|
|
|
class="button-default dropdown-item dropdown-item-icon"
|
2019-07-05 07:17:44 +00:00
|
|
|
@click.prevent="pinStatus"
|
2020-05-08 07:46:00 +00:00
|
|
|
@click="close"
|
2019-07-05 07:17:44 +00:00
|
|
|
>
|
2020-10-20 21:31:16 +00:00
|
|
|
<FAIcon
|
|
|
|
fixed-width
|
|
|
|
icon="thumbtack"
|
|
|
|
/><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"
|
2020-11-24 10:32:42 +00:00
|
|
|
class="button-default dropdown-item dropdown-item-icon"
|
2019-07-05 07:17:44 +00:00
|
|
|
@click.prevent="unpinStatus"
|
2020-05-08 07:46:00 +00:00
|
|
|
@click="close"
|
2019-07-05 07:17:44 +00:00
|
|
|
>
|
2020-10-20 21:31:16 +00:00
|
|
|
<FAIcon
|
|
|
|
fixed-width
|
|
|
|
icon="thumbtack"
|
|
|
|
/><span>{{ $t("status.unpin") }}</span>
|
2019-04-12 19:35:29 +00:00
|
|
|
</button>
|
2022-06-20 22:24:50 +00:00
|
|
|
<template v-if="canBookmark">
|
|
|
|
<button
|
|
|
|
v-if="!status.bookmarked"
|
|
|
|
class="button-default dropdown-item dropdown-item-icon"
|
|
|
|
@click.prevent="bookmarkStatus"
|
|
|
|
@click="close"
|
|
|
|
>
|
|
|
|
<FAIcon
|
|
|
|
fixed-width
|
|
|
|
:icon="['far', 'bookmark']"
|
|
|
|
/><span>{{ $t("status.bookmark") }}</span>
|
|
|
|
</button>
|
|
|
|
<button
|
|
|
|
v-if="status.bookmarked"
|
|
|
|
class="button-default dropdown-item dropdown-item-icon"
|
|
|
|
@click.prevent="unbookmarkStatus"
|
|
|
|
@click="close"
|
|
|
|
>
|
|
|
|
<FAIcon
|
|
|
|
fixed-width
|
|
|
|
icon="bookmark"
|
|
|
|
/><span>{{ $t("status.unbookmark") }}</span>
|
|
|
|
</button>
|
|
|
|
</template>
|
2022-06-08 03:31:48 +00:00
|
|
|
<button
|
2022-06-21 23:44:04 +00:00
|
|
|
v-if="ownStatus && editingAvailable"
|
2022-06-08 03:31:48 +00:00
|
|
|
class="button-default dropdown-item dropdown-item-icon"
|
|
|
|
@click.prevent="editStatus"
|
|
|
|
@click="close"
|
|
|
|
>
|
|
|
|
<FAIcon
|
|
|
|
fixed-width
|
|
|
|
icon="pen"
|
|
|
|
/><span>{{ $t("status.edit") }}</span>
|
|
|
|
</button>
|
2022-06-21 04:52:08 +00:00
|
|
|
<button
|
2022-06-21 23:44:04 +00:00
|
|
|
v-if="isEdited && editingAvailable"
|
2022-06-21 04:52:08 +00:00
|
|
|
class="button-default dropdown-item dropdown-item-icon"
|
|
|
|
@click.prevent="showStatusHistory"
|
|
|
|
@click="close"
|
|
|
|
>
|
|
|
|
<FAIcon
|
|
|
|
fixed-width
|
|
|
|
icon="history"
|
|
|
|
/><span>{{ $t("status.status_history") }}</span>
|
|
|
|
</button>
|
2019-07-05 07:17:44 +00:00
|
|
|
<button
|
|
|
|
v-if="canDelete"
|
2020-11-24 10:32:42 +00:00
|
|
|
class="button-default dropdown-item dropdown-item-icon"
|
2019-07-05 07:17:44 +00:00
|
|
|
@click.prevent="deleteStatus"
|
2020-05-08 07:46:00 +00:00
|
|
|
@click="close"
|
2019-07-05 07:17:44 +00:00
|
|
|
>
|
2020-10-20 21:31:16 +00:00
|
|
|
<FAIcon
|
|
|
|
fixed-width
|
|
|
|
icon="times"
|
|
|
|
/><span>{{ $t("status.delete") }}</span>
|
2019-04-12 19:35:29 +00:00
|
|
|
</button>
|
2020-03-30 17:39:28 +00:00
|
|
|
<button
|
2020-11-24 10:32:42 +00:00
|
|
|
class="button-default dropdown-item dropdown-item-icon"
|
2020-03-30 17:39:28 +00:00
|
|
|
@click.prevent="copyLink"
|
2020-05-08 07:46:00 +00:00
|
|
|
@click="close"
|
2020-03-30 17:39:28 +00:00
|
|
|
>
|
2020-10-20 21:31:16 +00:00
|
|
|
<FAIcon
|
|
|
|
fixed-width
|
|
|
|
icon="share-alt"
|
|
|
|
/><span>{{ $t("status.copy_link") }}</span>
|
2020-03-30 17:39:28 +00:00
|
|
|
</button>
|
2020-12-03 09:57:17 +00:00
|
|
|
<a
|
|
|
|
v-if="!status.is_local"
|
|
|
|
class="button-default dropdown-item dropdown-item-icon"
|
|
|
|
title="Source"
|
|
|
|
:href="status.external_url"
|
|
|
|
target="_blank"
|
|
|
|
>
|
|
|
|
<FAIcon
|
|
|
|
fixed-width
|
|
|
|
icon="external-link-alt"
|
|
|
|
/><span>{{ $t("status.external_source") }}</span>
|
|
|
|
</a>
|
2021-01-12 12:43:21 +00:00
|
|
|
<button
|
|
|
|
class="button-default dropdown-item dropdown-item-icon"
|
|
|
|
@click.prevent="reportStatus"
|
|
|
|
@click="close"
|
|
|
|
>
|
|
|
|
<FAIcon
|
|
|
|
fixed-width
|
|
|
|
:icon="['far', 'flag']"
|
|
|
|
/><span>{{ $t("user_card.report") }}</span>
|
|
|
|
</button>
|
2019-04-12 19:35:29 +00:00
|
|
|
</div>
|
2021-04-07 19:42:34 +00:00
|
|
|
</template>
|
2022-07-31 09:35:48 +00:00
|
|
|
<template #trigger>
|
2022-06-12 13:32:32 +00:00
|
|
|
<span class="button-unstyled popover-trigger">
|
2022-01-16 06:01:19 +00:00
|
|
|
<FALayers class="fa-old-padding-layer">
|
|
|
|
<FAIcon
|
|
|
|
class="fa-scale-110 "
|
|
|
|
icon="ellipsis-h"
|
|
|
|
/>
|
|
|
|
<FAIcon
|
2022-04-16 19:27:35 +00:00
|
|
|
v-show="!expanded"
|
2022-01-16 06:01:19 +00:00
|
|
|
class="focus-marker"
|
|
|
|
transform="shrink-6 up-8 right-16"
|
|
|
|
icon="plus"
|
|
|
|
/>
|
|
|
|
<FAIcon
|
2022-04-16 19:27:35 +00:00
|
|
|
v-show="expanded"
|
2022-01-16 06:01:19 +00:00
|
|
|
class="focus-marker"
|
|
|
|
transform="shrink-6 up-8 right-16"
|
|
|
|
icon="times"
|
|
|
|
/>
|
|
|
|
</FALayers>
|
2022-06-12 13:32:32 +00:00
|
|
|
</span>
|
2022-04-06 18:54:58 +00:00
|
|
|
<teleport to="#modal">
|
2022-03-17 04:06:26 +00:00
|
|
|
<ConfirmModal
|
|
|
|
v-if="showingDeleteDialog"
|
|
|
|
:title="$t('status.delete_confirm_title')"
|
|
|
|
:cancel-text="$t('status.delete_confirm_cancel_button')"
|
|
|
|
:confirm-text="$t('status.delete_confirm_accept_button')"
|
|
|
|
@cancelled="hideDeleteStatusConfirmDialog"
|
|
|
|
@accepted="doDeleteStatus"
|
|
|
|
>
|
|
|
|
{{ $t('status.delete_confirm') }}
|
|
|
|
</ConfirmModal>
|
2022-04-06 18:54:58 +00:00
|
|
|
</teleport>
|
2021-04-07 19:42:34 +00:00
|
|
|
</template>
|
2020-02-28 16:39:47 +00:00
|
|
|
</Popover>
|
2019-04-12 19:35:29 +00:00
|
|
|
</template>
|
|
|
|
|
2022-07-31 09:35:48 +00:00
|
|
|
<script src="./extra_buttons.js"></script>
|
2019-04-12 19:35:29 +00:00
|
|
|
|
|
|
|
<style lang="scss">
|
2023-01-09 18:02:16 +00:00
|
|
|
@import "../../variables";
|
|
|
|
@import "../../mixins";
|
2019-04-12 19:35:29 +00:00
|
|
|
|
2020-10-19 19:35:46 +00:00
|
|
|
.ExtraButtons {
|
2020-12-03 09:57:17 +00:00
|
|
|
.popover-trigger {
|
|
|
|
position: static;
|
|
|
|
padding: 10px;
|
|
|
|
margin: -10px;
|
2019-04-12 19:35:29 +00:00
|
|
|
|
2020-12-03 09:57:17 +00:00
|
|
|
&:hover .svg-inline--fa {
|
|
|
|
color: $fallback--text;
|
|
|
|
color: var(--text, $fallback--text);
|
|
|
|
}
|
2022-08-19 12:45:59 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.popover-trigger-button {
|
2023-01-09 18:02:16 +00:00
|
|
|
/* override of popover internal stuff */
|
|
|
|
width: auto;
|
|
|
|
|
2022-01-20 02:18:02 +00:00
|
|
|
@include unfocused-style {
|
|
|
|
.focus-marker {
|
|
|
|
visibility: hidden;
|
|
|
|
}
|
2022-01-16 06:01:19 +00:00
|
|
|
}
|
|
|
|
|
2022-01-20 02:18:02 +00:00
|
|
|
@include focused-style {
|
2022-01-16 06:01:19 +00:00
|
|
|
.focus-marker {
|
|
|
|
visibility: visible;
|
|
|
|
}
|
|
|
|
}
|
2019-04-12 19:35:29 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
</style>
|