2016-11-28 03:44:56 +09:00
|
|
|
<template>
|
2022-07-31 18:35:48 +09:00
|
|
|
<teleport
|
|
|
|
:disabled="minimalMode || disableTeleport"
|
|
|
|
:to="teleportTarget"
|
|
|
|
>
|
2022-11-08 14:37:22 +09:00
|
|
|
<component
|
|
|
|
:is="noHeading ? 'div' : 'aside'"
|
2022-08-25 04:46:41 +09:00
|
|
|
ref="root"
|
2022-04-06 01:22:15 +09:00
|
|
|
:class="{ minimal: minimalMode }"
|
|
|
|
class="Notifications"
|
|
|
|
>
|
|
|
|
<div :class="mainClass">
|
2019-07-05 16:17:44 +09:00
|
|
|
<div
|
2022-04-06 01:22:15 +09:00
|
|
|
v-if="!noHeading"
|
|
|
|
class="notifications-heading panel-heading -sticky"
|
2019-07-05 16:17:44 +09:00
|
|
|
>
|
2022-04-06 01:22:15 +09:00
|
|
|
<div class="title">
|
|
|
|
{{ $t('notifications.notifications') }}
|
|
|
|
<span
|
2023-08-19 10:07:48 +09:00
|
|
|
v-if="unseenCountBadgeText"
|
2022-04-06 01:22:15 +09:00
|
|
|
class="badge badge-notification unseen-count"
|
2023-08-19 10:07:48 +09:00
|
|
|
>{{ unseenCountBadgeText }}</span>
|
2022-04-06 01:22:15 +09:00
|
|
|
</div>
|
2022-09-29 03:34:53 +09:00
|
|
|
<div
|
2022-08-18 02:49:20 +09:00
|
|
|
v-if="showScrollTop"
|
2022-11-22 05:17:33 +09:00
|
|
|
class="rightside-button"
|
2022-08-18 02:49:20 +09:00
|
|
|
>
|
2022-09-29 03:34:53 +09:00
|
|
|
<button
|
|
|
|
class="button-unstyled scroll-to-top-button"
|
|
|
|
type="button"
|
2022-10-18 03:50:37 +09:00
|
|
|
:title="$t('general.scroll_to_top')"
|
2022-09-29 03:34:53 +09:00
|
|
|
@click="scrollToTop"
|
|
|
|
>
|
|
|
|
<FALayers class="fa-scale-110 fa-old-padding-layer">
|
|
|
|
<FAIcon icon="arrow-up" />
|
|
|
|
<FAIcon
|
|
|
|
icon="minus"
|
|
|
|
transform="up-7"
|
|
|
|
/>
|
|
|
|
</FALayers>
|
|
|
|
</button>
|
|
|
|
</div>
|
2022-04-06 01:22:15 +09:00
|
|
|
<button
|
|
|
|
v-if="unseenCount"
|
|
|
|
class="button-default read-button"
|
2022-08-18 02:49:20 +09:00
|
|
|
type="button"
|
2022-04-06 01:22:15 +09:00
|
|
|
@click.prevent="markAsSeen"
|
|
|
|
>
|
2022-08-18 03:34:56 +09:00
|
|
|
{{ $t('notifications.read') }}
|
2022-04-06 01:22:15 +09:00
|
|
|
</button>
|
2022-10-10 00:50:13 +09:00
|
|
|
<NotificationFilters class="rightside-button" />
|
2016-11-28 03:44:56 +09:00
|
|
|
</div>
|
2022-11-08 14:43:33 +09:00
|
|
|
<div
|
|
|
|
class="panel-body"
|
2022-11-09 00:34:38 +09:00
|
|
|
role="feed"
|
2022-11-08 14:43:33 +09:00
|
|
|
>
|
2023-08-14 12:57:34 +09:00
|
|
|
<div
|
|
|
|
v-if="showExtraNotifications"
|
|
|
|
role="listitem"
|
|
|
|
class="notification"
|
|
|
|
>
|
|
|
|
<extra-notifications />
|
|
|
|
</div>
|
2022-04-06 01:22:15 +09:00
|
|
|
<div
|
|
|
|
v-for="notification in notificationsToDisplay"
|
|
|
|
:key="notification.id"
|
2022-11-08 14:43:33 +09:00
|
|
|
role="listitem"
|
2022-04-06 01:22:15 +09:00
|
|
|
class="notification"
|
2022-05-23 03:50:30 +09:00
|
|
|
:class="{unseen: !minimalMode && !notification.seen}"
|
2023-11-14 00:29:25 +09:00
|
|
|
@click="e => notificationClicked(notification)"
|
2022-04-06 01:22:15 +09:00
|
|
|
>
|
|
|
|
<div class="notification-overlay" />
|
2023-11-14 00:29:25 +09:00
|
|
|
<notification
|
|
|
|
:notification="notification"
|
|
|
|
@interacted="e => notificationInteracted(notification)"
|
|
|
|
/>
|
2022-04-06 01:22:15 +09:00
|
|
|
</div>
|
2019-01-30 04:04:52 +09:00
|
|
|
</div>
|
2022-04-26 05:50:22 +09:00
|
|
|
<div class="panel-footer">
|
2022-04-06 01:22:15 +09: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-16 02:44:35 +09:00
|
|
|
</div>
|
2019-01-30 04:04:52 +09:00
|
|
|
</div>
|
2018-08-12 20:14:34 +09:00
|
|
|
</div>
|
2022-11-08 14:37:22 +09:00
|
|
|
</component>
|
2022-04-06 01:22:15 +09:00
|
|
|
</teleport>
|
2016-11-28 03:44:56 +09:00
|
|
|
</template>
|
|
|
|
|
|
|
|
<script src="./notifications.js"></script>
|
|
|
|
<style lang="scss" src="./notifications.scss"></style>
|