forked from MapComplete/MapComplete
Move default icon list into icons.json
This commit is contained in:
parent
15a1ab19cd
commit
32bd2a00b3
2 changed files with 9 additions and 7 deletions
|
@ -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);
|
||||
|
|
|
@ -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": {
|
||||
|
|
Loading…
Reference in a new issue