mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-13 06:35:24 +03:00
Add maskable icon
This commit is contained in:
parent
242c254cce
commit
104d56af25
@ -33,7 +33,6 @@ def migrate(migrator, database, fake=False, **kwargs):
|
|||||||
migrator.add_fields(
|
migrator.add_fields(
|
||||||
User,
|
User,
|
||||||
notification_tokens=JSONField(default=[]),
|
notification_tokens=JSONField(default=[]),
|
||||||
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
BIN
web/public/images/maskable-badge.png
Normal file
BIN
web/public/images/maskable-badge.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.0 KiB |
@ -8,16 +8,11 @@ self.addEventListener("push", function (event) {
|
|||||||
// @ts-expect-error we know this exists
|
// @ts-expect-error we know this exists
|
||||||
self.registration.showNotification(data.title, {
|
self.registration.showNotification(data.title, {
|
||||||
body: data.message,
|
body: data.message,
|
||||||
icon: data.image,
|
icon: "/images/maskable-icon.png",
|
||||||
image: data.image,
|
image: data.image,
|
||||||
|
badge: "/images/maskable-badge.png",
|
||||||
tag: data.id,
|
tag: data.id,
|
||||||
data: { id: data.id, link: data.direct_url },
|
data: { id: data.id, link: data.direct_url },
|
||||||
actions: [
|
|
||||||
{
|
|
||||||
action: `view-${data.id}`,
|
|
||||||
title: "View",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
// pass
|
// pass
|
||||||
|
|||||||
@ -20,6 +20,12 @@
|
|||||||
"sizes": "180x180",
|
"sizes": "180x180",
|
||||||
"type": "image/png",
|
"type": "image/png",
|
||||||
"purpose": "maskable"
|
"purpose": "maskable"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"src": "/images/maskable-badge.png",
|
||||||
|
"sizes": "96x96",
|
||||||
|
"type": "image/png",
|
||||||
|
"purpose": "maskable"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"theme_color": "#ffffff",
|
"theme_color": "#ffffff",
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user