mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Add rotation effect to "Show More Chats" button and toggle visibility of hidden chats
This commit is contained in:
@@ -186,6 +186,10 @@ body.big-avatars .welcomeRecent .recentChatList .recentChat .chatMessageContaine
|
|||||||
align-self: center;
|
align-self: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.welcomeRecent .recentChatList .showMoreChats.rotate {
|
||||||
|
transform: rotate(180deg);
|
||||||
|
}
|
||||||
|
|
||||||
@media screen and (max-width: 1000px) {
|
@media screen and (max-width: 1000px) {
|
||||||
.welcomePanel .welcomeShortcuts a span {
|
.welcomePanel .welcomeShortcuts a span {
|
||||||
display: none;
|
display: none;
|
||||||
|
@@ -107,10 +107,11 @@ async function sendWelcomePanel() {
|
|||||||
const hiddenChats = fragment.querySelectorAll('.recentChat.hidden');
|
const hiddenChats = fragment.querySelectorAll('.recentChat.hidden');
|
||||||
fragment.querySelectorAll('button.showMoreChats').forEach((button) => {
|
fragment.querySelectorAll('button.showMoreChats').forEach((button) => {
|
||||||
button.addEventListener('click', () => {
|
button.addEventListener('click', () => {
|
||||||
|
const rotate = button.classList.contains('rotate');
|
||||||
hiddenChats.forEach((chatItem) => {
|
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) => {
|
fragment.querySelectorAll('button.openTemporaryChat').forEach((button) => {
|
||||||
|
Reference in New Issue
Block a user