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