mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-03-12 10:30:47 +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,11 +391,17 @@ if (window.Blazor) {
|
||||||
$title.textContent = isConnected ? 'Connection established' : 'Connection interrupted';
|
$title.textContent = isConnected ? 'Connection established' : 'Connection interrupted';
|
||||||
$body.innerHTML = isConnected ? '' : 'Please <a href="">refresh the page</a>.'; // use empty link on purpose
|
$body.innerHTML = isConnected ? '' : 'Please <a href="">refresh the page</a>.'; // use empty link on purpose
|
||||||
$body.classList.toggle('d-none', isConnected);
|
$body.classList.toggle('d-none', isConnected);
|
||||||
if (!isConnected && !isUnloading) {
|
if (!isUnloading) {
|
||||||
const toast = new bootstrap.Toast($status, { autohide: false });
|
const toast = new bootstrap.Toast($status, { autohide: false });
|
||||||
|
if (isConnected) {
|
||||||
|
if (toast.isShown())
|
||||||
|
toast.hide();
|
||||||
|
}
|
||||||
|
else {
|
||||||
if (!toast.isShown())
|
if (!toast.isShown())
|
||||||
toast.show();
|
toast.show();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
delay(durationMilliseconds) {
|
delay(durationMilliseconds) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue