From b9bb79d24ca109ddf7352cc73fb4145e7a669dc3 Mon Sep 17 00:00:00 2001 From: seud0nym Date: Mon, 5 Oct 2020 20:21:13 +1100 Subject: [PATCH] Status icon colours match theme colour --- additional/broadband/www/cards/002_broadband.lp | 2 +- additional/gateway/www/cards/001_gateway.lp | 8 ++++---- build/common/170-Light-Theme | 5 ++--- build/common/175-Telstra-Theme | 1 + build/common/180-Night-Theme | 4 ++-- build/common/185-Theme-End | 3 +++ 6 files changed, 13 insertions(+), 10 deletions(-) diff --git a/additional/broadband/www/cards/002_broadband.lp b/additional/broadband/www/cards/002_broadband.lp index 2941662e..34401bf8 100644 --- a/additional/broadband/www/cards/002_broadband.lp +++ b/additional/broadband/www/cards/002_broadband.lp @@ -127,7 +127,7 @@ end html[#html+1] = ui_helper.createSimpleLight("1", "Mobile connected") end if tonumber(content_rpc.rx_bytes) and tonumber(content_rpc.tx_bytes) and tonumber(content_rpc.uptime) then - html[#html+1] = format(' %s %s %s/d', bytes2string(content_rpc.tx_bytes), bytes2string(content_rpc.rx_bytes), bytes2string((content_rpc.rx_bytes+content_rpc.tx_bytes)/(content_rpc.uptime/86400))) + html[#html+1] = format(' %s %s %s/d', bytes2string(content_rpc.tx_bytes), bytes2string(content_rpc.rx_bytes), bytes2string((content_rpc.rx_bytes+content_rpc.tx_bytes)/(content_rpc.uptime/86400))) end ngx.print(html) ngx.print('\ diff --git a/additional/gateway/www/cards/001_gateway.lp b/additional/gateway/www/cards/001_gateway.lp index 95d03a54..6b7963c5 100644 --- a/additional/gateway/www/cards/001_gateway.lp +++ b/additional/gateway/www/cards/001_gateway.lp @@ -65,10 +65,10 @@ local headerAttr = { '); ngx.print( ui_helper.createCardHeader(T(symbolv1), "modals/gateway-modal.lp", nil, nil, headerAttr) ); ngx.print('\
\   Version: '); ngx.print(content.name .. " (" .. content.version .. ")"); ngx.print('\ -   System Time: '); ngx.print(os.date("%d/%m/%Y %H:%M:%S",os.time())); ngx.print('\ -   Up: '); ngx.print(secondsToTime(content.uptime)); ngx.print('\ -   CPU Usage: '); ngx.print(content.cpu); ngx.print('% ['); ngx.print(content.load); ngx.print(']\ -   RAM: '); ngx.print(format('%.2f', content.ram_total / 1024)); ngx.print('MB ['); ngx.print(format('%.2f', content.ram_free / 1024)); ngx.print('MB Free]\ +   System Time: '); ngx.print(os.date("%d/%m/%Y %H:%M:%S",os.time())); ngx.print('\ +   Up: '); ngx.print(secondsToTime(content.uptime)); ngx.print('\ +   CPU Usage: '); ngx.print(content.cpu); ngx.print('% ['); ngx.print(content.load); ngx.print(']\ +   RAM: '); ngx.print(format('%.2f', content.ram_total / 1024)); ngx.print('MB ['); ngx.print(format('%.2f', content.ram_free / 1024)); ngx.print('MB Free]\
\ \ \ diff --git a/build/common/170-Light-Theme b/build/common/170-Light-Theme index 439640f0..0bfb7a67 100644 --- a/build/common/170-Light-Theme +++ b/build/common/170-Light-Theme @@ -1,9 +1,8 @@ if [ "$THEME" = "light" ]; then if [ $COLOR = monochrome ]; then - RGB_BTN=404040; RGB_HDR=eee; RGB_NAV=404040; RGB_SYM=018ed42b; RGB_GRAD_FROM=404040; RGB_GRAD_TO=404040; RGB_TXT=404040; RGB_HDR_TXT=$RGB_TXT; + RGB_BTN=404040; RGB_HDR=eee; RGB_NAV=404040; RGB_SYM=018ed42b; RGB_GRAD_FROM=404040; RGB_GRAD_TO=404040; RGB_TXT=404040; RGB_HDR_TXT=$RGB_TXT; RGB_STATUS_ICON=$RGB_NAV; else - RGB_TXT=fff - RGB_HDR_TXT=$RGB_HDR + RGB_TXT=fff; RGB_HDR_TXT=$RGB_HDR; RGB_STATUS_ICON=$RGB_HDR; fi sed \ -e "$ a a{color:#$RGB_NAV;}" \ diff --git a/build/common/175-Telstra-Theme b/build/common/175-Telstra-Theme index d295c141..01f4fd49 100644 --- a/build/common/175-Telstra-Theme +++ b/build/common/175-Telstra-Theme @@ -1,4 +1,5 @@ elif [ "$THEME" = "Telstra" ]; then + RGB_STATUS_ICON=3399cc; sed \ -e '$ a .card_bg:after{z-index:-20;}' \ -i /www/docroot/css/gw.css diff --git a/build/common/180-Night-Theme b/build/common/180-Night-Theme index ab197e42..7ac26b7c 100644 --- a/build/common/180-Night-Theme +++ b/build/common/180-Night-Theme @@ -1,8 +1,8 @@ elif [ "$THEME" = "night" ]; then if [ $COLOR = monochrome ]; then - RGB_BTN=272c30; RGB_HDR=272c30; RGB_NAV=0088cc; RGB_SYM=eeeeee0f; RGB_GRAD_FROM=272c30; RGB_GRAD_TO=272c30; RGB_TXT=fff; + RGB_BTN=272c30; RGB_HDR=272c30; RGB_NAV=0088cc; RGB_SYM=eeeeee0f; RGB_GRAD_FROM=272c30; RGB_GRAD_TO=272c30; RGB_TXT=fff; RGB_STATUS_ICON=$RGB_NAV; else - RGB_TXT=$RGB_HDR + RGB_TXT=$RGB_HDR; RGB_STATUS_ICON=$RGB_HDR; fi sed \ -e "$ a a{color:#$RGB_NAV;}" \ diff --git a/build/common/185-Theme-End b/build/common/185-Theme-End index 98da25eb..20f3d2a1 100644 --- a/build/common/185-Theme-End +++ b/build/common/185-Theme-End @@ -1,2 +1,5 @@ fi +sed \ + -e "$ a .status-icon{color:#$RGB_STATUS_ICON;}" \ + -i /www/docroot/css/gw.css