From cefc135869b551968d85ad13654357a6c1230a48 Mon Sep 17 00:00:00 2001 From: Ryan Meek <25127328+maykar@users.noreply.github.com> Date: Sat, 7 Nov 2020 18:13:03 -0500 Subject: [PATCH] Fix kiosk option --- kiosk-mode.js | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/kiosk-mode.js b/kiosk-mode.js index d7b8c6c..d77de30 100644 --- a/kiosk-mode.js +++ b/kiosk-mode.js @@ -65,13 +65,13 @@ function kiosk_mode() { hide_sidebar = queryStringsSet ? hide_sidebar : config.kiosk || config.hide_sidebar; if (adminConf && hass.user.is_admin) { - hide_header = adminConf.kiosk_mode || adminConf.hide_header; - hide_sidebar = adminConf.kiosk_mode || adminConf.hide_sidebar; + hide_header = adminConf.kiosk || adminConf.hide_header; + hide_sidebar = adminConf.kiosk || adminConf.hide_sidebar; } if (nonAdminConf && !hass.user.is_admin) { - hide_header = nonAdminConf.kiosk_mode || nonAdminConf.hide_header; - hide_sidebar = nonAdminConf.kiosk_mode || nonAdminConf.hide_sidebar; + hide_header = nonAdminConf.kiosk || nonAdminConf.hide_header; + hide_sidebar = nonAdminConf.kiosk || nonAdminConf.hide_sidebar; } if (userConf) { @@ -80,8 +80,9 @@ function kiosk_mode() { let users = conf.users; if (!Array.isArray(conf.users)) users = [users]; if (users.map((u) => u.toLowerCase().includes(hass.user.name.toLowerCase()))) { - hide_header = conf.kiosk_mode || conf.hide_header; - hide_sidebar = conf.kiosk_mode || conf.hide_sidebar; + console.log(conf.kiosk || conf.hide_header) + hide_header = conf.kiosk || conf.hide_header; + hide_sidebar = conf.kiosk || conf.hide_sidebar; } } }