mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-03-11 01:35:22 +01:00
Hide 'Connection established' when connection to server come back (#5352)
This commit is contained in:
parent
0a956fdc73
commit
16433dc183
1 changed files with 9 additions and 3 deletions
|
@ -391,10 +391,16 @@ if (window.Blazor) {
|
|||
$title.textContent = isConnected ? 'Connection established' : 'Connection interrupted';
|
||||
$body.innerHTML = isConnected ? '' : 'Please <a href="">refresh the page</a>.'; // use empty link on purpose
|
||||
$body.classList.toggle('d-none', isConnected);
|
||||
if (!isConnected && !isUnloading) {
|
||||
if (!isUnloading) {
|
||||
const toast = new bootstrap.Toast($status, { autohide: false });
|
||||
if (!toast.isShown())
|
||||
toast.show();
|
||||
if (isConnected) {
|
||||
if (toast.isShown())
|
||||
toast.hide();
|
||||
}
|
||||
else {
|
||||
if (!toast.isShown())
|
||||
toast.show();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue