forked from MapComplete/MapComplete
Merge develop
This commit is contained in:
commit
9b7052767a
49 changed files with 1744 additions and 1414 deletions
|
@ -22,6 +22,7 @@ import { QuestionableTagRenderingConfigJson } from "../src/Models/ThemeConfig/Js
|
|||
import Script from "./Script"
|
||||
import crypto from "crypto"
|
||||
import { RasterLayerProperties } from "../src/Models/RasterLayerProperties"
|
||||
|
||||
const sharp = require("sharp")
|
||||
|
||||
class GenerateLayouts extends Script {
|
||||
|
@ -172,7 +173,7 @@ class GenerateLayouts extends Script {
|
|||
const icons = []
|
||||
|
||||
const whiteIcons: string[] = []
|
||||
let icon = layout.icon
|
||||
const icon = layout.icon
|
||||
if (icon.endsWith(".svg") || icon.startsWith("<svg") || icon.startsWith("<?xml")) {
|
||||
// This is an svg. Lets create the needed pngs and do some checkes!
|
||||
|
||||
|
@ -582,7 +583,7 @@ class GenerateLayouts extends Script {
|
|||
const filename = "index_" + theme.id + ".ts"
|
||||
|
||||
const imports = [
|
||||
`import layout from "./public/assets/generated/themes/${theme.id}.json"`,
|
||||
`import theme from "./public/assets/generated/themes/${theme.id}.json"`,
|
||||
`import { ThemeMetaTagging } from "./src/assets/generated/metatagging/${theme.id}"`,
|
||||
]
|
||||
for (const layerName of Constants.added_by_default) {
|
||||
|
@ -595,10 +596,10 @@ class GenerateLayouts extends Script {
|
|||
const addLayers = []
|
||||
|
||||
for (const layerName of Constants.added_by_default) {
|
||||
addLayers.push(` layout.layers.push(<any> ${layerName})`)
|
||||
addLayers.push(` theme.layers.push(<any> ${layerName})`)
|
||||
}
|
||||
|
||||
let codeTemplate = this.codeTemplate.replace(
|
||||
const codeTemplate = this.codeTemplate.replace(
|
||||
" // LAYOUT.ADD_LAYERS",
|
||||
addLayers.join("\n")
|
||||
)
|
||||
|
|
|
@ -1,11 +1,10 @@
|
|||
import Script from "./Script"
|
||||
import { appendFileSync, readFileSync, writeFile, writeFileSync } from "fs"
|
||||
import { readFileSync, writeFileSync } from "fs"
|
||||
import { ChangeDescription } from "../src/Logic/Osm/Actions/ChangeDescription"
|
||||
import { Changes } from "../src/Logic/Osm/Changes"
|
||||
import { OsmObject } from "../src/Logic/Osm/OsmObject"
|
||||
import OsmObjectDownloader from "../src/Logic/Osm/OsmObjectDownloader"
|
||||
import { OsmConnection } from "../src/Logic/Osm/OsmConnection"
|
||||
import { ImmutableStore } from "../src/Logic/UIEventSource"
|
||||
import Constants from "../src/Models/Constants"
|
||||
|
||||
type ErrorMessage = {
|
||||
|
@ -130,11 +129,10 @@ ${changeset}`
|
|||
|
||||
const changesObj = new Changes(
|
||||
{
|
||||
dryRun: new ImmutableStore(true),
|
||||
osmConnection,
|
||||
reportError: (err) => console.error(err)
|
||||
},
|
||||
false,
|
||||
(err) => console.error(err)
|
||||
)
|
||||
|
||||
const all: ErrorMessage[] = []
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue