diff --git a/platypush/backend/http/webapp/src/components/Nav.vue b/platypush/backend/http/webapp/src/components/Nav.vue index 649bf6ad1..3a551ed2a 100644 --- a/platypush/backend/http/webapp/src/components/Nav.vue +++ b/platypush/backend/http/webapp/src/components/Nav.vue @@ -6,7 +6,7 @@ @@ -66,6 +66,16 @@ export default { }, }, + computed: { + panelNames() { + let panelNames = Object.keys(this.panels) + const homeIdx = panelNames.indexOf('entities') + if (homeIdx >= 0) + return ['entities'].concat((panelNames.slice(0, homeIdx).concat(panelNames.slice(homeIdx+1))).sort()) + return panelNames.sort() + }, + }, + methods: { onItemClick(name) { this.$emit('select', name) diff --git a/platypush/backend/http/webapp/src/components/panels/Entities/Entity.vue b/platypush/backend/http/webapp/src/components/panels/Entities/Entity.vue new file mode 100644 index 000000000..dd2417981 --- /dev/null +++ b/platypush/backend/http/webapp/src/components/panels/Entities/Entity.vue @@ -0,0 +1,74 @@ + + + + + diff --git a/platypush/backend/http/webapp/src/components/panels/Entities/Index.vue b/platypush/backend/http/webapp/src/components/panels/Entities/Index.vue new file mode 100644 index 000000000..714928da1 --- /dev/null +++ b/platypush/backend/http/webapp/src/components/panels/Entities/Index.vue @@ -0,0 +1,242 @@ + + + + + diff --git a/platypush/backend/http/webapp/src/components/panels/Entities/Selector.vue b/platypush/backend/http/webapp/src/components/panels/Entities/Selector.vue new file mode 100644 index 000000000..3d737ae07 --- /dev/null +++ b/platypush/backend/http/webapp/src/components/panels/Entities/Selector.vue @@ -0,0 +1,198 @@ + + + + + diff --git a/platypush/backend/http/webapp/src/components/panels/Entities/Switch.vue b/platypush/backend/http/webapp/src/components/panels/Entities/Switch.vue new file mode 100644 index 000000000..e8fcf1c99 --- /dev/null +++ b/platypush/backend/http/webapp/src/components/panels/Entities/Switch.vue @@ -0,0 +1,53 @@ + + + + + diff --git a/platypush/backend/http/webapp/src/components/panels/Entities/meta.json b/platypush/backend/http/webapp/src/components/panels/Entities/meta.json new file mode 100644 index 000000000..e4eafd8f0 --- /dev/null +++ b/platypush/backend/http/webapp/src/components/panels/Entities/meta.json @@ -0,0 +1,33 @@ +{ + "entity": { + "name": "Entity", + "name_plural": "Entities", + "icon": { + "class": "fas fa-circle-question" + } + }, + + "device": { + "name": "Device", + "name_plural": "Devices", + "icon": { + "class": "fas fa-gear" + } + }, + + "switch": { + "name": "Switch", + "name_plural": "Switches", + "icon": { + "class": "fas fa-toggle-on" + } + }, + + "light": { + "name": "Light", + "name_plural": "Lights", + "icon": { + "class": "fas fa-lightbulb" + } + } +} diff --git a/platypush/backend/http/webapp/src/components/panels/Entities/vars.scss b/platypush/backend/http/webapp/src/components/panels/Entities/vars.scss new file mode 100644 index 000000000..388ce2595 --- /dev/null +++ b/platypush/backend/http/webapp/src/components/panels/Entities/vars.scss @@ -0,0 +1,2 @@ +$main-margin: 1em; +$selector-height: 2.5em; diff --git a/platypush/backend/http/webapp/src/style/items.scss b/platypush/backend/http/webapp/src/style/items.scss index ae1adf67c..db6e7b471 100644 --- a/platypush/backend/http/webapp/src/style/items.scss +++ b/platypush/backend/http/webapp/src/style/items.scss @@ -1,3 +1,5 @@ +$header-height: 3.5em; + .item { display: flex; align-items: center; diff --git a/platypush/backend/http/webapp/src/style/themes/light.scss b/platypush/backend/http/webapp/src/style/themes/light.scss index c7f621765..b3e793378 100644 --- a/platypush/backend/http/webapp/src/style/themes/light.scss +++ b/platypush/backend/http/webapp/src/style/themes/light.scss @@ -10,6 +10,7 @@ $default-bg-7: #e4e4e4 !default; $default-fg: black !default; $default-fg-2: #23513a !default; $default-fg-3: #195331b3 !default; +$header-bg: linear-gradient(0deg, #c0e8e4, #e4f8f4) !default; //// Notifications $notification-bg: rgba(185, 255, 193, 0.9) !default; @@ -51,6 +52,8 @@ $border-shadow-bottom: 0 3px 2px -1px $default-shadow-color; $border-shadow-left: -2.5px 0 4px 0 $default-shadow-color; $border-shadow-right: 2.5px 0 4px 0 $default-shadow-color; $border-shadow-bottom-right: 2.5px 2.5px 3px 0 $default-shadow-color; +$header-shadow: 0px 1px 3px 1px #bbb !default; +$group-shadow: 3px -2px 6px 1px #98b0a0; //// Modals $modal-header-bg: #e0e0e0 !default; @@ -141,5 +144,5 @@ $dropdown-shadow: 1px 1px 1px #bbb !default; //// Scrollbars $scrollbar-track-bg: $slider-bg !default; $scrollbar-track-shadow: inset 1px 0px 3px 0 $slider-track-shadow !default; -$scrollbar-thumb-bg: #50ca80 !default; +$scrollbar-thumb-bg: #a5a2a2 !default; diff --git a/platypush/backend/http/webapp/src/views/Panel.vue b/platypush/backend/http/webapp/src/views/Panel.vue index e143b04a9..78a6cdbe5 100644 --- a/platypush/backend/http/webapp/src/views/Panel.vue +++ b/platypush/backend/http/webapp/src/views/Panel.vue @@ -90,7 +90,7 @@ export default { initializeDefaultViews() { this.plugins.execute = {} - this.plugins.switches = {} + this.plugins.entities = {} }, },