Skip to content

armgit / core

Public Imported from GitHub
0

100% open-source IoT Platform - Integrate your devices, add intelligence, build custom apps

UI updates: Remove smart-building placeholder

Rich Turnerecc3a11918c3
diff --git a/ui/app/realmA/smart-building/locales.json b/ui/app/realmA/smart-building/locales.json
deleted file mode 100644
index a12927d30..000000000
--- a/ui/app/realmA/smart-building/locales.json
+++ /dev/null
@@ -1,60 +0,0 @@
-{
- "en": {
- },
- "nl": {
- "Scenes": "Home",
- "Energy": "Start",
- "Security": "Veilig",
- "Climate": "Klimaat",
- "Settings": "Settings",
- "Log out": "Log uit",
- "All Smart": "Alles Slim",
- "At Home": "Thuis",
- "Away": "Weg",
- "Evening": "Avond",
- "Night": "Nacht",
- "Switch A": "Afwas",
- "Switch B": "Was",
- "Switch C": "Droger",
- "Now on": "Nu aan",
- "On at": "Aan om",
- "Ready at": "Klaar om",
- "tomorrow": "morgen",
- "Mode": "Mode",
- "Begin/end of cycle": "Begin/end of cycle",
- "Green": "Groen",
- "Usage today": "Huidig verbruik",
- "Zone & Battery": "Zon & Batterij",
- "Grid": "Netwerk",
- "Alarm": "Alarm",
- "Presence detected": "Activiteit",
- "No presence": "Geen Activiteit",
- "Kitchen": "Keuken",
- "Living Room": "Woonkamer",
- "Hallway": "Gang",
- "Bedroom": "Slaapkamer",
- "Bedroom 2": "Slaapkamer 2",
- "Bathroom": "Badkamer",
- "Ventilation": "Ventilatie",
- "Ventilation Mode": "Ventilation Mode",
- "Auto": "Auto",
- "Low": "Laag",
- "Medium": "Medium",
- "High": "Hoog",
- "Vacation": "Vakantie",
- "On vacation until": "Op vakantie tot",
- "Weekly Schedule": "Weekschema",
- "Monday": "Maandag",
- "Tuesday": "Dinsdag",
- "Wednesday": "Woensdag",
- "Thursday": "Donderdag",
- "Friday": "Vrijdag",
- "Saturday": "Zaterdag",
- "Sunday": "Zondag",
- "Scene start time": "Scene start time",
- "Scene Configuration": "Scene Configuratie",
- "Temperature": "Temperatuur",
- "Enabled": "Geactiveerd",
- "Scene": "Scene"
- }
-}
diff --git a/ui/app/realmA/smart-building/smart-home-body.html b/ui/app/realmA/smart-building/smart-home-body.html
deleted file mode 100644
index 39fce8977..000000000
--- a/ui/app/realmA/smart-building/smart-home-body.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<link rel="import" href="smart-building-component.html">
-<link rel="import" href="smart-building-style.html">
-
-<dom-module id="smart-building-body">
- <template>
- <style include="smart-building-style">
- </style>
-
- <slot></slot>
-
- </template>
-
- <script>
- class SmartBuildingBody extends SmartBuildingComponent {
- static get is() {
- return "smart-building-body";
- }
-
- ready() {
- super.ready();
- this.shadowRoot.host.classList.add("scroll", "layout", "vertical");
- }
- }
-
- defineAppElement(SmartBuildingBody, SmartBuildingBody.is, "SmartBuildingBody");
- </script>
-
-</dom-module>
diff --git a/ui/app/realmA/smart-building/smart-home-scenes.html b/ui/app/realmA/smart-building/smart-home-scenes.html
deleted file mode 100644
index fbf52c505..000000000
--- a/ui/app/realmA/smart-building/smart-home-scenes.html
+++ /dev/null
@@ -1,85 +0,0 @@
-<link rel="import" href="smart-building-component.html">
-<link rel="import" href="smart-building-style.html">
-<link rel="import" href="smart-building-section.html">
-<link rel="import" href="smart-building-smart.html">
-
-<dom-module id="smart-building-scenes">
- <template>
- <style include="smart-building-style">
-
- .sceneItem {
- font-weight: 600;
- width: 100px;
- height: 100px;
- margin: 10px;
- border-radius: 0.15em;
- cursor: pointer;
- -webkit-user-select: none;
- -moz-user-select: none;
- -ms-user-select: none;
- user-select: none;
- box-sizing: border-box;
- -moz-box-sizing: border-box;
- -webkit-box-sizing: border-box;
- background-color: var(--theme-darkgrey);
- color: var(--theme-white);
- }
-
- .sceneItem.selected {
- background-color: var(--theme-lightgrey);
- color: var(--theme-darkgrey);
- }
-
- .sceneItem.active {
- background-color: var(--theme-lightgreen);
- color: var(--theme-black);
- }
-
- </style>
-
- <smart-building-smart residence="[[residence]]"></smart-building-smart>
-
- <smart-building-section>
- <div class="layout horizontal center-center">
- <div id="HOME"
- class$="layout horizontal center-center sceneItem [[getItemClass(residence.attributes.lastExecutedScene.value, 'HOME')]]"
- on-click="switchScene">{{localize('At Home')}}</div>
- <div id="AWAY"
- class$="layout horizontal center-center sceneItem [[getItemClass(residence.attributes.lastExecutedScene.value, 'AWAY')]]"
- on-click="switchScene">{{localize('Away')}}</div>
- </div>
- <div class="layout horizontal center-center">
- <div id="EVENING"
- class$="layout horizontal center-center sceneItem [[getItemClass(residence.attributes.lastExecutedScene.value, 'EVENING')]]"
- on-click="switchScene">{{localize('Evening')}}</div>
- <div id="NIGHT"
- class$="layout horizontal center-center sceneItem [[getItemClass(residence.attributes.lastExecutedScene.value, 'NIGHT')]]"
- on-click="switchScene">{{localize('Night')}}</div>
- </div>
- </smart-building-section>
-
- </template>
-
- <script>
- class SmartBuildingScenes extends SmartBuildingComponent {
- static get is() {
- return "smart-building-scenes";
- }
-
- getItemClass(lastExecutedScene, item) {
- return lastExecutedScene === item ? "active" : "";
- }
-
- switchScene(e) {
- let sceneItem = Polymer.dom(e).localTarget;
- sceneItem.classList.add("selected");
- this.sendAttributeEvent(
- this.residence.id, sceneItem.id.toLowerCase() + "Scene", "REQUEST_START"
- );
- }
- }
-
- defineAppElement(SmartBuildingScenes, SmartBuildingScenes.is, "SmartBuildingScenes");
- </script>
-
-</dom-module>
diff --git a/ui/app/realmA/smart-building/smart-home-security.html b/ui/app/realmA/smart-building/smart-home-security.html
deleted file mode 100644
index 83fe14549..000000000
--- a/ui/app/realmA/smart-building/smart-home-security.html
+++ /dev/null
@@ -1,121 +0,0 @@
-<link rel="import" href="smart-building-component.html">
-<link rel="import" href="smart-building-style.html">
-<link rel="import" href="smart-building-section.html">
-<link rel="import" href="smart-building-smart.html">
-<link rel="import" href="/static/src/or-checkbox/or-checkbox.html">
-
-<dom-module id="smart-building-security">
- <template>
- <style include="smart-building-style">
-
- .alarm {
- margin: 10px 0;
- }
-
- .residencePresenceStatus {
- padding: 10px 20px;
- }
-
- .roomLabel {
- padding: 0 10px;
- }
-
- .presenceStatus {
- color: var(--theme-mediumgrey);
- }
-
- .roomPresenceStatusItem {
- margin: 10px 0;
- }
-
- </style>
-
- <smart-building-smart residence="[[residence]]"></smart-building-smart>
-
- <smart-building-section>
-
- <div class="layout horizontal center alarm">
- <template is="dom-if" if="[[residence.attributes.presenceDetected.value]]">
- <img height="80" src="smart-building/img/eye_large_active.png"/>
- </template>
- <template is="dom-if" if="[[!residence.attributes.presenceDetected.value]]">
- <img height="80" src="smart-building/img/eye_large.png"/>
- </template>
- <div class="flex layout vertical residencePresenceStatus">
- <div>[[localize('Alarm')]]</div>
- <div class="presenceStatus">
- [[computePresenceStatus(residence.attributes.presenceDetected.value)]]
- </div>
- </div>
- <div class="layout horizontal">
- <or-checkbox checked="[[residence.attributes.alarmEnabled.value]]"
- on-change="onAlarmEnabledChange"></or-checkbox>
- </div>
- </div>
-
- <div class="layout vertical">
- <template is="dom-repeat" items="[[roomsPresenceStatus]]">
- <div class="layout horizontal center roomPresenceStatusItem">
- <div class="layout vertical center-center">
- <img height="30" src="smart-building/img/eye.png"/>
- </div>
- <div class="flex layout horizontal roomLabel">
- [[localize(item.roomName)]]
- </div>
- <div class="presenceStatus">
- [[computePresenceStatus(item.presenceDetected)]]
- </div>
- </div>
- </template>
- </div>
-
- </smart-building-section>
-
- </template>
-
- <script>
- class SmartBuildingSecurity extends SmartBuildingComponent {
- static get is() {
- return "smart-building-security";
- }
-
- static get properties() {
- return {
- roomsPresenceStatus: {
- type: Array,
- computed: "computeRoomsPresenceStatus(rooms.*)"
- }
- }
- }
-
- onAlarmEnabledChange(e) {
- this.sendAttributeEvent(
- this.residence.id, "alarmEnabled", e.detail
- );
- }
-
- computePresenceStatus(presenceDetected) {
- return presenceDetected === true ? this.localize("Presence detected") : this.localize("No presence");
- }
-
- computeRoomsPresenceStatus(rooms) {
- let roomsPresenceStatus = [];
- if (!this.rooms)
- return roomsPresenceStatus;
- this.rooms.forEach(room => {
- if ("presenceDetected" in room.attributes) {
- roomsPresenceStatus.push({
- roomId: room.id,
- roomName: room.name,
- presenceDetected: room.attributes.presenceDetected.value
- });
- }
- })
- return roomsPresenceStatus;
- }
- }
-
- defineAppElement(SmartBuildingSecurity, SmartBuildingSecurity.is, "SmartBuildingSecurity");
- </script>
-
-</dom-module>
diff --git a/ui/app/realmA/smart-building/smart-home-style.html b/ui/app/realmA/smart-building/smart-home-style.html
deleted file mode 100644
index 0c8d00c0c..000000000
--- a/ui/app/realmA/smart-building/smart-home-style.html
+++ /dev/null
@@ -1,6 +0,0 @@
-<dom-module id="smart-building-style">
- <template>
- <style include="or-style">
- </style>
- </template>
-</dom-module>
\ No newline at end of file
diff --git a/ui/app/realmA/yarn.lock b/ui/app/realmA/yarn.lock
deleted file mode 100644
index fb57ccd13..000000000
--- a/ui/app/realmA/yarn.lock
+++ /dev/null
@@ -1,4 +0,0 @@
-# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
-# yarn lockfile v1
-
-