feat: navigate to mailbox after successful mail import
Build and Push Multi-Platform Images / build-and-push (push) Successful in 16s

- Add onSuccess prop to MailImportWizard, called instead of onClose on success
- MailDetailPage navigates to /mailpostfach after import completes

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-25 15:35:43 +02:00
parent 7cd7b2dbf5
commit 72d199fb3a
2 changed files with 9 additions and 7 deletions
@@ -18,11 +18,12 @@ const { Text } = Typography;
interface MailImportWizardProps {
visible: boolean;
onClose: () => void;
onSuccess?: () => void;
email: any;
attachments: any[];
}
export default function MailImportWizard({ visible, onClose, email, attachments }: MailImportWizardProps) {
export default function MailImportWizard({ visible, onClose, onSuccess, email, attachments }: MailImportWizardProps) {
const [currentStep, setCurrentStep] = useState(0);
const [importData, setImportData] = useState<AttachmentImportData[]>([]);
const [loading, setLoading] = useState(false);
@@ -726,7 +727,7 @@ export default function MailImportWizard({ visible, onClose, email, attachments
width={1000}
footer={
importSuccess ? (
<Button type="primary" onClick={onClose}>Schließen</Button>
<Button type="primary" onClick={onSuccess ?? onClose}>Schließen</Button>
) : (
<Space>
{currentStep > 0 && <Button onClick={handleBack}>Zurück</Button>}
@@ -252,11 +252,12 @@ export default function MailDetailPage() {
</div>
{wizardOpen && email && (
<MailImportWizard
visible={wizardOpen}
onClose={() => setWizardOpen(false)}
email={email}
attachments={attachments}
<MailImportWizard
visible={wizardOpen}
onClose={() => setWizardOpen(false)}
onSuccess={() => navigate('/mailpostfach')}
email={email}
attachments={attachments}
/>
)}
</div>