Message header: room for the sender on a phone #90

Merged
jcoffey-dev merged 1 commits from fix/message-head-phone into main 2026-11-13 18:31:02 +00:00
12 changed files with 36 additions and 4 deletions

No files matched your search

+2
View File
@@ -512,6 +512,8 @@ export const catalog: Catalog = {
"Normal": "Normal",
"Low": "Niedrig",
"to {recipients}": "an {recipients}",
// The recipient summary's word for the reader, as in "to me".
"me": "mich",
"From: {sender}": "Von: {sender}",
"Waiting on the server — goes out {when}.": "Wartet auf dem Server — geht {when} raus.",
"Scheduled — click to clear the schedule": "Geplant — zum Aufheben klicken",
+2
View File
@@ -504,6 +504,8 @@ export const catalog: Catalog = {
"Normal": "Normal",
"Low": "Baja",
"to {recipients}": "para {recipients}",
// The recipient summary's word for the reader, as in "to me".
"me": "mí",
"From: {sender}": "De: {sender}",
"Waiting on the server — goes out {when}.": "Esperando en el servidor: se enviará {when}.",
"Scheduled — click to clear the schedule": "Programado: haga clic para anular la programación",
+2
View File
@@ -509,6 +509,8 @@ export const catalog: Catalog = {
"Normal": "Normale",
"Low": "Basse",
"to {recipients}": "à {recipients}",
// The recipient summary's word for the reader, as in "to me".
"me": "moi",
"From: {sender}": "De : {sender}",
"Waiting on the server — goes out {when}.": "En attente sur le serveur — envoi {when}.",
"Scheduled — click to clear the schedule": "Programmé — cliquez pour annuler la programmation",
+2
View File
@@ -503,6 +503,8 @@ export const catalog: Catalog = {
"Normal": "標準",
"Low": "低",
"to {recipients}": "宛先: {recipients}",
// The recipient summary's word for the reader, as in "to me".
"me": "自分",
"From: {sender}": "差出人: {sender}",
"Waiting on the server — goes out {when}.": "サーバーで待機中です。{when} に送信されます。",
"Scheduled — click to clear the schedule": "予約済み — クリックすると予約を解除します",
+2
View File
@@ -503,6 +503,8 @@ export const catalog: Catalog = {
"Normal": "Normaal",
"Low": "Laag",
"to {recipients}": "aan {recipients}",
// The recipient summary's word for the reader, as in "to me".
"me": "mij",
"From: {sender}": "Van: {sender}",
"Waiting on the server — goes out {when}.": "Wacht op de server — wordt {when} verzonden.",
"Scheduled — click to clear the schedule": "Gepland — klik om de planning te wissen",
+2
View File
@@ -507,6 +507,8 @@ export const catalog: Catalog = {
"Normal": "Normal",
"Low": "Baixa",
"to {recipients}": "para {recipients}",
// The recipient summary's word for the reader, as in "to me".
"me": "mim",
"From: {sender}": "De: {sender}",
"Waiting on the server — goes out {when}.": "Aguardando no servidor — será enviada {when}.",
"Scheduled — click to clear the schedule": "Programada — clique para cancelar a programação",
+2
View File
@@ -506,6 +506,8 @@ export const catalog: Catalog = {
"Normal": "Обычный",
"Low": "Низкий",
"to {recipients}": "кому: {recipients}",
// The recipient summary's word for the reader, as in "to me".
"me": "мне",
"From: {sender}": "От: {sender}",
"Waiting on the server — goes out {when}.": "Ожидает на сервере — будет отправлено {when}.",
"Scheduled — click to clear the schedule": "Отложено — нажмите, чтобы отменить",
+2
View File
@@ -1548,6 +1548,8 @@ export const catalog: Catalog = {
"this view": "bu görünüm",
"to": "kime",
"to {recipients}": "alıcı: {recipients}",
// The recipient summary's word for the reader, as in "to me".
"me": "ben",
"users": "kullanıcılar",
"vCard": "vCard",
"vCard attachment": "vCard eki",
+2
View File
@@ -500,6 +500,8 @@ export const catalog: Catalog = {
"Normal": "Звичайний",
"Low": "Низький",
"to {recipients}": "кому: {recipients}",
// The recipient summary's word for the reader, as in "to me".
"me": "мені",
"From: {sender}": "Від: {sender}",
"Waiting on the server — goes out {when}.": "Очікує на сервері — буде надіслано {when}.",
"Scheduled — click to clear the schedule": "Заплановано — натисніть, щоб скасувати",
+2
View File
@@ -502,6 +502,8 @@ export const catalog: Catalog = {
"Normal": "普通",
"Low": "低",
"to {recipients}": "收件人:{recipients}",
// The recipient summary's word for the reader, as in "to me".
"me": "我",
"From: {sender}": "发件人:{sender}",
"Waiting on the server — goes out {when}.": "正在服务器上等待,将于 {when} 发出。",
"Scheduled — click to clear the schedule": "已定时,点击可取消定时",
+9 -1
View File
@@ -1582,7 +1582,13 @@ a.menu-item:hover { color: var(--fg); }
.message-head .who { flex: 1; min-width: 0; }
.message-head .who .from { font-weight: 650; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.message-head .who .from .email { color: var(--fg-muted); font-weight: 400; font-size: .9em; }
.message-head .who .to { color: var(--fg-muted); font-size: .88em; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
/* A long name breaks inside the column rather than running out of it, under
the date beside it (#89). The address keeps to one line and shortens: it's
whole in the details, and broken it leaves a ">" on a line of its own. */
.message-head .who .from .addr { min-width: 0; overflow-wrap: anywhere; }
.message-head .who .from .email { max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.message-head .who .to { color: var(--fg-muted); font-size: .88em; display: flex; align-items: center; gap: 4px; }
.message-head .who .to .truncate { min-width: 0; }
.message-head .who .to button { color: var(--fg-muted); display: inline-flex; align-items: center; }
.message-head .who .snippet { color: var(--fg-muted); font-size: .92em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.message-head .meta { display: flex; align-items: center; gap: 2px; color: var(--fg-muted); font-size: .85em; white-space: nowrap; flex: 0 0 auto; }
@@ -2270,6 +2276,8 @@ select optgroup { background-color: var(--bg-elev); color: var(--fg); }
.thread-subject { padding: 14px 16px 8px; }
.message { margin: 0 8px 8px; }
.message-head { padding: 10px 12px; }
/* Reply is under the thread and in the ⋮ menu; here it only took the sender's room. */
.message-head .meta .hide-mobile { display: none; }
.message-body { padding: 4px 12px 12px; }
.thread-toolbar .hide-mobile { display: none; }
.list-toolbar .hide-mobile { display: none; }
+7 -3
View File
@@ -28,7 +28,7 @@ const FilterFromMessageDialog = lazy(() => import("./FilterFromMessage").then((m
const FilePreviewDialog = lazy(() => import("@/ui/filepreview").then((m) => ({ default: m.FilePreviewDialog })));
import { findQuoteStart, htmlToText, textToHtml, withoutBidiControls } from "@/lib/text/text";
import { canShare, canShareFiles, shareFile, shareText } from "@/lib/share";
import { Avatar } from "@/ui/misc";
import { Avatar, useIsMobile } from "@/ui/misc";
import { MenuItem, MenuSep, Popover, useMenu } from "@/ui/popover";
import { Dialog, choiceDialog} from "@/ui/dialog";
import { toast } from "@/ui/toast";
@@ -113,6 +113,10 @@ export const MessageView = memo(function MessageView({ email: e, expanded, wasUn
const reply = useCompose((s) => s.reply);
const cardRef = useRef<HTMLElement>(null);
/* The full date takes about half a phone's width, and the sender loses it
(#89). The short one is what a collapsed message shows; the full one is
still the title and in the details. */
const isMobile = useIsMobile();
const [details, setDetails] = useState(false);
const [showSource, setShowSource] = useState(false);
const [showHeaders, setShowHeaders] = useState(false);
@@ -330,7 +334,7 @@ export const MessageView = memo(function MessageView({ email: e, expanded, wasUn
</div>
<div className="meta">
{e.hasAttachment && !expanded && <Paperclip size={14} />}
<span className="date" title={formatFullDate(e.receivedAt)}>{expanded ? formatFullDate(e.receivedAt) : formatListDate(e.receivedAt)}</span>
<span className="date" title={formatFullDate(e.receivedAt)}>{expanded && !isMobile ? formatFullDate(e.receivedAt) : formatListDate(e.receivedAt)}</span>
<button className={`icon-btn sm ${e.keywords.$flagged ? "active" : ""}`} style={e.keywords.$flagged ? { color: "var(--star)", background: "transparent" } : undefined} title={translate("Star")} onClick={(ev) => { ev.stopPropagation(); void actions.star(!e.keywords.$flagged, [e.id]); }}>
<Star size={17} fill={e.keywords.$flagged ? "currentColor" : "none"} />
</button>
@@ -520,7 +524,7 @@ function summarizeRecipients(e: Email): string {
const all = [...(e.to ?? []), ...(e.cc ?? [])];
if (!all.length) return "(undisclosed recipients)";
const me = useMail.getState().identities.map((i) => i.email.toLowerCase());
const names = all.map((a) => (me.includes(a.email.toLowerCase()) ? "me" : displayName(a).split(" ")[0] || a.email));
const names = all.map((a) => (me.includes(a.email.toLowerCase()) ? translate("me") : displayName(a).split(" ")[0] || a.email));
if (names.length <= 3) return names.join(", ");
return `${names.slice(0, 3).join(", ")} +${names.length - 3}`;
}