Fix custom themes

This commit is contained in:
pietervdvn 2022-01-27 20:37:22 +01:00
parent 2ce3ebe06a
commit ed7a109736

View file

@ -134,8 +134,8 @@ export default class DetermineLayout {
private static prepCustomTheme(json: any): LayoutConfigJson { private static prepCustomTheme(json: any): LayoutConfigJson {
const knownLayersDict = new Map<string, LayerConfigJson>() const knownLayersDict = new Map<string, LayerConfigJson>()
for (const key in known_layers["default"]) { for (const key in known_layers.layers) {
const layer = known_layers["default"][key] const layer = known_layers.layers[key]
knownLayersDict.set(layer.id, layer) knownLayersDict.set(layer.id, layer)
} }
const converState = { const converState = {
@ -159,6 +159,7 @@ export default class DetermineLayout {
let parsed = await Utils.downloadJson(link) let parsed = await Utils.downloadJson(link)
try { try {
parsed.id = link; parsed.id = link;
console.log("Loaded remote link:", link)
const layoutToUse = DetermineLayout.prepCustomTheme(parsed) const layoutToUse = DetermineLayout.prepCustomTheme(parsed)
return new LayoutConfig(layoutToUse, false) return new LayoutConfig(layoutToUse, false)
} catch (e) { } catch (e) {