From 2d883cbb6f8c302c8d3a99fcf2ec102efd65f755 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Fri, 4 Aug 2023 11:42:46 -0400 Subject: [PATCH] fix reconnect toast taking space when no visible --- public/src/sockets.js | 4 +++- src/views/partials/reconnect-alert.tpl | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/public/src/sockets.js b/public/src/sockets.js index a523a29597..9e840ec513 100644 --- a/public/src/sockets.js +++ b/public/src/sockets.js @@ -166,6 +166,7 @@ app = window.app || {}; reconnectEl.tooltip('dispose'); reconnectEl.html(''); reconnectAlert.removeClass('show'); + setTimeout(() => reconnectAlert.addClass('hide'), 100); reconnecting = false; reJoinCurrentRoom(); @@ -202,7 +203,8 @@ app = window.app || {}; if (!reconnectEl.hasClass('active')) { reconnectEl.html(''); - reconnectAlert.addClass('show'); + reconnectAlert.removeClass('hide'); + setTimeout(() => reconnectAlert.addClass('show'), 100); } reconnectEl.addClass('active').removeClass('hide').tooltip({ diff --git a/src/views/partials/reconnect-alert.tpl b/src/views/partials/reconnect-alert.tpl index 50a6e1e330..343cf90beb 100644 --- a/src/views/partials/reconnect-alert.tpl +++ b/src/views/partials/reconnect-alert.tpl @@ -1,4 +1,4 @@ -
+

[[global:reconnecting-message, {config.siteTitle}]]

\ No newline at end of file