Refractoring Stage 6.5 Migrated the snooze, attachment, and OpenPGP mail UI to the explicit mail feature API.

This commit is contained in:
2026-10-16 20:31:59 +03:00
parent f19573a337
commit 84a63441ef
14 changed files with 178 additions and 108 deletions
+13 -3
View File
@@ -735,7 +735,9 @@ if (window.daybreakMail) {
sendButton.disabled = true;
sendButton.textContent = 'Sending…';
try {
const pgp = window.pgpPrepareSend ? await window.pgpPrepareSend(recipient, $('#compose-cc').value) : null;
const pgp = window.epMailFeatures.pgp?.prepareSend
? await window.epMailFeatures.pgp.prepareSend(recipient, $('#compose-cc').value)
: null;
if (pgp === false) {
sendButton.disabled = false;
sendButton.textContent = 'Send ↗';
@@ -794,8 +796,16 @@ const mailUiApi = window.epMailUiModules.createMailUiApi({
updateAccountCard,
getRenderList: () => renderList,
getOpenMessage: () => openMessage,
getShowCompose: () => showCompose,
baseRenderList: renderList,
emptyReader,
openMailAccount
openMailAccount,
select: $,
selectAll: $$,
toast,
setRenderList: renderer => { renderList = renderer; },
setOpenMessage: renderer => { openMessage = renderer; },
setShowCompose: renderer => { showCompose = renderer; }
});
window.epMailFeatures = Object.freeze({ ...(window.epMailFeatures || {}), mail: mailUiApi });
window.epMailFeatures = window.epMailFeatures || {};
window.epMailFeatures.mail = mailUiApi;