Merge branch 'develop' into feature/maproulette

This commit is contained in:
Robin van der Linde 2022-07-13 08:03:32 +00:00 committed by GitHub
commit 556ed6001f
5 changed files with 10 additions and 9 deletions

View file

@ -1,6 +1,8 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
viewBox="0 0 600 600"
width="600"
height="600"
version="1.1"
id="svg20"
sodipodi:docname="crossing.svg"

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 600 600">
<svg xmlns="http://www.w3.org/2000/svg" width="600" height="600" viewBox="0 0 600 600">
<rect fill="#750787" width="600" height="600" />
<rect fill="#004dff" width="500" height="600" />
<rect fill="#008026" width="400" height="600" />

Before

Width:  |  Height:  |  Size: 733 B

After

Width:  |  Height:  |  Size: 758 B

View file

@ -1,5 +1,5 @@
{
"name": "index",
"name": "MapComplete",
"short_name": "MapComplete",
"start_url": "index.html",
"lang": "en",

View file

@ -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(/<!-- THEME-SPECIFIC -->.*<!-- THEME-SPECIFIC-END-->/s, themeSpecific)
.replace(/<!-- DESCRIPTION START -->.*<!-- DESCRIPTION END -->/s, layout.shortDescription.textFor(targetLanguage))
.replace("<script src=\"./index.ts\"></script>", `<script src='./index_${layout.id}.ts'></script>`);
0
try {
output = output
.replace(/<!-- DECORATION 0 START -->.*<!-- DECORATION 0 END -->/s, `<img src='${icon}' width="100%" height="100%">`)
@ -320,10 +320,9 @@ async function main(): Promise<void> {
writeFile(manifestLocation, manif, err);
// Create a landing page for the given theme
createLandingPage(layout, manifest, whiteIcons, alreadyWritten).then(landing => {
const landing = await createLandingPage(layout, manifest, whiteIcons, alreadyWritten)
writeFile(enc(layout.id) + ".html", landing, err)
});
createIndexFor(layout)
await createIndexFor(layout)
}

View file

@ -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