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