courrier multi account restore compose

This commit is contained in:
alma 2025-04-29 09:13:52 +02:00
parent d6c6832a21
commit 2fb4fcd069

View File

@ -80,7 +80,7 @@ export default function EmailSidebar({
};
const handleAccountClick = (accountId: string) => {
setExpandedAccount(expandedAccount === accountId ? null : accountId);
setExpandedAccount(accountId);
};
return (
@ -99,18 +99,26 @@ export default function EmailSidebar({
{/* Accounts and folders navigation */}
<ScrollArea className="flex-1">
<div className="p-2 space-y-1">
{/* Accounts header with toggle */}
{/* Accounts header with toggle and add button */}
<div className="flex items-center justify-between px-2 py-2 text-sm font-medium text-gray-600">
<span>Accounts</span>
<div className="flex items-center gap-2">
<button
onClick={() => setShowAccounts(!showAccounts)}
className="text-gray-400 hover:text-gray-600"
>
{showAccounts ? (
<ChevronDown className="h-4 w-4" />
) : (
<ChevronRight className="h-4 w-4" />
)}
</button>
<span>Accounts</span>
</div>
<button
onClick={() => setShowAccounts(!showAccounts)}
onClick={() => {/* Add account logic here */}}
className="text-gray-400 hover:text-gray-600"
>
{showAccounts ? (
<ChevronDown className="h-4 w-4" />
) : (
<ChevronRight className="h-4 w-4" />
)}
<Plus className="h-4 w-4" />
</button>
</div>
@ -131,14 +139,9 @@ export default function EmailSidebar({
<Mail className="h-4 w-4 mr-2" />
<span className="truncate">{account.email}</span>
</div>
{expandedAccount === account.id ? (
<ChevronDown className="h-4 w-4" />
) : (
<ChevronRight className="h-4 w-4" />
)}
</Button>
{/* Account folders - shown when account is expanded */}
{/* Account folders - shown when account is selected */}
{expandedAccount === account.id && (
<div className="pl-6 space-y-1">
{getStandardFolders(account.folders).map((folder) => (