Move default icon list into icons.json

This commit is contained in:
pietervdvn 2021-11-10 08:34:29 +01:00
parent 15a1ab19cd
commit 32bd2a00b3
2 changed files with 9 additions and 7 deletions

View file

@ -22,6 +22,7 @@ import Title from "../../UI/Base/Title";
import List from "../../UI/Base/List";
import Link from "../../UI/Base/Link";
import {Utils} from "../../Utils";
import * as icons from "../../assets/tagRenderings/icons.json"
export default class LayerConfig extends WithContextLoader {
@ -255,13 +256,7 @@ export default class LayerConfig extends WithContextLoader {
}
const titleIcons = [];
const defaultIcons = [
"phonelink",
"emaillink",
"wikipedialink",
"osmlink",
"sharelink",
];
const defaultIcons = icons.defaultIcons;
for (const icon of json.titleIcons ?? defaultIcons) {
if (icon === "defaults") {
titleIcons.push(...defaultIcons);

View file

@ -1,4 +1,11 @@
{
"defaultIcons": ["phonelink",
"emaillink",
"wikipedialink",
"osmlink",
"sharelink"
],
"wikipedialink": {
"render": "<a href='https://wikipedia.org/wiki/{wikipedia}' target='_blank'><img src='./assets/svg/wikipedia.svg' alt='WP'/></a>",
"condition": {