]> git.ipfire.org Git - people/mfischer/ipfire-2.x.git/commitdiff
ovpnmain.cgi: Fix connection status colours
authorMichael Tremer <michael.tremer@ipfire.org>
Wed, 7 Aug 2024 13:45:24 +0000 (15:45 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Wed, 7 Aug 2024 13:45:24 +0000 (15:45 +0200)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
html/cgi-bin/ovpnmain.cgi
html/html/themes/ipfire/include/css/style.css

index 5cf2f5eab0117205904ed2bc6fd841ce32c472e6..b89fe432da681e6238a4833fa9ad3d59e5bb01e3 100755 (executable)
@@ -5462,12 +5462,12 @@ END
        print "</td>";
        print "<td align='center' nowrap='nowrap' $col>" . $Lang::tr{"$confighash{$key}[3]"} . " (" . $Lang::tr{"$confighash{$key}[4]"} . ")</td>";
        print "<td align='center' $col>$confighash{$key}[25]</td>";
-       $col1="bgcolor='${Header::colourred}'";
-       my $active = "<b><font color='#FFFFFF'>$Lang::tr{'capsclosed'}</font></b>";
+       $col1="class='status is-disconnected'";
+       my $active = "$Lang::tr{'capsclosed'}";
 
        if ($confighash{$key}[0] eq 'off') {
-               $col1="bgcolor='${Header::colourblue}'";
-               $active = "<b><font color='#FFFFFF'>$Lang::tr{'capsclosed'}</font></b>";
+               $col1="class='status is-disabled'";
+               $active = "$Lang::tr{'capsclosed'}";
        } else {
 
 ###
@@ -5498,11 +5498,11 @@ END
 ####
 
                if (($tustate[1] eq 'CONNECTED') || ($tustate[1] eq 'WAIT')) {
-                       $col1="bgcolor='${Header::colourgreen}'";
-                       $active = "<b><font color='#FFFFFF'>$Lang::tr{'capsopen'}</font></b>";
+                       $col1="class='status is-connected'";
+                       $active = "$Lang::tr{'capsopen'}";
                }else {
-                       $col1="bgcolor='${Header::colourred}'";
-                       $active = "<b><font color='#FFFFFF'>$tustate[1]</font></b>";
+                       $col1="class='status is-disconnected'";
+                       $active = "$tustate[1]";
                }
            }
            }
@@ -5518,8 +5518,8 @@ END
                                        $cn = $match[1];
                                }
                                if ($cn eq "$confighash{$key}[2]") {
-                                       $col1="bgcolor='${Header::colourgreen}'";
-                                       $active = "<b><font color='#FFFFFF'>$Lang::tr{'capsopen'}</font></b>";
+                                       $col1="class='status is-connected'";
+                                       $active = "$Lang::tr{'capsopen'}";
                                }
                        }
                }
index 5b1f84b3e984bc385e4a63b1fcf7a31527875f87..2d4338892f4001698ca875f0eaefe4f7471ac106 100644 (file)
@@ -392,7 +392,7 @@ table {
        color: var(--color-green-invert);
 }
 
-.tbl .status.is-stopped {
+.tbl .status.is-stopped, .tbl .status.is-disconnected {
        background-color: var(--color-red);
        color: var(--color-red-invert);