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",
"version": "1.0.0",
"version": "1.0.2",
"description": "A server to control the Orvibo B25 range of smart sockets",
"main": "index.js",
"scripts": {

View File

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