mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-05-02 20:32:39 +02:00
feat: enhance chat sidebar functionality and UI
- Updated `LayoutDataProvider` to toggle sidebar states for shared and private chats more efficiently. - Added new props to `MobileSidebar`, `Sidebar`, and `LayoutShell` to manage the open states of chat panels. - Improved button interactions in the sidebar to show/hide chat panels with updated tooltip text. - Enhanced styling for tab triggers in `AllPrivateChatsSidebar` and `AllSharedChatsSidebar` for better user experience. - Added new localization strings for "show all" and "hide" actions in multiple languages.
This commit is contained in:
parent
54156633ff
commit
651d381bcb
12 changed files with 94 additions and 98 deletions
|
|
@ -628,17 +628,25 @@ export function LayoutDataProvider({ searchSpaceId, children }: LayoutDataProvid
|
|||
}, [router]);
|
||||
|
||||
const handleViewAllSharedChats = useCallback(() => {
|
||||
setIsAllSharedChatsSidebarOpen(true);
|
||||
setIsAllPrivateChatsSidebarOpen(false);
|
||||
setIsInboxSidebarOpen(false);
|
||||
setIsAnnouncementsSidebarOpen(false);
|
||||
setIsAllSharedChatsSidebarOpen((prev) => {
|
||||
if (!prev) {
|
||||
setIsAllPrivateChatsSidebarOpen(false);
|
||||
setIsInboxSidebarOpen(false);
|
||||
setIsAnnouncementsSidebarOpen(false);
|
||||
}
|
||||
return !prev;
|
||||
});
|
||||
}, []);
|
||||
|
||||
const handleViewAllPrivateChats = useCallback(() => {
|
||||
setIsAllPrivateChatsSidebarOpen(true);
|
||||
setIsAllSharedChatsSidebarOpen(false);
|
||||
setIsInboxSidebarOpen(false);
|
||||
setIsAnnouncementsSidebarOpen(false);
|
||||
setIsAllPrivateChatsSidebarOpen((prev) => {
|
||||
if (!prev) {
|
||||
setIsAllSharedChatsSidebarOpen(false);
|
||||
setIsInboxSidebarOpen(false);
|
||||
setIsAnnouncementsSidebarOpen(false);
|
||||
}
|
||||
return !prev;
|
||||
});
|
||||
}, []);
|
||||
|
||||
// Delete handlers
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue