Merge branch 'develop'

This commit is contained in:
Fallenbagel
2022-05-21 06:43:52 +05:00
315 changed files with 29562 additions and 14858 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 134 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 372 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 407 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 384 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 421 KiB

View File

@@ -4,6 +4,7 @@
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#1f2937" />
<title>You are offline</title>

View File

@@ -90,8 +90,8 @@ self.addEventListener('push', (event) => {
if (payload.actionUrl){
options.actions.push(
{
action: 'viewmedia',
title: 'View Media',
action: 'view',
title: payload.actionUrlTitle ?? 'View',
}
);
}
@@ -119,21 +119,17 @@ self.addEventListener('notificationclick', (event) => {
event.notification.close();
if (event.action === 'viewmedia') {
clients.openWindow(notificationData.actionUrl);
} else if (event.action === 'approve') {
if (event.action === 'approve') {
fetch(`/api/v1/request/${notificationData.requestId}/approve`, {
method: 'POST',
});
clients.openWindow(notificationData.actionUrl);
} else if (event.action === 'decline') {
fetch(`/api/v1/request/${notificationData.requestId}/decline`, {
method: 'POST',
});
clients.openWindow(notificationData.actionUrl);
} else if (notificationData.actionUrl) {
}
if (notificationData.actionUrl) {
clients.openWindow(notificationData.actionUrl);
}
}, false);