This commit is contained in:
Kostiantyn Stoliarskyi 2023-06-09 11:16:25 +03:00
parent 604a66fc0b
commit 0d64b9f2e9
6 changed files with 152654 additions and 3 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -40,7 +40,7 @@
<!-- prettier-ignore -->
<button id="dropdownNotificationButton" data-dropdown-toggle="dropdownNotification" class="inline-flex items-center text-sm font-medium text-center text-gray-500 hover:text-gray-900 focus:outline-none dark:hover:text-white dark:text-gray-400" type="button">
<svg class="w-6 h-6" aria-hidden="true" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <path d="M10 2a6 6 0 00-6 6v3.586l-.707.707A1 1 0 004 14h12a1 1 0 00.707-1.707L16 11.586V8a6 6 0 00-6-6zM10 18a3 3 0 01-3-3h6a3 3 0 01-3 3z"></path> </svg>
{% if current_user.notifications %}
{% if current_user.active_notifications %}
<div class="relative flex">
<div class="relative inline-flex w-3 h-3 bg-red-500 border-2 border-white rounded-full -top-2 right-3 dark:border-gray-900"></div>
</div>

View File

@ -32,3 +32,8 @@ def get_all():
),
page=pagination,
)
@bp.route('/mark_as_read',methods=["GET"])
@login_required
def mark_as_read():

View File

@ -0,0 +1,10 @@
export function activeNotifications() {
const notificationButton = document.querySelector(
'#dropdownNotificationButton',
);
if (notificationButton) {
notificationButton.addEventListener('click', () => {
console.log('CLICK');
});
}
}

View File

@ -35,6 +35,7 @@ import {initRefreshAccessLevelTree} from './refreshAccessLevelTree';
import {deleteContributor} from './deleteContributor';
import {initUnsavedChangedAlerts} from './unsavedChangedAlert';
import {initVersions} from './versions';
import {activeNotifications} from './activeNotifications';
initQuillReadOnly();
initBooks();
@ -73,3 +74,4 @@ initRefreshAccessLevelTree();
deleteContributor();
initUnsavedChangedAlerts();
initVersions();
activeNotifications();