2016-11-27 18:44:56 +00:00
|
|
|
<template>
|
2019-07-05 07:17:44 +00:00
|
|
|
<div
|
|
|
|
:class="{ minimal: minimalMode }"
|
2021-03-11 13:14:30 +00:00
|
|
|
class="Notifications"
|
2019-07-05 07:17:44 +00:00
|
|
|
>
|
2019-05-14 19:38:16 +00:00
|
|
|
<div :class="mainClass">
|
2019-07-05 07:17:44 +00:00
|
|
|
<div
|
|
|
|
v-if="!noHeading"
|
|
|
|
class="panel-heading"
|
|
|
|
>
|
2018-08-28 13:14:32 +00:00
|
|
|
<div class="title">
|
2019-07-05 07:17:44 +00:00
|
|
|
{{ $t('notifications.notifications') }}
|
|
|
|
<span
|
|
|
|
v-if="unseenCount"
|
|
|
|
class="badge badge-notification unseen-count"
|
|
|
|
>{{ unseenCount }}</span>
|
2018-08-28 13:14:32 +00:00
|
|
|
</div>
|
2019-07-05 07:17:44 +00:00
|
|
|
<button
|
|
|
|
v-if="unseenCount"
|
2020-11-24 10:32:42 +00:00
|
|
|
class="button-default read-button"
|
2019-07-05 07:17:44 +00:00
|
|
|
@click.prevent="markAsSeen"
|
|
|
|
>
|
|
|
|
{{ $t('notifications.read') }}
|
|
|
|
</button>
|
2021-03-01 14:21:35 +00:00
|
|
|
<NotificationFilters />
|
2017-02-24 16:53:53 +00:00
|
|
|
</div>
|
2018-03-31 18:14:36 +00:00
|
|
|
<div class="panel-body">
|
2019-07-05 07:17:44 +00:00
|
|
|
<div
|
2020-01-14 13:28:57 +00:00
|
|
|
v-for="notification in notificationsToDisplay"
|
2019-07-05 07:17:44 +00:00
|
|
|
:key="notification.id"
|
|
|
|
class="notification"
|
|
|
|
:class="{"unseen": !minimalMode && !notification.seen}"
|
|
|
|
>
|
|
|
|
<div class="notification-overlay" />
|
|
|
|
<notification :notification="notification" />
|
2016-11-27 18:44:56 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2021-03-11 13:14:30 +00:00
|
|
|
<div class="panel-footer notifications-footer">
|
2019-07-05 07:17:44 +00:00
|
|
|
<div
|
|
|
|
v-if="bottomedOut"
|
2021-03-08 17:18:43 +00:00
|
|
|
class="new-status-notification text-center faint"
|
2019-07-05 07:17:44 +00:00
|
|
|
>
|
|
|
|
{{ $t('notifications.no_more_notifications') }}
|
2019-01-29 19:04:52 +00:00
|
|
|
</div>
|
2020-11-24 10:32:42 +00:00
|
|
|
<button
|
2019-07-05 07:17:44 +00:00
|
|
|
v-else-if="!loading"
|
2020-11-26 16:25:21 +00:00
|
|
|
class="button-unstyled -link -fullwidth"
|
2019-07-05 07:17:44 +00:00
|
|
|
@click.prevent="fetchOlderNotifications()"
|
|
|
|
>
|
2021-03-08 17:18:43 +00:00
|
|
|
<div class="new-status-notification text-center">
|
2019-07-05 07:17:44 +00:00
|
|
|
{{ minimalMode ? $t('interactions.load_older') : $t('notifications.load_older') }}
|
2019-05-15 17:44:35 +00:00
|
|
|
</div>
|
2020-11-24 10:32:42 +00:00
|
|
|
</button>
|
2019-07-05 07:17:44 +00:00
|
|
|
<div
|
|
|
|
v-else
|
2021-03-11 13:14:30 +00:00
|
|
|
class="new-status-notification text-center"
|
2019-07-05 07:17:44 +00:00
|
|
|
>
|
2020-10-20 21:31:16 +00:00
|
|
|
<FAIcon
|
|
|
|
icon="circle-notch"
|
|
|
|
spin
|
|
|
|
size="lg"
|
|
|
|
/>
|
2019-01-29 19:04:52 +00:00
|
|
|
</div>
|
2018-08-12 11:14:34 +00:00
|
|
|
</div>
|
2016-11-27 18:44:56 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script src="./notifications.js"></script>
|
|
|
|
<style lang="scss" src="./notifications.scss"></style>
|