mirror of
https://github.com/lnbits/lnbits.git
synced 2025-09-29 21:32:38 +02:00
feat: improve PWA configuration (#2214)
--- PWA Errors: --- - fix logo size - add shortcut icon - add maskable icons - add desktop and phone screenshots (wide and narrow)
This commit is contained in:
@@ -359,9 +359,44 @@ async def manifest(request: Request, usr: str):
|
|||||||
if settings.lnbits_custom_logo
|
if settings.lnbits_custom_logo
|
||||||
else "https://cdn.jsdelivr.net/gh/lnbits/lnbits@main/docs/logos/lnbits.png"
|
else "https://cdn.jsdelivr.net/gh/lnbits/lnbits@main/docs/logos/lnbits.png"
|
||||||
),
|
),
|
||||||
|
"sizes": "512x512",
|
||||||
"type": "image/png",
|
"type": "image/png",
|
||||||
"sizes": "900x900",
|
},
|
||||||
}
|
{"src": "/static/favicon.ico", "sizes": "32x32", "type": "image/x-icon"},
|
||||||
|
{
|
||||||
|
"src": "/static/images/maskable_icon_x192.png",
|
||||||
|
"type": "image/png",
|
||||||
|
"sizes": "192x192",
|
||||||
|
"purpose": "maskable",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"src": "/static/images/maskable_icon_x512.png",
|
||||||
|
"type": "image/png",
|
||||||
|
"sizes": "512x512",
|
||||||
|
"purpose": "maskable",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"src": "/static/images/maskable_icon.png",
|
||||||
|
"type": "image/png",
|
||||||
|
"sizes": "1024x1024",
|
||||||
|
"purpose": "maskable",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
"screenshots": [
|
||||||
|
{
|
||||||
|
"src": "/static/images/screenshot_desktop.png",
|
||||||
|
"sizes": "2394x1314",
|
||||||
|
"type": "image/png",
|
||||||
|
"form_factor": "wide",
|
||||||
|
"label": "LNbits - Desktop screenshot",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"src": "/static/images/screenshot_phone.png",
|
||||||
|
"sizes": "1080x1739",
|
||||||
|
"type": "image/png",
|
||||||
|
"form_factor": "narrow",
|
||||||
|
"label": "LNbits - Phone screenshot",
|
||||||
|
},
|
||||||
],
|
],
|
||||||
"start_url": f"/wallet?usr={usr}&wal={user.wallets[0].id}",
|
"start_url": f"/wallet?usr={usr}&wal={user.wallets[0].id}",
|
||||||
"background_color": "#1F2234",
|
"background_color": "#1F2234",
|
||||||
@@ -375,6 +410,13 @@ async def manifest(request: Request, usr: str):
|
|||||||
"short_name": wallet.name,
|
"short_name": wallet.name,
|
||||||
"description": wallet.name,
|
"description": wallet.name,
|
||||||
"url": f"/wallet?usr={usr}&wal={wallet.id}",
|
"url": f"/wallet?usr={usr}&wal={wallet.id}",
|
||||||
|
"icons": [
|
||||||
|
{
|
||||||
|
"src": "/static/images/maskable_icon_x96.png",
|
||||||
|
"sizes": "96x96",
|
||||||
|
"type": "image/png",
|
||||||
|
}
|
||||||
|
],
|
||||||
}
|
}
|
||||||
for wallet in user.wallets
|
for wallet in user.wallets
|
||||||
],
|
],
|
||||||
|
BIN
lnbits/static/images/maskable_icon.png
Normal file
BIN
lnbits/static/images/maskable_icon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 15 KiB |
BIN
lnbits/static/images/maskable_icon_x192.png
Normal file
BIN
lnbits/static/images/maskable_icon_x192.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.3 KiB |
BIN
lnbits/static/images/maskable_icon_x512.png
Normal file
BIN
lnbits/static/images/maskable_icon_x512.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 6.0 KiB |
BIN
lnbits/static/images/maskable_icon_x96.png
Normal file
BIN
lnbits/static/images/maskable_icon_x96.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.2 KiB |
BIN
lnbits/static/images/screenshot_desktop.png
Normal file
BIN
lnbits/static/images/screenshot_desktop.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 96 KiB |
BIN
lnbits/static/images/screenshot_phone.png
Normal file
BIN
lnbits/static/images/screenshot_phone.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 118 KiB |
Reference in New Issue
Block a user