2018-04-09 17:44:37 +00:00
|
|
|
<template>
|
2018-12-10 20:12:51 +00:00
|
|
|
<status :activatePanel="activatePanel" v-if="notification.type === 'mention'" :compact="true" :statusoid="notification.status"></status>
|
2018-06-18 09:09:14 +00:00
|
|
|
<div class="non-mention" :class="[userClass, { highlighted: userStyle }]" :style="[ userStyle ]"v-else>
|
2018-04-10 16:25:24 +00:00
|
|
|
<a class='avatar-container' :href="notification.action.user.statusnet_profile_url" @click.stop.prevent.capture="toggleUserExpanded">
|
2018-11-30 13:39:07 +00:00
|
|
|
<StillImage class='avatar-compact' :class="{'better-shadow': betterShadow}" :src="notification.action.user.profile_image_url_original"/>
|
2018-04-09 17:44:37 +00:00
|
|
|
</a>
|
|
|
|
<div class='notification-right'>
|
2018-04-10 16:25:24 +00:00
|
|
|
<div class="usercard notification-usercard" v-if="userExpanded">
|
2018-04-09 17:44:37 +00:00
|
|
|
<user-card-content :user="notification.action.user" :switcher="false"></user-card-content>
|
|
|
|
</div>
|
|
|
|
<span class="notification-details">
|
2018-04-10 16:25:24 +00:00
|
|
|
<div class="name-and-action">
|
2018-08-09 09:52:34 +00:00
|
|
|
<span class="username" v-if="!!notification.action.user.name_html" :title="'@'+notification.action.user.screen_name" v-html="notification.action.user.name_html"></span>
|
|
|
|
<span class="username" v-else :title="'@'+notification.action.user.screen_name">{{ notification.action.user.name }}</span>
|
2018-08-12 11:14:34 +00:00
|
|
|
<span v-if="notification.type === 'like'">
|
2018-04-10 16:25:24 +00:00
|
|
|
<i class="fa icon-star lit"></i>
|
|
|
|
<small>{{$t('notifications.favorited_you')}}</small>
|
|
|
|
</span>
|
|
|
|
<span v-if="notification.type === 'repeat'">
|
2018-12-03 17:12:43 +00:00
|
|
|
<i class="fa icon-retweet lit" :title="$t('tool_tip.repeat')"></i>
|
2018-04-10 16:25:24 +00:00
|
|
|
<small>{{$t('notifications.repeated_you')}}</small>
|
|
|
|
</span>
|
|
|
|
<span v-if="notification.type === 'follow'">
|
|
|
|
<i class="fa icon-user-plus lit"></i>
|
|
|
|
<small>{{$t('notifications.followed_you')}}</small>
|
|
|
|
</span>
|
|
|
|
</div>
|
2018-12-11 14:36:55 +00:00
|
|
|
<small class="timeago"><router-link @click.native="activatePanel('timeline')" v-if="notification.status" :to="{ name: 'conversation', params: { id: notification.status.id } }"><timeago :since="notification.action.created_at" :auto-update="240"></timeago></router-link></small>
|
2018-04-09 17:44:37 +00:00
|
|
|
</span>
|
|
|
|
<div class="follow-text" v-if="notification.type === 'follow'">
|
2018-12-16 23:39:37 +00:00
|
|
|
<router-link @click.native="activatePanel('timeline')" :to="userProfileLink(notification.action.user)">
|
2018-12-13 16:57:11 +00:00
|
|
|
@{{notification.action.user.screen_name}}
|
|
|
|
</router-link>
|
2018-04-09 17:44:37 +00:00
|
|
|
</div>
|
2018-08-16 10:41:45 +00:00
|
|
|
<template v-else>
|
2018-12-10 20:12:51 +00:00
|
|
|
<status :activatePanel="activatePanel" v-if="notification.status" class="faint" :compact="true" :statusoid="notification.status" :noHeading="true"></status>
|
2018-08-16 10:41:45 +00:00
|
|
|
<div class="broken-favorite" v-else>
|
|
|
|
{{$t('notifications.broken_favorite')}}
|
|
|
|
</div>
|
|
|
|
</template>
|
2018-04-09 17:44:37 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script src="./notification.js"></script>
|