additional icon classes in metadata

This commit is contained in:
Yuri Kuznetsov
2025-04-23 10:03:57 +03:00
parent 8a8b800302
commit e2800c7dbf
5 changed files with 49 additions and 0 deletions

19
.idea/jsonSchemas.xml generated
View File

@@ -341,6 +341,25 @@
</SchemaInfo>
</value>
</entry>
<entry key="metadata/app/clientIcons">
<value>
<SchemaInfo>
<option name="generatedName" value="New Schema" />
<option name="name" value="metadata/app/clientIcons" />
<option name="relativePathToSchema" value="schema/metadata/app/clientIcons.json" />
<option name="schemaVersion" value="JSON Schema version 7" />
<option name="patterns">
<list>
<Item>
<option name="pattern" value="true" />
<option name="path" value="*/Resources/metadata/app/clientIcons.json" />
<option name="mappingKind" value="Pattern" />
</Item>
</list>
</option>
</SchemaInfo>
</value>
</entry>
<entry key="metadata/app/clientRecord">
<value>
<SchemaInfo>

View File

@@ -190,6 +190,12 @@
],
"url": "./schema/metadata/app/client.json"
},
{
"fileMatch": [
"*/Resources/metadata/app/clientIcons.json"
],
"url": "./schema/metadata/app/clientIcons.json"
},
{
"fileMatch": [
"*/Resources/metadata/app/clientRecord.json"

View File

@@ -0,0 +1,3 @@
{
"classList": []
}

View File

@@ -1611,6 +1611,8 @@ export default class extends ModalView {
"far fa-window-minimize",
"far fa-window-restore"
];
this.iconList.push(...this.getMetadata().get('app.clientIcons.classList', []));
}
// noinspection JSUnusedGlobalSymbols

View File

@@ -0,0 +1,19 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://www.espocrm.com/schema/metadata/app/clientIcons.json",
"title": "app/icons",
"description": "Client icons.",
"type": "object",
"properties": {
"classList": {
"description": "Icon classes.",
"type": "array",
"items": {
"anyOf": [
{"type": "string"},
{"enum": ["__APPEND__"]}
]
}
}
}
}