courrier multi account restore compose

This commit is contained in:
alma 2025-04-28 19:12:02 +02:00
parent 464a30c31b
commit 90f2c61c3c

View File

@ -784,13 +784,7 @@ export default function CourrierPage() {
{/* Accounts Section */} {/* Accounts Section */}
<div className="p-3 border-b border-gray-100"> <div className="p-3 border-b border-gray-100">
<div className="flex items-center justify-between mb-2"> <div className="flex items-center justify-between mb-2">
<Button <span className="text-sm font-medium text-gray-500">Accounts</span>
variant="ghost"
className="w-full justify-between text-sm font-medium text-gray-500"
onClick={() => setAccountsDropdownOpen(!accountsDropdownOpen)}
>
<span>Accounts</span>
</Button>
<Button <Button
variant="ghost" variant="ghost"
size="sm" size="sm"
@ -1014,17 +1008,14 @@ export default function CourrierPage() {
<div className={`w-3 h-3 rounded-full ${account.color?.startsWith('#') ? 'bg-blue-500' : account.color || 'bg-blue-500'} mr-2`}></div> <div className={`w-3 h-3 rounded-full ${account.color?.startsWith('#') ? 'bg-blue-500' : account.color || 'bg-blue-500'} mr-2`}></div>
<span className="truncate text-gray-700 flex-1">{account.name}</span> <span className="truncate text-gray-700 flex-1">{account.name}</span>
{account.id !== 'loading-account' && ( {account.id !== 'loading-account' && (
<DropdownMenu> <button
<DropdownMenuTrigger asChild> type="button"
<button type="button" className="ml-1 h-5 w-5 p-0 text-gray-400 hover:text-gray-600 flex items-center justify-center" onClick={e => e.stopPropagation()}> className="ml-1 text-gray-400 hover:text-gray-600 cursor-pointer flex items-center justify-center h-5 w-5"
<MoreVertical className="h-4 w-4" /> tabIndex={-1}
</button> onClick={e => { e.stopPropagation(); setExpandedAccounts(prev => ({ ...prev, [account.id]: !prev[account.id] })); }}
</DropdownMenuTrigger> >
<DropdownMenuContent align="end"> {expandedAccounts[account.id] ? <ChevronUp className="h-3 w-3" /> : <ChevronDown className="h-3 w-3" />}
<DropdownMenuItem onClick={e => { e.stopPropagation(); setAccountToEdit(account); setShowEditModal(true); }}>Edit</DropdownMenuItem> </button>
<DropdownMenuItem onClick={e => { e.stopPropagation(); setAccountToDelete(account); setShowDeleteDialog(true); }}>Delete</DropdownMenuItem>
</DropdownMenuContent>
</DropdownMenu>
)} )}
</div> </div>
{/* Show folders for any expanded account */} {/* Show folders for any expanded account */}