-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
80 lines (76 loc) · 4.11 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Origin Trial Token -->
<meta http-equiv="origin-trial" content="AtgOYVRO5xlsm/3qCzZ701Hx8qTUrCUbFVML9Z8E9vELP5w9K9E73YWGBQc4Ivy0hGd+++sh7JUtKx+3EuV3ngkAAABeeyJvcmlnaW4iOiAiaHR0cHM6Ly9ibHVlYXBwaW8uZ2l0aHViLmlvOjQ0MyIsICJmZWF0dXJlIjogIldlYkJsdWV0b290aCIsICJleHBpcnkiOiAxNDc2ODE1NjAyfQ==" />
<title>Smart Light</title>
<link rel="stylesheet"
href="https://ajax.googleapis.com/ajax/libs/angular_material/1.1.0-rc4/angular-material.min.css">
<link rel="stylesheet" href="style.css">
</head>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.3/angular.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.3/angular-animate.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.3/angular-aria.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.3/angular-messages.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angular_material/1.1.0-rc4/angular-material.min.js"></script>
<script src="https://blueappio.github.io/blueapp.io/blueapp.io.min.js"></script>
<script src="smartlight.js"></script>
<script src="app.js"></script>
<body ng-app="smartLight" class="thing">
<div ng-controller="mainController as main" md-theme-watch="true">
<div class="layout-wrap layout-row flex-100" layout="row" flex="100" layout-wrap="">
<div layout="column" flex="100" flex-gt-sm="50" class="layout-column flex-gt-sm-50 flex-100">
<md-input-container>
<label>Light Name</label>
<input type="text" ng-model="smartlight.lightName" ng-change="lightNameChange()">
</md-input-container>
</div>
<div layout="column" flex="100" flex-gt-sm="50" class="layout-column flex-gt-sm-50 flex-100">
<md-input-container>
<label>Room Name</label>
<input type="text" ng-model="smartlight.roomName" ng-change="roomNameChange()">
</md-input-container>
</div>
</div>
<div class="layout-wrap layout-row flex-100" layout="row" flex="100" layout-wrap="">
<div layout="column" flex="100" flex-gt-sm="50" class="layout-column flex-gt-sm-50 flex-100">
<md-input-container>
<label>Group Name</label>
<input type="text" ng-model="smartlight.groupName" ng-change="groupNameChange()">
</md-input-container>
</div>
<div layout="column" flex="100" flex-gt-sm="50" class="layout-column flex-gt-sm-50 flex-100">
<md-input-container>
<label>Power Consume</label>
<input type="text" ng-model="smartlight.powerConsumed" ng-disabled="true" style="color:black;">
</md-input-container>
</div>
</div>
<div class="layout-wrap layout-row flex-100" layout="row" flex="100" layout-wrap="">
<div layout="column" flex="100" flex-gt-sm="50" class="layout-column flex-gt-sm-50 flex-100">
<span>DIM</span>
<md-slider min="0" max="255" ng-model="smartlight.dimValue" aria-label="red" id="red-slider" ng-value="0"
ng-change="dimSliderChange()" ng-disabled="smartlight.powerStatus==false" style="cursor:pointer">
</md-slider>
</div>
<div layout="column" flex="100" flex-gt-sm="50" class="layout-column flex-gt-sm-50 flex-100">
<md-list>
<md-list-item>
<p> Power Button : </p>
<md-switch ng-model="smartlight.powerStatus" aria-label="Switch 1" ng-change="toggleSmartLight()"
ng-disabled="smartlight.connected==false || powerChanged==false">
</md-switch>
</md-list-item>
</md-list>
</div>
</div>
<div layout="row" layout-align="start start" ng-hide="smartlight.connected">
<md-button class="md-raised connect-btn" ng-click="onConnect()" style="top: 20px;">
Connect
</md-button>
</div>
</div>
</body>
</html>