mirror of
https://github.com/netbirdio/plugins.git
synced 2026-05-22 18:44:07 -07:00
dyndns widget - fix cached IP status colors to standard values (#1139)
the ip color of the dyndns widget is now automatically adjusted for each theme. (text-success or text-warning). This results in a nicer overall picture and does not use another color value for green or red.
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
PLUGIN_NAME= dyndns
|
||||
PLUGIN_VERSION= 1.12
|
||||
PLUGIN_REVISION= 1
|
||||
PLUGIN_COMMENT= Dynamic DNS Support
|
||||
PLUGIN_MAINTAINER= franco@opnsense.org
|
||||
|
||||
|
||||
@@ -64,16 +64,16 @@ if (!empty($_REQUEST['getdyndnsstatus'])) {
|
||||
$cached_ip_s = explode('|', $fdata);
|
||||
$cached_ip = $cached_ip_s[0];
|
||||
echo sprintf(
|
||||
'<font color="%s">%s</font>',
|
||||
$ipaddr != $cached_ip ? 'red' : 'green',
|
||||
'<span class="%s">%s</span>',
|
||||
$ipaddr != $cached_ip ? 'text-warning' : 'text-success',
|
||||
htmlspecialchars($cached_ip)
|
||||
);
|
||||
} elseif (!empty($fdata6)) {
|
||||
$cached_ipv6_s = explode('|', $fdata6);
|
||||
$cached_ipv6 = $cached_ipv6_s[0];
|
||||
echo sprintf(
|
||||
'<font color="%s">%s</font>',
|
||||
$ipv6addr != $cached_ipv6 ? 'red' : 'green',
|
||||
'<span class="%s">%s</span>',
|
||||
$ipv6addr != $cached_ipv6 ? 'text-warning' : 'text-success',
|
||||
htmlspecialchars($cached_ipv6)
|
||||
);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user