Merge pull request #10 from karl0ss/NoPlugMessage

no plugs
This commit is contained in:
Karl Hudgell 2019-07-17 08:59:38 +01:00 committed by GitHub
commit 3d8935c5a6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 17 additions and 13 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "orvibo-b25-server-kex", "name": "orvibo-b25-server-kex",
"version": "1.0.0", "version": "1.0.2",
"description": "A server to control the Orvibo B25 range of smart sockets", "description": "A server to control the Orvibo B25 range of smart sockets",
"main": "index.js", "main": "index.js",
"scripts": { "scripts": {

View File

@ -2,15 +2,19 @@ extends default
block content block content
div.container div.container
each socket in sockets if sockets.length <= 0
div.socket h2.socket-name
h2.socket-name | No Plugs Found
| #{socket.name} else
h2.socket-name each socket in sockets
| #{socket.uid} div.socket
if socket.state === 'OFF' h2.socket-name
a.button-off(href=`/?uid=${socket.uid}`) | #{socket.name}
| #{socket.state} h2.socket-name
else | #{socket.uid}
a.button-on(href=`/?uid=${socket.uid}`) if socket.state === 'OFF'
| #{socket.state} a.button-off(href=`/?uid=${socket.uid}`)
| #{socket.state}
else
a.button-on(href=`/?uid=${socket.uid}`)
| #{socket.state}