Skip to content

Email for professionals and teams

minor improvement

Hieu Nguyen (Jack)56483510b512
diff --git a/src/app/api/mailboxes/[id]/route.ts b/src/app/api/mailboxes/[id]/route.ts
index 9276e75..654d5a1 100644
--- a/src/app/api/mailboxes/[id]/route.ts
+++ b/src/app/api/mailboxes/[id]/route.ts
@@ -61,9 +61,15 @@ export async function PATCH(request: Request, { params }: MailboxRouteParams) {
.set(updateValues)
.where(eq(mailboxes.id, id));
}
- if (updateValues.useAllDomains) {
+ if (updateValues.useAllDomains && !existing.useAllDomains) {
const [routingMailbox] = await db.select().from(mailboxes).where(eq(mailboxes.id, id)).limit(1);
- if (routingMailbox) await ensureMailboxDomainRouting(env, db, routingMailbox);
+ if (routingMailbox) {
+ try {
+ await ensureMailboxDomainRouting(env, db, routingMailbox);
+ } catch (error) {
+ console.warn("ensureMailboxDomainRouting", error);
+ }
+ }
}
const [mailbox] = await selectMailboxForUser(db, user.id, id);
diff --git a/src/components/mailbox-selector.tsx b/src/components/mailbox-selector.tsx
index bca8295..4b43d65 100644
--- a/src/components/mailbox-selector.tsx
+++ b/src/components/mailbox-selector.tsx
@@ -253,7 +253,6 @@ export function MailboxSelector() {
onSelect={() => {
setSelectedMailbox(mailbox);
setOpen(false);
- router.push("/inbox");
}}
/>
);
diff --git a/src/components/messages/message-list-row-actions.tsx b/src/components/messages/message-list-row-actions.tsx
index 7855bee..c19d80d 100644
--- a/src/components/messages/message-list-row-actions.tsx
+++ b/src/components/messages/message-list-row-actions.tsx
@@ -33,7 +33,7 @@ export function MessageListRowActions({ message, onAction }: MessageListRowActio
return (
<>
- <div className="pointer-events-none absolute right-6 top-1/2 z-10 flex -translate-y-1/2 items-center gap-1 pl-3 opacity-0 transition-opacity group-hover:pointer-events-auto group-hover:opacity-100 group-focus-within:pointer-events-auto group-focus-within:opacity-100">
+ <div className="pointer-events-none absolute right-6 top-1/2 z-10 flex -translate-y-1/2 items-center gap-1 pl-3 opacity-0 transition-opacity group-hover:pointer-events-auto group-hover:opacity-100 group-focus-within:pointer-events-auto group-focus-within:opacity-100 bg-[#f2f6fc]">
<Tooltip label="Archive">
<Button type="button" variant="ghost" size="sm" onClick={() => void onAction("archive")} aria-label="Archive">
<Archive className="h-4 w-4" />
diff --git a/src/components/sidebar-header.tsx b/src/components/sidebar-header.tsx
index aeceddc..fcb8e74 100644
--- a/src/components/sidebar-header.tsx
+++ b/src/components/sidebar-header.tsx
@@ -12,7 +12,7 @@ export function SidebarHeader({ href, label }: SidebarHeaderProps) {
return (
<div className={`mb-3 flex h-10 items-center ${minimal ? "justify-center" : "gap-2 px-1"}`}>
<button type="button" onClick={toggle} className="flex h-10 w-10 shrink-0 items-center justify-center rounded-full text-neutral-600 hover:bg-neutral-200" aria-label={minimal ? "Expand menu" : "Collapse menu"}>
- <Menu className="h-5 w-5" />
+ {minimal ? <img src={branding.iconUrl} height={28} width={28} alt="" /> : <Menu className="h-5 w-5" />}
</button>
{!minimal && <Link href={href} className="flex min-w-0 items-center gap-3"><img src={branding.iconUrl} height={28} width={28} alt="" /><span className="truncate text-lg font-semibold text-neutral-800">{label ?? branding.appName}</span></Link>}
</div>