From 0d67c289469133ccdada8a864ac12e80e0ae6a43 Mon Sep 17 00:00:00 2001 From: Daisuke <144384874+daisuke1227@users.noreply.github.com> Date: Tue, 18 Nov 2025 11:00:12 -0500 Subject: [PATCH] Added clear all to Ghosted Plugin (#506) * Added clear all to Ghosted Plugin * cl --------- Co-authored-by: thororen1234 <78185467+thororen1234@users.noreply.github.com> --- src/equicordplugins/boo/GhostedUsersModal.tsx | 23 ++++++++++++++++--- src/equicordplugins/boo/styles.css | 16 +++++++++++++ 2 files changed, 36 insertions(+), 3 deletions(-) diff --git a/src/equicordplugins/boo/GhostedUsersModal.tsx b/src/equicordplugins/boo/GhostedUsersModal.tsx index 312410146..630ce5ddf 100644 --- a/src/equicordplugins/boo/GhostedUsersModal.tsx +++ b/src/equicordplugins/boo/GhostedUsersModal.tsx @@ -46,19 +46,36 @@ export function GhostedUsersModal({ modalProps, ghostedChannels: initialChannels setGhostedChannels(prev => prev.filter(id => id !== channelId)); }; + const handleClearAll = () => { + for (const channelId of initialChannels) { + onClearGhost(channelId); + } + setGhostedChannels([]); + }; + return ( Ghosted Users ({ghostedChannels.length}) + {ghostedChannels.length > 0 && ( + + )} -
+
{ghostedChannels.length === 0 ? ( No ghosts here! ) : ( @@ -102,7 +119,7 @@ export function GhostedUsersModal({ modalProps, ghostedChannels: initialChannels {displayName} {lastMessageDate && ( - + {lastMessageDate} )} diff --git a/src/equicordplugins/boo/styles.css b/src/equicordplugins/boo/styles.css index a790b9a0d..4a5b1ea2b 100644 --- a/src/equicordplugins/boo/styles.css +++ b/src/equicordplugins/boo/styles.css @@ -138,3 +138,19 @@ transform: translate(-2px, -2px) rotate(-0.5deg); } } + +.vc-boo-clear { + margin-right: 16px; +} + +.vc-boo-modal-header { + flex-grow: 1; +} + +.vc-boo-modal-content { + padding: 16px 0; +} + +.vc-boo-modal-text { + color: var(--text-muted); +} \ No newline at end of file