This commit is contained in:
Lurkars 2024-05-05 08:03:57 +02:00
parent 21aefb1710
commit 8386fa0245
10 changed files with 109 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.2 KiB

BIN
assets/icons/icon-72x72.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 674 B

BIN
assets/icons/icon-96x96.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 835 B

64
manifest.json Normal file
View File

@ -0,0 +1,64 @@
{
"name": "Role Playing Game Dices",
"short_name": "rgp-dices",
"start_url": "index.html",
"display": "standalone",
"background_color": "#ffffff",
"theme_color": "#ffffff",
"icons": [
{
"src": "/assets/icons/icon-72x72.png",
"type": "image/png",
"sizes": "72x72",
"purpose": "any"
},
{
"src": "/assets/icons/icon-96x96.png",
"type": "image/png",
"sizes": "96x96",
"purpose": "any"
},
{
"src": "/assets/icons/icon-128x128.png",
"type": "image/png",
"sizes": "128x128",
"purpose": "any"
},
{
"src": "/assets/icons/icon-144x144.png",
"type": "image/png",
"sizes": "144x144",
"purpose": "any"
},
{
"src": "/assets/icons/icon-144x144.png",
"type": "image/png",
"sizes": "144x144",
"purpose": "maskable"
},
{
"src": "/assets/icons/icon-152x152.png",
"type": "image/png",
"sizes": "152x152",
"purpose": "any"
},
{
"src": "/assets/icons/icon-192x192.png",
"type": "image/png",
"sizes": "192x192",
"purpose": "any"
},
{
"src": "/assets/icons/icon-384x384.png",
"type": "image/png",
"sizes": "384x384",
"purpose": "any"
},
{
"src": "/assets/icons/icon-512x512.png",
"type": "image/png",
"sizes": "512x512",
"purpose": "any"
}
]
}

45
sw.js Normal file
View File

@ -0,0 +1,45 @@
const rpgDicesVersion = "rpg-dices-v0.1"
const assets = [
"/",
"/index.html",
"/style.css",
"/script.js",
"/js/libs/moment.js",
"/js/libs/sidebar/sidebar.js",
"/js/libs/sidebar/sidebar.css",
"/assets/add.svg",
"/assets/close.svg",
"/assets/dark.svg",
"/assets/dices.svg",
"/assets/export.svg",
"/assets/history.svg",
"/assets/import.svg",
"/assets/light.svg",
"/assets/menu.svg",
"/assets/plus.svg",
"/assets/roll.svg",
"/assets/dices/4.svg",
"/assets/dices/6.svg",
"/assets/dices/8.svg",
"/assets/dices/10.svg",
"/assets/dices/12.svg",
"/assets/dices/20.svg",
"/assets/dices/100.svg",
"/assets/dices/custom.svg",
]
self.addEventListener("install", installEvent => {
installEvent.waitUntil(
caches.open(rpgDicesVersion).then(cache => {
cache.addAll(assets)
})
)
})
self.addEventListener("fetch", fetchEvent => {
fetchEvent.respondWith(
caches.match(fetchEvent.request).then(res => {
return res || fetch(fetchEvent.request)
})
)
})