fix reconnect toast taking space when no visible

isekai-main
Barış Soner Uşaklı 1 year ago
parent e4f8e5067e
commit 2d883cbb6f

@ -166,6 +166,7 @@ app = window.app || {};
reconnectEl.tooltip('dispose'); reconnectEl.tooltip('dispose');
reconnectEl.html('<i class="fa fa-check text-success"></i>'); reconnectEl.html('<i class="fa fa-check text-success"></i>');
reconnectAlert.removeClass('show'); reconnectAlert.removeClass('show');
setTimeout(() => reconnectAlert.addClass('hide'), 100);
reconnecting = false; reconnecting = false;
reJoinCurrentRoom(); reJoinCurrentRoom();
@ -202,7 +203,8 @@ app = window.app || {};
if (!reconnectEl.hasClass('active')) { if (!reconnectEl.hasClass('active')) {
reconnectEl.html('<i class="fa fa-spinner fa-spin"></i>'); reconnectEl.html('<i class="fa fa-spinner fa-spin"></i>');
reconnectAlert.addClass('show'); reconnectAlert.removeClass('hide');
setTimeout(() => reconnectAlert.addClass('show'), 100);
} }
reconnectEl.addClass('active').removeClass('hide').tooltip({ reconnectEl.addClass('active').removeClass('hide').tooltip({

@ -1,4 +1,4 @@
<div id="reconnect-alert" class="alert alert-dismissible alert-warning fade" component="toaster/toast"> <div id="reconnect-alert" class="alert alert-dismissible alert-warning fade hide" component="toaster/toast">
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-hidden="true"></button> <button type="button" class="btn-close" data-bs-dismiss="alert" aria-hidden="true"></button>
<p>[[global:reconnecting-message, {config.siteTitle}]]</p> <p>[[global:reconnecting-message, {config.siteTitle}]]</p>
</div> </div>
Loading…
Cancel
Save