@bobfrankston/mailx 1.0.439 → 1.0.440
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.
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Message viewer component -- displays full message in sandboxed iframe.
|
|
3
3
|
* Subscribes to message-state: clears when selected becomes null.
|
|
4
4
|
*/
|
|
5
|
-
import { getMessage, updateFlags, allowRemoteContent, flagSenderOrDomain, getAttachment, addContact, listContacts, upsertContact, unsubscribeOneClick } from "../lib/api-client.js";
|
|
5
|
+
import { getMessage, updateFlags, allowRemoteContent, flagSenderOrDomain, getAttachment, addContact, listContacts, upsertContact, unsubscribeOneClick, addPreferredContact } from "../lib/api-client.js";
|
|
6
6
|
import { showContextMenu } from "./context-menu.js";
|
|
7
7
|
import * as state from "../lib/message-state.js";
|
|
8
8
|
/** Currently displayed message (for reply/forward) */
|
|
@@ -348,6 +348,28 @@ export async function showMessage(accountId, uid, folderId, specialUse, isRetry
|
|
|
348
348
|
await showAddContactDialog(name, addr.address);
|
|
349
349
|
},
|
|
350
350
|
});
|
|
351
|
+
// "Add to preferred" — separate path: writes to
|
|
352
|
+
// contacts.jsonc#preferred[] with an optional source tag.
|
|
353
|
+
// Distinct from "Add to contacts" which goes into the DB +
|
|
354
|
+
// pushes to Google. Preferred entries rank higher in
|
|
355
|
+
// autocomplete and survive Google sync's churn.
|
|
356
|
+
items.push({
|
|
357
|
+
label: `Add to preferred: ${addr.address}`,
|
|
358
|
+
action: async () => {
|
|
359
|
+
const tag = prompt("Tag (e.g. work, family, vendor) — leave blank for default:", "");
|
|
360
|
+
if (tag === null)
|
|
361
|
+
return; // user cancelled
|
|
362
|
+
try {
|
|
363
|
+
await addPreferredContact({ name, email: addr.address, source: tag.trim() || undefined });
|
|
364
|
+
const status = document.getElementById("status-sync");
|
|
365
|
+
if (status)
|
|
366
|
+
status.textContent = `Added to preferred: ${addr.address}${tag ? ` [${tag}]` : ""}`;
|
|
367
|
+
}
|
|
368
|
+
catch (e) {
|
|
369
|
+
alert(`Couldn't add to preferred: ${e?.message || e}`);
|
|
370
|
+
}
|
|
371
|
+
},
|
|
372
|
+
});
|
|
351
373
|
items.push({ label: "", action: () => { }, separator: true });
|
|
352
374
|
}
|
|
353
375
|
items.push({ label: "Reply", action: () => document.dispatchEvent(new CustomEvent("mailx-compose", { detail: { mode: "reply" } })) });
|
package/client/index.html
CHANGED
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
<label class="tb-menu-item" title="Ghost-text completions while composing — Ollama / Claude / OpenAI back-end, off by default"><input type="checkbox" id="opt-autocomplete"> AI autocomplete</label>
|
|
56
56
|
<label class="tb-menu-item" title="Right-click in message body → Translate"><input type="checkbox" id="opt-ai-translate"> AI translate (off by default)</label>
|
|
57
57
|
<label class="tb-menu-item" title="Right-click in compose editor → Proofread (when wired)"><input type="checkbox" id="opt-ai-proofread"> AI proofread (off by default)</label>
|
|
58
|
-
<label class="tb-menu-item" title="When opening a message with remote content, look up the sender's domain in Spamhaus DBL.
|
|
58
|
+
<label class="tb-menu-item" title="When opening a message with remote content, look up the sender's domain in three free DNS blocklists in parallel: Spamhaus DBL, SURBL, URIBL. The banner shows N-of-3 services flagging the domain. Each query leaks the bare domain to that DNSBL's DNS. Off by default."><input type="checkbox" id="opt-check-reputation"> Check sender reputation (DNSBLs)</label>
|
|
59
59
|
<hr class="tb-menu-sep">
|
|
60
60
|
<button class="tb-menu-item" id="btn-edit-jsonc" title="Edit accounts.jsonc / allowlist.jsonc">Edit config files...</button>
|
|
61
61
|
<button class="tb-menu-item" id="btn-open-mailx-dir" title="Open ~/.mailx in file explorer">Open mailx folder...</button>
|
|
@@ -184,6 +184,7 @@
|
|
|
184
184
|
</header>
|
|
185
185
|
<div class="cal-side-actions">
|
|
186
186
|
<button class="cal-side-new" id="cal-side-new" title="New event">+ New event</button>
|
|
187
|
+
<button class="cal-side-new" id="cal-side-refresh-events" title="Refresh events from Google">↻</button>
|
|
187
188
|
<label class="cal-side-opt" title="Include expanded instances of recurring events">
|
|
188
189
|
<input type="checkbox" id="cal-side-show-recurring" checked> Show recurring
|
|
189
190
|
</label>
|