Small fixes in CustomGenerator; artworkmap is now a json-preset

This commit is contained in:
Pieter Vander Vennet 2020-08-25 02:12:26 +02:00
parent c8b2dab669
commit 1cdf2ee9bc
9 changed files with 224 additions and 150 deletions

View file

@ -62,14 +62,19 @@ export class MoreScreen extends UIElement {
}
if (layout.name === CustomLayout.NAME) {
continue;
continue;
}
const currentLocation = State.state.locationControl.data;
const linkText =
`https://pietervdvn.github.io/MapComplete/${layout.name}.html?z=${currentLocation.zoom}&lat=${currentLocation.lat}&lon=${currentLocation.lon}`
let linkText =
`./${layout.name}.html?z=${currentLocation.zoom}&lat=${currentLocation.lat}&lon=${currentLocation.lon}`
if (location.hostname === "localhost" || location.hostname === "127.0.0.1") {
linkText = `./index.html?layout=${layout.name}&z=${currentLocation.zoom}&lat=${currentLocation.lat}&lon=${currentLocation.lon}`
}
let description = Translations.W(layout.description);
if(description !== undefined){
if (description !== undefined) {
description = new Combine(["<br/>", description]);
}
const link =