diff --git a/assets/themes/rainbow_crossings/crossing.svg b/assets/themes/rainbow_crossings/crossing.svg index 37304af0f3..468f421dd0 100644 --- a/assets/themes/rainbow_crossings/crossing.svg +++ b/assets/themes/rainbow_crossings/crossing.svg @@ -1,6 +1,8 @@ - + diff --git a/manifest.webmanifest b/manifest.webmanifest index 1e577af789..5679708fcb 100644 --- a/manifest.webmanifest +++ b/manifest.webmanifest @@ -1,5 +1,5 @@ { - "name": "index", + "name": "MapComplete", "short_name": "MapComplete", "start_url": "index.html", "lang": "en", diff --git a/scripts/generateLayouts.ts b/scripts/generateLayouts.ts index 546d26350b..1272117c52 100644 --- a/scripts/generateLayouts.ts +++ b/scripts/generateLayouts.ts @@ -165,7 +165,7 @@ async function createManifest(layout: LayoutConfig, alreadyWritten: string[]): P const ogDescr = Translations.T(layout.description ?? "").txt; const manifest = { - name: name, + name: ogTitle, short_name: ogTitle, start_url: `${layout.id.toLowerCase()}.html`, lang: "en", @@ -257,7 +257,7 @@ async function createLandingPage(layout: LayoutConfig, manifest, whiteIcons, alr .replace(/.*/s, themeSpecific) .replace(/.*/s, layout.shortDescription.textFor(targetLanguage)) .replace("", ``); - +0 try { output = output .replace(/.*/s, ``) @@ -320,10 +320,9 @@ async function main(): Promise { writeFile(manifestLocation, manif, err); // Create a landing page for the given theme - createLandingPage(layout, manifest, whiteIcons, alreadyWritten).then(landing => { - writeFile(enc(layout.id) + ".html", landing, err) - }); - createIndexFor(layout) + const landing = await createLandingPage(layout, manifest, whiteIcons, alreadyWritten) + writeFile(enc(layout.id) + ".html", landing, err) + await createIndexFor(layout) } diff --git a/service-worker.ts b/service-worker.ts index 56e006a4e1..d50009104b 100644 --- a/service-worker.ts +++ b/service-worker.ts @@ -71,7 +71,7 @@ self.addEventListener('fetch', event.respondWith(new Response(JSON.stringify({"service-worker-version": version}))); return } - const shouldBeCached = origin.host === requestUrl.host && origin.host !== "127.0.0.1:1234" && origin.host !== "localhost" && !origin.host.endsWith(".gitpod.io") + const shouldBeCached = origin.host === requestUrl.host && origin.hostname !== "127.0.0.1" && origin.hostname !== "localhost" && !origin.host.endsWith(".gitpod.io") if (!shouldBeCached) { console.log("Not intercepting ", requestUrl.toString(), origin.host, requestUrl.host) // We return _without_ calling event.respondWith, which signals the browser that it'll have to handle it himself