courrier multi account
This commit is contained in:
parent
65d75a0213
commit
27127ae99c
@ -675,13 +675,6 @@ export default function CourrierPage() {
|
|||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Debug info */}
|
|
||||||
<div className="text-xs text-red-500 p-1 border border-red-300 mb-2 bg-red-50 rounded">
|
|
||||||
Accounts: {accounts.length},
|
|
||||||
Selected: {selectedAccount?.id || 'none'},
|
|
||||||
ShowFolders: {String(showFolders)}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{/* Display all accounts */}
|
{/* Display all accounts */}
|
||||||
<div className="mt-1">
|
<div className="mt-1">
|
||||||
{accounts.map((account) => (
|
{accounts.map((account) => (
|
||||||
@ -699,9 +692,9 @@ export default function CourrierPage() {
|
|||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<div className="flex items-center">
|
<div className="flex items-center w-full">
|
||||||
<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">{account.name}</span>
|
<span className="truncate text-gray-700">{account.name}</span>
|
||||||
</div>
|
</div>
|
||||||
</Button>
|
</Button>
|
||||||
))}
|
))}
|
||||||
@ -719,13 +712,6 @@ export default function CourrierPage() {
|
|||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Debug info */}
|
|
||||||
<div className="text-xs text-blue-500 p-1 border border-blue-300 mb-2 bg-blue-50 rounded">
|
|
||||||
Selected: {selectedAccount?.id || 'none'}<br />
|
|
||||||
Has Folders: {String(!!selectedAccount?.folders)}<br />
|
|
||||||
Folder Count: {selectedAccount?.folders?.length || 0}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{/* Display folders if available */}
|
{/* Display folders if available */}
|
||||||
{selectedAccount?.folders?.map((folder) => (
|
{selectedAccount?.folders?.map((folder) => (
|
||||||
<Button
|
<Button
|
||||||
@ -734,9 +720,9 @@ export default function CourrierPage() {
|
|||||||
className={`w-full justify-start text-xs mb-1 ${currentFolder === folder ? 'bg-gray-100' : ''}`}
|
className={`w-full justify-start text-xs mb-1 ${currentFolder === folder ? 'bg-gray-100' : ''}`}
|
||||||
onClick={() => handleMailboxChange(folder, selectedAccount.id !== 'all-accounts' ? selectedAccount.id : undefined)}
|
onClick={() => handleMailboxChange(folder, selectedAccount.id !== 'all-accounts' ? selectedAccount.id : undefined)}
|
||||||
>
|
>
|
||||||
<div className="flex items-center">
|
<div className="flex items-center w-full">
|
||||||
{getFolderIcon(folder)}
|
{getFolderIcon(folder)}
|
||||||
<span className="ml-2 truncate">{formatFolderName(folder)}</span>
|
<span className="ml-2 truncate text-gray-700">{formatFolderName(folder)}</span>
|
||||||
{folder === 'INBOX' && unreadCount > 0 && (
|
{folder === 'INBOX' && unreadCount > 0 && (
|
||||||
<span className="ml-auto bg-blue-500 text-white text-[10px] px-1.5 rounded-full">
|
<span className="ml-auto bg-blue-500 text-white text-[10px] px-1.5 rounded-full">
|
||||||
{unreadCount}
|
{unreadCount}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user