2018-04-09 10:44:37 -07:00
|
|
|
<template>
|
2020-10-19 12:35:46 -07:00
|
|
|
<Status
|
2019-03-31 11:50:34 -07:00
|
|
|
v-if="notification.type === 'mention'"
|
|
|
|
:compact="true"
|
2019-03-13 11:08:03 -07:00
|
|
|
:statusoid="notification.status"
|
2019-07-05 00:17:44 -07:00
|
|
|
/>
|
2019-09-06 08:15:22 -07:00
|
|
|
<div v-else>
|
|
|
|
<div
|
|
|
|
v-if="needMute && !unmuted"
|
2020-08-17 14:26:02 -07:00
|
|
|
class="Notification container -muted"
|
2019-07-05 00:17:44 -07:00
|
|
|
>
|
2019-09-06 08:15:22 -07:00
|
|
|
<small>
|
|
|
|
<router-link :to="userProfileLink">
|
|
|
|
{{ notification.from_profile.screen_name }}
|
|
|
|
</router-link>
|
|
|
|
</small>
|
2020-11-24 02:32:42 -08:00
|
|
|
<button
|
|
|
|
class="button-unstyled unmute"
|
2019-09-06 08:15:22 -07:00
|
|
|
@click.prevent="toggleMute"
|
2020-10-20 14:31:16 -07:00
|
|
|
><FAIcon
|
2020-10-28 12:31:16 -07:00
|
|
|
class="fa-scale-110 fa-old-padding"
|
2020-10-20 14:31:16 -07:00
|
|
|
icon="eye-slash"
|
2020-11-24 02:32:42 -08:00
|
|
|
/></button>
|
2019-09-06 08:15:22 -07:00
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
v-else
|
2020-10-19 12:35:46 -07:00
|
|
|
class="Notification non-mention"
|
|
|
|
:class="[userClass, { highlighted: userStyle }, '-type--' + notification.type]"
|
2019-09-06 08:15:22 -07:00
|
|
|
:style="[ userStyle ]"
|
|
|
|
>
|
|
|
|
<a
|
|
|
|
class="avatar-container"
|
|
|
|
:href="notification.from_profile.statusnet_profile_url"
|
|
|
|
@click.stop.prevent.capture="toggleUserExpanded"
|
|
|
|
>
|
|
|
|
<UserAvatar
|
|
|
|
:compact="true"
|
|
|
|
:better-shadow="betterShadow"
|
|
|
|
:user="notification.from_profile"
|
|
|
|
/>
|
|
|
|
</a>
|
|
|
|
<div class="notification-right">
|
|
|
|
<UserCard
|
|
|
|
v-if="userExpanded"
|
2020-04-21 13:27:51 -07:00
|
|
|
:user-id="getUser(notification).id"
|
2019-09-06 08:15:22 -07:00
|
|
|
:rounded="true"
|
|
|
|
:bordered="true"
|
|
|
|
/>
|
|
|
|
<span class="notification-details">
|
|
|
|
<div class="name-and-action">
|
|
|
|
<!-- eslint-disable vue/no-v-html -->
|
2020-04-18 09:48:45 -07:00
|
|
|
<bdi
|
2019-09-06 08:15:22 -07:00
|
|
|
v-if="!!notification.from_profile.name_html"
|
|
|
|
class="username"
|
|
|
|
:title="'@'+notification.from_profile.screen_name"
|
|
|
|
v-html="notification.from_profile.name_html"
|
2019-07-05 00:17:44 -07:00
|
|
|
/>
|
2019-09-06 08:15:22 -07:00
|
|
|
<!-- eslint-enable vue/no-v-html -->
|
|
|
|
<span
|
|
|
|
v-else
|
|
|
|
class="username"
|
|
|
|
:title="'@'+notification.from_profile.screen_name"
|
|
|
|
>{{ notification.from_profile.name }}</span>
|
|
|
|
<span v-if="notification.type === 'like'">
|
2020-10-20 14:31:16 -07:00
|
|
|
<FAIcon
|
|
|
|
class="type-icon"
|
|
|
|
icon="star"
|
|
|
|
/>
|
2019-09-06 08:15:22 -07:00
|
|
|
<small>{{ $t('notifications.favorited_you') }}</small>
|
|
|
|
</span>
|
|
|
|
<span v-if="notification.type === 'repeat'">
|
2020-10-19 12:35:46 -07:00
|
|
|
<FAIcon
|
2020-10-20 14:31:16 -07:00
|
|
|
class="type-icon"
|
|
|
|
icon="retweet"
|
2019-09-06 08:15:22 -07:00
|
|
|
:title="$t('tool_tip.repeat')"
|
|
|
|
/>
|
|
|
|
<small>{{ $t('notifications.repeated_you') }}</small>
|
|
|
|
</span>
|
|
|
|
<span v-if="notification.type === 'follow'">
|
2020-10-20 14:31:16 -07:00
|
|
|
<FAIcon
|
|
|
|
class="type-icon"
|
|
|
|
icon="user-plus"
|
|
|
|
/>
|
2019-09-06 08:15:22 -07:00
|
|
|
<small>{{ $t('notifications.followed_you') }}</small>
|
|
|
|
</span>
|
2020-04-24 21:04:39 -07:00
|
|
|
<span v-if="notification.type === 'follow_request'">
|
2020-10-20 14:31:16 -07:00
|
|
|
<FAIcon
|
|
|
|
class="type-icon"
|
|
|
|
icon="user"
|
|
|
|
/>
|
2020-04-24 21:04:39 -07:00
|
|
|
<small>{{ $t('notifications.follow_request') }}</small>
|
|
|
|
</span>
|
2019-12-10 07:00:10 -08:00
|
|
|
<span v-if="notification.type === 'move'">
|
2020-10-20 14:31:16 -07:00
|
|
|
<FAIcon
|
|
|
|
class="type-icon"
|
|
|
|
icon="suitcase-rolling"
|
|
|
|
/>
|
2019-12-11 01:20:23 -08:00
|
|
|
<small>{{ $t('notifications.migrated_to') }}</small>
|
2019-12-10 07:00:10 -08:00
|
|
|
</span>
|
2020-02-11 04:24:51 -08:00
|
|
|
<span v-if="notification.type === 'pleroma:emoji_reaction'">
|
|
|
|
<small>
|
|
|
|
<i18n path="notifications.reacted_with">
|
|
|
|
<span class="emoji-reaction-emoji">{{ notification.emoji }}</span>
|
|
|
|
</i18n>
|
|
|
|
</small>
|
|
|
|
</span>
|
2019-09-06 08:15:22 -07:00
|
|
|
</div>
|
|
|
|
<div
|
2020-04-24 21:04:39 -07:00
|
|
|
v-if="isStatusNotification"
|
2019-09-06 08:15:22 -07:00
|
|
|
class="timeago"
|
|
|
|
>
|
2020-04-24 21:04:39 -07:00
|
|
|
<router-link
|
|
|
|
v-if="notification.status"
|
|
|
|
:to="{ name: 'conversation', params: { id: notification.status.id } }"
|
|
|
|
class="faint-link"
|
|
|
|
>
|
2019-09-06 08:15:22 -07:00
|
|
|
<Timeago
|
|
|
|
:time="notification.created_at"
|
|
|
|
:auto-update="240"
|
|
|
|
/>
|
2020-04-24 21:04:39 -07:00
|
|
|
</router-link>
|
2019-09-06 08:15:22 -07:00
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
v-else
|
|
|
|
class="timeago"
|
|
|
|
>
|
2020-04-24 21:04:39 -07:00
|
|
|
<span class="faint">
|
2019-09-06 08:15:22 -07:00
|
|
|
<Timeago
|
|
|
|
:time="notification.created_at"
|
|
|
|
:auto-update="240"
|
|
|
|
/>
|
2020-04-24 21:04:39 -07:00
|
|
|
</span>
|
2019-09-06 08:15:22 -07:00
|
|
|
</div>
|
2020-11-24 02:32:42 -08:00
|
|
|
<button
|
2019-09-06 08:15:22 -07:00
|
|
|
v-if="needMute"
|
2020-11-24 02:32:42 -08:00
|
|
|
class="button-unstyled"
|
2019-09-06 08:15:22 -07:00
|
|
|
@click.prevent="toggleMute"
|
2020-10-20 14:31:16 -07:00
|
|
|
><FAIcon
|
2020-10-28 12:31:16 -07:00
|
|
|
class="fa-scale-110 fa-old-padding"
|
2020-10-20 14:31:16 -07:00
|
|
|
icon="eye-slash"
|
2020-11-24 02:32:42 -08:00
|
|
|
/></button>
|
2019-09-06 08:15:22 -07:00
|
|
|
</span>
|
2019-07-05 00:17:44 -07:00
|
|
|
<div
|
2020-04-24 21:04:39 -07:00
|
|
|
v-if="notification.type === 'follow' || notification.type === 'follow_request'"
|
2019-09-06 08:15:22 -07:00
|
|
|
class="follow-text"
|
2019-07-05 00:17:44 -07:00
|
|
|
>
|
2020-04-24 21:04:39 -07:00
|
|
|
<router-link
|
|
|
|
:to="userProfileLink"
|
|
|
|
class="follow-name"
|
|
|
|
>
|
2019-09-06 08:15:22 -07:00
|
|
|
@{{ notification.from_profile.screen_name }}
|
2019-03-03 11:11:38 -08:00
|
|
|
</router-link>
|
2020-04-24 21:04:39 -07:00
|
|
|
<div
|
|
|
|
v-if="notification.type === 'follow_request'"
|
|
|
|
style="white-space: nowrap;"
|
|
|
|
>
|
2020-10-19 12:35:46 -07:00
|
|
|
<FAIcon
|
|
|
|
icon="check"
|
2020-10-28 12:31:16 -07:00
|
|
|
class="fa-scale-110 fa-old-padding follow-request-accept"
|
2020-04-24 21:04:39 -07:00
|
|
|
:title="$t('tool_tip.accept_follow_request')"
|
|
|
|
@click="approveUser()"
|
|
|
|
/>
|
2020-10-19 12:35:46 -07:00
|
|
|
<FAIcon
|
|
|
|
icon="times"
|
2020-10-28 12:31:16 -07:00
|
|
|
class="fa-scale-110 fa-old-padding follow-request-reject"
|
2020-05-02 00:19:47 -07:00
|
|
|
:title="$t('tool_tip.reject_follow_request')"
|
2020-04-24 21:04:39 -07:00
|
|
|
@click="denyUser()"
|
|
|
|
/>
|
|
|
|
</div>
|
2019-03-03 11:11:38 -08:00
|
|
|
</div>
|
2019-12-10 07:00:10 -08:00
|
|
|
<div
|
|
|
|
v-else-if="notification.type === 'move'"
|
|
|
|
class="move-text"
|
|
|
|
>
|
2019-12-10 11:02:25 -08:00
|
|
|
<router-link :to="targetUserProfileLink">
|
2019-12-10 07:00:10 -08:00
|
|
|
@{{ notification.target.screen_name }}
|
|
|
|
</router-link>
|
|
|
|
</div>
|
2019-09-06 08:15:22 -07:00
|
|
|
<template v-else>
|
2020-05-25 15:01:25 -07:00
|
|
|
<status-content
|
2019-09-06 08:15:22 -07:00
|
|
|
class="faint"
|
2020-05-25 15:01:25 -07:00
|
|
|
:status="notification.action"
|
2019-09-06 08:15:22 -07:00
|
|
|
/>
|
|
|
|
</template>
|
2018-04-09 10:44:37 -07:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script src="./notification.js"></script>
|
2020-08-17 14:26:02 -07:00
|
|
|
<style src="./notification.scss" lang="scss"></style>
|