Skip to content

Commit

Permalink
dyndns widget - fix cached IP status colors to standard values (opnse…
Browse files Browse the repository at this point in the history
…nse#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.
  • Loading branch information
opnsenseuser authored and fichtner committed Feb 1, 2019
1 parent c3d2972 commit cc6e6dd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions dns/dyndns/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
PLUGIN_NAME= dyndns
PLUGIN_VERSION= 1.12
PLUGIN_REVISION= 1
PLUGIN_COMMENT= Dynamic DNS Support
PLUGIN_MAINTAINER= [email protected]

Expand Down
8 changes: 4 additions & 4 deletions dns/dyndns/src/www/widgets/widgets/dyn_dns_status.widget.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,16 +64,16 @@
$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 {
Expand Down

0 comments on commit cc6e6dd

Please sign in to comment.