From f7b9c14db37dd69ac4b30484b0af6d7691ba176e Mon Sep 17 00:00:00 2001 From: alma Date: Mon, 28 Apr 2025 18:30:46 +0200 Subject: [PATCH] courrier multi account restore compose --- app/courrier/page.tsx | 69 +++++++++++++++++++------------------------ 1 file changed, 31 insertions(+), 38 deletions(-) diff --git a/app/courrier/page.tsx b/app/courrier/page.tsx index 8844c118..63facf48 100644 --- a/app/courrier/page.tsx +++ b/app/courrier/page.tsx @@ -1026,50 +1026,43 @@ export default function CourrierPage() { {accounts.map((account) => (
- - - - { e.stopPropagation(); setAccountToEdit(account); setShowEditModal(true); }}>Edit - { e.stopPropagation(); setAccountToDelete(account); setShowDeleteDialog(true); }}>Delete - - - )} - {account.id !== 'all-accounts' && ( - { e.stopPropagation(); setExpandedAccounts(prev => ({ ...prev, [account.id]: !prev[account.id] })); }} - > - {expandedAccounts[account.id] ? : } - - )} -
- - +
+ {account.name} + {/* More options button */} + {account.id !== 'all-accounts' && ( + + + + + + { e.stopPropagation(); setAccountToEdit(account); setShowEditModal(true); }}>Edit + { e.stopPropagation(); setAccountToDelete(account); setShowDeleteDialog(true); }}>Delete + + + )} + {account.id !== 'all-accounts' && ( + + )} + {/* Show folders for this account if expanded */} {(() => { const isExpanded = expandedAccounts[account.id]; const hasFolders = account.folders && account.folders.length > 0; - console.log('[DEBUG] Folder rendering check:', { - accountId: account.id, - isExpanded, - hasFolders, - folders: account.folders - }); - return isExpanded && account.id !== 'all-accounts' && hasFolders && (
{account.folders.map((folder) => renderFolderButton(folder, account.id))}