diff --git a/public/css/welcome.css b/public/css/welcome.css index 06795dad5..4cecdf756 100644 --- a/public/css/welcome.css +++ b/public/css/welcome.css @@ -186,6 +186,10 @@ body.big-avatars .welcomeRecent .recentChatList .recentChat .chatMessageContaine align-self: center; } +.welcomeRecent .recentChatList .showMoreChats.rotate { + transform: rotate(180deg); +} + @media screen and (max-width: 1000px) { .welcomePanel .welcomeShortcuts a span { display: none; diff --git a/public/scripts/welcome-screen.js b/public/scripts/welcome-screen.js index 6ad9a22a0..1dee39059 100644 --- a/public/scripts/welcome-screen.js +++ b/public/scripts/welcome-screen.js @@ -107,10 +107,11 @@ async function sendWelcomePanel() { const hiddenChats = fragment.querySelectorAll('.recentChat.hidden'); fragment.querySelectorAll('button.showMoreChats').forEach((button) => { button.addEventListener('click', () => { + const rotate = button.classList.contains('rotate'); hiddenChats.forEach((chatItem) => { - chatItem.classList.remove('hidden'); + chatItem.classList.toggle('hidden', rotate); }); - button.remove(); + button.classList.toggle('rotate', !rotate); }); }); fragment.querySelectorAll('button.openTemporaryChat').forEach((button) => {