Neah version mail stable 3?
This commit is contained in:
parent
03893edd09
commit
a768221be9
@ -148,7 +148,9 @@ export async function GET(request: Request) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const availableMailboxes = Object.keys(boxes);
|
const availableMailboxes = Object.keys(boxes).filter(
|
||||||
|
box => !['Starred', 'Archives'].includes(box)
|
||||||
|
);
|
||||||
console.log('Available mailboxes:', availableMailboxes);
|
console.log('Available mailboxes:', availableMailboxes);
|
||||||
|
|
||||||
// Only process the requested folder
|
// Only process the requested folder
|
||||||
|
|||||||
@ -430,7 +430,6 @@ function cleanEmailContent(content: string): string {
|
|||||||
|
|
||||||
// Define the exact folder names from IMAP
|
// Define the exact folder names from IMAP
|
||||||
type MailFolder = string;
|
type MailFolder = string;
|
||||||
type MailView = MailFolder | 'starred';
|
|
||||||
|
|
||||||
// Map IMAP folders to sidebar items with icons
|
// Map IMAP folders to sidebar items with icons
|
||||||
const getFolderIcon = (folder: string) => {
|
const getFolderIcon = (folder: string) => {
|
||||||
@ -453,19 +452,13 @@ const getFolderIcon = (folder: string) => {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
// Initial sidebar items
|
// Initial sidebar items - only INBOX
|
||||||
const initialSidebarItems = [
|
const initialSidebarItems = [
|
||||||
{
|
{
|
||||||
view: 'INBOX' as MailView,
|
view: 'INBOX' as MailFolder,
|
||||||
label: 'Inbox',
|
label: 'Inbox',
|
||||||
icon: Inbox,
|
icon: Inbox,
|
||||||
folder: 'INBOX'
|
folder: 'INBOX'
|
||||||
},
|
|
||||||
{
|
|
||||||
view: 'starred' as MailView,
|
|
||||||
label: 'Starred',
|
|
||||||
icon: Star,
|
|
||||||
folder: null
|
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
@ -477,7 +470,7 @@ export default function MailPage() {
|
|||||||
{ id: 1, name: 'Mail', email: 'alma@governance-labs.org', color: 'bg-blue-500' }
|
{ id: 1, name: 'Mail', email: 'alma@governance-labs.org', color: 'bg-blue-500' }
|
||||||
]);
|
]);
|
||||||
const [selectedAccount, setSelectedAccount] = useState<Account | null>(null);
|
const [selectedAccount, setSelectedAccount] = useState<Account | null>(null);
|
||||||
const [currentView, setCurrentView] = useState<MailView>('INBOX');
|
const [currentView, setCurrentView] = useState<MailFolder>('INBOX');
|
||||||
const [showCompose, setShowCompose] = useState(false);
|
const [showCompose, setShowCompose] = useState(false);
|
||||||
const [showDeleteConfirm, setShowDeleteConfirm] = useState(false);
|
const [showDeleteConfirm, setShowDeleteConfirm] = useState(false);
|
||||||
const [selectedEmails, setSelectedEmails] = useState<string[]>([]);
|
const [selectedEmails, setSelectedEmails] = useState<string[]>([]);
|
||||||
@ -1026,7 +1019,7 @@ export default function MailPage() {
|
|||||||
...availableFolders
|
...availableFolders
|
||||||
.filter(folder => !['INBOX'].includes(folder)) // Exclude folders already in initial items
|
.filter(folder => !['INBOX'].includes(folder)) // Exclude folders already in initial items
|
||||||
.map(folder => ({
|
.map(folder => ({
|
||||||
view: folder as MailView,
|
view: folder as MailFolder,
|
||||||
label: folder.charAt(0).toUpperCase() + folder.slice(1).toLowerCase(),
|
label: folder.charAt(0).toUpperCase() + folder.slice(1).toLowerCase(),
|
||||||
icon: getFolderIcon(folder),
|
icon: getFolderIcon(folder),
|
||||||
folder: folder
|
folder: folder
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user