forked from MapComplete/MapComplete
Feature(pwa): add protocol handler
This commit is contained in:
parent
50c2abebdf
commit
de74a5dc08
4 changed files with 43 additions and 17 deletions
|
@ -168,6 +168,7 @@ class GenerateLayouts extends Script {
|
|||
manifest: any
|
||||
whiteIcons: string[]
|
||||
}> {
|
||||
const id = layout.id
|
||||
Translation.forcedLanguage = "en"
|
||||
const icons = []
|
||||
|
||||
|
@ -228,7 +229,7 @@ class GenerateLayouts extends Script {
|
|||
const manifest = {
|
||||
name: ogTitle,
|
||||
short_name: ogTitle,
|
||||
start_url: `${layout.id.toLowerCase()}.html`,
|
||||
start_url: `${id.toLowerCase()}.html`,
|
||||
lang: "en",
|
||||
display: "standalone",
|
||||
background_color: "#fff",
|
||||
|
@ -236,6 +237,12 @@ class GenerateLayouts extends Script {
|
|||
orientation: "portrait-primary, landscape-primary",
|
||||
icons: icons,
|
||||
categories: ["map", "navigation"],
|
||||
"protocol_handlers": [
|
||||
{
|
||||
"protocol": "geo",
|
||||
"url": `/${id.toLowerCase()}.html?geouri=%s`
|
||||
}
|
||||
]
|
||||
}
|
||||
return {
|
||||
manifest,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue