From 274943f1c3bfc2863519db1200fee0759e372d91 Mon Sep 17 00:00:00 2001 From: ferivoq <36544651+ferivoq@users.noreply.github.com> Date: Thu, 26 Nov 2026 21:41:04 +0100 Subject: [PATCH] open-draft-attachment: Open attachments from the composer Open the attached copy through the existing attachment checks and desktop launcher, or download it in the browser. Keep approval bound to the file shown in the prompt. Human-reviewed, AI-assisted, nobody's mailbox harmed. --- Cargo.lock | 1 + crates/engine/src/agent.rs | 1 + crates/i18n/po/cs.po | 40 ++++- crates/i18n/po/de.po | 40 ++++- crates/i18n/po/es.po | 40 ++++- crates/i18n/po/fr.po | 40 ++++- crates/i18n/po/hu.po | 46 ++++- crates/i18n/po/it.po | 40 ++++- crates/i18n/po/ka.po | 40 ++++- crates/i18n/po/messages.pot | 40 ++++- crates/i18n/po/nl.po | 40 ++++- crates/i18n/po/pl.po | 40 ++++- crates/i18n/po/ro.po | 40 ++++- crates/i18n/po/zh_CN.po | 40 ++++- crates/ui-egui/Cargo.toml | 2 + crates/ui-egui/src/attachment_open.rs | 92 ++++++++-- crates/ui-egui/src/compose.rs | 85 ++++++--- .../ui-egui/src/compose/attachment_tests.rs | 161 ++++++++++++++++++ crates/ui-egui/src/dialogs.rs | 1 + crates/ui-egui/src/lib.rs | 14 +- docs/control-protocol.md | 1 + .../ROADMAP/progress/open-draft-attachment.md | 1 + .../revisions/open-draft-attachment.md | 1 + .../revisions/open-draft-attachment.md | 1 + docs/ui-parity.md | 2 +- .../new/open-draft-attachment.md | 1 + 26 files changed, 750 insertions(+), 100 deletions(-) create mode 100644 crates/ui-egui/src/compose/attachment_tests.rs create mode 100644 docs/log.d/ROADMAP/progress/open-draft-attachment.md create mode 100644 docs/log.d/docs/control-protocol/revisions/open-draft-attachment.md create mode 100644 docs/log.d/docs/ui-parity/revisions/open-draft-attachment.md create mode 100644 packaging/release-notes.d/new/open-draft-attachment.md diff --git a/Cargo.lock b/Cargo.lock index 9c01cd06ee..97f117a9d3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3545,6 +3545,7 @@ dependencies = [ "mailcraft-time", "serde", "serde_json", + "sha2 0.11.1", "skrifa 0.50.0", "tempfile", "toml", diff --git a/crates/engine/src/agent.rs b/crates/engine/src/agent.rs index 37d59055fe..3ae5ad29bf 100644 --- a/crates/engine/src/agent.rs +++ b/crates/engine/src/agent.rs @@ -708,6 +708,7 @@ const NEVER: &[&str] = &[ "ui.calendarPaste", // A file from a message opened with another program: only ever the owner's own doing. "mail.openAttachment", + "ui.openDraftAttachment", "ui.previewAttachment", // Installing a new version, or going back to the one before: only the owner's click. "ui.restartToUpdate", diff --git a/crates/i18n/po/cs.po b/crates/i18n/po/cs.po index c8af166124..e444a4cee0 100644 --- a/crates/i18n/po/cs.po +++ b/crates/i18n/po/cs.po @@ -2381,6 +2381,11 @@ msgstr "Možnosti přílohy {name}" msgid "Attachments" msgstr "Přílohy" +#. interface +#: crates/ui-egui/src/attachment_open.rs crates/ui-egui/src/compose.rs +msgid "Attachments can't be opened here." +msgstr "" + #. interface #: crates/ui-egui/src/attachment_open.rs #, fuzzy @@ -5102,8 +5107,18 @@ msgstr "Hotovo: aktuální" msgid "Done: {n} new" msgstr "Hotovo: {n} nových" -#. android, ribbon location -#: apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/PicturesBanner.kt crates/engine/src/cmd/send_receive.rs +#. interface +#: crates/ui-egui/src/compose.rs +msgid "Double-click to download {name}" +msgstr "" + +#. interface +#: crates/ui-egui/src/compose.rs +msgid "Double-click to open {name}" +msgstr "" + +#. android, interface, ribbon location +#: apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/PicturesBanner.kt crates/engine/src/cmd/send_receive.rs crates/ui-egui/src/compose.rs #, fuzzy msgid "Download" msgstr "Stahování" @@ -8996,6 +9011,11 @@ msgstr "MailCraft teď může účet {account} synchronizovat s Microsoftem pře msgid "MailCraft can't keep this account's rules on its server" msgstr "MailCraft nemůže uchovávat pravidla tohoto účtu na jeho serveru" +#. interface +#: crates/ui-egui/src/attachment_open.rs +msgid "MailCraft can't open {name} because of its file type." +msgstr "" + #. interface #: crates/ui-egui/src/account_setup/exchange.rs #, fuzzy @@ -11613,7 +11633,7 @@ msgid "Nothing was done: what the agent asked about changed after you were asked msgstr "Nic se neprovedlo: to, na co se agent ptal, se po vašem dotazu změnilo." #. interface -#: crates/ui-egui/src/dialogs.rs +#: crates/ui-egui/src/attachment_open.rs crates/ui-egui/src/dialogs.rs #, fuzzy msgid "Nothing was done: what you were asked about has changed since. Ask again." msgstr "Nic se neudělalo: to, na co jste byli dotázáni, se mezitím změnilo. Zkuste to znovu." @@ -12050,7 +12070,7 @@ msgid "Only while MailCraft isn't the window in front, and only for the Inboxes msgstr "Jen když MailCraft není okno v popředí, a jen pro Doručenou poštu vašich vlastních účtů." #. android, interface, ribbon -#: apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/AttachmentsView.kt apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/ReadingScreen.kt crates/ui-egui/src/attachment_open.rs crates/ui-egui/src/calendar_view.rs crates/ui-egui/src/dialogs.rs crates/ui-egui/src/reading.rs crates/ui-egui/src/ribbon.rs +#: apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/AttachmentsView.kt apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/ReadingScreen.kt crates/ui-egui/src/attachment_open.rs crates/ui-egui/src/calendar_view.rs crates/ui-egui/src/compose.rs crates/ui-egui/src/dialogs.rs crates/ui-egui/src/reading.rs crates/ui-egui/src/ribbon.rs #, fuzzy msgid "Open" msgstr "Otevřít" @@ -12101,6 +12121,11 @@ msgstr "Otevřít dialog" msgid "Open Draft" msgstr "Otevřít koncept" +#. command label +#: crates/ui-egui/src/lib.rs +msgid "Open Draft Attachment" +msgstr "" + #. interface #: crates/ui-egui/src/data_removal.rs #, fuzzy @@ -13610,7 +13635,7 @@ msgid "Remove Account" msgstr "Odebrat účet" #. command label, interface -#: crates/engine/src/cmd/compose.rs crates/engine/src/cmd/mail.rs crates/ui-egui/src/reading.rs +#: crates/engine/src/cmd/compose.rs crates/engine/src/cmd/mail.rs crates/ui-egui/src/compose.rs crates/ui-egui/src/reading.rs #, fuzzy msgid "Remove Attachment" msgstr "Odebrat přílohu" @@ -17964,6 +17989,11 @@ msgstr "Doména {domain} uvádí server pro automatické nastavení (Autodiscove msgid "The download was called off." msgstr "Stahování bylo zrušeno." +#. interface +#: crates/ui-egui/src/attachment_open.rs +msgid "The draft isn't open any more" +msgstr "" + #. interface #: crates/ui-egui/src/dialogs.rs #, fuzzy diff --git a/crates/i18n/po/de.po b/crates/i18n/po/de.po index cb7798a459..a7a9bfc101 100644 --- a/crates/i18n/po/de.po +++ b/crates/i18n/po/de.po @@ -2277,6 +2277,11 @@ msgstr "Anlagenoptionen für {name}" msgid "Attachments" msgstr "Anlagen" +#. interface +#: crates/ui-egui/src/attachment_open.rs crates/ui-egui/src/compose.rs +msgid "Attachments can't be opened here." +msgstr "" + #. interface #: crates/ui-egui/src/attachment_open.rs #, fuzzy @@ -4844,8 +4849,18 @@ msgstr "Fertig: auf dem neuesten Stand" msgid "Done: {n} new" msgstr "Fertig: {n} neu" -#. android, ribbon location -#: apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/PicturesBanner.kt crates/engine/src/cmd/send_receive.rs +#. interface +#: crates/ui-egui/src/compose.rs +msgid "Double-click to download {name}" +msgstr "" + +#. interface +#: crates/ui-egui/src/compose.rs +msgid "Double-click to open {name}" +msgstr "" + +#. android, interface, ribbon location +#: apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/PicturesBanner.kt crates/engine/src/cmd/send_receive.rs crates/ui-egui/src/compose.rs msgid "Download" msgstr "Herunterladen" @@ -8446,6 +8461,11 @@ msgstr "MailCraft kann {account} jetzt statt über IMAP über Microsoft Graph mi msgid "MailCraft can't keep this account's rules on its server" msgstr "MailCraft kann die Regeln dieses Kontos nicht auf seinem Server speichern" +#. interface +#: crates/ui-egui/src/attachment_open.rs +msgid "MailCraft can't open {name} because of its file type." +msgstr "" + #. interface #: crates/ui-egui/src/account_setup/exchange.rs msgid "MailCraft can't sign in to this server this way yet (it wants Kerberos). Ask your administrator whether it can take a user name and password over an encrypted connection." @@ -10915,7 +10935,7 @@ msgid "Nothing was done: what the agent asked about changed after you were asked msgstr "Es wurde nichts ausgeführt: Das, wonach der Agent gefragt hat, hat sich geändert, nachdem Sie gefragt wurden." #. interface -#: crates/ui-egui/src/dialogs.rs +#: crates/ui-egui/src/attachment_open.rs crates/ui-egui/src/dialogs.rs #, fuzzy msgid "Nothing was done: what you were asked about has changed since. Ask again." msgstr "Es wurde nichts getan: Das, wonach Sie gefragt wurden, hat sich inzwischen geändert. Versuchen Sie es erneut." @@ -11322,7 +11342,7 @@ msgid "Only while MailCraft isn't the window in front, and only for the Inboxes msgstr "Nur, wenn MailCraft nicht das vordere Fenster ist, und nur für die Posteingänge Ihrer eigenen Konten." #. android, interface, ribbon -#: apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/AttachmentsView.kt apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/ReadingScreen.kt crates/ui-egui/src/attachment_open.rs crates/ui-egui/src/calendar_view.rs crates/ui-egui/src/dialogs.rs crates/ui-egui/src/reading.rs crates/ui-egui/src/ribbon.rs +#: apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/AttachmentsView.kt apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/ReadingScreen.kt crates/ui-egui/src/attachment_open.rs crates/ui-egui/src/calendar_view.rs crates/ui-egui/src/compose.rs crates/ui-egui/src/dialogs.rs crates/ui-egui/src/reading.rs crates/ui-egui/src/ribbon.rs msgid "Open" msgstr "Öffnen" @@ -11366,6 +11386,11 @@ msgstr "Dialog öffnen" msgid "Open Draft" msgstr "Entwurf öffnen" +#. command label +#: crates/ui-egui/src/lib.rs +msgid "Open Draft Attachment" +msgstr "" + #. interface #: crates/ui-egui/src/data_removal.rs msgid "Open MailCraft's data folder" @@ -12774,7 +12799,7 @@ msgid "Remove Account" msgstr "Konto entfernen" #. command label, interface -#: crates/engine/src/cmd/compose.rs crates/engine/src/cmd/mail.rs crates/ui-egui/src/reading.rs +#: crates/engine/src/cmd/compose.rs crates/engine/src/cmd/mail.rs crates/ui-egui/src/compose.rs crates/ui-egui/src/reading.rs #, fuzzy msgid "Remove Attachment" msgstr "Anlage entfernen" @@ -16895,6 +16920,11 @@ msgstr "Die Domain {domain} nennt einen Server für die automatische Einrichtung msgid "The download was called off." msgstr "Der Download wurde abgebrochen." +#. interface +#: crates/ui-egui/src/attachment_open.rs +msgid "The draft isn't open any more" +msgstr "" + #. interface #: crates/ui-egui/src/dialogs.rs msgid "The e-mail address of the person whose calendar you want to open" diff --git a/crates/i18n/po/es.po b/crates/i18n/po/es.po index 055d56f147..d5cf845f62 100644 --- a/crates/i18n/po/es.po +++ b/crates/i18n/po/es.po @@ -2386,6 +2386,11 @@ msgstr "Opciones de datos adjuntos de {name}" msgid "Attachments" msgstr "Datos adjuntos" +#. interface +#: crates/ui-egui/src/attachment_open.rs crates/ui-egui/src/compose.rs +msgid "Attachments can't be opened here." +msgstr "" + #. interface #: crates/ui-egui/src/attachment_open.rs #, fuzzy @@ -5104,8 +5109,18 @@ msgstr "Listo: actualizado" msgid "Done: {n} new" msgstr "Listo: {n} nuevos" -#. android, ribbon location -#: apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/PicturesBanner.kt crates/engine/src/cmd/send_receive.rs +#. interface +#: crates/ui-egui/src/compose.rs +msgid "Double-click to download {name}" +msgstr "" + +#. interface +#: crates/ui-egui/src/compose.rs +msgid "Double-click to open {name}" +msgstr "" + +#. android, interface, ribbon location +#: apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/PicturesBanner.kt crates/engine/src/cmd/send_receive.rs crates/ui-egui/src/compose.rs #, fuzzy msgid "Download" msgstr "Descargar" @@ -8979,6 +8994,11 @@ msgstr "MailCraft ya puede mantener {account} sincronizada con Microsoft a trav msgid "MailCraft can't keep this account's rules on its server" msgstr "MailCraft no puede guardar las reglas de esta cuenta en su servidor" +#. interface +#: crates/ui-egui/src/attachment_open.rs +msgid "MailCraft can't open {name} because of its file type." +msgstr "" + #. interface #: crates/ui-egui/src/account_setup/exchange.rs #, fuzzy @@ -11596,7 +11616,7 @@ msgid "Nothing was done: what the agent asked about changed after you were asked msgstr "No se hizo nada: lo que el agente preguntó cambió después de que se le consultara." #. interface -#: crates/ui-egui/src/dialogs.rs +#: crates/ui-egui/src/attachment_open.rs crates/ui-egui/src/dialogs.rs #, fuzzy msgid "Nothing was done: what you were asked about has changed since. Ask again." msgstr "No se ha hecho nada: lo que se le preguntó ha cambiado desde entonces. Vuelva a intentarlo." @@ -12034,7 +12054,7 @@ msgid "Only while MailCraft isn't the window in front, and only for the Inboxes msgstr "Solo cuando MailCraft no es la ventana en primer plano, y solo para las Bandejas de entrada de sus propias cuentas." #. android, interface, ribbon -#: apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/AttachmentsView.kt apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/ReadingScreen.kt crates/ui-egui/src/attachment_open.rs crates/ui-egui/src/calendar_view.rs crates/ui-egui/src/dialogs.rs crates/ui-egui/src/reading.rs crates/ui-egui/src/ribbon.rs +#: apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/AttachmentsView.kt apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/ReadingScreen.kt crates/ui-egui/src/attachment_open.rs crates/ui-egui/src/calendar_view.rs crates/ui-egui/src/compose.rs crates/ui-egui/src/dialogs.rs crates/ui-egui/src/reading.rs crates/ui-egui/src/ribbon.rs #, fuzzy msgid "Open" msgstr "Abrir" @@ -12085,6 +12105,11 @@ msgstr "Abrir cuadro de diálogo" msgid "Open Draft" msgstr "Abrir borrador" +#. command label +#: crates/ui-egui/src/lib.rs +msgid "Open Draft Attachment" +msgstr "" + #. interface #: crates/ui-egui/src/data_removal.rs #, fuzzy @@ -13593,7 +13618,7 @@ msgid "Remove Account" msgstr "Quitar cuenta" #. command label, interface -#: crates/engine/src/cmd/compose.rs crates/engine/src/cmd/mail.rs crates/ui-egui/src/reading.rs +#: crates/engine/src/cmd/compose.rs crates/engine/src/cmd/mail.rs crates/ui-egui/src/compose.rs crates/ui-egui/src/reading.rs #, fuzzy msgid "Remove Attachment" msgstr "Quitar datos adjuntos" @@ -17939,6 +17964,11 @@ msgstr "El dominio {domain} indica un servidor para la configuración automátic msgid "The download was called off." msgstr "Se canceló la descarga." +#. interface +#: crates/ui-egui/src/attachment_open.rs +msgid "The draft isn't open any more" +msgstr "" + #. interface #: crates/ui-egui/src/dialogs.rs #, fuzzy diff --git a/crates/i18n/po/fr.po b/crates/i18n/po/fr.po index 31078d0caf..78648cc7b7 100644 --- a/crates/i18n/po/fr.po +++ b/crates/i18n/po/fr.po @@ -2380,6 +2380,11 @@ msgstr "Options de pièce jointe pour {name}" msgid "Attachments" msgstr "Pièces jointes" +#. interface +#: crates/ui-egui/src/attachment_open.rs crates/ui-egui/src/compose.rs +msgid "Attachments can't be opened here." +msgstr "" + #. interface #: crates/ui-egui/src/attachment_open.rs #, fuzzy @@ -5087,8 +5092,18 @@ msgstr "Terminé : à jour" msgid "Done: {n} new" msgstr "Terminé : {n} nouveau(x)" -#. android, ribbon location -#: apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/PicturesBanner.kt crates/engine/src/cmd/send_receive.rs +#. interface +#: crates/ui-egui/src/compose.rs +msgid "Double-click to download {name}" +msgstr "" + +#. interface +#: crates/ui-egui/src/compose.rs +msgid "Double-click to open {name}" +msgstr "" + +#. android, interface, ribbon location +#: apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/PicturesBanner.kt crates/engine/src/cmd/send_receive.rs crates/ui-egui/src/compose.rs #, fuzzy msgid "Download" msgstr "Télécharger" @@ -8940,6 +8955,11 @@ msgstr "MailCraft peut désormais synchroniser {account} avec Microsoft via Micr msgid "MailCraft can't keep this account's rules on its server" msgstr "MailCraft ne peut pas conserver les règles de ce compte sur son serveur" +#. interface +#: crates/ui-egui/src/attachment_open.rs +msgid "MailCraft can't open {name} because of its file type." +msgstr "" + #. interface #: crates/ui-egui/src/account_setup/exchange.rs #, fuzzy @@ -11549,7 +11569,7 @@ msgid "Nothing was done: what the agent asked about changed after you were asked msgstr "Rien n'a été fait : ce dont l'agent parlait a changé après que la question vous a été posée." #. interface -#: crates/ui-egui/src/dialogs.rs +#: crates/ui-egui/src/attachment_open.rs crates/ui-egui/src/dialogs.rs #, fuzzy msgid "Nothing was done: what you were asked about has changed since. Ask again." msgstr "Rien n'a été fait : ce sur quoi vous avez été interrogé a changé depuis. Recommencez." @@ -11986,7 +12006,7 @@ msgid "Only while MailCraft isn't the window in front, and only for the Inboxes msgstr "Uniquement quand MailCraft n'est pas la fenêtre au premier plan, et uniquement pour les boîtes de réception de vos propres comptes." #. android, interface, ribbon -#: apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/AttachmentsView.kt apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/ReadingScreen.kt crates/ui-egui/src/attachment_open.rs crates/ui-egui/src/calendar_view.rs crates/ui-egui/src/dialogs.rs crates/ui-egui/src/reading.rs crates/ui-egui/src/ribbon.rs +#: apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/AttachmentsView.kt apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/ReadingScreen.kt crates/ui-egui/src/attachment_open.rs crates/ui-egui/src/calendar_view.rs crates/ui-egui/src/compose.rs crates/ui-egui/src/dialogs.rs crates/ui-egui/src/reading.rs crates/ui-egui/src/ribbon.rs #, fuzzy msgid "Open" msgstr "Ouvrir" @@ -12036,6 +12056,11 @@ msgstr "Ouvrir la boîte de dialogue" msgid "Open Draft" msgstr "Ouvrir le brouillon" +#. command label +#: crates/ui-egui/src/lib.rs +msgid "Open Draft Attachment" +msgstr "" + #. interface #: crates/ui-egui/src/data_removal.rs #, fuzzy @@ -13532,7 +13557,7 @@ msgid "Remove Account" msgstr "Supprimer le compte" #. command label, interface -#: crates/engine/src/cmd/compose.rs crates/engine/src/cmd/mail.rs crates/ui-egui/src/reading.rs +#: crates/engine/src/cmd/compose.rs crates/engine/src/cmd/mail.rs crates/ui-egui/src/compose.rs crates/ui-egui/src/reading.rs #, fuzzy msgid "Remove Attachment" msgstr "Supprimer la pièce jointe" @@ -17856,6 +17881,11 @@ msgstr "Le domaine {domain} désigne un serveur pour la configuration automatiqu msgid "The download was called off." msgstr "Le téléchargement a été annulé." +#. interface +#: crates/ui-egui/src/attachment_open.rs +msgid "The draft isn't open any more" +msgstr "" + #. interface #: crates/ui-egui/src/dialogs.rs #, fuzzy diff --git a/crates/i18n/po/hu.po b/crates/i18n/po/hu.po index be0de62db9..1c45bb345e 100644 --- a/crates/i18n/po/hu.po +++ b/crates/i18n/po/hu.po @@ -2386,6 +2386,12 @@ msgstr "A(z) „{name}” melléklet beállításai" msgid "Attachments" msgstr "Mellékletek" +#. interface +#: crates/ui-egui/src/attachment_open.rs crates/ui-egui/src/compose.rs +#, fuzzy +msgid "Attachments can't be opened here." +msgstr "Itt nem lehet megnyitni a mellékleteket." + #. interface #: crates/ui-egui/src/attachment_open.rs #, fuzzy @@ -5100,8 +5106,20 @@ msgstr "Kész: naprakész" msgid "Done: {n} new" msgstr "Kész: {n} új" -#. android, ribbon location -#: apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/PicturesBanner.kt crates/engine/src/cmd/send_receive.rs +#. interface +#: crates/ui-egui/src/compose.rs +#, fuzzy +msgid "Double-click to download {name}" +msgstr "Kattintson duplán a letöltéshez: {name}" + +#. interface +#: crates/ui-egui/src/compose.rs +#, fuzzy +msgid "Double-click to open {name}" +msgstr "Kattintson duplán a megnyitáshoz: {name}" + +#. android, interface, ribbon location +#: apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/PicturesBanner.kt crates/engine/src/cmd/send_receive.rs crates/ui-egui/src/compose.rs #, fuzzy msgid "Download" msgstr "Letöltés" @@ -8974,6 +8992,12 @@ msgstr "MailCraft most tartsa {account} lépést Microsoft keresztül Microsoft msgid "MailCraft can't keep this account's rules on its server" msgstr "A MailCraft nem tudja a fiók szabályait a kiszolgálón tárolni" +#. interface +#: crates/ui-egui/src/attachment_open.rs +#, fuzzy +msgid "MailCraft can't open {name} because of its file type." +msgstr "A MailCraft nem tudja megnyitni ezt a fájlt a típusa miatt: {name}" + #. interface #: crates/ui-egui/src/account_setup/exchange.rs #, fuzzy @@ -11588,7 +11612,7 @@ msgid "Nothing was done: what the agent asked about changed after you were asked msgstr "Semmi sem történt: amit az ügynök kérdezett, megváltozott, miután téged megkérdeztek." #. interface -#: crates/ui-egui/src/dialogs.rs +#: crates/ui-egui/src/attachment_open.rs crates/ui-egui/src/dialogs.rs #, fuzzy msgid "Nothing was done: what you were asked about has changed since. Ask again." msgstr "Semmi sem történt: amire rákérdeztünk, azóta megváltozott. Próbálja újra." @@ -12026,7 +12050,7 @@ msgid "Only while MailCraft isn't the window in front, and only for the Inboxes msgstr "Csak akkor, amikor a MailCraft ablaka nincs előtérben, és csak a saját fiókok Beérkezett üzenetek mappáihoz." #. android, interface, ribbon -#: apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/AttachmentsView.kt apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/ReadingScreen.kt crates/ui-egui/src/attachment_open.rs crates/ui-egui/src/calendar_view.rs crates/ui-egui/src/dialogs.rs crates/ui-egui/src/reading.rs crates/ui-egui/src/ribbon.rs +#: apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/AttachmentsView.kt apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/ReadingScreen.kt crates/ui-egui/src/attachment_open.rs crates/ui-egui/src/calendar_view.rs crates/ui-egui/src/compose.rs crates/ui-egui/src/dialogs.rs crates/ui-egui/src/reading.rs crates/ui-egui/src/ribbon.rs #, fuzzy msgid "Open" msgstr "Megnyitás" @@ -12077,6 +12101,12 @@ msgstr "A párbeszédablak megnyitása" msgid "Open Draft" msgstr "A tervezet megnyitása" +#. command label +#: crates/ui-egui/src/lib.rs +#, fuzzy +msgid "Open Draft Attachment" +msgstr "Piszkozat mellékletének megnyitása" + #. interface #: crates/ui-egui/src/data_removal.rs #, fuzzy @@ -13584,7 +13614,7 @@ msgid "Remove Account" msgstr "Fiók törlése" #. command label, interface -#: crates/engine/src/cmd/compose.rs crates/engine/src/cmd/mail.rs crates/ui-egui/src/reading.rs +#: crates/engine/src/cmd/compose.rs crates/engine/src/cmd/mail.rs crates/ui-egui/src/compose.rs crates/ui-egui/src/reading.rs #, fuzzy msgid "Remove Attachment" msgstr "Melléklet eltávolítása" @@ -17932,6 +17962,12 @@ msgstr "A domain {domain} névre szerver automatikus beállítás (Autodiscover) msgid "The download was called off." msgstr "A letöltés megszakadt." +#. interface +#: crates/ui-egui/src/attachment_open.rs +#, fuzzy +msgid "The draft isn't open any more" +msgstr "A piszkozat már nincs megnyitva" + #. interface #: crates/ui-egui/src/dialogs.rs #, fuzzy diff --git a/crates/i18n/po/it.po b/crates/i18n/po/it.po index 6c8a8ff926..858cabc1c0 100644 --- a/crates/i18n/po/it.po +++ b/crates/i18n/po/it.po @@ -2384,6 +2384,11 @@ msgstr "Opzioni allegato per {name}" msgid "Attachments" msgstr "Allegati" +#. interface +#: crates/ui-egui/src/attachment_open.rs crates/ui-egui/src/compose.rs +msgid "Attachments can't be opened here." +msgstr "" + #. interface #: crates/ui-egui/src/attachment_open.rs #, fuzzy @@ -5100,8 +5105,18 @@ msgstr "Fatto: aggiornato" msgid "Done: {n} new" msgstr "Fatto: {n} nuovi" -#. android, ribbon location -#: apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/PicturesBanner.kt crates/engine/src/cmd/send_receive.rs +#. interface +#: crates/ui-egui/src/compose.rs +msgid "Double-click to download {name}" +msgstr "" + +#. interface +#: crates/ui-egui/src/compose.rs +msgid "Double-click to open {name}" +msgstr "" + +#. android, interface, ribbon location +#: apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/PicturesBanner.kt crates/engine/src/cmd/send_receive.rs crates/ui-egui/src/compose.rs #, fuzzy msgid "Download" msgstr "Scarica" @@ -8974,6 +8989,11 @@ msgstr "MailCraft ora può mantenere {account} sincronizzato con Microsoft trami msgid "MailCraft can't keep this account's rules on its server" msgstr "MailCraft non può conservare le regole di questo account sul suo server" +#. interface +#: crates/ui-egui/src/attachment_open.rs +msgid "MailCraft can't open {name} because of its file type." +msgstr "" + #. interface #: crates/ui-egui/src/account_setup/exchange.rs #, fuzzy @@ -11588,7 +11608,7 @@ msgid "Nothing was done: what the agent asked about changed after you were asked msgstr "Non è stato fatto nulla: ciò che l'agente ha chiesto è cambiato dopo la tua richiesta di conferma." #. interface -#: crates/ui-egui/src/dialogs.rs +#: crates/ui-egui/src/attachment_open.rs crates/ui-egui/src/dialogs.rs #, fuzzy msgid "Nothing was done: what you were asked about has changed since. Ask again." msgstr "Non è stato fatto nulla: ciò su cui è stata posta la domanda è cambiato nel frattempo. Riprovare." @@ -12026,7 +12046,7 @@ msgid "Only while MailCraft isn't the window in front, and only for the Inboxes msgstr "Solo quando MailCraft non è la finestra in primo piano, e solo per le cartelle Posta in arrivo dei propri account." #. android, interface, ribbon -#: apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/AttachmentsView.kt apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/ReadingScreen.kt crates/ui-egui/src/attachment_open.rs crates/ui-egui/src/calendar_view.rs crates/ui-egui/src/dialogs.rs crates/ui-egui/src/reading.rs crates/ui-egui/src/ribbon.rs +#: apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/AttachmentsView.kt apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/ReadingScreen.kt crates/ui-egui/src/attachment_open.rs crates/ui-egui/src/calendar_view.rs crates/ui-egui/src/compose.rs crates/ui-egui/src/dialogs.rs crates/ui-egui/src/reading.rs crates/ui-egui/src/ribbon.rs #, fuzzy msgid "Open" msgstr "Apri" @@ -12077,6 +12097,11 @@ msgstr "Apri finestra di dialogo" msgid "Open Draft" msgstr "Apri bozza" +#. command label +#: crates/ui-egui/src/lib.rs +msgid "Open Draft Attachment" +msgstr "" + #. interface #: crates/ui-egui/src/data_removal.rs #, fuzzy @@ -13578,7 +13603,7 @@ msgid "Remove Account" msgstr "Rimuovi account" #. command label, interface -#: crates/engine/src/cmd/compose.rs crates/engine/src/cmd/mail.rs crates/ui-egui/src/reading.rs +#: crates/engine/src/cmd/compose.rs crates/engine/src/cmd/mail.rs crates/ui-egui/src/compose.rs crates/ui-egui/src/reading.rs #, fuzzy msgid "Remove Attachment" msgstr "Rimuovi allegato" @@ -17919,6 +17944,11 @@ msgstr "Il dominio {domain} indica un server per la configurazione automatica (A msgid "The download was called off." msgstr "Il download è stato annullato." +#. interface +#: crates/ui-egui/src/attachment_open.rs +msgid "The draft isn't open any more" +msgstr "" + #. interface #: crates/ui-egui/src/dialogs.rs #, fuzzy diff --git a/crates/i18n/po/ka.po b/crates/i18n/po/ka.po index 64f93160aa..bc6fa8b2ae 100644 --- a/crates/i18n/po/ka.po +++ b/crates/i18n/po/ka.po @@ -2379,6 +2379,11 @@ msgstr "დანართის პარამეტრები: {name}" msgid "Attachments" msgstr "დანართები" +#. interface +#: crates/ui-egui/src/attachment_open.rs crates/ui-egui/src/compose.rs +msgid "Attachments can't be opened here." +msgstr "" + #. interface #: crates/ui-egui/src/attachment_open.rs #, fuzzy @@ -5092,8 +5097,18 @@ msgstr "მზადაა: განახლებულია" msgid "Done: {n} new" msgstr "მზადაა: ახალი {n}" -#. android, ribbon location -#: apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/PicturesBanner.kt crates/engine/src/cmd/send_receive.rs +#. interface +#: crates/ui-egui/src/compose.rs +msgid "Double-click to download {name}" +msgstr "" + +#. interface +#: crates/ui-egui/src/compose.rs +msgid "Double-click to open {name}" +msgstr "" + +#. android, interface, ribbon location +#: apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/PicturesBanner.kt crates/engine/src/cmd/send_receive.rs crates/ui-egui/src/compose.rs #, fuzzy msgid "Download" msgstr "ჩამოტვირთვა" @@ -8955,6 +8970,11 @@ msgstr "MailCraft-ს ახლა შეუძლია {account} Microsoft-თ msgid "MailCraft can't keep this account's rules on its server" msgstr "MailCraft ვერ ინახავს ამ ანგარიშის წესებს მის სერვერზე" +#. interface +#: crates/ui-egui/src/attachment_open.rs +msgid "MailCraft can't open {name} because of its file type." +msgstr "" + #. interface #: crates/ui-egui/src/account_setup/exchange.rs #, fuzzy @@ -11561,7 +11581,7 @@ msgid "Nothing was done: what the agent asked about changed after you were asked msgstr "არაფერი გაკეთებულა: ის, რასაც აგენტი ეკითხებოდა, შეიცვალა მას შემდეგ, რაც გკითხეს." #. interface -#: crates/ui-egui/src/dialogs.rs +#: crates/ui-egui/src/attachment_open.rs crates/ui-egui/src/dialogs.rs #, fuzzy msgid "Nothing was done: what you were asked about has changed since. Ask again." msgstr "არაფერი გაკეთებულა: ის, რაზეც გკითხეთ, მას შემდეგ შეიცვალა. სცადეთ თავიდან." @@ -11999,7 +12019,7 @@ msgid "Only while MailCraft isn't the window in front, and only for the Inboxes msgstr "მხოლოდ მაშინ, როცა MailCraft წინა პლანზე არ არის, და მხოლოდ თქვენი საკუთარი ანგარიშების „შემოსულებისთვის“." #. android, interface, ribbon -#: apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/AttachmentsView.kt apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/ReadingScreen.kt crates/ui-egui/src/attachment_open.rs crates/ui-egui/src/calendar_view.rs crates/ui-egui/src/dialogs.rs crates/ui-egui/src/reading.rs crates/ui-egui/src/ribbon.rs +#: apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/AttachmentsView.kt apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/ReadingScreen.kt crates/ui-egui/src/attachment_open.rs crates/ui-egui/src/calendar_view.rs crates/ui-egui/src/compose.rs crates/ui-egui/src/dialogs.rs crates/ui-egui/src/reading.rs crates/ui-egui/src/ribbon.rs #, fuzzy msgid "Open" msgstr "გახსნა" @@ -12050,6 +12070,11 @@ msgstr "დიალოგის გახსნა" msgid "Open Draft" msgstr "მონახაზის გახსნა" +#. command label +#: crates/ui-egui/src/lib.rs +msgid "Open Draft Attachment" +msgstr "" + #. interface #: crates/ui-egui/src/data_removal.rs #, fuzzy @@ -13545,7 +13570,7 @@ msgid "Remove Account" msgstr "ანგარიშის წაშლა" #. command label, interface -#: crates/engine/src/cmd/compose.rs crates/engine/src/cmd/mail.rs crates/ui-egui/src/reading.rs +#: crates/engine/src/cmd/compose.rs crates/engine/src/cmd/mail.rs crates/ui-egui/src/compose.rs crates/ui-egui/src/reading.rs #, fuzzy msgid "Remove Attachment" msgstr "დანართის წაშლა" @@ -17870,6 +17895,11 @@ msgstr "დომენი {domain} ავტომატური დაყე msgid "The download was called off." msgstr "ჩამოტვირთვა გაუქმდა." +#. interface +#: crates/ui-egui/src/attachment_open.rs +msgid "The draft isn't open any more" +msgstr "" + #. interface #: crates/ui-egui/src/dialogs.rs #, fuzzy diff --git a/crates/i18n/po/messages.pot b/crates/i18n/po/messages.pot index 90cb6da02b..da257eca2d 100644 --- a/crates/i18n/po/messages.pot +++ b/crates/i18n/po/messages.pot @@ -1983,6 +1983,11 @@ msgstr "" msgid "Attachments" msgstr "" +#. interface +#: crates/ui-egui/src/attachment_open.rs crates/ui-egui/src/compose.rs +msgid "Attachments can't be opened here." +msgstr "" + #. interface #: crates/ui-egui/src/attachment_open.rs msgid "Attachments can't be opened here: save it with Save As instead." @@ -4244,8 +4249,18 @@ msgstr "" msgid "Done: {n} new" msgstr "" -#. android, ribbon location -#: apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/PicturesBanner.kt crates/engine/src/cmd/send_receive.rs +#. interface +#: crates/ui-egui/src/compose.rs +msgid "Double-click to download {name}" +msgstr "" + +#. interface +#: crates/ui-egui/src/compose.rs +msgid "Double-click to open {name}" +msgstr "" + +#. android, interface, ribbon location +#: apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/PicturesBanner.kt crates/engine/src/cmd/send_receive.rs crates/ui-egui/src/compose.rs msgid "Download" msgstr "" @@ -7456,6 +7471,11 @@ msgstr "" msgid "MailCraft can't keep this account's rules on its server" msgstr "" +#. interface +#: crates/ui-egui/src/attachment_open.rs +msgid "MailCraft can't open {name} because of its file type." +msgstr "" + #. interface #: crates/ui-egui/src/account_setup/exchange.rs msgid "MailCraft can't sign in to this server this way yet (it wants Kerberos). Ask your administrator whether it can take a user name and password over an encrypted connection." @@ -9621,7 +9641,7 @@ msgid "Nothing was done: what the agent asked about changed after you were asked msgstr "" #. interface -#: crates/ui-egui/src/dialogs.rs +#: crates/ui-egui/src/attachment_open.rs crates/ui-egui/src/dialogs.rs msgid "Nothing was done: what you were asked about has changed since. Ask again." msgstr "" @@ -9986,7 +10006,7 @@ msgid "Only while MailCraft isn't the window in front, and only for the Inboxes msgstr "" #. android, interface, ribbon -#: apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/AttachmentsView.kt apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/ReadingScreen.kt crates/ui-egui/src/attachment_open.rs crates/ui-egui/src/calendar_view.rs crates/ui-egui/src/dialogs.rs crates/ui-egui/src/reading.rs crates/ui-egui/src/ribbon.rs +#: apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/AttachmentsView.kt apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/ReadingScreen.kt crates/ui-egui/src/attachment_open.rs crates/ui-egui/src/calendar_view.rs crates/ui-egui/src/compose.rs crates/ui-egui/src/dialogs.rs crates/ui-egui/src/reading.rs crates/ui-egui/src/ribbon.rs msgid "Open" msgstr "" @@ -10027,6 +10047,11 @@ msgstr "" msgid "Open Draft" msgstr "" +#. command label +#: crates/ui-egui/src/lib.rs +msgid "Open Draft Attachment" +msgstr "" + #. interface #: crates/ui-egui/src/data_removal.rs msgid "Open MailCraft's data folder" @@ -11280,7 +11305,7 @@ msgid "Remove Account" msgstr "" #. command label, interface -#: crates/engine/src/cmd/compose.rs crates/engine/src/cmd/mail.rs crates/ui-egui/src/reading.rs +#: crates/engine/src/cmd/compose.rs crates/engine/src/cmd/mail.rs crates/ui-egui/src/compose.rs crates/ui-egui/src/reading.rs msgid "Remove Attachment" msgstr "" @@ -14881,6 +14906,11 @@ msgstr "" msgid "The download was called off." msgstr "" +#. interface +#: crates/ui-egui/src/attachment_open.rs +msgid "The draft isn't open any more" +msgstr "" + #. interface #: crates/ui-egui/src/dialogs.rs msgid "The e-mail address of the person whose calendar you want to open" diff --git a/crates/i18n/po/nl.po b/crates/i18n/po/nl.po index cba3c6eda4..9efee262b0 100644 --- a/crates/i18n/po/nl.po +++ b/crates/i18n/po/nl.po @@ -2309,6 +2309,11 @@ msgstr "Opties voor bijlagen voor {name}" msgid "Attachments" msgstr "Bijlagen" +#. interface +#: crates/ui-egui/src/attachment_open.rs crates/ui-egui/src/compose.rs +msgid "Attachments can't be opened here." +msgstr "" + #. interface #: crates/ui-egui/src/attachment_open.rs #, fuzzy @@ -4933,8 +4938,18 @@ msgstr "Gereed: bijgewerkt" msgid "Done: {n} new" msgstr "Gereed: {n} nieuw" -#. android, ribbon location -#: apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/PicturesBanner.kt crates/engine/src/cmd/send_receive.rs +#. interface +#: crates/ui-egui/src/compose.rs +msgid "Double-click to download {name}" +msgstr "" + +#. interface +#: crates/ui-egui/src/compose.rs +msgid "Double-click to open {name}" +msgstr "" + +#. android, interface, ribbon location +#: apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/PicturesBanner.kt crates/engine/src/cmd/send_receive.rs crates/ui-egui/src/compose.rs msgid "Download" msgstr "Downloaden" @@ -8663,6 +8678,11 @@ msgstr "MailCraft kan {account} nu bijhouden bij Microsoft via Microsoft Graph, msgid "MailCraft can't keep this account's rules on its server" msgstr "MailCraft kan de regels van dit account niet op de server ervan bewaren" +#. interface +#: crates/ui-egui/src/attachment_open.rs +msgid "MailCraft can't open {name} because of its file type." +msgstr "" + #. interface #: crates/ui-egui/src/account_setup/exchange.rs #, fuzzy @@ -11208,7 +11228,7 @@ msgid "Nothing was done: what the agent asked about changed after you were asked msgstr "Er werd niets gedaan: waar de agent om vroeg, is veranderd nadat u werd gevraagd." #. interface -#: crates/ui-egui/src/dialogs.rs +#: crates/ui-egui/src/attachment_open.rs crates/ui-egui/src/dialogs.rs #, fuzzy msgid "Nothing was done: what you were asked about has changed since. Ask again." msgstr "Er is niets gedaan: waar u naar gevraagd werd, is sindsdien veranderd. Probeer het opnieuw." @@ -11642,7 +11662,7 @@ msgid "Only while MailCraft isn't the window in front, and only for the Inboxes msgstr "Alleen wanneer MailCraft niet het voorste venster is, en alleen voor de Postvakken IN van uw eigen accounts." #. android, interface, ribbon -#: apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/AttachmentsView.kt apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/ReadingScreen.kt crates/ui-egui/src/attachment_open.rs crates/ui-egui/src/calendar_view.rs crates/ui-egui/src/dialogs.rs crates/ui-egui/src/reading.rs crates/ui-egui/src/ribbon.rs +#: apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/AttachmentsView.kt apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/ReadingScreen.kt crates/ui-egui/src/attachment_open.rs crates/ui-egui/src/calendar_view.rs crates/ui-egui/src/compose.rs crates/ui-egui/src/dialogs.rs crates/ui-egui/src/reading.rs crates/ui-egui/src/ribbon.rs msgid "Open" msgstr "Openen" @@ -11686,6 +11706,11 @@ msgstr "Dialoogvenster openen" msgid "Open Draft" msgstr "Concept openen" +#. command label +#: crates/ui-egui/src/lib.rs +msgid "Open Draft Attachment" +msgstr "" + #. interface #: crates/ui-egui/src/data_removal.rs #, fuzzy @@ -13148,7 +13173,7 @@ msgid "Remove Account" msgstr "Account verwijderen" #. command label, interface -#: crates/engine/src/cmd/compose.rs crates/engine/src/cmd/mail.rs crates/ui-egui/src/reading.rs +#: crates/engine/src/cmd/compose.rs crates/engine/src/cmd/mail.rs crates/ui-egui/src/compose.rs crates/ui-egui/src/reading.rs msgid "Remove Attachment" msgstr "Bijlage verwijderen" @@ -17369,6 +17394,11 @@ msgstr "Het domein {domain} noemt een server voor de automatische instelling (Au msgid "The download was called off." msgstr "De download is afgebroken." +#. interface +#: crates/ui-egui/src/attachment_open.rs +msgid "The draft isn't open any more" +msgstr "" + #. interface #: crates/ui-egui/src/dialogs.rs #, fuzzy diff --git a/crates/i18n/po/pl.po b/crates/i18n/po/pl.po index 84418f6a2f..9612693d14 100644 --- a/crates/i18n/po/pl.po +++ b/crates/i18n/po/pl.po @@ -2390,6 +2390,11 @@ msgstr "Opcje załącznika {name}" msgid "Attachments" msgstr "Załączniki" +#. interface +#: crates/ui-egui/src/attachment_open.rs crates/ui-egui/src/compose.rs +msgid "Attachments can't be opened here." +msgstr "" + #. interface #: crates/ui-egui/src/attachment_open.rs #, fuzzy @@ -5113,8 +5118,18 @@ msgstr "Gotowe: aktualne" msgid "Done: {n} new" msgstr "Gotowe: nowych {n}" -#. android, ribbon location -#: apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/PicturesBanner.kt crates/engine/src/cmd/send_receive.rs +#. interface +#: crates/ui-egui/src/compose.rs +msgid "Double-click to download {name}" +msgstr "" + +#. interface +#: crates/ui-egui/src/compose.rs +msgid "Double-click to open {name}" +msgstr "" + +#. android, interface, ribbon location +#: apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/PicturesBanner.kt crates/engine/src/cmd/send_receive.rs crates/ui-egui/src/compose.rs #, fuzzy msgid "Download" msgstr "Pobieranie" @@ -9011,6 +9026,11 @@ msgstr "MailCraft może teraz synchronizować konto {account} z Microsoft przez msgid "MailCraft can't keep this account's rules on its server" msgstr "MailCraft nie może zachować reguł tego konta na jego serwerze" +#. interface +#: crates/ui-egui/src/attachment_open.rs +msgid "MailCraft can't open {name} because of its file type." +msgstr "" + #. interface #: crates/ui-egui/src/account_setup/exchange.rs #, fuzzy @@ -11632,7 +11652,7 @@ msgid "Nothing was done: what the agent asked about changed after you were asked msgstr "Nic nie zrobiono: to, o co pytał agent, zmieniło się po zadaniu pytania." #. interface -#: crates/ui-egui/src/dialogs.rs +#: crates/ui-egui/src/attachment_open.rs crates/ui-egui/src/dialogs.rs #, fuzzy msgid "Nothing was done: what you were asked about has changed since. Ask again." msgstr "Nic nie zostało zrobione: to, o co pytano, zmieniło się od tego czasu. Spróbuj ponownie." @@ -12070,7 +12090,7 @@ msgid "Only while MailCraft isn't the window in front, and only for the Inboxes msgstr "Tylko gdy MailCraft nie jest oknem na wierzchu i tylko dla skrzynek odbiorczych Twoich własnych kont." #. android, interface, ribbon -#: apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/AttachmentsView.kt apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/ReadingScreen.kt crates/ui-egui/src/attachment_open.rs crates/ui-egui/src/calendar_view.rs crates/ui-egui/src/dialogs.rs crates/ui-egui/src/reading.rs crates/ui-egui/src/ribbon.rs +#: apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/AttachmentsView.kt apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/ReadingScreen.kt crates/ui-egui/src/attachment_open.rs crates/ui-egui/src/calendar_view.rs crates/ui-egui/src/compose.rs crates/ui-egui/src/dialogs.rs crates/ui-egui/src/reading.rs crates/ui-egui/src/ribbon.rs #, fuzzy msgid "Open" msgstr "Otwórz" @@ -12121,6 +12141,11 @@ msgstr "Otwórz okno dialogowe" msgid "Open Draft" msgstr "Otwórz wersję roboczą" +#. command label +#: crates/ui-egui/src/lib.rs +msgid "Open Draft Attachment" +msgstr "" + #. interface #: crates/ui-egui/src/data_removal.rs #, fuzzy @@ -13632,7 +13657,7 @@ msgid "Remove Account" msgstr "Usuń konto" #. command label, interface -#: crates/engine/src/cmd/compose.rs crates/engine/src/cmd/mail.rs crates/ui-egui/src/reading.rs +#: crates/engine/src/cmd/compose.rs crates/engine/src/cmd/mail.rs crates/ui-egui/src/compose.rs crates/ui-egui/src/reading.rs #, fuzzy msgid "Remove Attachment" msgstr "Usuń załącznik" @@ -17992,6 +18017,11 @@ msgstr "Domena {domain} wskazuje serwer automatycznej konfiguracji (Autodiscover msgid "The download was called off." msgstr "Pobieranie zostało odwołane." +#. interface +#: crates/ui-egui/src/attachment_open.rs +msgid "The draft isn't open any more" +msgstr "" + #. interface #: crates/ui-egui/src/dialogs.rs #, fuzzy diff --git a/crates/i18n/po/ro.po b/crates/i18n/po/ro.po index d5f19ecc43..0d9867c0de 100644 --- a/crates/i18n/po/ro.po +++ b/crates/i18n/po/ro.po @@ -2388,6 +2388,11 @@ msgstr "Opțiuni atașament pentru {name}" msgid "Attachments" msgstr "Atașamente" +#. interface +#: crates/ui-egui/src/attachment_open.rs crates/ui-egui/src/compose.rs +msgid "Attachments can't be opened here." +msgstr "" + #. interface #: crates/ui-egui/src/attachment_open.rs #, fuzzy @@ -5111,8 +5116,18 @@ msgstr "Gata: la zi" msgid "Done: {n} new" msgstr "Gata: {n} noi" -#. android, ribbon location -#: apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/PicturesBanner.kt crates/engine/src/cmd/send_receive.rs +#. interface +#: crates/ui-egui/src/compose.rs +msgid "Double-click to download {name}" +msgstr "" + +#. interface +#: crates/ui-egui/src/compose.rs +msgid "Double-click to open {name}" +msgstr "" + +#. android, interface, ribbon location +#: apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/PicturesBanner.kt crates/engine/src/cmd/send_receive.rs crates/ui-egui/src/compose.rs #, fuzzy msgid "Download" msgstr "Descărcare" @@ -9007,6 +9022,11 @@ msgstr "MailCraft poate acum să sincronizeze {account} cu Microsoft prin Micros msgid "MailCraft can't keep this account's rules on its server" msgstr "MailCraft nu poate păstra regulile acestui cont pe serverul lui" +#. interface +#: crates/ui-egui/src/attachment_open.rs +msgid "MailCraft can't open {name} because of its file type." +msgstr "" + #. interface #: crates/ui-egui/src/account_setup/exchange.rs #, fuzzy @@ -11628,7 +11648,7 @@ msgid "Nothing was done: what the agent asked about changed after you were asked msgstr "Nu s-a făcut nimic: ce a cerut agentul s-a schimbat după ce ați fost întrebat." #. interface -#: crates/ui-egui/src/dialogs.rs +#: crates/ui-egui/src/attachment_open.rs crates/ui-egui/src/dialogs.rs #, fuzzy msgid "Nothing was done: what you were asked about has changed since. Ask again." msgstr "Nu s-a făcut nimic: ceea ce vi s-a cerut s-a schimbat între timp. Încercați din nou." @@ -12066,7 +12086,7 @@ msgid "Only while MailCraft isn't the window in front, and only for the Inboxes msgstr "Doar cât timp MailCraft nu este fereastra din față și doar pentru dosarele Mesaje primite ale propriilor conturi." #. android, interface, ribbon -#: apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/AttachmentsView.kt apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/ReadingScreen.kt crates/ui-egui/src/attachment_open.rs crates/ui-egui/src/calendar_view.rs crates/ui-egui/src/dialogs.rs crates/ui-egui/src/reading.rs crates/ui-egui/src/ribbon.rs +#: apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/AttachmentsView.kt apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/ReadingScreen.kt crates/ui-egui/src/attachment_open.rs crates/ui-egui/src/calendar_view.rs crates/ui-egui/src/compose.rs crates/ui-egui/src/dialogs.rs crates/ui-egui/src/reading.rs crates/ui-egui/src/ribbon.rs #, fuzzy msgid "Open" msgstr "Deschidere" @@ -12117,6 +12137,11 @@ msgstr "Deschidere fereastră de dialog" msgid "Open Draft" msgstr "Deschidere ciornă" +#. command label +#: crates/ui-egui/src/lib.rs +msgid "Open Draft Attachment" +msgstr "" + #. interface #: crates/ui-egui/src/data_removal.rs #, fuzzy @@ -13628,7 +13653,7 @@ msgid "Remove Account" msgstr "Eliminare cont" #. command label, interface -#: crates/engine/src/cmd/compose.rs crates/engine/src/cmd/mail.rs crates/ui-egui/src/reading.rs +#: crates/engine/src/cmd/compose.rs crates/engine/src/cmd/mail.rs crates/ui-egui/src/compose.rs crates/ui-egui/src/reading.rs #, fuzzy msgid "Remove Attachment" msgstr "Eliminare atașament" @@ -17988,6 +18013,11 @@ msgstr "Domeniul {domain} indică un server pentru configurarea automată (Autod msgid "The download was called off." msgstr "Descărcarea a fost anulată." +#. interface +#: crates/ui-egui/src/attachment_open.rs +msgid "The draft isn't open any more" +msgstr "" + #. interface #: crates/ui-egui/src/dialogs.rs #, fuzzy diff --git a/crates/i18n/po/zh_CN.po b/crates/i18n/po/zh_CN.po index a6c04b5dfd..408b5e08b6 100644 --- a/crates/i18n/po/zh_CN.po +++ b/crates/i18n/po/zh_CN.po @@ -2382,6 +2382,11 @@ msgstr "{name} 的附件选项" msgid "Attachments" msgstr "附件" +#. interface +#: crates/ui-egui/src/attachment_open.rs crates/ui-egui/src/compose.rs +msgid "Attachments can't be opened here." +msgstr "" + #. interface #: crates/ui-egui/src/attachment_open.rs #, fuzzy @@ -5104,8 +5109,18 @@ msgstr "完成:已是最新状态" msgid "Done: {n} new" msgstr "完成:{n} 项新增" -#. android, ribbon location -#: apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/PicturesBanner.kt crates/engine/src/cmd/send_receive.rs +#. interface +#: crates/ui-egui/src/compose.rs +msgid "Double-click to download {name}" +msgstr "" + +#. interface +#: crates/ui-egui/src/compose.rs +msgid "Double-click to open {name}" +msgstr "" + +#. android, interface, ribbon location +#: apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/PicturesBanner.kt crates/engine/src/cmd/send_receive.rs crates/ui-egui/src/compose.rs #, fuzzy msgid "Download" msgstr "下载" @@ -8972,6 +8987,11 @@ msgstr "MailCraft 现在可以像 Outlook 网页版一样,通过 Microsoft Gra msgid "MailCraft can't keep this account's rules on its server" msgstr "MailCraft 无法在服务器上保存此账户的规则" +#. interface +#: crates/ui-egui/src/attachment_open.rs +msgid "MailCraft can't open {name} because of its file type." +msgstr "" + #. interface #: crates/ui-egui/src/account_setup/exchange.rs #, fuzzy @@ -11585,7 +11605,7 @@ msgid "Nothing was done: what the agent asked about changed after you were asked msgstr "未执行任何操作:在征求您的确认后,智能体询问的内容发生了变化。" #. interface -#: crates/ui-egui/src/dialogs.rs +#: crates/ui-egui/src/attachment_open.rs crates/ui-egui/src/dialogs.rs #, fuzzy msgid "Nothing was done: what you were asked about has changed since. Ask again." msgstr "未执行任何操作:询问您的内容此后已发生变化。请重试。" @@ -12023,7 +12043,7 @@ msgid "Only while MailCraft isn't the window in front, and only for the Inboxes msgstr "仅在 MailCraft 不是前台窗口时通知,且只适用于您自己账户的收件箱。" #. android, interface, ribbon -#: apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/AttachmentsView.kt apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/ReadingScreen.kt crates/ui-egui/src/attachment_open.rs crates/ui-egui/src/calendar_view.rs crates/ui-egui/src/dialogs.rs crates/ui-egui/src/reading.rs crates/ui-egui/src/ribbon.rs +#: apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/AttachmentsView.kt apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/ReadingScreen.kt crates/ui-egui/src/attachment_open.rs crates/ui-egui/src/calendar_view.rs crates/ui-egui/src/compose.rs crates/ui-egui/src/dialogs.rs crates/ui-egui/src/reading.rs crates/ui-egui/src/ribbon.rs #, fuzzy msgid "Open" msgstr "打开" @@ -12074,6 +12094,11 @@ msgstr "打开对话框" msgid "Open Draft" msgstr "打开草稿" +#. command label +#: crates/ui-egui/src/lib.rs +msgid "Open Draft Attachment" +msgstr "" + #. interface #: crates/ui-egui/src/data_removal.rs #, fuzzy @@ -13583,7 +13608,7 @@ msgid "Remove Account" msgstr "移除账户" #. command label, interface -#: crates/engine/src/cmd/compose.rs crates/engine/src/cmd/mail.rs crates/ui-egui/src/reading.rs +#: crates/engine/src/cmd/compose.rs crates/engine/src/cmd/mail.rs crates/ui-egui/src/compose.rs crates/ui-egui/src/reading.rs #, fuzzy msgid "Remove Attachment" msgstr "移除附件" @@ -17927,6 +17952,11 @@ msgstr "域名 {domain} 指定了自动设置 (Autodiscover) 所用的服务器 msgid "The download was called off." msgstr "下载已取消。" +#. interface +#: crates/ui-egui/src/attachment_open.rs +msgid "The draft isn't open any more" +msgstr "" + #. interface #: crates/ui-egui/src/dialogs.rs #, fuzzy diff --git a/crates/ui-egui/Cargo.toml b/crates/ui-egui/Cargo.toml index 5d36af155c..177e345a9d 100644 --- a/crates/ui-egui/Cargo.toml +++ b/crates/ui-egui/Cargo.toml @@ -20,6 +20,8 @@ mailcraft-host = { workspace = true } egui = { workspace = true, features = ["monochrome_emoji_fonts"] } serde = { workspace = true } serde_json = { workspace = true } +# Bind an attachment warning to the exact draft copy, including in the browser. +sha2 = { workspace = true } log = { workspace = true } # The host a link really goes to, for its tip. mailcraft-link = { workspace = true } diff --git a/crates/ui-egui/src/attachment_open.rs b/crates/ui-egui/src/attachment_open.rs index af2b272fda..4482c9a880 100644 --- a/crates/ui-egui/src/attachment_open.rs +++ b/crates/ui-egui/src/attachment_open.rs @@ -1,7 +1,7 @@ // SPDX-FileCopyrightText: MailCraft contributors // SPDX-License-Identifier: MIT OR Apache-2.0 -//! `mail.openAttachment` in the window (#126): an attachment opened with the computer's own -//! program for that kind of file, as Outlook's double-click and Open do. +//! Attachments opened with the computer's own program for that kind of file, from a received +//! message (#126) or from the message being written. //! //! What the sender chose is never trusted: the kind of file decides first //! ([`mailcraft_engine::opening::verdict`]): programs, scripts, shortcuts, installers, disk @@ -12,12 +12,14 @@ //! file is downloaded instead. Agents can't ask for any of it (`agent::access`). use mailcraft_engine::opening::{self, Verdict}; -use mailcraft_model::Id; +use mailcraft_model::{Attachment, Id}; use serde_json::{Value, json}; +use sha2::{Digest as _, Sha256}; use crate::MailApp; pub(crate) const OPEN: &str = "mail.openAttachment"; +pub(crate) const OPEN_DRAFT: &str = "ui.openDraftAttachment"; /// The attachment the params name: its message, its index and its name. fn target(app: &MailApp, p: &Value) -> Result<(Id, usize, String), String> { @@ -38,8 +40,12 @@ fn target(app: &MailApp, p: &Value) -> Result<(Id, usize, String), String> { /// for everything else (it opens, or it is refused, without a question). pub(crate) fn question(app: &MailApp, p: &Value) -> Option<(String, String, String)> { let (_, _, name) = target(app, p).ok()?; - let shown = opening::file_name(&name); - let why = match opening::verdict(&name) { + warning(&name) +} + +fn warning(name: &str) -> Option<(String, String, String)> { + let shown = opening::file_name(name); + let why = match opening::verdict(name) { Verdict::Macros => tl!("Files like this can carry macros, which run as programs do. Open it only if you know who sent it and expect it."), Verdict::Scripts => { tl!("Pages like this open in the browser, where scripts in them run. Open it only if you know who sent it and expect it.") @@ -53,6 +59,37 @@ pub(crate) fn question(app: &MailApp, p: &Value) -> Option<(String, String, Stri Some((tl!("Opening Mail Attachment").to_string(), text, tl!("Open").to_string())) } +fn draft_target<'a>(app: &'a MailApp, p: &Value) -> Result<&'a Attachment, String> { + let id = mailcraft_engine::p::id_strict(p, "compose") + .map_err(|e| e.to_string())? + .ok_or_else(|| "bad parameters: `compose` (number) is required".to_string())?; + let index = p.get("index").and_then(Value::as_u64).ok_or_else(|| "bad parameters: `index` (number) is required".to_string())?; + let draft = app.session.composing_by_id(id).ok_or_else(|| tl!("The draft isn't open any more").to_string())?; + let index = usize::try_from(index).ok(); + index.and_then(|index| draft.attachments.get(index)).ok_or_else(|| tl!("The message has no such attachment").to_string()) +} + +/// Bind the question to the name and bytes it asked about, even if the draft is edited while +/// the question is open. A stored attachment already has the digest of its bytes. +fn draft_attachment_identity(attachment: &Attachment) -> Value { + let digest = match attachment.kept.filter(|_| attachment.data.is_empty()) { + Some(reference) => reference.sha256, + None => Sha256::digest(attachment.data.as_slice()).into(), + }; + json!([attachment.name, digest]) +} + +pub(crate) fn draft_question(app: &MailApp, p: &Value) -> Option { + let attachment = draft_target(app, p).ok()?; + let (title, text, action) = warning(&attachment.name)?; + Some(crate::dialogs::Question::new( + &title, + text, + &action, + json!({"confirmed": true, "draftAttachmentAsked": draft_attachment_identity(attachment)}), + )) +} + /// What the owner is told when an attachment isn't opened on Linux or a BSD because neither /// program that says what kind of file it is (`gio`, `kmimetypefinder`) is installed: the host /// opens a file only once the desktop has said it is the kind its name says. @@ -69,36 +106,61 @@ pub fn sandbox_kind_text() -> String { /// `mail.openAttachment` from the window, the control channel or a test. pub(crate) fn ui_command(app: &mut MailApp, id: &str, p: &Value) -> Option> { - if id != OPEN { - return None; + match id { + OPEN => Some(open(app, p)), + OPEN_DRAFT => Some(open_draft(app, p)), + _ => None, } - Some(open(app, p)) } fn open(app: &mut MailApp, p: &Value) -> Result { let (message, index, name) = target(app, p)?; - let verdict = opening::verdict(&name); + let file = checked_file(&name, p, false)?; + let bytes = app.session.content(message, mailcraft_engine::Part::Attachment(index)).map_err(|e| e.to_string())?; + handoff(app, file, &bytes, false) +} + +fn open_draft(app: &mut MailApp, p: &Value) -> Result { + let attachment = draft_target(app, p)?; + let file = checked_file(&attachment.name, p, true)?; + if p.get("draftAttachmentAsked").is_some_and(|asked| *asked != draft_attachment_identity(attachment)) { + return Err(tl!("Nothing was done: what you were asked about has changed since. Ask again.").into()); + } + let read = app.session.attachment_reader(attachment).map_err(|e| e.to_string())?; + let bytes = read().map_err(|e| e.to_string())?; + handoff(app, file, &bytes, true) +} + +fn checked_file(name: &str, p: &Value, draft: bool) -> Result { + let verdict = opening::verdict(name); if verdict == Verdict::Blocked { - return Err(opening::blocked_message(&name)); + return Err(if draft { + let shown: String = opening::file_name(name).chars().take(60).collect(); + crate::i18n::fmt(tl!("MailCraft can't open {name} because of its file type."), &[("name", &shown)]) + } else { + opening::blocked_message(name) + }); } // The window asks first ([`question`]) and its yes says so; any other caller says so itself. if verdict.asks() && p.get("confirmed").and_then(Value::as_bool) != Some(true) { return Err("bad parameters: this kind of file is asked about first; `\"confirmed\": true` says the owner said yes".into()); } - let file = opening::file_name(&name); - let bytes = app.session.content(message, mailcraft_engine::Part::Attachment(index)).map_err(|e| e.to_string())?; + Ok(opening::file_name(name)) +} + +fn handoff(app: &mut MailApp, file: String, bytes: &[u8], draft: bool) -> Result { if let Some(open_file) = &app.services.open_file { - open_file(&file, bytes.as_slice())?; + open_file(&file, bytes)?; app.status(crate::i18n::fmt(tl!("Opening {name}"), &[("name", &file)])); return Ok(json!({"name": file, "opened": true})); } // The browser opens nothing of the computer's: the file is downloaded instead. if let Some(download) = &app.services.download { - download(&file, bytes.as_slice())?; + download(&file, bytes)?; app.status(crate::i18n::fmt(tl!("Downloaded {name}"), &[("name", &file)])); return Ok(json!({"name": file, "downloaded": true})); } - Err(tl!("Attachments can't be opened here: save it with Save As instead.").to_string()) + Err(if draft { tl!("Attachments can't be opened here.") } else { tl!("Attachments can't be opened here: save it with Save As instead.") }.into()) } #[cfg(test)] diff --git a/crates/ui-egui/src/compose.rs b/crates/ui-egui/src/compose.rs index 3746c745ec..7fc010d79b 100644 --- a/crates/ui-egui/src/compose.rs +++ b/crates/ui-egui/src/compose.rs @@ -9,6 +9,8 @@ use serde_json::json; use crate::theme::{Tokens, paint_clipped, regular}; use crate::{MailApp, icons}; +#[cfg(test)] +mod attachment_tests; pub(crate) mod editor; #[cfg(test)] mod font_tests; @@ -178,6 +180,7 @@ fn recipient_field(app: &mut MailApp, ui: &mut Ui, key: &str, label: &str, text: /// What the window shows of the message being written besides its body (copied out of the /// session once a frame, so the commands it runs can change the message meanwhile). struct Shown { + id: u64, mode: ComposeMode, dirty: bool, draft: bool, @@ -200,6 +203,7 @@ impl Shown { fn of(app: &MailApp) -> Option { let c = app.session.compose.as_ref()?; Some(Shown { + id: c.id, mode: c.mode, send_at: c.send_at, dirty: c.dirty, @@ -256,33 +260,13 @@ pub(crate) fn show_in(app: &mut MailApp, ui: &mut Ui, window: Option, keybo header(app, ui, &c, focus_to); } - // Attachments, each with a way to take it off again. + // Attachments, with separate targets to open and remove each one. if !c.attachments.is_empty() { egui::Frame::NONE.inner_margin(egui::Margin { left: 16, right: 12, top: 6, bottom: 6 }).show(ui, |ui| { ui.horizontal_wrapped(|ui| { ui.spacing_mut().item_spacing = vec2(6.0, 6.0); for (i, (name, size)) in c.attachments.iter().enumerate() { - let label = format!("{name} ({size})"); - let w = ui.ctx().fonts_mut(|f| f.layout_no_wrap(label.clone(), regular(12.0), t.text).size().x).min(260.0); - let (r, _) = ui.allocate_exact_size(vec2(w + 52.0, 26.0), Sense::hover()); - ui.painter().rect(r, 5.0, t.panel, Stroke::new(1.0, t.border), egui::StrokeKind::Inside); - icons::paint( - ui.painter(), - Rect::from_center_size(pos2(r.min.x + 13.0, r.center().y), vec2(16.0, 16.0)), - "attach", - t.icon, - t.accent, - ); - paint_clipped(ui.painter(), pos2(r.min.x + 26.0, r.center().y), w, &label, regular(12.0), t.text); - let x = Rect::from_center_size(pos2(r.max.x - 12.0, r.center().y), vec2(18.0, 18.0)); - let xr = ui.interact(x, ui.scope_id().with(("unattach", i)), Sense::click()); - if xr.hovered() { - ui.painter().rect_filled(x, 3.0, t.hover); - } - icons::paint(ui.painter(), x.shrink(4.0), "close", t.text_dim, t.accent); - if xr.on_hover_text(tl!("Remove")).clicked() { - let _ = app.execute("compose.removeAttachment", json!({"index": i})); - } + attachment_chip(app, ui, &t, c.id, i, name, size); } }); }); @@ -315,6 +299,63 @@ pub(crate) fn show_in(app: &mut MailApp, ui: &mut Ui, window: Option, keybo }); } +fn attachment_chip(app: &mut MailApp, ui: &mut Ui, t: &Tokens, compose: u64, index: usize, name: &str, size: &str) { + let command = crate::attachment_open::OPEN_DRAFT; + let can_open = app.enabled(command); + let download = app.services.open_file.is_none(); + let label = format!("{name} ({size})"); + let w = ui.ctx().fonts_mut(|f| f.layout_no_wrap(label.clone(), regular(12.0), t.text).size().x).min(260.0); + let (rect, _) = ui.allocate_exact_size(vec2(w + 52.0, 26.0), Sense::hover()); + let x = Rect::from_center_size(pos2(rect.max.x - 12.0, rect.center().y), vec2(18.0, 18.0)); + let main = Rect::from_min_max(rect.min, pos2(x.min.x, rect.max.y)); + let id = ui.scope_id().with(("draftAttachment", compose, index)); + let file = ui.interact(main, id, if can_open { Sense::click() } else { Sense::hover() }); + let remove = ui.interact(x, id.with("remove"), Sense::click()); + app.hit.add("draftAttachment", index as u64, main); + app.hit.add("draftAttachmentRemove", index as u64, x); + + ui.painter().rect(rect, 5.0, t.panel, Stroke::new(1.0, t.border), egui::StrokeKind::Inside); + if can_open { + crate::widgets::bg(ui, main.shrink(1.0), &file, file.has_focus(), t); + } + icons::paint(ui.painter(), Rect::from_center_size(pos2(rect.min.x + 13.0, rect.center().y), vec2(16.0, 16.0)), "attach", t.icon, t.accent); + paint_clipped(ui.painter(), pos2(rect.min.x + 26.0, rect.center().y), w, &label, regular(12.0), t.text); + crate::widgets::bg(ui, x, &remove, remove.has_focus(), t); + icons::paint(ui.painter(), x.shrink(4.0), "close", t.text_dim, t.accent); + remove.widget_info(|| egui::WidgetInfo::labeled(egui::Role::Button, true, tl!("Remove Attachment"))); + if remove.on_hover_text(tl!("Remove")).clicked() { + let _ = app.execute("compose.removeAttachment", json!({"compose": compose, "index": index})); + } + + let hint = if !can_open { + tl!("Attachments can't be opened here.") + } else if download { + tl!("Double-click to download {name}") + } else { + tl!("Double-click to open {name}") + }; + let file = file.on_hover_text(crate::i18n::fmt(hint, &[("name", name)])); + file.widget_info(|| egui::WidgetInfo::labeled(egui::Role::Button, can_open, &label)); + let params = || json!({"compose": compose, "index": index}); + let pointer_clicked = file.clicked_by(egui::PointerButton::Primary); + if pointer_clicked { + file.request_focus(); + } + // `clicked` also includes keyboard and accessibility activation, which don't need two clicks. + if can_open && (file.double_clicked() || (file.clicked() && !pointer_clicked)) { + let _ = app.run(command, params()); + } + if can_open { + file.context_menu(|ui| { + if download { + crate::widgets::mi(ui, app, "Download", command, params()); + } else { + crate::widgets::mi(ui, app, "Open", command, params()); + } + }); + } +} + /// What the message is and its actions, over its lines in the reading pane. The actions use /// icons when their labels don't fit, and the status can have a line below them. fn action_bar(app: &mut MailApp, ui: &mut Ui, c: &Shown, window: Option) { diff --git a/crates/ui-egui/src/compose/attachment_tests.rs b/crates/ui-egui/src/compose/attachment_tests.rs new file mode 100644 index 0000000000..cc5d5ca546 --- /dev/null +++ b/crates/ui-egui/src/compose/attachment_tests.rs @@ -0,0 +1,161 @@ +// SPDX-FileCopyrightText: MailCraft contributors +// SPDX-License-Identifier: MIT OR Apache-2.0 + +use std::sync::{Arc, Mutex}; + +use egui::{Key, PointerButton}; +use egui_kittest::kittest::{NodeT, Queryable}; +use mailcraft_engine::store::{self, Digest}; +use mailcraft_model::Attachment; +use serde_json::json; + +use super::tests::app; +use crate::MailApp; +use crate::attachment_open::OPEN_DRAFT; +use crate::people_view::testing::{click, window}; + +type Opened = Arc)>>>; + +fn record_open(app: &mut MailApp) -> Opened { + let opened: Opened = Default::default(); + let sink = opened.clone(); + app.services.open_file = Some(Box::new(move |name, bytes| { + sink.lock().unwrap().push((name.to_owned(), bytes.to_vec())); + Ok(()) + })); + opened +} + +fn draft(app: &mut MailApp, subject: &str, data: &str) -> u64 { + let compose = app.run("mail.new", json!({"to": "maya@lumen.example", "subject": subject, "body": "Please check this."})).unwrap()["compose"] + .as_u64() + .unwrap(); + app.execute("compose.attach", json!({"compose": compose, "name": "report.txt", "data": data})).unwrap(); + compose +} + +#[test] +fn the_draft_chip_opens_by_double_click_menu_and_keyboard_and_removes_separately() { + let mut h = window("view.mail"); + let app = h.state_mut(); + let opened = record_open(app); + let compose = draft(app, "Quarterly report", "ZHJhZnQgY29weQ=="); + let before = app.session.composing_by_id(compose).unwrap().attachments.clone(); + h.state_mut().execute("ui.dismissReminder", json!({"all": true})).unwrap(); + h.run_steps(5); + let chip = h.state().hit.rect_in(0, "draftAttachment", 0).unwrap().center(); + click(&mut h, chip, PointerButton::Primary, 1); + assert!(opened.lock().unwrap().is_empty(), "a single pointer click should not launch another app"); + click(&mut h, chip, PointerButton::Primary, 2); + assert_eq!(opened.lock().unwrap().as_slice(), &[("report.txt".into(), b"draft copy".to_vec())]); + + click(&mut h, chip, PointerButton::Secondary, 1); + let open = h.query_all_by_label_contains("Open").find(|n| n.accesskit_node().label().is_some_and(|label| label.trim() == "Open")).unwrap(); + let at = open.rect().center(); + click(&mut h, at, PointerButton::Primary, 1); + assert_eq!(opened.lock().unwrap().len(), 2, "Open from the menu hands the file to the host"); + + click(&mut h, chip, PointerButton::Primary, 1); + super::tests::key(&mut h, Key::Enter); + assert_eq!(opened.lock().unwrap().len(), 3, "Enter opens the selected attachment"); + let current = h.state().session.composing_by_id(compose).unwrap(); + assert_eq!(current.subject, "Quarterly report"); + assert!(current.body.plain().contains("Please check this.")); + assert_eq!(current.attachments, before); + assert!(current.draft.is_none(), "opening does not save or send the draft"); + + let remove = h.state().hit.rect_in(0, "draftAttachmentRemove", 0).unwrap().center(); + click(&mut h, remove, PointerButton::Primary, 1); + assert!(h.state().session.composing_by_id(compose).unwrap().attachments.is_empty()); + assert_eq!(opened.lock().unwrap().len(), 3); +} + +#[test] +fn a_pop_out_opens_its_own_copy_even_with_a_same_named_file_in_the_other_draft() { + let mut h = window("view.mail"); + let app = h.state_mut(); + let opened = record_open(app); + let compose = draft(app, "Pop-out draft", "cG9wLW91dA=="); + let pop = app.run("ui.openWindow", json!({"compose": compose})).unwrap()["window"].as_u64().unwrap(); + let other = draft(app, "Reading pane draft", "cmVhZGluZyBwYW5l"); + h.state_mut().execute("ui.dismissReminder", json!({"all": true})).unwrap(); + h.run_steps(5); + let chip = h.state().hit.rect_in(pop, "draftAttachment", 0).unwrap().center(); + click(&mut h, chip, PointerButton::Primary, 2); + assert_eq!(opened.lock().unwrap().as_slice(), &[("report.txt".into(), b"pop-out".to_vec())]); + assert_eq!(h.state().session.composing_by_id(other).unwrap().attachments[0].data.as_slice(), b"reading pane"); +} + +#[test] +fn a_reopened_draft_opens_the_bytes_of_a_stored_attachment() { + let mut app = app(); + let opened = record_open(&mut app); + draft(&mut app, "Saved report", "b3JpZ2luYWw="); + let saved = app.execute("compose.saveDraft", json!({})).unwrap()["draft"].as_u64().unwrap(); + app.execute("compose.close", json!({})).unwrap(); + let dir = tempfile::tempdir().unwrap(); + let path = dir.path().join("draft.mailcraft"); + let bytes = b"original"; + let reference = store::stash(&path, &Digest::of(bytes), bytes).unwrap(); + app.session.path = Some(path); + let file = &mut app.session.mailbox.message_mut(saved).unwrap().attachments[0]; + file.data = Arc::default(); + file.kept = Some(reference); + let compose = app.execute("mail.editDraft", json!({"id": saved})).unwrap()["compose"].as_u64().unwrap(); + app.run(OPEN_DRAFT, json!({"compose": compose, "index": 0})).unwrap(); + assert_eq!(opened.lock().unwrap().as_slice(), &[("report.txt".into(), bytes.to_vec())]); + assert!(!app.session.composing_by_id(compose).unwrap().dirty); + + // Also exercise an attachment whose bytes still live beside the mailbox during composition. + let file = &mut app.session.compose.as_mut().unwrap().attachments[0]; + file.data = Arc::default(); + file.kept = Some(reference); + app.run(OPEN_DRAFT, json!({"compose": compose, "index": 0})).unwrap(); + assert_eq!(opened.lock().unwrap().last(), Some(&("report.txt".into(), bytes.to_vec()))); + assert_eq!(opened.lock().unwrap().len(), 2); +} + +#[test] +fn opening_respects_file_checks_and_confirmation_cannot_open_a_replacement() { + use mailcraft_engine::agent::{Access, access}; + + let mut app = app(); + let opened = record_open(&mut app); + let compose = draft(&mut app, "Safe opening", "b3JpZ2luYWw="); + let params = json!({"compose": compose, "index": 0}); + app.session.compose.as_mut().unwrap().attachments[0].name = "program.exe".into(); + assert!(app.run(OPEN_DRAFT, params.clone()).is_err()); + app.session.compose.as_mut().unwrap().attachments[0].name = "notes.md".into(); + assert!(app.execute(OPEN_DRAFT, params.clone()).is_err(), "the script route needs an explicit confirmation too"); + assert_eq!(app.run(OPEN_DRAFT, params.clone()).unwrap()["pending"], "confirm"); + let Some(crate::dialogs::Dialog::Confirm { ask, .. }) = app.dialog.take() else { panic!("expected an attachment warning") }; + let confirmed = crate::dialogs::answered(¶ms, &ask.with, None); + let file = &mut app.session.compose.as_mut().unwrap().attachments[0]; + *file = Attachment::new("notes.md", "text/markdown", b"changed!".to_vec()); + assert!(app.run(OPEN_DRAFT, confirmed).is_err()); + assert!(opened.lock().unwrap().is_empty()); + assert_eq!(access(OPEN_DRAFT), Some(Access::Never)); + + app.run(OPEN_DRAFT, params.clone()).unwrap(); + let Some(crate::dialogs::Dialog::Confirm { ask, .. }) = app.dialog.take() else { panic!("expected a fresh warning") }; + app.run(OPEN_DRAFT, crate::dialogs::answered(¶ms, &ask.with, None)).unwrap(); + assert_eq!(opened.lock().unwrap().as_slice(), &[("notes.md".into(), b"changed!".to_vec())]); +} + +#[test] +fn the_browser_downloads_the_draft_copy_and_an_invalid_draft_never_falls_back() { + let mut app = app(); + let downloaded: Opened = Default::default(); + let sink = downloaded.clone(); + app.services.download = Some(Box::new(move |name, bytes| { + sink.lock().unwrap().push((name.into(), bytes.to_vec())); + Ok(()) + })); + let compose = draft(&mut app, "Browser draft", "Y29weQ=="); + assert!(app.execute(OPEN_DRAFT, json!({"index": 0})).is_err()); + assert!(app.execute(OPEN_DRAFT, json!({"compose": compose + 1, "index": 0})).is_err()); + assert!(app.execute(OPEN_DRAFT, json!({"compose": compose, "index": 1})).is_err()); + assert!(downloaded.lock().unwrap().is_empty()); + assert_eq!(app.execute(OPEN_DRAFT, json!({"compose": compose, "index": 0})).unwrap()["downloaded"], true); + assert_eq!(downloaded.lock().unwrap().as_slice(), &[("report.txt".into(), b"copy".to_vec())]); +} diff --git a/crates/ui-egui/src/dialogs.rs b/crates/ui-egui/src/dialogs.rs index aa84029fc9..3729169309 100644 --- a/crates/ui-egui/src/dialogs.rs +++ b/crates/ui-egui/src/dialogs.rs @@ -560,6 +560,7 @@ pub fn confirmation(app: &MailApp, id: &str, params: &Value) -> Option let (title, text, action) = crate::attachment_open::question(app, params)?; question(&title, text, &action) } + crate::attachment_open::OPEN_DRAFT => crate::attachment_open::draft_question(app, params), "mail.delete" | "mail.deletePermanently" => { // What the selection stands for: a conversation's row, every message of it the list // shows (#503). diff --git a/crates/ui-egui/src/lib.rs b/crates/ui-egui/src/lib.rs index 2acaf4eabb..31c07620d5 100644 --- a/crates/ui-egui/src/lib.rs +++ b/crates/ui-egui/src/lib.rs @@ -380,7 +380,7 @@ pub struct Services { /// Files delivered asynchronously otherwise (dropped in the browser): each goes where its /// kind says, to the message with the keyboard, whatever a picker was last opened for. pub inbox: Option, - /// Desktop: open an attachment the owner asked to open (`mail.openAttachment`) with the + /// Desktop: open an attachment the owner asked to open with the /// system's own program for its kind: the host writes it, under the name given (already /// made safe, and made safe again there), into a folder of MailCraft's own that only this /// user can read and that is emptied when MailCraft quits, and asks the system to open it. @@ -1436,6 +1436,12 @@ pub const UI_COMMANDS: &[(&str, &str, &str, &str)] = &[ ("ui.open", "Open Mailbox", "File › Open & Export", "{}"), ("ui.import", "Import", "File › Open & Export", "{}"), ("ui.attach", "Attach File", "Message › Include", "{}"), + ( + "ui.openDraftAttachment", + "Open Draft Attachment", + "Message › Include", + r#"{"compose": id, "index": zero-based, "confirmed"?: bool} — open a copy of the attachment in that draft, or download it in the browser"#, + ), ("ui.toggleFolder", "Expand or Collapse Folder", "Folder", r#"{"id": number}"#), ( "ui.openWindow", @@ -2344,6 +2350,10 @@ impl MailApp { // still the ones it took, and a time picked to put them at. A hint only, as above. None if id == "ui.calendarPaste" => calendar_view::paste_ready(self), None if id == "ui.openDataFolder" => self.services.data_folder.is_some() && !self.data_removed, + None if id == attachment_open::OPEN_DRAFT => { + self.session.compose.as_ref().is_some_and(|c| !c.attachments.is_empty()) + && (self.services.open_file.is_some() || self.services.download.is_some()) + } None => UI_COMMANDS.iter().any(|c| c.0 == id), } } @@ -6097,7 +6107,7 @@ const MAX_PROBLEM: usize = 600; pub(crate) fn refusal_worth_a_box(id: &str, error: &str) -> bool { let quiet = ["not available:", "unknown command", "bad parameters:", "nothing "]; let lower = error.trim_start().to_lowercase(); - !id.starts_with("ui.") && !error.trim().is_empty() && !quiet.iter().any(|q| lower.starts_with(q)) + (!id.starts_with("ui.") || id == attachment_open::OPEN_DRAFT) && !error.trim().is_empty() && !quiet.iter().any(|q| lower.starts_with(q)) } fn feedback(id: &str, v: &Value) -> Option { diff --git a/docs/control-protocol.md b/docs/control-protocol.md index 16dc6cc957..33ce41ca24 100644 --- a/docs/control-protocol.md +++ b/docs/control-protocol.md @@ -154,6 +154,7 @@ still opening"}`, whatever it is; ask `app.status` and try again once it says `o | `ui.darkStyle {"value"}` | the greys of the dark theme: `neutral` (default) or `blue`, the blue-tinted greys the dark theme had before #1242 (#1384); File › Options › General › Dark theme. The light theme is the same in both, and the accent and high contrast apply to either. Saved in `ui.json` (`darkStyle`) and shows at once in every window | | `ui.animations {"value"}` | whether the window's animations play: `system` (default) as the system says (Windows' Animation effects; where the system says nothing, they play), `on` or `off` (menus and sections open at once, scrolling to a place jumps there, the search bar over the list appears at once; a spinner still turns) (#1183). Saved in `ui.json` (`animations`) and follows at once in every window | | `ui.previewAttachment` | `{"id"?: number, "index": number}`: preview a zero-based attachment of the selected message in the reading pane after the owner enables previews in File › Options. This command is unavailable to agents and in Junk E-mail or its subfolders. PDF uses `pdfcraft-cli`; PNG, JPEG, TIFF and WebP use `photocraft-cli`. Install the native executable on `PATH`, or set `MAILCRAFT_PDFCRAFT_CLI` or `MAILCRAFT_PHOTOCRAFT_CLI` to its absolute path. Helpers must render in their own process, since the time limit terminates the process MailCraft started. | +| `ui.openDraftAttachment` | `{"compose": id, "index": number, "confirmed"?: bool}` opens the attached copy from the named draft using the same file checks as received attachments. The index is zero-based. The browser downloads the copy. For a kind that asks first, `confirmed: true` means the owner agreed. This command is unavailable to agents. The chip and its separate Remove button are `draftAttachment` and `draftAttachmentRemove` in `ui.inspect`, each named by the index in its window. | | `ui.showAttachmentMessage` | `{}`: close the attachment view and return to its message. `attachmentPreviewBack` and `attachmentPreviewStart` identify the Back to Message and Preview File buttons in `ui.inspect`. | | `ui.language` | `{"language": "auto"\|"en"\|"fr"\|"de"\|"es"\|"it"\|"nl"\|"ro"\|"hu"\|"pl"\|"cs"\|"zh_CN"\|"ka"\|"pseudo"}`: the interface language (`auto`, the system's, is the default); a language is offered once it has a catalogue (French, German, Spanish, Italian, Dutch, Romanian, Hungarian, Polish, Czech, Simplified Chinese and Georgian are previews; the initial Chinese catalogue was reviewed by its contributor and is offered on desktop only until the browser has a CJK font, while the others (Georgian included) await native-speaker review), and `pseudo` (accented English, for finding text that isn't translated) only here | | `ui.focusSearch` | put the keyboard in the search box | diff --git a/docs/log.d/ROADMAP/progress/open-draft-attachment.md b/docs/log.d/ROADMAP/progress/open-draft-attachment.md new file mode 100644 index 0000000000..3356a5ebeb --- /dev/null +++ b/docs/log.d/ROADMAP/progress/open-draft-attachment.md @@ -0,0 +1 @@ +| 2026-11-26 | Composer: double-click or use the attachment menu to check the attached copy from a draft, including a reopened draft or one in its own window. | diff --git a/docs/log.d/docs/control-protocol/revisions/open-draft-attachment.md b/docs/log.d/docs/control-protocol/revisions/open-draft-attachment.md new file mode 100644 index 0000000000..c09214e40a --- /dev/null +++ b/docs/log.d/docs/control-protocol/revisions/open-draft-attachment.md @@ -0,0 +1 @@ +| 2026-11-26 | minor | `ui.openDraftAttachment` opens an attachment of a named draft, and the hit map identifies its chip and Remove button. | diff --git a/docs/log.d/docs/ui-parity/revisions/open-draft-attachment.md b/docs/log.d/docs/ui-parity/revisions/open-draft-attachment.md new file mode 100644 index 0000000000..63330fbbbd --- /dev/null +++ b/docs/log.d/docs/ui-parity/revisions/open-draft-attachment.md @@ -0,0 +1 @@ +| 2026-11-26 | minor | Composer attachment chips can open the attached copy, with a browser download and separate Remove button. | diff --git a/docs/ui-parity.md b/docs/ui-parity.md index 2b6dd51066..ecc714c93f 100644 --- a/docs/ui-parity.md +++ b/docs/ui-parity.md @@ -22,7 +22,7 @@ Outlook users know. No pixel of the target's artwork is used: every icon is draw | Folder pane | yes | Favorites, account trees, collapse/expand, unread counts, context menu, resizable. With two accounts at least, All Accounts at the top lists All Inboxes, All Drafts, All Sent Items, All Deleted Items and All Archives: each every account's folder of that kind in one list, its rows wearing their account's stripe and name, each message acted on in its own account (#625; shared mailboxes are listed too; it opens again at the next start when it was open at quit; no per-account choice under it yet). Move to Folder and Copy to Folder without a folder (Ctrl+Shift+V, Ctrl+Shift+Y, the menu bar, Search Commands) ask which in Move Items or Copy Items: the folders of every account, the one in view's first and the others' under their names, each as Home › Move lists them, with a search (#1176); it has no New… button yet for making a folder there and then, as classic Outlook's has. For an account that signs in with Microsoft the Favorites are the folders Outlook shows there, in Outlook's order, read from the server (never written: they are changed in Outlook); one quiet line under the heading offers to connect them, or says why they can't be had, and File › Options switches back to the favourites kept here. They are read through Microsoft Graph, for a work or school account as for any other; when an administrator has to approve it first, the pane says so and offers what can be done (a message to copy for the administrator, the page that says what to do next). The owner puts the accounts in the order they want by dragging an account's heading up or down the pane (#702), as in classic Outlook: a line shows where it goes, its shared mailboxes go with it, and the order is kept in the mailbox and followed by File › Info, the From list of a new message, the list of calendars, the account choice of Junk E-mail Options, the accounts of Signatures, Rules and Alerts and Tasks, and the To Do jobs, which start in the pane's order (Send/Receive keeps the order they were added in); the default account doesn't change with it. An account's right-click menu has Move Up and Move Down for the same (greyed at the ends), and the pane scrolls while a heading is dragged near its top or bottom. Folders are put in the owner's order the same way (#1514): a folder's row drags up or down among the folders beside it (Inbox, Drafts, Sent Items and Deleted Items stay at the top of an account), and a favourite kept in MailCraft among the others under Favorites, with Move Up and Move Down in the row's right-click menu; the order is kept in the mailbox, never sent to a server, and an account whose Favorites are Outlook's keeps Outlook's order. Folders aren't dragged into another folder, no search folders, no groups; a favourite that is a person, a category or a group is not shown. A shared mailbox has its own tree under its owner's, its unread counted on its own folders; its folders can be put among the Favorites, kept in MailCraft whatever the owner's come from, and are named there with the mailbox ("Inbox - support@…"). A folder among the Favorites whose name a folder of another of the owner's accounts has too (two Inboxes) is named there with its account ("Inbox - Work"), as on a row of a search of All Mailboxes. Outlook's own Favorites that point into a shared mailbox are not shown yet. The folder menus (Move to Folder, Copy to Folder and the message's Move offer every account's folders, the one in view's first and the others' under their names; Move Folder offers the account's own) open with a search box that has the keyboard: typing narrows them to the folders whose name holds it, any part, ignoring case and accents, each shown with its place in the tree, and with its mailbox where several are; the arrow keys and Enter choose, Escape clears the search and then closes the menu. Properties… in a folder's or an account's right-click menu (and Folder › Properties) opens Folder Properties, with classic Outlook's tabs. General gives the folder's or the account's name, type, location, messages and unread, and a Folder Size… button for a table over it: each folder's messages, unread and size here, its messages and size with its subfolders, and for a Microsoft account what its server last counted; sorted by any column, a folder's name goes to it. AutoArchive, Policy, Permissions and Synchronization say they are still to come. Messages whose size isn't known here (only their headers, and no size from their server; or too large to download) are counted apart. An account's colour (Account Settings › Colour; a new account is given one of the palette's that no other account has, an account from before has none until one is chosen; `account.edit` `color`) is a dot after its name (#893). An account's heading is the name given in Account Settings › Account name, and its address while none is (`account.edit` `name`, #1017); a shared mailbox's too, whose Account Settings (Settings on its card in File › Info) are only its name and colour, kept on this computer (#1385). No total of items in place of the unread count yet, no quota | | Message list | yes | Laid out from the target's at 100 %, to the pixel ([the measurements](#the-message-list-measured)): a header with All and Unread as tabs and the arrangement (By Date) with the arrow that turns the list over; rows of the sender (11 pt), the subject with the time at the end of its line, and 0–3 lines of preview (8 pt); a selected row is a rounded card with an accent edge (quieter while the list has no focus) over a flag's tint; the dot an unread message wears, and its sender in the accent's text colour (#1657); a plainly seen line under each row (#1657); a message with nothing to preview yet has its two lines in the middle of its row; a scroll bar with arrows in its own lane (on a Mac, a slim bar over the rows' right end while the list is scrolled or pointed at, with no lane or arrows, as Mac programs have; the rows then reach the list's edge and the flag and quick actions leave room for the thumb). Date/sender/importance groups (View › Arrange By › Show in Groups turns the headings off, `view.groups`), and category groups (Categories in the arrangement's menu and View › Arrange By: a message under each of its categories, one row under each category's heading, as in the target; "No category" first, then A to Z (Reverse Sort: Z to A, "No category" last), newest first under each; a pinned message once, on top; counts take a message once, the keys step through each of its rows, Select All and Shift ranges take it once; Show in Groups off leaves it grouped, as in the target), a single-line layout (View › Message Preview › Single Line, `view.oneLine`: sender, subject, marks and time on one line, 32 px a row, both kept with the other options), three ready-made views in View › Change View (Compact, Single Line, and Preview: three lines of preview and no reading pane; `view.changeView`), View › Tighter Spacing (rows 10 px shorter, a single-line row 6 px, `view.density`), View › Shade Alternate Rows (every other row a faint band, the first under each heading plain; `view.shadeRows`, #1657), arranged by size each message's size under the time (for one only partly here its whole size: what a Microsoft account's server said, or what the message came to when it was fetched whole; for one too large to download from a mail server, the size that server gave; #273, #300), conversations as one row with a count (a conversation is one thread: one subject and linked by its headers or its server's conversation id, so unrelated mail that shares a subject is two rows, #795), of the conversation's messages in every folder but Deleted Items, Junk E-mail and the folders under them, as the reading pane counts them (in the All tab, with no search), opened in place by the arrow before the row or Right and closed by it or Left: its messages are listed under the row, newest first and a step in, one in another folder (a reply in Sent Items; in a search, only what it found) with that folder's name, and each is selected, read, moved and deleted on its own; closing it with the focus on one of them selects the row (otherwise what was picked under it is let go of), and another folder, tab or search closes it (#503). Picked as the conversation, its row and, under it, the rows of its messages in this folder are drawn selected, and it stays picked when another of its messages comes on top of it (a newer one, another tab): what is drawn selected is what Delete and Move take (but for a message selected by itself and listed under a closed conversation, picked in the reading pane or selected before another of its messages came on top of it, which they take by itself, as before), and Ctrl+click takes a row drawn selected out, a closed conversation's with all of it. Delete or Move on a conversation's row takes the messages it shows (its messages in this folder that the tab lists; in a search, those found) and leaves the rest where they are, and Delete asks first when that is more than one message (Delete Conversation, with Don't ask again for this account, but for the account on this computer, which has no Account Settings, and one a newer MailCraft added, whose settings this version doesn't change; Account Settings › Deleting asks again). Also: marks, category marks, flag and delete on the row under the pointer, the read switch down a row's left edge, dragging to a folder (the pointer stays the arrow over a folder that takes the messages and turns to the system's "not allowed" one over the folder they are in or anywhere else; #430), context menu (with Messages from Sender, also in Home › Find: the sender's mail in every mailbox, by address; #301; with several messages selected, its Forward and Forward as Attachment, as Forward's ▾ and Ctrl+Alt+F do, attach every one of them whole, in the list's order, #360), multi-select with Ctrl/Shift and from the keyboard (Up and Down move a row, Home and End to the first and the last, Page Up and Page Down by the rows that fit; with Shift each selects from the anchor to where it moves, and going back takes rows out again; a held key moves a row for each repeat, and the list scrolls to keep the row in view; changing the arrangement (Arrange By, Reverse Sort, conversations, groups, single line, preview lines, a ready-made view, Tighter Spacing, Reset View) scrolls the list to the selected message and centres it (equal senders, subjects and sizes stay newest first), and with nothing selected the list stays where it is; #426, #1511; no Ctrl+Up/Down or Ctrl+Space yet), virtualised. A selected message stays in the list while it is selected (the target keeps the one being read; MailCraft keeps every selected one, so the list doesn't change while several are picked): opened in the Unread tab or an `is:unread` search, by a click or a key, it is drawn as read, a flag cleared in the Flagged tab leaves it there, and the arrows, Home, End and the Page keys, with Shift or without, go on from it; one you delete or move leaves at once, and another tab or search starts the list afresh (#428), with only what it shows still selected (#485; in conversation view, every message a row it shows stands for, not only the newest). What is selected is always in the list, so Delete and Move take only what you see: Ctrl+click and Shift+click add only what the list shows, a message opened from outside the list (a task, a contact's recent mail, a new-mail alert) is shown in its folder's All tab with no search, and one Undo selects again, or one imported, is shown, in its folder's All tab if the list hides it (Undo of a task or an appointment leaves the list and its selection as they are); a result opened from the server is selected among the server's results (#485). The preview is what the message says to its reader: the words of its HTML (the opening line a sender hid for message lists included), without markup, invisible padding or web addresses. A flagged message's row is tinted, and its text is red once its follow-up is past due; a completed flag is not tinted. No column view (Outlook's columns, to choose and sort by, are the follow-up to #214), no collapsing of groups; the tabs do not turn into a menu in a narrow list (the one in use stays, the others are in the arrangement's menu). Below a search that takes in a Microsoft account, More results on the server (greyed, Not connected, offline or without a sign-in); what it finds comes under On the server, with the folder it is in under the time in a search of All Mailboxes (as the local results show theirs), and opens into that folder. In a search of All Mailboxes with more than one account, a row of an account that has a colour wears a stripe of it down its left edge, also when selected, so that whose mail it is is seen at a glance (#893). Sender images (File › Options, off by default): a round picture before each row's text and over the message being read, for the senders the owner knows and those whose mail's pictures are downloaded, when the server vouches for the sender, from Gravatar, favicon.im or Google, initials for everybody else | | Reading pane | yes | Right, bottom or off; after a click in the message the keyboard scrolls it (the arrows, Page Up and Page Down, Space and Shift+Space, Home and End; a click elsewhere or another message gives the keys back to the list, #1739); header with avatar, recipients, date; notes (flag, importance, replied, pictures withheld); attachment chips (double-click or Open opens one with the computer's own program for its kind, as Outlook does; programs, scripts, shortcuts, installers, disk images and files of no kind are refused and can be saved, and on Linux and the BSDs so is a file of a kind the desktop doesn't know by name, or that it takes for another kind; Office files with macros, web pages, Markdown, and keys, certificates and signatures are asked about first; in the browser, Open downloads; right-click, or the ▾ at a chip's right end (a click, or Enter or Space while it has the keyboard; named Attachment options for the file to a screen reader), for the same menu: Open, Save As, Save All Attachments and Remove, #785; a picture that comes as an attachment (PNG, JPEG, GIF or WebP by its bytes) is shown as a small picture with its name and size under it, as the new Outlook shows one, and the check box in File › Options goes back to chips for every message (mail in Junk E-mail always shows names), #834; on an unfiled message file the ▾ is greyed). Selecting a filed attachment opens an Attachments ribbon (Open, Remove Attachment, Save As, Save All Attachments and Show Message). The message stays visible when previews are disabled or the file has no available previewer. Supported previews keep the message header and attachment chips above the preview. Preview File uses an installed local renderer if enabled in File › Options and asks first by default. The owner can remember that choice for the same file format. In Junk E-mail, previewing still requires the attachment menu. Back to Message restores the normal pane; conversation jump list; formatted body with clickable links. Simplified HTML (gap #6): a message's `@media` is read for the pane's width class and the window's theme, so the desktop or the mobile copy of a newsletter is shown for the pane it is in and a sender's own dark palette is used in a dark window (#599); a picture behind a table, a cell or a block is shown when it is attached to the message or written into it, never one from the web (#601); its text is in the first of the fonts it names that is installed on this computer, never one fetched (#600); View › Zoom sizes the text of the message being read, in the pane and in a window of its own, 50–300 % (Ctrl+Plus, Ctrl+Minus, Ctrl+0, or Ctrl and the wheel over the message; `view.zoom`), its pictures keep their size; no inline reply; a React button beside Forward opens a row of six emoji (👍 ❤️ 🎉 😂 😮 😢), and one click sends it to the sender (never the Reply-To, shown beside the emoji) as a short mail (RFC 9078, `mail.react`, #1544) filed in Sent Items, for IMAP, JMAP and local accounts only (greyed, with the engine's reason as its tooltip, for drafts, mail you wrote, Junk E-mail, automated mail and a message with a sender warning; the Respond menu entry greys for those too, except for a sender warning, where it stays enabled and the command says why; it waits as long as Undo Send says; not in a message's window toolbar yet, a deliberate limit; reactions that come in are not shown yet) | -| Composer | yes | In place of the reading pane: From (several accounts, and under each IMAP account the other addresses it sends from, kept in Account Settings › Other addresses you send from, each with the name recipients see and a signature of its own; a reply, Reply All or forward is from the account's address the original was sent to, by its To, then its Cc, then the `X-Original-To` and `Delivered-To` its server wrote, else from the account's own, #797; not for a Microsoft or Exchange account, whose server would have to allow it), To, Cc, Bcc, Subject, attachment chips, body in rich text (bold, italic, underline, a size, links, bulleted and numbered lists eight levels deep (typing `* `, `- `, `1. ` or `1) ` at the start of a line starts one, Undo puts the marker back, unless File › Options › Mail › Automatic bulleted and numbered lists is off, #973), a font — the six MailCraft has fallbacks for and every family installed on this computer, with a field to find one among them and a line to look for new ones after the owner installs some; what is chosen is drawn in the composer and written out as a `font-family` with a font of its kind after it, and Courier New keeps text art and columns lined up with spaces fixed width (#969, #1493) — and a text colour, pictures in the text (Insert › Pictures, Ctrl+V of a copied picture; a selected one sized by dragging its bottom-right corner or by its width or height in the Picture size strip along the foot of the message, its height in proportion, #1310) and a signature's, paragraphs aligned left, centred or right (`format.align`, so far for scripts, the command line and agents, not in the ribbon or the Commands list; a list item is always left; kept when sent, as `text-align` on the paragraph, on a paste and in a draft, but not for a blank line, which reopens left); copy and paste as HTML on the desktop, including bounded spreadsheet tables that can be selected and removed as a block (#1197); the Message tab's Basic Text group and Ctrl+B/I/U/K/Z/Y while the body has the keyboard), Insert › Date & Time (eight formats in the interface language) and Review › Word Count (Ctrl+Shift+G; words, characters with and without spaces, paragraphs; of the selection when there is one), the original of a reply shown as the reading pane shows it; Send, Attach, Save draft, Discard. A right click in the body, a line or any other text field of the window (the search box, the forms, the dialogs) opens Cut, Copy, Paste and Select All, each doing what its key does (Cut and Copy greyed with nothing selected, Paste alone in a password field, Copy and Select All in a text that is only read; Paste needs the desktop's clipboard, and is greyed in the browser, where Ctrl+V still pastes) (#557). Several can be written at once, at most 13 (#286): New Email, Reply, Reply All, Forward, Forward as Attachment, Open Draft and People › Email open another beside the one being written, which is saved to Drafts first when it has changes, unasked, stays open and comes back when the new one is sent or closed; every message with changes (in a window of its own, put aside or in the reading pane) is saved to Drafts by itself every five minutes, for every kind of account, as Save Draft saves it: a Microsoft or Exchange account's goes up at the next Send/Receive, an IMAP or local account's is kept in Drafts here; nothing is saved while Save, Don't Save or Cancel is asked, and Don't Save takes out of Drafts again a new message that only these saves, or being put aside for another message, put there, so closing one saved only this way asks Save, Don't Save or Cancel too; these saves are no steps to undo, and an agent or a script can't make one (#286). In a window of its own (#286): a double-clicked draft, a reply or forward started in a message's window, and Pop Out (at the top right of the message in the reading pane, Message › Window) open one, its ribbon over the lines with Send beside them and no bar of actions; the owner's New Email (Ctrl+N, New Items › E-mail Message), replies and forwards start in the reading pane unless File › Options › Mail › Open new messages, replies and forwards in a new window; at most 12 windows of their own, every kind together (at the bound a new message or a reply stays in the pane, anything else is refused in the status bar); an agent's message opens behind, without the keyboard, never takes the reading pane and at the bound is refused; closing a window with changes asks Save, Don't Save or Cancel; closing MailCraft saves every message being written to Drafts, unasked; on the desktop each kind of window of its own (a message, a message being written, an appointment) opens at the size and place the last one of its kind had, kept in `ui.json`, a step down and to the right of one of its kind still open (back to the monitor's top left when that would run off it), no bigger than the monitor it opens on (when it has a place) and at that monitor's scale (macOS keeps places in points, the rest in pixels), and in the middle of the main monitor when no monitor connected now shows enough of its title bar (under Wayland the system places it; in the browser the panels open where they did). Leaving a message with changes that aren't saved (Escape, the ✕ on its bar, or another mailbox, which asks once about every one), or whose saved draft was deleted meanwhile, asks Unsaved Message first: Save Draft, Discard (what was last saved of a draft stays in Drafts) or Cancel; a message with only what it started with closes at once; a script is never asked, and the message is saved to Drafts first (#442); a click on a message in the list other than the draft being written (a right click too), Next Message, Select All or a new-mail alert saves the reading pane's message to Drafts, and any put aside for another there (a draft with no changes isn't saved again), closes them and shows what is selected, so that what acts on the selection acts on what is shown, and the list's keys move nothing while a message is being written there; one in a window of its own stays, and when one can't be saved all stay, with the selection as it was (#727); an agent waits for the owner's Allow over the window when the owner has typed in the message (until it is closed, saved or not), and for their Delete when it would throw it away (Discard included), whatever `--allow` says (#494). Gap #7 | +| Composer | yes | In place of the reading pane: From (several accounts, and under each IMAP account the other addresses it sends from, kept in Account Settings › Other addresses you send from, each with the name recipients see and a signature of its own; a reply, Reply All or forward is from the account's address the original was sent to, by its To, then its Cc, then the `X-Original-To` and `Delivered-To` its server wrote, else from the account's own, #797; not for a Microsoft or Exchange account, whose server would have to allow it), To, Cc, Bcc, Subject, attachment chips (double-click or right-click › Open to check the attached copy in the computer’s default app, or download it in the browser, without changing the draft), body in rich text (bold, italic, underline, a size, links, bulleted and numbered lists eight levels deep (typing `* `, `- `, `1. ` or `1) ` at the start of a line starts one, Undo puts the marker back, unless File › Options › Mail › Automatic bulleted and numbered lists is off, #973), a font — the six MailCraft has fallbacks for and every family installed on this computer, with a field to find one among them and a line to look for new ones after the owner installs some; what is chosen is drawn in the composer and written out as a `font-family` with a font of its kind after it, and Courier New keeps text art and columns lined up with spaces fixed width (#969, #1493) — and a text colour, pictures in the text (Insert › Pictures, Ctrl+V of a copied picture; a selected one sized by dragging its bottom-right corner or by its width or height in the Picture size strip along the foot of the message, its height in proportion, #1310) and a signature's, paragraphs aligned left, centred or right (`format.align`, so far for scripts, the command line and agents, not in the ribbon or the Commands list; a list item is always left; kept when sent, as `text-align` on the paragraph, on a paste and in a draft, but not for a blank line, which reopens left); copy and paste as HTML on the desktop, including bounded spreadsheet tables that can be selected and removed as a block (#1197); the Message tab's Basic Text group and Ctrl+B/I/U/K/Z/Y while the body has the keyboard), Insert › Date & Time (eight formats in the interface language) and Review › Word Count (Ctrl+Shift+G; words, characters with and without spaces, paragraphs; of the selection when there is one), the original of a reply shown as the reading pane shows it; Send, Attach, Save draft, Discard. A right click in the body, a line or any other text field of the window (the search box, the forms, the dialogs) opens Cut, Copy, Paste and Select All, each doing what its key does (Cut and Copy greyed with nothing selected, Paste alone in a password field, Copy and Select All in a text that is only read; Paste needs the desktop's clipboard, and is greyed in the browser, where Ctrl+V still pastes) (#557). Several can be written at once, at most 13 (#286): New Email, Reply, Reply All, Forward, Forward as Attachment, Open Draft and People › Email open another beside the one being written, which is saved to Drafts first when it has changes, unasked, stays open and comes back when the new one is sent or closed; every message with changes (in a window of its own, put aside or in the reading pane) is saved to Drafts by itself every five minutes, for every kind of account, as Save Draft saves it: a Microsoft or Exchange account's goes up at the next Send/Receive, an IMAP or local account's is kept in Drafts here; nothing is saved while Save, Don't Save or Cancel is asked, and Don't Save takes out of Drafts again a new message that only these saves, or being put aside for another message, put there, so closing one saved only this way asks Save, Don't Save or Cancel too; these saves are no steps to undo, and an agent or a script can't make one (#286). In a window of its own (#286): a double-clicked draft, a reply or forward started in a message's window, and Pop Out (at the top right of the message in the reading pane, Message › Window) open one, its ribbon over the lines with Send beside them and no bar of actions; the owner's New Email (Ctrl+N, New Items › E-mail Message), replies and forwards start in the reading pane unless File › Options › Mail › Open new messages, replies and forwards in a new window; at most 12 windows of their own, every kind together (at the bound a new message or a reply stays in the pane, anything else is refused in the status bar); an agent's message opens behind, without the keyboard, never takes the reading pane and at the bound is refused; closing a window with changes asks Save, Don't Save or Cancel; closing MailCraft saves every message being written to Drafts, unasked; on the desktop each kind of window of its own (a message, a message being written, an appointment) opens at the size and place the last one of its kind had, kept in `ui.json`, a step down and to the right of one of its kind still open (back to the monitor's top left when that would run off it), no bigger than the monitor it opens on (when it has a place) and at that monitor's scale (macOS keeps places in points, the rest in pixels), and in the middle of the main monitor when no monitor connected now shows enough of its title bar (under Wayland the system places it; in the browser the panels open where they did). Leaving a message with changes that aren't saved (Escape, the ✕ on its bar, or another mailbox, which asks once about every one), or whose saved draft was deleted meanwhile, asks Unsaved Message first: Save Draft, Discard (what was last saved of a draft stays in Drafts) or Cancel; a message with only what it started with closes at once; a script is never asked, and the message is saved to Drafts first (#442); a click on a message in the list other than the draft being written (a right click too), Next Message, Select All or a new-mail alert saves the reading pane's message to Drafts, and any put aside for another there (a draft with no changes isn't saved again), closes them and shows what is selected, so that what acts on the selection acts on what is shown, and the list's keys move nothing while a message is being written there; one in a window of its own stays, and when one can't be saved all stay, with the selection as it was (#727); an agent waits for the owner's Allow over the window when the owner has typed in the message (until it is closed, saved or not), and for their Delete when it would throw it away (Discard included), whatever `--allow` says (#494). Gap #7 | | Calendar | yes | Side pane with a month navigator and calendar list; day, work-week, week and month grids; drag to move. A second time zone in the time bar. No schedule view, overlay, drag to resize or create | | People | yes | List with letter headings and favourites; View › Arrange By Name (A to Z, favourites first) or Categories (a contact under each of its categories, "No category" first, then by name); contact card with recent mail; several contacts picked with Ctrl-click (⌘ on a Mac), each with a tick; Home › Merge Duplicates goes through the contacts that share an e-mail address or a phone number, or those picked, a choice per field that differs (#506); each account's contacts shown apart or together, with a Microsoft account, and a contact from an account's server marked Read-only in its card (#631); with sender images on (File › Options), a contact's picture in place of their initials, in the list and on the card. No business-card or table views, no groups; a contact just made, imported or picked is shown in the list, which moves to where it is kept and clears a search that would leave it out. On macOS, the list uses the same floating bar as Mail. | | Tasks | yes | Filters, quick add, grouped list with check boxes, details pane; View › Arrange By Due Date (Overdue, Today, Tomorrow…) or Categories (a task under each of its categories, "No category" first, by due date under each). Kept in step with Microsoft To Do for accounts that sign in with Microsoft (#248), each account's tasks shown apart or together, and a new task put in the account chosen (#632). No To-Do bar, no table view. On macOS, the list uses the same floating bar as Mail. | diff --git a/packaging/release-notes.d/new/open-draft-attachment.md b/packaging/release-notes.d/new/open-draft-attachment.md new file mode 100644 index 0000000000..5ffa668aed --- /dev/null +++ b/packaging/release-notes.d/new/open-draft-attachment.md @@ -0,0 +1 @@ +- Open a draft attachment by double-clicking it or choosing Open from its menu. MailCraft opens the attached copy so you can check it before sending. In the browser, the menu downloads the copy.