diff --git a/platypush/backend/http/webapp/src/components/panels/Entities/Device.vue b/platypush/backend/http/webapp/src/components/panels/Entities/Device.vue new file mode 100644 index 00000000..91fe95f3 --- /dev/null +++ b/platypush/backend/http/webapp/src/components/panels/Entities/Device.vue @@ -0,0 +1,37 @@ + + + + + diff --git a/platypush/backend/http/webapp/src/components/panels/Entities/Entity.vue b/platypush/backend/http/webapp/src/components/panels/Entities/Entity.vue index 2b44f1ba..a64d52c7 100644 --- a/platypush/backend/http/webapp/src/components/panels/Entities/Entity.vue +++ b/platypush/backend/http/webapp/src/components/panels/Entities/Entity.vue @@ -1,12 +1,33 @@ @@ -22,10 +43,28 @@ export default { data() { return { component: null, + collapsed: true, justUpdated: false, } }, + computed: { + computedChildren() { + return Object.values(this.children || {}).filter((child) => child) + }, + + hasChildren() { + return !!this.computedChildren.length + }, + + isCollapsed() { + if (!this.hasChildren) + return true + + return this.collapsed + }, + }, + methods: { valuesEqual(a, b) { a = {...a} @@ -68,10 +107,47 @@ export default {