From 135965176dcbac9a875773b0fa915e3401224f3c Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Sat, 23 Apr 2022 17:52:21 +0200 Subject: [PATCH] Support for entity icon color change --- .../webapp/src/components/elements/Icon.vue | 7 +- .../src/components/elements/NameEditor.vue | 1 + .../src/components/panels/Entities/Index.vue | 2 +- .../src/components/panels/Entities/Modal.vue | 106 +++++++++++++++++- 4 files changed, 108 insertions(+), 8 deletions(-) diff --git a/platypush/backend/http/webapp/src/components/elements/Icon.vue b/platypush/backend/http/webapp/src/components/elements/Icon.vue index eb44fd603..e61c7a7d9 100644 --- a/platypush/backend/http/webapp/src/components/elements/Icon.vue +++ b/platypush/backend/http/webapp/src/components/elements/Icon.vue @@ -1,7 +1,8 @@ @@ -14,6 +15,10 @@ export default { url: { type: String, }, + color: { + type: String, + default: '', + }, alt: { type: String, default: '', diff --git a/platypush/backend/http/webapp/src/components/elements/NameEditor.vue b/platypush/backend/http/webapp/src/components/elements/NameEditor.vue index 8446b0431..73cf72899 100644 --- a/platypush/backend/http/webapp/src/components/elements/NameEditor.vue +++ b/platypush/backend/http/webapp/src/components/elements/NameEditor.vue @@ -7,6 +7,7 @@ + diff --git a/platypush/backend/http/webapp/src/components/panels/Entities/Index.vue b/platypush/backend/http/webapp/src/components/panels/Entities/Index.vue index d7b21e953..b177a79f5 100644 --- a/platypush/backend/http/webapp/src/components/panels/Entities/Index.vue +++ b/platypush/backend/http/webapp/src/components/panels/Entities/Index.vue @@ -246,8 +246,8 @@ export default { entity.name = event.entity?.name || this.entities[entityId]?.name entity.meta = { - ...(this.entities[entityId]?.meta || {}), ...(meta[event.entity.type] || {}), + ...(this.entities[entityId]?.meta || {}), ...(event.entity?.meta || {}), } diff --git a/platypush/backend/http/webapp/src/components/panels/Entities/Modal.vue b/platypush/backend/http/webapp/src/components/panels/Entities/Modal.vue index 5d041961f..4890f1654 100644 --- a/platypush/backend/http/webapp/src/components/panels/Entities/Modal.vue +++ b/platypush/backend/http/webapp/src/components/panels/Entities/Modal.vue @@ -13,9 +13,39 @@
-
Icon
-
- +
+ Icon + +
+
+ + + + + + Supported: image URLs or + FontAwesome icon classes. + + + + +
+
+ +
+
+ Icon color +
+
+ +
@@ -53,13 +83,15 @@