feat: navigate to mailbox after successful mail import
Build and Push Multi-Platform Images / build-and-push (push) Successful in 16s
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:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user