|
173 | 173 | const isBodyPrefetchEnabled = () => |
174 | 174 | getEffectiveSettingValue('cache_prefetch_enabled') !== false; |
175 | 175 |
|
| 176 | + const isDefaultReplyAll = () => |
| 177 | + Boolean(getEffectiveSettingValue('default_reply_all')); |
| 178 | + |
176 | 179 | interface MailboxApi { |
177 | 180 | open?: () => void; |
178 | 181 | refresh?: () => void; |
@@ -3253,7 +3256,11 @@ const stopVerticalResize = () => { |
3253 | 3256 |
|
3254 | 3257 | const contextReply = () => { |
3255 | 3258 | if (!contextMenuMessage) return; |
3256 | | - mailboxView?.replyTo?.(contextMenuMessage); |
| 3259 | + if (isDefaultReplyAll()) { |
| 3260 | + mailboxView?.replyAll?.(contextMenuMessage); |
| 3261 | + } else { |
| 3262 | + mailboxView?.replyTo?.(contextMenuMessage); |
| 3263 | + } |
3257 | 3264 | closeContextMenu(); |
3258 | 3265 | }; |
3259 | 3266 |
|
@@ -3412,7 +3419,7 @@ const stopVerticalResize = () => { |
3412 | 3419 | !readerIsDraftFolder && |
3413 | 3420 | !readerIsTrashFolder && |
3414 | 3421 | !readerIsSpamOrJunk); |
3415 | | - const canReply = $derived(!readerIsSentFolder && !readerIsDraftFolder); |
| 3422 | + const canReply = $derived(!readerIsDraftFolder); |
3416 | 3423 | const canForward = $derived(!readerIsDraftFolder); |
3417 | 3424 | const canDownloadOriginal = $derived(!readerIsDraftFolder); |
3418 | 3425 | const canViewOriginal = $derived(!readerIsDraftFolder); |
@@ -4565,19 +4572,17 @@ const stopVerticalResize = () => { |
4565 | 4572 | onclick={() => handleSelectFolder(folder.path)} |
4566 | 4573 | onkeydown={(e) => activateOnKeys(e, () => handleSelectFolder(folder.path))} |
4567 | 4574 | > |
4568 | | - <span class="flex items-center gap-2 min-w-0 flex-1" style={`padding-left: ${(folder.level || 0) * 12}px`}> |
| 4575 | + <span class={`flex items-center gap-1.5 min-w-0 flex-1 ${(folder.level || 0) > 0 ? 'border-l border-border pl-1.5' : ''}`} style={`${(folder.level || 0) > 0 ? `margin-left: ${(folder.level) * 6}px` : ''}`}> |
4569 | 4576 | <!-- Chevron for expand/collapse --> |
4570 | 4577 | {#if hasChildren(folder)} |
4571 | 4578 | <button |
4572 | 4579 | type="button" |
4573 | | - class="p-0.5 hover:bg-accent transition-colors shrink-0" |
| 4580 | + class="hover:bg-accent transition-colors shrink-0" |
4574 | 4581 | onclick={(e) => { e.stopPropagation(); toggleFolderExpansion(folder.path); }} |
4575 | 4582 | aria-label={$expandedFolders.has(folder.path) ? 'Collapse' : 'Expand'} |
4576 | 4583 | > |
4577 | | - <ChevronRight class={`h-4 w-4 transition-transform ${$expandedFolders.has(folder.path) ? 'rotate-90' : ''}`} /> |
| 4584 | + <ChevronRight class={`h-3.5 w-3.5 transition-transform ${$expandedFolders.has(folder.path) ? 'rotate-90' : ''}`} /> |
4578 | 4585 | </button> |
4579 | | - {:else if (folder.level || 0) > 0} |
4580 | | - <span class="w-4 shrink-0" aria-hidden="true"></span> |
4581 | 4586 | {/if} |
4582 | 4587 |
|
4583 | 4588 | <svelte:component this={getFolderIcon(folder)} class="h-5 w-5 text-primary shrink-0" /> |
@@ -5645,7 +5650,7 @@ const stopVerticalResize = () => { |
5645 | 5650 | {/if} |
5646 | 5651 | {:else if $selectedMessage} |
5647 | 5652 | {#if isProductivityLayout || $mobileReader} |
5648 | | - <div class="flex items-center gap-2 p-2 border-b border-border"> |
| 5653 | + <div class="sticky top-0 z-10 bg-background flex items-center gap-2 p-2 border-b border-border"> |
5649 | 5654 | <button |
5650 | 5655 | class="inline-flex items-center justify-center h-11 w-11 hover:bg-accent hover:text-accent-foreground" |
5651 | 5656 | type="button" |
@@ -5732,7 +5737,7 @@ const stopVerticalResize = () => { |
5732 | 5737 | </div> |
5733 | 5738 | </div> |
5734 | 5739 | {/if} |
5735 | | - <div class="p-4 border-b border-border"> |
| 5740 | + <div class="sticky top-0 z-10 bg-background p-4 border-b border-border"> |
5736 | 5741 | <div class="flex items-start justify-between gap-4 mb-2"> |
5737 | 5742 | <div class="flex-1 min-w-0"> |
5738 | 5743 | <strong class="text-lg font-semibold">{threadSubject || $selectedMessage.subject}</strong> |
@@ -5768,10 +5773,10 @@ const stopVerticalResize = () => { |
5768 | 5773 | <button |
5769 | 5774 | class="inline-flex items-center justify-center h-9 w-9 hover:bg-accent hover:text-accent-foreground" |
5770 | 5775 | type="button" |
5771 | | - aria-label="Reply" |
5772 | | - data-tooltip="Reply (R)" |
| 5776 | + aria-label={isDefaultReplyAll() ? 'Reply All' : 'Reply'} |
| 5777 | + data-tooltip={isDefaultReplyAll() ? 'Reply All (R)' : 'Reply (R)'} |
5773 | 5778 | data-tooltip-position="bottom" |
5774 | | - onclick={() => mailboxView?.replyTo?.($selectedMessage)} |
| 5779 | + onclick={() => isDefaultReplyAll() ? mailboxView?.replyAll?.($selectedMessage) : mailboxView?.replyTo?.($selectedMessage)} |
5775 | 5780 | > |
5776 | 5781 | <svg class="h-4 w-4" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><polyline points="9 17 4 12 9 7"></polyline><path d="M20 18v-2a4 4 0 0 0-4-4H4"></path></svg> |
5777 | 5782 | </button> |
|
0 commit comments