diff --git a/esphomeyaml/dashboard/dashboard.py b/esphomeyaml/dashboard/dashboard.py index 2f2b140682..3b5475a9aa 100644 --- a/esphomeyaml/dashboard/dashboard.py +++ b/esphomeyaml/dashboard/dashboard.py @@ -44,10 +44,10 @@ HASSIO_MQTT_CONFIG = {} # pylint: disable=abstract-method class BaseHandler(tornado.web.RequestHandler): def is_authenticated(self): - if not USING_HASSIO_AUTH and not USING_PASSWORD: - return True + if USING_HASSIO_AUTH or USING_PASSWORD: + return self.get_secure_cookie('authenticated') == 'yes' - return self.get_secure_cookie('authenticated') == 'yes' + return True # pylint: disable=abstract-method, arguments-differ @@ -59,7 +59,7 @@ class EsphomeyamlCommandWebSocket(tornado.websocket.WebSocketHandler): def on_message(self, message): if USING_HASSIO_AUTH or USING_PASSWORD: - if not self.get_secure_cookie('authenticated') == 'yes': + if self.get_secure_cookie('authenticated') != 'yes': return if self.proc is not None: return diff --git a/esphomeyaml/dashboard/static/favicon.ico b/esphomeyaml/dashboard/static/favicon.ico new file mode 100644 index 0000000000..5aaaf3fb24 Binary files /dev/null and b/esphomeyaml/dashboard/static/favicon.ico differ diff --git a/esphomeyaml/dashboard/templates/index.html b/esphomeyaml/dashboard/templates/index.html index e0c61e1a92..785649d795 100644 --- a/esphomeyaml/dashboard/templates/index.html +++ b/esphomeyaml/dashboard/templates/index.html @@ -17,6 +17,8 @@ + +