From 90a190a2fd2c9bc614a841ae588d2b28046e5435 Mon Sep 17 00:00:00 2001 From: seud0nym Date: Sat, 12 Feb 2022 17:22:16 +1100 Subject: [PATCH] Fixed WireGuard card icon in Telstra themes --- .../src/wireguard/www/cards/004_WireGuard.lp | 21 ++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/extras/src/wireguard/www/cards/004_WireGuard.lp b/extras/src/wireguard/www/cards/004_WireGuard.lp index 4e9c0f83..9c838685 100644 --- a/extras/src/wireguard/www/cards/004_WireGuard.lp +++ b/extras/src/wireguard/www/cards/004_WireGuard.lp @@ -3,17 +3,27 @@ -- Enable localization gettext.textdomain('webui-core') -local wireguard_helper = require("wireguard_helper") -local ui_helper = require("web.ui_helper") +local ngx = ngx local session = ngx.ctx.session local modalPath = "/modals/wireguard-modal.lp" if session:hasAccess(modalPath) then + local wireguard_helper = require("wireguard_helper") + local ui_helper = require("web.ui_helper") + local TGU_Config = ngx.shared.TGU_Config + local theme = TGU_Config:get("THEME") or "" + if string.find(theme,"^telstra") then + ngx.print('') + end local html = wireguard_helper.getWireguardCardHTML() ngx.print('\
\
\ - '); ngx.print(ui_helper.createCardHeader(T"WireGuard",modalPath)); ngx.print('\ + ',ui_helper.createCardHeader(T"WireGuard",modalPath),'\
\
\ \ @@ -24,10 +34,7 @@ if session:hasAccess(modalPath) then \ \
\ -
\ - '); - ngx.print(html); - ngx.print('\ +
',html,'\
\
\
\