Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion apps/mail/components/create/editor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -516,6 +516,13 @@ export default function Editor({
return true;
}
}

// Prevent Command+Enter from adding a new line
if (event.key === 'Enter' && (event.metaKey || event.ctrlKey)) {
event.preventDefault();
return true;
}

return handleCommandNavigation(event);
},
focus: () => {
Expand All @@ -532,7 +539,7 @@ export default function Editor({
onAttachmentsChange?.([file]);
}),
attributes: {
class: 'prose dark:prose-invert prose-headings:font-title font-default focus:outline-none max-w-full min-h-[200px] px-4 py-2',
class: 'prose dark:prose-invert prose-headings:font-title font-default focus:outline-none max-w-full min-h-[200px] py-2',
'data-placeholder': placeholder,
},
}}
Expand Down
4 changes: 2 additions & 2 deletions apps/mail/components/mail/mail-list.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ const Thread = memo(
key={message.threadId ?? message.id}
className={cn(
'hover:bg-offsetLight hover:bg-primary/5 group relative flex cursor-pointer flex-col items-start overflow-clip rounded-lg border border-transparent px-4 py-3 text-left text-sm transition-all hover:opacity-100',
isMailSelected || (!message.unread && 'opacity-50'),
isMailSelected || (!message.unread && 'opacity-80'),
(isMailSelected || isMailBulkSelected || isKeyboardFocused) &&
'border-border bg-primary/5 opacity-100',
isKeyboardFocused && 'ring-primary/50 ring-2',
Expand Down Expand Up @@ -252,7 +252,7 @@ const Thread = memo(
key={message.threadId ?? message.id}
className={cn(
'hover:bg-offsetLight hover:bg-primary/5 group relative flex cursor-pointer flex-col items-start overflow-clip rounded-lg border border-transparent px-4 py-3 text-left text-sm transition-all hover:opacity-100',
(isMailSelected || !message.unread && !['sent', 'archive', 'bin'].includes(folder)) && 'opacity-50',
(isMailSelected || !message.unread && !['sent', 'archive', 'bin'].includes(folder)) && 'dark:opacity-50 opacity-80',
(isMailSelected || isMailBulkSelected || isKeyboardFocused) &&
'border-border bg-primary/5 opacity-100',
isKeyboardFocused && 'ring-primary/50 ring-2',
Expand Down
36 changes: 16 additions & 20 deletions apps/mail/components/mail/reply-composer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1203,26 +1203,22 @@ export default function ReplyCompose({ mode = 'reply' }: ReplyComposeProps) {
</Popover>
)}
{/* The Plus button is always visible, wrapped in a label for better click handling */}
<div className="">
<label htmlFor="reply-attachment-input" className="cursor-pointer">
<Input
type="file"
id="reply-attachment-input" // Use a unique ID
className="absolute h-full w-full cursor-pointer opacity-0"
onChange={handleAttachmentEvent}
multiple
accept="image/*,.pdf,.doc,.docx,.xls,.xlsx,.txt"
/>
<Button
variant="ghost" // Match create-email style (might need adjustment)
size="icon" // Match create-email style
type="button"
className="rounded-full transition-transform cursor-pointer hover:bg-muted h-8 w-8 -ml-1" // Match create-email style
tabIndex={-1}
>
<Plus className="h-4 w-4 cursor-pointer"/>
</Button>
</label>
<div className="-pb-1.5 relative">
<Input
type="file"
id="reply-attachment-input"
className="absolute h-full w-full cursor-pointer opacity-0"
onChange={handleAttachmentEvent}
multiple
accept="image/*,.pdf,.doc,.docx,.xls,.xlsx,.txt"
/>
<Button
variant="ghost"
className="rounded-full transition-transform cursor-pointer hover:bg-muted h-8 w-8 -ml-1"
tabIndex={-1}
>
<Plus className="h-4 w-4 cursor-pointer"/>
</Button>
</div>
</div>
<div className="mr-2 flex items-center gap-2">
Expand Down