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 { interface MailImportWizardProps {
visible: boolean; visible: boolean;
onClose: () => void; onClose: () => void;
onSuccess?: () => void;
email: any; email: any;
attachments: 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 [currentStep, setCurrentStep] = useState(0);
const [importData, setImportData] = useState<AttachmentImportData[]>([]); const [importData, setImportData] = useState<AttachmentImportData[]>([]);
const [loading, setLoading] = useState(false); const [loading, setLoading] = useState(false);
@@ -726,7 +727,7 @@ export default function MailImportWizard({ visible, onClose, email, attachments
width={1000} width={1000}
footer={ footer={
importSuccess ? ( importSuccess ? (
<Button type="primary" onClick={onClose}>Schließen</Button> <Button type="primary" onClick={onSuccess ?? onClose}>Schließen</Button>
) : ( ) : (
<Space> <Space>
{currentStep > 0 && <Button onClick={handleBack}>Zurück</Button>} {currentStep > 0 && <Button onClick={handleBack}>Zurück</Button>}
@@ -252,11 +252,12 @@ export default function MailDetailPage() {
</div> </div>
{wizardOpen && email && ( {wizardOpen && email && (
<MailImportWizard <MailImportWizard
visible={wizardOpen} visible={wizardOpen}
onClose={() => setWizardOpen(false)} onClose={() => setWizardOpen(false)}
email={email} onSuccess={() => navigate('/mailpostfach')}
attachments={attachments} email={email}
attachments={attachments}
/> />
)} )}
</div> </div>