2016-11-27 18:44:56 +00:00
|
|
|
<template>
|
2022-07-31 09:35:48 +00:00
|
|
|
<teleport
|
|
|
|
:disabled="minimalMode || disableTeleport"
|
|
|
|
:to="teleportTarget"
|
|
|
|
>
|
2022-04-05 16:22:15 +00:00
|
|
|
<div
|
|
|
|
:class="{ minimal: minimalMode }"
|
|
|
|
class="Notifications"
|
2022-08-17 17:49:20 +00:00
|
|
|
ref="root"
|
2022-04-05 16:22:15 +00:00
|
|
|
>
|
|
|
|
<div :class="mainClass">
|
2019-07-05 07:17:44 +00:00
|
|
|
<div
|
2022-04-05 16:22:15 +00:00
|
|
|
v-if="!noHeading"
|
|
|
|
class="notifications-heading panel-heading -sticky"
|
2019-07-05 07:17:44 +00:00
|
|
|
>
|
2022-04-05 16:22:15 +00:00
|
|
|
<div class="title">
|
|
|
|
{{ $t('notifications.notifications') }}
|
|
|
|
<span
|
|
|
|
v-if="unseenCount"
|
|
|
|
class="badge badge-notification unseen-count"
|
|
|
|
>{{ unseenCount }}</span>
|
|
|
|
</div>
|
2022-08-17 17:49:20 +00:00
|
|
|
<button
|
|
|
|
v-if="showScrollTop"
|
|
|
|
class="button-unstyled scroll-to-top-button"
|
|
|
|
type="button"
|
|
|
|
@click="scrollToTop"
|
|
|
|
>
|
2022-08-24 19:31:48 +00:00
|
|
|
<FALayers class="fa-scale-110 fa-old-padding-layer">
|
|
|
|
<FAIcon icon="arrow-up" />
|
|
|
|
<FAIcon
|
|
|
|
icon="minus"
|
|
|
|
transform="up-7"
|
|
|
|
/>
|
|
|
|
</FALayers>
|
2022-08-17 17:49:20 +00:00
|
|
|
</button>
|
2022-04-05 16:22:15 +00:00
|
|
|
<button
|
|
|
|
v-if="unseenCount"
|
|
|
|
class="button-default read-button"
|
2022-08-17 17:49:20 +00:00
|
|
|
type="button"
|
2022-04-05 16:22:15 +00:00
|
|
|
@click.prevent="markAsSeen"
|
|
|
|
>
|
2022-08-17 18:34:56 +00:00
|
|
|
{{ $t('notifications.read') }}
|
2022-04-05 16:22:15 +00:00
|
|
|
</button>
|
|
|
|
<NotificationFilters />
|
2016-11-27 18:44:56 +00:00
|
|
|
</div>
|
2022-04-05 16:22:15 +00:00
|
|
|
<div class="panel-body">
|
|
|
|
<div
|
|
|
|
v-for="notification in notificationsToDisplay"
|
|
|
|
:key="notification.id"
|
|
|
|
class="notification"
|
2022-05-22 18:50:30 +00:00
|
|
|
:class="{unseen: !minimalMode && !notification.seen}"
|
2022-04-05 16:22:15 +00:00
|
|
|
>
|
|
|
|
<div class="notification-overlay" />
|
|
|
|
<notification :notification="notification" />
|
|
|
|
</div>
|
2019-01-29 19:04:52 +00:00
|
|
|
</div>
|
2022-04-25 20:50:22 +00:00
|
|
|
<div class="panel-footer">
|
2022-04-05 16:22:15 +00:00
|
|
|
<div
|
|
|
|
v-if="bottomedOut"
|
|
|
|
class="new-status-notification text-center faint"
|
|
|
|
>
|
|
|
|
{{ $t('notifications.no_more_notifications') }}
|
|
|
|
</div>
|
|
|
|
<button
|
|
|
|
v-else-if="!loading"
|
|
|
|
class="button-unstyled -link -fullwidth"
|
|
|
|
@click.prevent="fetchOlderNotifications()"
|
|
|
|
>
|
|
|
|
<div class="new-status-notification text-center">
|
|
|
|
{{ minimalMode ? $t('interactions.load_older') : $t('notifications.load_older') }}
|
|
|
|
</div>
|
|
|
|
</button>
|
|
|
|
<div
|
|
|
|
v-else
|
|
|
|
class="new-status-notification text-center"
|
|
|
|
>
|
|
|
|
<FAIcon
|
|
|
|
icon="circle-notch"
|
|
|
|
spin
|
|
|
|
size="lg"
|
|
|
|
/>
|
2019-05-15 17:44:35 +00:00
|
|
|
</div>
|
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>
|
2022-04-05 16:22:15 +00:00
|
|
|
</teleport>
|
2016-11-27 18:44:56 +00:00
|
|
|
</template>
|
|
|
|
|
|
|
|
<script src="./notifications.js"></script>
|
|
|
|
<style lang="scss" src="./notifications.scss"></style>
|