@bobfrankston/rmfmail 1.2.171 → 1.2.173
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/TODO.md +1 -0
- package/client/android-bootstrap.bundle.js +27 -1
- package/client/android-bootstrap.bundle.js.map +2 -2
- package/client/app.bundle.js +58 -0
- package/client/app.bundle.js.map +3 -3
- package/client/components/message-viewer.js +60 -0
- package/client/components/message-viewer.js.map +1 -1
- package/client/components/message-viewer.ts +60 -0
- package/client/compose/compose.bundle.js +7 -0
- package/client/compose/compose.bundle.js.map +2 -2
- package/client/lib/api-client.js +9 -0
- package/client/lib/api-client.js.map +1 -1
- package/client/lib/api-client.ts +9 -0
- package/client/lib/mailxapi.js +6 -0
- package/package.json +5 -5
- package/packages/mailx-imap/index.d.ts.map +1 -1
- package/packages/mailx-imap/index.js +22 -0
- package/packages/mailx-imap/index.js.map +1 -1
- package/packages/mailx-imap/index.ts +22 -0
- package/packages/mailx-imap/package-lock.json +2 -2
- package/packages/mailx-imap/package.json +1 -1
- package/packages/mailx-service/index.d.ts +23 -0
- package/packages/mailx-service/index.d.ts.map +1 -1
- package/packages/mailx-service/index.js +206 -0
- package/packages/mailx-service/index.js.map +1 -1
- package/packages/mailx-service/index.ts +198 -0
- package/packages/mailx-service/jsonrpc.js +2 -0
- package/packages/mailx-service/jsonrpc.js.map +1 -1
- package/packages/mailx-service/jsonrpc.ts +2 -0
- package/packages/mailx-service/package.json +1 -1
- package/packages/mailx-settings/index.d.ts.map +1 -1
- package/packages/mailx-settings/index.js +35 -1
- package/packages/mailx-settings/index.js.map +1 -1
- package/packages/mailx-settings/index.ts +32 -1
- package/packages/mailx-settings/package.json +1 -1
- package/packages/mailx-store/db.d.ts +3 -0
- package/packages/mailx-store/db.d.ts.map +1 -1
- package/packages/mailx-store/db.js +5 -0
- package/packages/mailx-store/db.js.map +1 -1
- package/packages/mailx-store/db.ts +8 -0
- package/packages/mailx-store/package.json +1 -1
- package/packages/mailx-store-web/package.json +1 -1
- package/packages/mailx-store-web/web-settings.d.ts.map +1 -1
- package/packages/mailx-store-web/web-settings.js +31 -0
- package/packages/mailx-store-web/web-settings.js.map +1 -1
- package/packages/mailx-store-web/web-settings.ts +31 -0
- package/packages/mailx-types/mailx-api.d.ts +8 -0
- package/packages/mailx-types/mailx-api.d.ts.map +1 -1
- package/packages/mailx-types/mailx-api.ts +4 -0
- package/packages/mailx-types/package.json +1 -1
- /package/packages/mailx-imap/{node_modules.npmglobalize-stash-3252 → node_modules.npmglobalize-stash-7284}/.package-lock.json +0 -0
package/client/app.bundle.js
CHANGED
|
@@ -38,6 +38,7 @@ __export(api_client_exports, {
|
|
|
38
38
|
createFolder: () => createFolder,
|
|
39
39
|
createTask: () => createTask,
|
|
40
40
|
debugEvalResult: () => debugEvalResult,
|
|
41
|
+
deleteAttachments: () => deleteAttachments,
|
|
41
42
|
deleteCalendarEvent: () => deleteCalendarEvent,
|
|
42
43
|
deleteContact: () => deleteContact,
|
|
43
44
|
deleteDraft: () => deleteDraft,
|
|
@@ -633,6 +634,12 @@ async function openAttachment(accountId, uid, attachmentId, folderId, filename)
|
|
|
633
634
|
async function getMessageSource(accountId, uid, folderId) {
|
|
634
635
|
return ipc().getMessageSource(accountId, uid, folderId);
|
|
635
636
|
}
|
|
637
|
+
async function deleteAttachments(accountId, uid, folderId, ids) {
|
|
638
|
+
const fn = ipc().deleteAttachments;
|
|
639
|
+
if (!fn)
|
|
640
|
+
throw new Error("Attachment delete not available in this host");
|
|
641
|
+
return fn(accountId, uid, folderId, ids);
|
|
642
|
+
}
|
|
636
643
|
async function grammarLint(blocks) {
|
|
637
644
|
const fn = ipc().grammarLint;
|
|
638
645
|
if (!fn)
|
|
@@ -1558,6 +1565,47 @@ function clearViewer() {
|
|
|
1558
1565
|
if (attEl)
|
|
1559
1566
|
attEl.hidden = true;
|
|
1560
1567
|
}
|
|
1568
|
+
function confirmDeleteAttachments(msg, accountId, uid, ids, question) {
|
|
1569
|
+
const backdrop = document.createElement("div");
|
|
1570
|
+
backdrop.className = "mailx-modal-backdrop";
|
|
1571
|
+
backdrop.style.cssText = "position:fixed;inset:0;z-index:2100;background:rgba(0,0,0,0.4);display:flex;align-items:center;justify-content:center;";
|
|
1572
|
+
const panel = document.createElement("div");
|
|
1573
|
+
panel.style.cssText = "background:var(--color-bg,#fff);color:var(--color-text,#000);border-radius:8px;box-shadow:0 8px 32px rgba(0,0,0,0.3);width:min(440px,90vw);padding:16px;display:flex;flex-direction:column;gap:12px;";
|
|
1574
|
+
const body = document.createElement("div");
|
|
1575
|
+
body.style.cssText = "line-height:1.5;";
|
|
1576
|
+
body.textContent = `${question} The attachment is removed from the local copy and from the server copy. The message text is kept. This cannot be undone.`;
|
|
1577
|
+
const status = document.createElement("div");
|
|
1578
|
+
status.style.cssText = "min-height:1.2em;font-size:0.9em;color:var(--color-text-muted);";
|
|
1579
|
+
const row = document.createElement("div");
|
|
1580
|
+
row.style.cssText = "display:flex;gap:8px;justify-content:flex-end;";
|
|
1581
|
+
const cancel = document.createElement("button");
|
|
1582
|
+
cancel.textContent = "Cancel";
|
|
1583
|
+
cancel.style.cssText = "padding:6px 14px;";
|
|
1584
|
+
cancel.addEventListener("click", () => backdrop.remove());
|
|
1585
|
+
const del = document.createElement("button");
|
|
1586
|
+
del.textContent = "Delete";
|
|
1587
|
+
del.style.cssText = "padding:6px 14px;font-weight:600;background:#c0392b;color:#fff;border:none;border-radius:4px;cursor:pointer;";
|
|
1588
|
+
del.addEventListener("click", async () => {
|
|
1589
|
+
del.disabled = true;
|
|
1590
|
+
cancel.disabled = true;
|
|
1591
|
+
status.textContent = "Removing\u2026";
|
|
1592
|
+
try {
|
|
1593
|
+
const { deleteAttachments: deleteAttachments2 } = await Promise.resolve().then(() => (init_api_client(), api_client_exports));
|
|
1594
|
+
const r = await deleteAttachments2(accountId, uid, msg.folderId, ids);
|
|
1595
|
+
backdrop.remove();
|
|
1596
|
+
void showMessage(accountId, uid, msg.folderId);
|
|
1597
|
+
void r;
|
|
1598
|
+
} catch (e) {
|
|
1599
|
+
status.textContent = e?.message || "Delete failed \u2014 message unchanged.";
|
|
1600
|
+
del.disabled = false;
|
|
1601
|
+
cancel.disabled = false;
|
|
1602
|
+
}
|
|
1603
|
+
});
|
|
1604
|
+
row.append(cancel, del);
|
|
1605
|
+
panel.append(body, status, row);
|
|
1606
|
+
backdrop.append(panel);
|
|
1607
|
+
document.body.append(backdrop);
|
|
1608
|
+
}
|
|
1561
1609
|
async function showMessage(accountId, uid, folderId, specialUse, isRetry = false, envelope) {
|
|
1562
1610
|
const gen = ++showMessageGeneration;
|
|
1563
1611
|
if (!isRetry)
|
|
@@ -2308,6 +2356,16 @@ async function showMessage(accountId, uid, folderId, specialUse, isRetry = false
|
|
|
2308
2356
|
void saveAllAttachments();
|
|
2309
2357
|
} });
|
|
2310
2358
|
}
|
|
2359
|
+
if (window.mailxapi?.platform !== "android") {
|
|
2360
|
+
items.push({ label: `Delete "${att.filename}"\u2026`, separator: true, action: () => {
|
|
2361
|
+
confirmDeleteAttachments(msg, accountId, uid, [att.id], `Delete "${att.filename}" from this message?`);
|
|
2362
|
+
} });
|
|
2363
|
+
if (msg.attachments.length > 1) {
|
|
2364
|
+
items.push({ label: `Delete all (${msg.attachments.length})\u2026`, action: () => {
|
|
2365
|
+
confirmDeleteAttachments(msg, accountId, uid, "all", `Delete all ${msg.attachments.length} attachments from this message?`);
|
|
2366
|
+
} });
|
|
2367
|
+
}
|
|
2368
|
+
}
|
|
2311
2369
|
showContextMenu(e.clientX, e.clientY, items);
|
|
2312
2370
|
});
|
|
2313
2371
|
attEl.appendChild(chip);
|