Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUGFIX] Resolves pages flickering & public key cursor on hover #146

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@
<td><?=htmlspecialchars(format_bytes($device['transfer_rx']))?></td>
<td><?=htmlspecialchars(format_bytes($device['transfer_tx']))?></td>
</tr>
<tr class="peer-entries">
<tr style="display: none;" class="peer-entries">
<td colspan="9">
<table class="table table-hover table-condensed">
<thead>
Expand Down Expand Up @@ -251,8 +251,6 @@
events.push(function() {
var peershidden = true;

hideClass('peer-entries', peershidden);

// Toggle peer visibility
$('#showpeers').click(function () {
peershidden = !peershidden;
Expand All @@ -270,4 +268,4 @@
<?php
include('wireguard/includes/wg_foot.inc');
include('foot.inc');
?>
?>
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@
?>
<tr ondblclick="document.location='<?="vpn_wg_peers_edit.php?peer={$peer_idx}"?>';" class="<?=wg_peer_status_class($peer)?>">
<td><?=htmlspecialchars(wg_truncate_pretty($peer['descr'], 16))?></td>
<td class="pubkey" title="<?=htmlspecialchars($peer['publickey'])?>">
<td style="cursor: pointer;" class="pubkey" title="<?=htmlspecialchars($peer['publickey'])?>">
<?=htmlspecialchars(wg_truncate_pretty($peer['publickey'], 16))?>
</td>
<td><?=htmlspecialchars($peer['tun'])?></td>
Expand Down Expand Up @@ -224,4 +224,4 @@
<?php
include('wireguard/includes/wg_foot.inc');
include('foot.inc');
?>
?>
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@
<table class="table table-hover table-striped table-condensed">
<thead>
<tr>
<th class="peer-entries"></th>
<th style="display: none;" class="peer-entries"></th>
<th><?=gettext("Name")?></th>
<th><?=gettext("Description")?></th>
<th><?=gettext("Public Key")?></th>
Expand All @@ -182,10 +182,10 @@
$peers = wg_tunnel_get_peers_config($tunnel['name']);
?>
<tr ondblclick="document.location='vpn_wg_tunnels_edit.php?tun=<?=$tunnel['name']?>';" class="<?=wg_tunnel_status_class($tunnel)?>">
<td class="peer-entries"><?=gettext('Interface')?></td>
<td style="display: none;" class="peer-entries"><?=gettext('Interface')?></td>
<td><?=htmlspecialchars($tunnel['name'])?></td>
<td><?=htmlspecialchars($tunnel['descr'])?></td>
<td class="pubkey" title="<?=htmlspecialchars($tunnel['publickey'])?>">
<td style="cursor: pointer;" class="pubkey" title="<?=htmlspecialchars($tunnel['publickey'])?>">
<?=htmlspecialchars(wg_truncate_pretty($tunnel['publickey'], 16))?>
</td>
<td><?=wg_generate_tunnel_address_popover_link($tunnel['name'])?></td>
Expand All @@ -201,7 +201,7 @@
</td>
</tr>

<tr class="peer-entries peerbg_color">
<tr style="display: none;" class="peer-entries peerbg_color">
<td><?=gettext("Peers")?></td>
<?php
if (count($peers) > 0):
Expand Down Expand Up @@ -278,8 +278,6 @@

var keyshidden = true;

hideClass('peer-entries', peershidden);

// Toggle peer visibility
$('#showpeers').click(function () {

Expand All @@ -302,4 +300,4 @@
<?php
include('wireguard/includes/wg_foot.inc');
include('foot.inc');
?>
?>