fix manifest

This commit is contained in:
callebtc 2022-11-04 15:40:29 +01:00
parent 359b8bc4d2
commit 9b83733029
3 changed files with 25 additions and 16 deletions

View File

@ -1,10 +1,7 @@
<q-expansion-item group="extras" icon="info" label="About"> <q-expansion-item group="extras" icon="info" label="About">
<q-card> <q-card>
<q-card-section> <q-card-section>
<p> <p>Create Cashu ecash mints and wallets.</p>
Make Ecash mints with peg in/out to a wallet, that can create and manage
ecash.
</p>
<small <small
>Created by >Created by
<a href="https://github.com/arcbtc" target="_blank">arcbtc</a>, <a href="https://github.com/arcbtc" target="_blank">arcbtc</a>,

View File

@ -180,6 +180,7 @@ page_container %}
<q-tabs <q-tabs
class="lt-md fixed-bottom left-0 right-0 bg-primary text-white shadow-2 z-top" class="lt-md fixed-bottom left-0 right-0 bg-primary text-white shadow-2 z-top"
active-class="px-0" active-class="px-0"
align="justify"
indicator-color="transparent" indicator-color="transparent"
> >
<q-tab <q-tab

View File

@ -23,9 +23,20 @@ async def index(request: Request, user: User = Depends(check_user_exists)):
) )
# @cashu_ext.get("/wallet")
# async def wallet(request: Request):
# return cashu_renderer().TemplateResponse("cashu/wallet.html", {"request": request})
@cashu_ext.get("/wallet") @cashu_ext.get("/wallet")
async def cashu(request: Request): async def wallet(request: Request, mint_id: str):
return cashu_renderer().TemplateResponse("cashu/wallet.html", {"request": request}) return cashu_renderer().TemplateResponse(
"cashu/wallet.html",
{
"request": request,
"web_manifest": f"/cashu/manifest/{mint_id}.webmanifest",
},
)
@cashu_ext.get("/mint/{mintID}") @cashu_ext.get("/mint/{mintID}")
@ -45,29 +56,29 @@ async def manifest(cashu_id: str):
) )
return { return {
"short_name": LNBITS_SITE_TITLE, "short_name": "Cashu wallet",
"name": cashu.name + " - " + LNBITS_SITE_TITLE, "name": cashu.name + " - " + "Cashu wallet",
"icons": [ "icons": [
{ {
"src": LNBITS_CUSTOM_LOGO "src": LNBITS_CUSTOM_LOGO
if LNBITS_CUSTOM_LOGO if LNBITS_CUSTOM_LOGO
else "https://cdn.jsdelivr.net/gh/lnbits/lnbits@0.3.0/docs/logos/lnbits.png", else "https://github.com/cashubtc/cashu-ui/raw/main/ui/icons/512x512.png",
"type": "image/png", "type": "image/png",
"sizes": "900x900", "sizes": "512x512",
} }
], ],
"start_url": "/cashu/" + cashu_id, "start_url": "/cashu/wallet?mint_id=" + cashu_id,
"background_color": "#1F2234", "background_color": "#1F2234",
"description": "Bitcoin Lightning tPOS", "description": "Cashu ecash wallet",
"display": "standalone", "display": "standalone",
"scope": "/cashu/" + cashu_id, "scope": "/cashu/wallet?mint_id=" + cashu_id,
"theme_color": "#1F2234", "theme_color": "#1F2234",
"shortcuts": [ "shortcuts": [
{ {
"name": cashu.name + " - " + LNBITS_SITE_TITLE, "name": cashu.name + " - " + "Cashu wallet",
"short_name": cashu.name, "short_name": cashu.name,
"description": cashu.name + " - " + LNBITS_SITE_TITLE, "description": cashu.name + " - " + "Cashu wallet",
"url": "/cashu/" + cashu_id, "url": "/cashu/wallet?mint_id=" + cashu_id,
} }
], ],
} }