fixed TM-171 jira task

This commit is contained in:
amirrezaghabeli
2025-10-01 14:11:53 +03:30
parent d42f477dcb
commit 006b421a9e
12 changed files with 69 additions and 17 deletions
+24
View File
@@ -12,3 +12,27 @@ firebase.initializeApp({
});
const messaging = firebase.messaging();
// Handle background messages
messaging.onBackgroundMessage(async (payload) => {
const notificationTitle = payload.notification.title;
const notificationOptions = {
body: payload.notification.body,
badge: '/icons/Icon-192.svg',
icon: '/icons/notification.svg',
data: payload.data,
click_action: payload.notification.click_action,
};
self.registration.showNotification(notificationTitle, notificationOptions);
});
// Open or focus the app when a notification is clicked
self.addEventListener('notificationclick', (event) => {
event.notification.close();
const targetUrl = 'https://app.opplens.com/notification';
event.waitUntil(
self.clients.openWindow(targetUrl)
);
});
+5
View File
@@ -0,0 +1,5 @@
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M10 5.36719V8.14219" stroke="#0164FF" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round"/>
<path d="M10.0171 1.66406C6.9504 1.66406 4.46707 4.1474 4.46707 7.21406V8.96406C4.46707 9.53073 4.23374 10.3807 3.94207 10.8641L2.88374 12.6307C2.23374 13.7224 2.68374 14.9391 3.88374 15.3391C7.86707 16.6641 12.1754 16.6641 16.1587 15.3391C17.2837 14.9641 17.7671 13.6474 17.1587 12.6307L16.1004 10.8641C15.8087 10.3807 15.5754 9.5224 15.5754 8.96406V7.21406C15.5671 4.16406 13.0671 1.66406 10.0171 1.66406Z" stroke="#0164FF" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round"/>
<path d="M12.7766 15.6797C12.7766 17.2047 11.5266 18.4547 10.0016 18.4547C9.24323 18.4547 8.54323 18.138 8.04323 17.638C7.54323 17.138 7.22656 16.438 7.22656 15.6797" stroke="#0164FF" stroke-width="1.5" stroke-miterlimit="10"/>
</svg>

After

Width:  |  Height:  |  Size: 938 B