some fixes

This commit is contained in:
Lucas Gaitzsch
2026-05-20 20:04:46 +02:00
parent 7e15782fb3
commit dd322d4c9d
2 changed files with 7 additions and 7 deletions
+6 -6
View File
@@ -113,6 +113,7 @@ export default function Home() {
const { identities } = useIdentityStore();
useIdentitySync();
const trustedSendersAddressBook = useSettingsStore((state) => state.trustedSendersAddressBook);
const sendDelaySeconds = useSettingsStore((state) => state.sendDelaySeconds);
const { loadTrustedSendersBook, trustedSendersLoaded } = useContactStore();
// Load trusted senders address book when feature is enabled
@@ -1107,7 +1108,6 @@ export default function Home() {
if (result.scheduled) {
await refreshScheduledMetadata(client);
if (isScheduledView) await fetchScheduledEmails(client);
toast.success(t('email_viewer.scheduled_send_created'));
return;
}
@@ -1263,9 +1263,10 @@ export default function Home() {
lastUndoToastSubmissionRef.current = pendingUndoSend.submissionId;
const pending = pendingUndoSend;
const undoDurationMs = Math.max(sendDelaySeconds, 8) * 1000;
toast.info(t('email_viewer.undo_send_scheduled'), {
duration: 8000,
toast.success(t('email_viewer.scheduled_send_created'), {
duration: undoDurationMs,
action: {
label: t('email_viewer.undo_send'),
onClick: () => {
@@ -1289,11 +1290,11 @@ export default function Home() {
if (current?.submissionId === pending.submissionId) {
clearPendingUndoSend();
}
}, 8000);
}, undoDurationMs);
return () => clearTimeout(timer);
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [cancelUndoSend, clearPendingUndoSend, client, fetchScheduledEmails, isScheduledView, pendingUndoSend?.submissionId, t]);
}, [cancelUndoSend, clearPendingUndoSend, client, fetchScheduledEmails, isScheduledView, pendingUndoSend?.submissionId, sendDelaySeconds, t]);
const handleReplyAll = async () => {
if (selectedEmail) {
@@ -2812,7 +2813,6 @@ export default function Home() {
await refreshScheduledMetadata(client);
if (isScheduledView) await fetchScheduledEmails(client);
}
toast.success(t('email_viewer.scheduled_send_created'));
setShowComposer(false);
setPendingDraft(null);
}}
+1 -1
View File
@@ -4821,7 +4821,7 @@ export function EmailViewer({
{/* Draft Banner */}
{isDraft && (
<div className="border-b border-border bg-warning/10">
<div className="max-w-4xl mx-auto px-6 py-2.5 flex items-center justify-between">
<div className="px-6 py-2.5 flex items-center justify-between">
<div className="flex items-center gap-2 text-warning">
<File className="w-4 h-4" />
<span className="text-sm font-medium">{t('draft_banner')}</span>