mirror of
https://github.com/decolua/9router.git
synced 2026-05-08 12:01:28 +00:00
feat: cherry-pick PR #183 — multi-provider support, PWA, dynamic models, UI improvements
Cherry-picked from decolua/9router PR #183. Note: open-sse changes included but need further review due to extensive modifications. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
4
public/icons/icon-192.svg
Normal file
4
public/icons/icon-192.svg
Normal file
@@ -0,0 +1,4 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="192" height="192" viewBox="0 0 192 192">
|
||||
<rect width="192" height="192" rx="24" fill="#0a0a0a"/>
|
||||
<text x="96" y="120" font-family="Arial, sans-serif" font-size="80" font-weight="bold" fill="#ffffff" text-anchor="middle">9R</text>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 288 B |
4
public/icons/icon-512.svg
Normal file
4
public/icons/icon-512.svg
Normal file
@@ -0,0 +1,4 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 512 512">
|
||||
<rect width="512" height="512" rx="64" fill="#0a0a0a"/>
|
||||
<text x="256" y="320" font-family="Arial, sans-serif" font-size="200" font-weight="bold" fill="#ffffff" text-anchor="middle">9R</text>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 290 B |
BIN
public/providers/chutes.png
Normal file
BIN
public/providers/chutes.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.6 KiB |
22
public/sw.js
Normal file
22
public/sw.js
Normal file
@@ -0,0 +1,22 @@
|
||||
self.addEventListener('push', function (event) {
|
||||
if (event.data) {
|
||||
const data = event.data.json()
|
||||
const options = {
|
||||
body: data.body,
|
||||
icon: data.icon || '/icons/icon-192.svg',
|
||||
badge: '/icons/icon-192.svg',
|
||||
vibrate: [100, 50, 100],
|
||||
data: {
|
||||
dateOfArrival: Date.now(),
|
||||
primaryKey: '2',
|
||||
},
|
||||
}
|
||||
event.waitUntil(self.registration.showNotification(data.title, options))
|
||||
}
|
||||
})
|
||||
|
||||
self.addEventListener('notificationclick', function (event) {
|
||||
console.log('Notification click received.')
|
||||
event.notification.close()
|
||||
event.waitUntil(clients.openWindow('/'))
|
||||
})
|
||||
Reference in New Issue
Block a user