mirror of
https://github.com/ngoduykhanh/wireguard-ui.git
synced 2025-04-19 19:59:13 +03:00
Ajustment to update the UI when a client got removed
This commit is contained in:
parent
43012a720c
commit
ea36311475
1 changed files with 3 additions and 3 deletions
|
@ -7,7 +7,6 @@ Wireguard Clients
|
|||
.paused-client {
|
||||
transition: transform .2s;
|
||||
cursor: pointer;
|
||||
vertical-align: middle;
|
||||
}
|
||||
i[class^="paused-client"]:hover { transform: scale(1.5); }
|
||||
</style>
|
||||
|
@ -27,7 +26,7 @@ Wireguard Clients
|
|||
<!-- <h5 class="mt-4 mb-2">Wireguard Clients</h5> -->
|
||||
<div class="row">
|
||||
{{range .clientDataList}}
|
||||
<div class="col-sm-6">
|
||||
<div class="col-sm-6" id="client_{{.Client.ID}}">
|
||||
<div class="info-box">
|
||||
<div class="overlay" id="paused_{{.Client.ID}}"
|
||||
{{if eq .Client.Enabled true}}style="visibility: hidden;" {{end}}>
|
||||
|
@ -196,7 +195,8 @@ Wireguard Clients
|
|||
success: function(data) {
|
||||
$('#modal_remove_client').modal('hide');
|
||||
toastr.success('Removed client successfully');
|
||||
// TODO: trigger reloading the dashboard
|
||||
var divElement = document.getElementById('client_' + client_id);
|
||||
divElement.style.display = "none";
|
||||
},
|
||||
error: function(jqXHR, exception) {
|
||||
var responseJson = jQuery.parseJSON(jqXHR.responseText);
|
||||
|
|
Loading…
Add table
Reference in a new issue