2016-11-27 10:44:56 -08:00
|
|
|
<template>
|
|
|
|
<div class="notifications">
|
2018-03-31 11:14:36 -07:00
|
|
|
<div class="panel panel-default">
|
|
|
|
<div class="panel-heading">
|
2018-08-28 06:14:32 -07:00
|
|
|
<div class="title">
|
|
|
|
{{$t('notifications.notifications')}}
|
2018-11-25 16:19:04 -08:00
|
|
|
<span class="badge badge-notification unseen-count" v-if="unseenCount">{{unseenCount}}</span>
|
2018-08-28 06:14:32 -07:00
|
|
|
</div>
|
2018-08-20 10:45:54 -07:00
|
|
|
<div @click.prevent class="loadmore-error alert error" v-if="error">
|
|
|
|
{{$t('timeline.error_fetching')}}
|
|
|
|
</div>
|
2018-03-31 11:14:36 -07:00
|
|
|
<button v-if="unseenCount" @click.prevent="markAsSeen" class="read-button">{{$t('notifications.read')}}</button>
|
2017-02-24 08:53:53 -08:00
|
|
|
</div>
|
2018-03-31 11:14:36 -07:00
|
|
|
<div class="panel-body">
|
2018-04-11 09:34:40 -07:00
|
|
|
<div v-for="notification in visibleNotifications" :key="notification.action.id" class="notification" :class='{"unseen": !notification.seen}'>
|
2018-11-20 16:52:12 -08:00
|
|
|
<div class="notification-overlay"></div>
|
2018-12-28 11:39:54 -08:00
|
|
|
<notification :notification="notification"></notification>
|
2016-11-27 10:44:56 -08:00
|
|
|
</div>
|
|
|
|
</div>
|
2018-08-12 04:14:34 -07:00
|
|
|
<div class="panel-footer">
|
2019-01-29 11:04:52 -08:00
|
|
|
<div v-if="bottomedOut" class="new-status-notification text-center panel-footer faint">
|
|
|
|
{{$t('notifications.no_more_notifications')}}
|
|
|
|
</div>
|
|
|
|
<a v-else-if="!loading" href="#" v-on:click.prevent="fetchOlderNotifications()">
|
2018-08-12 04:14:34 -07:00
|
|
|
<div class="new-status-notification text-center panel-footer">{{$t('notifications.load_older')}}</div>
|
|
|
|
</a>
|
2019-01-29 11:04:52 -08:00
|
|
|
<div v-else class="new-status-notification text-center panel-footer">
|
|
|
|
<i class="icon-spin3 animate-spin"/>
|
|
|
|
</div>
|
2018-08-12 04:14:34 -07:00
|
|
|
</div>
|
2016-11-27 10:44:56 -08:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script src="./notifications.js"></script>
|
|
|
|
<style lang="scss" src="./notifications.scss"></style>
|