mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-15 05:34:53 +08:00
Merge pull request #8008 from aignatov-bio/ai-sci-11235-fixes-for-notifications
Fixes for notifications improvements [SCI-11235]
This commit is contained in:
commit
c12abc62ea
2 changed files with 14 additions and 7 deletions
|
@ -1,15 +1,17 @@
|
|||
<template>
|
||||
<div class="sci-navigation--notificaitons-flyout-notification">
|
||||
<div class="sci-navigation--notificaitons-flyout-notification hover:bg-sn-super-light-grey !px-2 !-mx-2">
|
||||
<div class="flex item-center">
|
||||
<a :href="lastBreadcrumbUrl" @click="toggleRead(true); closeFlyout()" class="hover:no-underline text-black hover:text-black grow">
|
||||
<div class="sci-navigation--notificaitons-flyout-notification-date">
|
||||
{{ notification.attributes.created_at }}
|
||||
</div>
|
||||
</a>
|
||||
<div class="ml-auto cursor-pointer" @click="toggleRead()">
|
||||
<div v-if="!notification.attributes.checked" class="w-2.5 h-2.5 bg-sn-coral rounded-full cursor-pointer"></div>
|
||||
<div v-else class="w-2.5 h-2.5 border-2 border-sn-grey rounded-full border-solid cursor-pointer"></div>
|
||||
<div v-else class="w-2.5 h-2.5 border-2 border-sn-grey rounded-full border-solid cursor-pointer hover:border-sn-coral"></div>
|
||||
</div>
|
||||
</div>
|
||||
<a :href="lastBreadcrumbUrl" @click="toggleRead(true)" class="hover:no-underline text-black hover:text-black">
|
||||
<a :href="lastBreadcrumbUrl" @click="toggleRead(true); closeFlyout()" class="hover:no-underline text-black hover:text-black">
|
||||
<div class="sci-navigation--notificaitons-flyout-notification-title"
|
||||
v-html="notification.attributes.title"
|
||||
:data-seen="notification.attributes.checked"></div>
|
||||
|
@ -42,6 +44,9 @@ export default {
|
|||
}
|
||||
},
|
||||
methods: {
|
||||
closeFlyout() {
|
||||
this.$emit('close');
|
||||
},
|
||||
toggleRead(check = false) {
|
||||
const params = {};
|
||||
if (!this.notification.attributes.checked || check) {
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
>
|
||||
{{ i18n.t('nav.notifications.read') }}
|
||||
</div>
|
||||
<div class="py-4 ml-auto cursor-pointer" @click="markAllNotificationsAsRead">
|
||||
<div v-if="activeTab !== 'read'" class="py-2 ml-auto cursor-pointer" @click="markAllNotificationsAsRead">
|
||||
{{ i18n.t('nav.notifications.read_all') }}
|
||||
</div>
|
||||
</div>
|
||||
|
@ -39,12 +39,14 @@
|
|||
</div>
|
||||
<NotificationItem v-for="notification in todayNotifications" :key="notification.type_of + '-' + notification.id"
|
||||
@updateNotification="updateNotification"
|
||||
@close="$emit('close')"
|
||||
:notification="notification" />
|
||||
<div class="sci-navigation--notificaitons-flyout-subtitle" v-if="olderNotifications.length">
|
||||
{{ i18n.t('nav.notifications.older') }}
|
||||
</div>
|
||||
<NotificationItem v-for="notification in olderNotifications" :key="notification.type_of + '-' + notification.id"
|
||||
@updateNotification="updateNotification"
|
||||
@close="$emit('close')"
|
||||
:notification="notification" />
|
||||
<div class="next-page-loader">
|
||||
<img src="/images/medium/loading.svg" v-if="loadingPage" />
|
||||
|
|
Loading…
Reference in a new issue