diff --git a/frontend/src/pages/Mail.tsx b/frontend/src/pages/Mail.tsx
index faff3b9..49f7dec 100644
--- a/frontend/src/pages/Mail.tsx
+++ b/frontend/src/pages/Mail.tsx
@@ -284,6 +284,7 @@ export function MailPage() {
// Register toolbar items
const { registerItems, unregisterPlugin } = usePluginToolbarStore();
useEffect(() => {
+ const hasMail = !!selectedMail;
registerItems('mail', [
{
id: 'account-select',
@@ -308,15 +309,52 @@ export function MailPage() {
id: 'compose',
plugin: 'mail',
label: 'Verfassen',
- group: 'actions',
+ group: 'compose',
icon: ,
onClick: handleCompose,
},
+ {
+ id: 'reply',
+ plugin: 'mail',
+ label: 'Antworten',
+ group: 'mail-actions',
+ disabled: !hasMail,
+ icon: ,
+ onClick: () => selectedMail && handleReply(selectedMail),
+ },
+ {
+ id: 'forward',
+ plugin: 'mail',
+ label: 'Weiterleiten',
+ group: 'mail-actions',
+ disabled: !hasMail,
+ icon: ,
+ onClick: () => selectedMail && handleForward(selectedMail),
+ },
+ {
+ id: 'flag',
+ plugin: 'mail',
+ label: 'Flagge',
+ group: 'mail-actions',
+ disabled: !hasMail,
+ active: selectedMail?.is_flagged,
+ icon: ,
+ onClick: () => selectedMail && handleToggleFlag(selectedMail),
+ },
+ {
+ id: 'create-event',
+ plugin: 'mail',
+ label: 'Termin',
+ group: 'mail-actions',
+ disabled: !hasMail,
+ icon: ,
+ onClick: () => selectedMail && handleCreateEvent(selectedMail),
+ },
{
id: 'sync',
plugin: 'mail',
label: 'Sync',
- group: 'actions',
+ group: 'tools',
icon: ,
onClick: () => { /* sync trigger */ },
},
@@ -324,13 +362,13 @@ export function MailPage() {
id: 'settings',
plugin: 'mail',
label: 'Einstellungen',
- group: 'actions',
+ group: 'tools',
icon: ,
onClick: () => window.location.href = '/mail/settings',
},
]);
return () => unregisterPlugin('mail');
- }, [registerItems, unregisterPlugin, accounts, selectedAccountId, handleAccountSwitch, handleSearch, handleCompose]);
+ }, [registerItems, unregisterPlugin, accounts, selectedAccountId, selectedMail, handleAccountSwitch, handleSearch, handleCompose, handleReply, handleForward, handleToggleFlag, handleCreateEvent]);
if (loadingAccounts) {
return (