diff --git a/app/globals.css b/app/globals.css index 6bbecdf9a..35957c45c 100644 --- a/app/globals.css +++ b/app/globals.css @@ -492,10 +492,10 @@ optgroup { opacity: 0.8; } -/* Toast animations */ +/* Toast animations. They slide in from the end edge: --toast-slide is -1 in RTL. */ @keyframes toast-enter { from { - transform: translateX(calc(100% + 1.25rem)); + transform: translateX(calc((100% + 1.25rem) * var(--toast-slide, 1))); opacity: 0; } to { @@ -510,7 +510,7 @@ optgroup { opacity: 1; } to { - transform: translateX(calc(100% + 1.25rem)); + transform: translateX(calc((100% + 1.25rem) * var(--toast-slide, 1))); opacity: 0; } } diff --git a/components/email/email-viewer.tsx b/components/email/email-viewer.tsx index 54a8409d6..359581851 100644 --- a/components/email/email-viewer.tsx +++ b/components/email/email-viewer.tsx @@ -18,6 +18,7 @@ import { useCopyLink } from "@/hooks/use-copy-link"; import { Button } from "@/components/ui/button"; import { Avatar } from "@/components/ui/avatar"; import { SubMenuPanel } from "@/components/ui/context-menu"; +import { useBottomControls } from "@/hooks/use-bottom-controls"; import { ReaderSelectionMenu, useReaderSelectionMenu, watchBodySelection, watchElementSelection } from "./reader-selection-menu"; import { onPanelRequest } from "@/lib/plugin-sandbox/panel-requests"; import { formatFileSize, cn, MailboxNode, formatDate, formatDateTime, formatRelativeAgo, generateUUID, cleanPreview } from "@/lib/utils"; @@ -1174,6 +1175,8 @@ export function EmailViewer({ // and has no bar fixed at the bottom; previous / next move to the top bar. const mvMobileViewer = interfaceLayout === 'mountain-view' && isMobile; const mvReplyRow = mvViewer || mvMobileViewer; + // The phone's bottom action bar: toasts sit above it. + const bottomBarRef = useBottomControls(isMobile && !mvMobileViewer); // The open conversation around the open message, split at it. const mvOpenIndex = (mvViewer || mvMobileViewer) && mvConversation && email ? mvConversation.findIndex((e) => e.id === email.id) : -1; const mvBefore = mvOpenIndex > 0 ? mvConversation!.slice(0, mvOpenIndex) : []; @@ -6529,7 +6532,7 @@ export function EmailViewer({ viewport `sm:hidden` guard would otherwise hide it there, and `fixed` would span the whole app instead of the pane). */} {isMobile && !mvMobileViewer && ( -