@bobfrankston/rmfmail 1.1.107 → 1.1.109

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.
@@ -21,6 +21,7 @@ __export(api_client_exports, {
21
21
  allowRemoteContent: () => allowRemoteContent,
22
22
  autocomplete: () => autocomplete,
23
23
  cancelQueuedOutgoing: () => cancelQueuedOutgoing,
24
+ cancelServerSearch: () => cancelServerSearch,
24
25
  closeWordEdit: () => closeWordEdit,
25
26
  connectEvents: () => connectEvents,
26
27
  connectWebSocket: () => connectWebSocket,
@@ -194,6 +195,9 @@ function getUnifiedInbox(page = 1, pageSize = 50) {
194
195
  function searchMessages(query, page = 1, pageSize = 50, scope = "all", accountId = "", folderId = 0, includeTrashSpam = false) {
195
196
  return ipc().searchMessages(query, page, pageSize, scope, accountId, folderId, includeTrashSpam);
196
197
  }
198
+ function cancelServerSearch() {
199
+ return ipc().cancelServerSearch?.();
200
+ }
197
201
  function getMessage(accountId, uid, allowRemote = false, folderId) {
198
202
  return ipc().getMessage(accountId, uid, allowRemote, folderId);
199
203
  }
@@ -2150,6 +2154,7 @@ function spawnDesktopPopout(msg, accountId) {
2150
2154
  iframe.srcdoc = wrapHtmlBody(msg.bodyHtml, msg.remoteAllowed);
2151
2155
  iframe.style.cssText = "flex:1;border:none;width:100%;background:#fff;";
2152
2156
  bodyContainer.appendChild(iframe);
2157
+ installPreviewControls(iframe);
2153
2158
  } else {
2154
2159
  const pre = document.createElement("pre");
2155
2160
  pre.style.cssText = "padding:12px;white-space:pre-wrap;word-break:break-word;margin:0;flex:1;overflow:auto;";
@@ -7418,14 +7423,14 @@ function quoteBody(msg) {
7418
7423
  const date = new Date(msg.date).toLocaleString();
7419
7424
  const from = msg.from.name ? `${msg.from.name} <${msg.from.address}>` : msg.from.address;
7420
7425
  const body = sanitizeQuotedBody(msg);
7421
- return `<p><br></p><div class="reply"><p>On ${date}, ${from} wrote:</p><blockquote>${body}</blockquote></div>`;
7426
+ return `<p></p><br><br><div class="reply"><p>On ${date}, ${from} wrote:</p><blockquote>${body}</blockquote></div>`;
7422
7427
  }
7423
7428
  function forwardBody(msg) {
7424
7429
  const date = new Date(msg.date).toLocaleString();
7425
7430
  const from = msg.from.name ? `${msg.from.name} &lt;${msg.from.address}&gt;` : msg.from.address;
7426
7431
  const to = msg.to.map((a) => a.name ? `${a.name} &lt;${a.address}&gt;` : a.address).join(", ");
7427
7432
  const body = sanitizeQuotedBody(msg);
7428
- return `<p><br></p><div class="reply"><p>---------- Forwarded message ----------<br>From: ${from}<br>Date: ${date}<br>Subject: ${msg.subject}<br>To: ${to}</p>${body}</div>`;
7433
+ return `<p></p><br><br><div class="reply"><p>---------- Forwarded message ----------<br>From: ${from}<br>Date: ${date}<br>Subject: ${msg.subject}<br>To: ${to}</p>${body}</div>`;
7429
7434
  }
7430
7435
  var lastDeleted = null;
7431
7436
  var lastMoved = null;
@@ -7962,6 +7967,7 @@ function doSearch(immediate = false) {
7962
7967
  clearTimeout(serverSearchTimer);
7963
7968
  serverSearchTimer = null;
7964
7969
  }
7970
+ cancelServerSearch();
7965
7971
  if (localScope === "current" && !serverOn && !immediate) {
7966
7972
  const body = document.getElementById("ml-body");
7967
7973
  if (body) {
@@ -7996,6 +8002,7 @@ searchInput?.addEventListener("input", () => {
7996
8002
  if (serverSearchTimer) {
7997
8003
  clearTimeout(serverSearchTimer);
7998
8004
  serverSearchTimer = null;
8005
+ cancelServerSearch();
7999
8006
  }
8000
8007
  updateSearchHighlight();
8001
8008
  if (searchInput.value.trim() === "") {
@@ -8019,6 +8026,7 @@ searchInput?.addEventListener("keydown", (e) => {
8019
8026
  clearTimeout(serverSearchTimer);
8020
8027
  serverSearchTimer = null;
8021
8028
  }
8029
+ cancelServerSearch();
8022
8030
  updateSearchHighlight();
8023
8031
  clearSearchMode();
8024
8032
  const body = document.getElementById("ml-body");
@@ -9869,6 +9877,10 @@ getSettings().then((s) => {
9869
9877
  }).catch(() => {
9870
9878
  });
9871
9879
  function saveEditorSetting(editor) {
9880
+ try {
9881
+ localStorage.setItem("mailx-editor-type", editor);
9882
+ } catch {
9883
+ }
9872
9884
  getSettings().then((settings) => {
9873
9885
  settings.ui = { ...settings.ui, editor };
9874
9886
  saveSettings(settings);