2016-11-28 03:44:56 +09:00
|
|
|
<template>
|
2019-05-16 02:44:35 +09:00
|
|
|
<div :class="{ minimal: minimalMode }" class="notifications">
|
2019-05-15 04:38:16 +09:00
|
|
|
<div :class="mainClass">
|
2019-03-15 00:46:04 +09:00
|
|
|
<div v-if="!noHeading" class="panel-heading">
|
2018-08-28 22:14:32 +09:00
|
|
|
<div class="title">
|
|
|
|
{{$t('notifications.notifications')}}
|
2018-11-26 09:19:04 +09:00
|
|
|
<span class="badge badge-notification unseen-count" v-if="unseenCount">{{unseenCount}}</span>
|
2018-08-28 22:14:32 +09:00
|
|
|
</div>
|
2018-08-21 02:45:54 +09:00
|
|
|
<div @click.prevent class="loadmore-error alert error" v-if="error">
|
|
|
|
{{$t('timeline.error_fetching')}}
|
|
|
|
</div>
|
2019-03-15 00:57:24 +09:00
|
|
|
<button v-if="unseenCount" @click.prevent="markAsSeen" class="read-button">{{$t('notifications.read')}}</button>
|
2017-02-25 01:53:53 +09:00
|
|
|
</div>
|
2018-04-01 03:14:36 +09:00
|
|
|
<div class="panel-body">
|
2019-05-15 04:38:16 +09:00
|
|
|
<div v-for="notification in visibleNotifications" :key="notification.id" class="notification" :class='{"unseen": !minimalMode && !notification.seen}'>
|
2018-11-21 09:52:12 +09:00
|
|
|
<div class="notification-overlay"></div>
|
2018-12-29 04:39:54 +09:00
|
|
|
<notification :notification="notification"></notification>
|
2016-11-28 03:44:56 +09:00
|
|
|
</div>
|
|
|
|
</div>
|
2018-08-12 20:14:34 +09:00
|
|
|
<div class="panel-footer">
|
2019-01-30 04:04:52 +09: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()">
|
2019-05-16 02:44:35 +09:00
|
|
|
<div class="new-status-notification text-center panel-footer">
|
|
|
|
{{ minimalMode ? $t('interactions.load_older') : $t('notifications.load_older')}}
|
|
|
|
</div>
|
2018-08-12 20:14:34 +09:00
|
|
|
</a>
|
2019-01-30 04:04:52 +09:00
|
|
|
<div v-else class="new-status-notification text-center panel-footer">
|
|
|
|
<i class="icon-spin3 animate-spin"/>
|
|
|
|
</div>
|
2018-08-12 20:14:34 +09:00
|
|
|
</div>
|
2016-11-28 03:44:56 +09:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script src="./notifications.js"></script>
|
|
|
|
<style lang="scss" src="./notifications.scss"></style>
|