2016-11-13 15:42:56 +00:00
|
|
|
<template>
|
2020-11-26 16:23:53 +00:00
|
|
|
<div class="RetweetButton">
|
2020-11-24 10:32:42 +00:00
|
|
|
<button
|
2022-04-05 12:34:27 +00:00
|
|
|
v-if="(visibility !== 'private' || isOwn) && visibility !== 'direct' && loggedIn"
|
2020-11-26 16:23:53 +00:00
|
|
|
class="button-unstyled interactive"
|
2020-11-24 10:32:42 +00:00
|
|
|
:class="status.repeated && '-repeated'"
|
2020-11-26 16:23:53 +00:00
|
|
|
:title="$t('tool_tip.repeat')"
|
|
|
|
@click.prevent="retweet()"
|
2020-11-24 10:32:42 +00:00
|
|
|
>
|
2020-10-20 21:31:16 +00:00
|
|
|
<FAIcon
|
2020-11-24 10:32:42 +00:00
|
|
|
class="fa-scale-110 fa-old-padding"
|
2020-10-20 21:31:16 +00:00
|
|
|
icon="retweet"
|
|
|
|
:spin="animated"
|
|
|
|
/>
|
2020-11-24 10:32:42 +00:00
|
|
|
</button>
|
2020-11-26 21:01:16 +00:00
|
|
|
<span v-else-if="loggedIn">
|
|
|
|
<FAIcon
|
|
|
|
class="fa-scale-110 fa-old-padding"
|
|
|
|
icon="lock"
|
|
|
|
:title="$t('timeline.no_retweet_hint')"
|
|
|
|
/>
|
|
|
|
</span>
|
|
|
|
<span v-else>
|
|
|
|
<FAIcon
|
|
|
|
class="fa-scale-110 fa-old-padding"
|
|
|
|
icon="retweet"
|
|
|
|
:title="$t('tool_tip.repeat')"
|
|
|
|
/>
|
|
|
|
</span>
|
2020-11-26 16:23:53 +00:00
|
|
|
<span
|
|
|
|
v-if="!mergedConfig.hidePostStats && status.repeat_num > 0"
|
|
|
|
class="no-event"
|
|
|
|
>
|
|
|
|
{{ status.repeat_num }}
|
|
|
|
</span>
|
2022-08-26 11:58:33 +00:00
|
|
|
<teleport to="#modal">
|
|
|
|
<confirm-modal
|
|
|
|
v-if="showingConfirmDialog"
|
|
|
|
:title="$t('status.repeat_confirm_title')"
|
|
|
|
:confirm-text="$t('status.repeat_confirm_accept_button')"
|
|
|
|
:cancel-text="$t('status.repeat_confirm_cancel_button')"
|
|
|
|
@accepted="doRetweet"
|
|
|
|
@cancelled="hideConfirmDialog"
|
|
|
|
>
|
|
|
|
{{ $t('status.repeat_confirm') }}
|
|
|
|
</confirm-modal>
|
|
|
|
</teleport>
|
2016-11-13 15:42:56 +00:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script src="./retweet_button.js" ></script>
|
|
|
|
|
2018-04-01 02:28:20 +00:00
|
|
|
<style lang="scss">
|
|
|
|
@import '../../_variables.scss';
|
2020-10-19 16:38:49 +00:00
|
|
|
|
|
|
|
.RetweetButton {
|
2020-11-26 16:23:53 +00:00
|
|
|
display: flex;
|
|
|
|
|
|
|
|
> :first-child {
|
|
|
|
padding: 10px;
|
2020-11-26 21:01:16 +00:00
|
|
|
margin: -10px -8px -10px -10px;
|
2020-11-26 16:23:53 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.action-counter {
|
|
|
|
pointer-events: none;
|
|
|
|
user-select: none;
|
|
|
|
}
|
2020-10-19 16:38:49 +00:00
|
|
|
|
2020-11-26 16:23:53 +00:00
|
|
|
.interactive {
|
2020-11-24 10:32:42 +00:00
|
|
|
.svg-inline--fa {
|
|
|
|
animation-duration: 0.6s;
|
|
|
|
}
|
|
|
|
|
|
|
|
&:hover .svg-inline--fa,
|
|
|
|
&.-repeated .svg-inline--fa {
|
2020-10-19 16:38:49 +00:00
|
|
|
color: $fallback--cGreen;
|
|
|
|
color: var(--cGreen, $fallback--cGreen);
|
|
|
|
}
|
|
|
|
}
|
2018-04-07 16:30:27 +00:00
|
|
|
}
|
2016-11-13 15:42:56 +00:00
|
|
|
</style>
|