Better tag rewriting, add icons, add bicycle rental theme

This commit is contained in:
Pieter Vander Vennet 2022-01-29 02:45:59 +01:00
parent 1dcb3897e4
commit 9594868e83
23 changed files with 389 additions and 117 deletions

View file

@ -49,8 +49,26 @@ export default class SharedTagRenderings {
return
}
value.id = value.id ?? key;
if(value["builtin"] !== undefined){
if(value["override"] == undefined){
throw "HUH? Why whould you want to reuse a builtin if one doesn't override? In questions.json/"+key
}
if(typeof value["builtin"] !== "string"){
return;
}
// This is a really funny situation: we extend another tagRendering!
const parent = Utils.Clone(dict.get(value["builtin"]))
delete parent.id
Utils.Merge(value["override"], parent)
delete value["builtin"]
delete value["override"]
for (const pkey in parent) {
value[pkey] = parent[pkey]
}
}
})
return dict;
}