2016-11-28 05:44:56 +11:00
|
|
|
<template>
|
|
|
|
<div class="notifications">
|
2017-01-16 01:44:56 +11:00
|
|
|
<div class="panel panel-default base00-background">
|
2017-02-25 03:53:53 +11:00
|
|
|
<div class="panel-heading base01-background base04">
|
2017-03-08 00:55:00 +11:00
|
|
|
<span class="unseen-count" v-if="unseenCount">{{unseenCount}}</span>
|
|
|
|
Notifications
|
2017-03-07 08:51:39 +11:00
|
|
|
<button @click.prevent="markAsSeen" class="base06 base02-background read-button">Read!</button>
|
2017-02-25 03:53:53 +11:00
|
|
|
</div>
|
2017-03-09 10:09:23 +11:00
|
|
|
<div class="panel-body base03-border">
|
2017-02-25 03:53:53 +11:00
|
|
|
<div v-for="notification in visibleNotifications" class="notification" :class='{"unseen": !notification.seen}'>
|
2017-02-23 10:26:37 +11:00
|
|
|
<a :href="notification.action.user.statusnet_profile_url">
|
|
|
|
<img class='avatar' :src="notification.action.user.profile_image_url_original">
|
|
|
|
</a>
|
|
|
|
<div class='text'>
|
|
|
|
<div v-if="notification.type === 'favorite'">
|
2017-05-30 07:24:08 +10:00
|
|
|
<h1>
|
|
|
|
{{ notification.action.user.name }}
|
|
|
|
<i class="fa icon-star"></i>
|
|
|
|
<small><router-link :to="{ name: 'conversation', params: { id: notification.status.id } }"><timeago :since="notification.action.created_at" :auto-update="240"></timeago></router-link></small>
|
|
|
|
</h1>
|
|
|
|
<p>{{ notification.status.text }}</p>
|
2017-02-23 10:26:37 +11:00
|
|
|
</div>
|
|
|
|
<div v-if="notification.type === 'repeat'">
|
2017-05-30 07:24:08 +10:00
|
|
|
<h1>
|
|
|
|
{{ notification.action.user.name }}
|
|
|
|
<i class="fa icon-retweet"></i>
|
|
|
|
<small><router-link :to="{ name: 'conversation', params: { id: notification.status.id } }"><timeago :since="notification.action.created_at" :auto-update="240"></timeago></router-link></small>
|
|
|
|
</h1>
|
|
|
|
<p>{{ notification.status.text }}</p>
|
2017-02-23 10:26:37 +11:00
|
|
|
</div>
|
|
|
|
<div v-if="notification.type === 'mention'">
|
2017-05-30 07:24:08 +10:00
|
|
|
<h1>
|
|
|
|
{{ notification.action.user.name }}
|
|
|
|
<i class="fa icon-reply"></i>
|
|
|
|
<small><router-link :to="{ name: 'conversation', params: { id: notification.status.id } }"><timeago :since="notification.action.created_at" :auto-update="240"></timeago></router-link></small>
|
|
|
|
</h1>
|
2017-02-23 10:26:37 +11:00
|
|
|
<p>{{ notification.status.text }}</p>
|
2016-11-28 05:44:56 +11:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script src="./notifications.js"></script>
|
|
|
|
<style lang="scss" src="./notifications.scss"></style>
|