@bobfrankston/rmfmail 1.2.164 → 1.2.166
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/bin/mailx.js +100 -82
- package/bin/mailx.js.map +1 -1
- package/bin/mailx.ts +89 -71
- package/client/android-bootstrap.bundle.js +8 -5
- package/client/android-bootstrap.bundle.js.map +2 -2
- package/client/app.bundle.js +45 -0
- package/client/app.bundle.js.map +3 -3
- package/client/app.js +48 -0
- package/client/app.js.map +1 -1
- package/client/app.ts +47 -0
- package/client/compose/compose.bundle.js +15 -0
- package/client/compose/compose.bundle.js.map +2 -2
- package/client/compose/compose.js +14 -0
- package/client/compose/compose.js.map +1 -1
- package/client/compose/compose.ts +12 -0
- package/client/index.html +1 -0
- package/client/lib/api-client.js +7 -0
- package/client/lib/api-client.js.map +1 -1
- package/client/lib/api-client.ts +7 -0
- package/client/lib/mailxapi.js +7 -0
- package/package.json +5 -5
- package/packages/mailx-imap/index.d.ts.map +1 -1
- package/packages/mailx-imap/index.js +32 -7
- package/packages/mailx-imap/index.js.map +1 -1
- package/packages/mailx-imap/index.ts +33 -7
- package/packages/mailx-imap/package-lock.json +2 -2
- package/packages/mailx-imap/package.json +1 -1
- package/packages/mailx-service/index.d.ts +15 -0
- package/packages/mailx-service/index.d.ts.map +1 -1
- package/packages/mailx-service/index.js +15 -0
- package/packages/mailx-service/index.js.map +1 -1
- package/packages/mailx-service/index.ts +12 -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/package.json +1 -1
- package/packages/mailx-store/package.json +1 -1
- package/packages/mailx-store-web/android-bootstrap.d.ts.map +1 -1
- package/packages/mailx-store-web/android-bootstrap.js +16 -6
- package/packages/mailx-store-web/android-bootstrap.js.map +1 -1
- package/packages/mailx-store-web/android-bootstrap.ts +17 -6
- package/packages/mailx-store-web/package.json +1 -1
- package/packages/mailx-store-web/sync-manager.d.ts.map +1 -1
- package/packages/mailx-store-web/sync-manager.js +20 -5
- package/packages/mailx-store-web/sync-manager.js.map +1 -1
- package/packages/mailx-store-web/sync-manager.ts +21 -5
- package/packages/mailx-types/mailx-api.d.ts +6 -0
- package/packages/mailx-types/mailx-api.d.ts.map +1 -1
- package/packages/mailx-types/mailx-api.ts +3 -0
- package/packages/mailx-types/package.json +1 -1
- /package/packages/mailx-imap/{node_modules.npmglobalize-stash-10468 → node_modules.npmglobalize-stash-61300}/.package-lock.json +0 -0
package/client/app.ts
CHANGED
|
@@ -4607,6 +4607,53 @@ document.getElementById("btn-edit-jsonc")?.addEventListener("click", async () =>
|
|
|
4607
4607
|
if (settingsDropdown) settingsDropdown.hidden = true;
|
|
4608
4608
|
await openJsoncEditor("accounts.jsonc");
|
|
4609
4609
|
});
|
|
4610
|
+
// Settings → "Make default email app...". Registers rmfmail as the OS
|
|
4611
|
+
// mailto: handler (same work as `rmfmail -register-mailto`), then walks the
|
|
4612
|
+
// user through the one step Windows refuses to automate: picking rmfmail in
|
|
4613
|
+
// Settings → Default apps (UserChoice is hash-protected). Discoverability
|
|
4614
|
+
// fix — the CLI flag existed but nothing in the app pointed at it (Bob
|
|
4615
|
+
// 2026-07-20 "couldn't figure out how to make rmfmail the responder").
|
|
4616
|
+
document.getElementById("btn-register-mailto")?.addEventListener("click", async () => {
|
|
4617
|
+
const settingsDropdown = document.getElementById("settings-dropdown");
|
|
4618
|
+
if (settingsDropdown) settingsDropdown.hidden = true;
|
|
4619
|
+
const { registerMailto } = await import("./lib/api-client.js");
|
|
4620
|
+
const r = await registerMailto();
|
|
4621
|
+
|
|
4622
|
+
const backdrop = document.createElement("div");
|
|
4623
|
+
backdrop.className = "mailx-modal-backdrop";
|
|
4624
|
+
backdrop.style.cssText = "position:fixed;inset:0;z-index:2000;background:rgba(0,0,0,0.4);display:flex;align-items:center;justify-content:center;";
|
|
4625
|
+
const panel = document.createElement("div");
|
|
4626
|
+
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(520px,90vw);padding:18px;display:flex;flex-direction:column;gap:12px;";
|
|
4627
|
+
const heading = document.createElement("div");
|
|
4628
|
+
heading.style.cssText = "font-weight:600;font-size:1.05em;";
|
|
4629
|
+
heading.textContent = r.ok ? "rmfmail registered as an email handler" : "Registration failed";
|
|
4630
|
+
const body = document.createElement("div");
|
|
4631
|
+
body.style.cssText = "font-size:0.92em;line-height:1.45;white-space:pre-wrap;";
|
|
4632
|
+
body.textContent = r.ok
|
|
4633
|
+
? "One manual step remains — Windows only lets YOU flip the default:\n\nSettings → Apps → Default apps → search \"rmfmail\" → set it for MAILTO.\n\nIf a picker warns the app must be from the Store, choose \"More options\" / \"Choose an app on this PC\"."
|
|
4634
|
+
: r.message;
|
|
4635
|
+
const btnRow = document.createElement("div");
|
|
4636
|
+
btnRow.style.cssText = "display:flex;gap:8px;justify-content:flex-end;";
|
|
4637
|
+
const closeBtn = document.createElement("button");
|
|
4638
|
+
closeBtn.textContent = "Close";
|
|
4639
|
+
closeBtn.style.cssText = "padding:6px 14px;";
|
|
4640
|
+
closeBtn.addEventListener("click", () => backdrop.remove());
|
|
4641
|
+
btnRow.append(closeBtn);
|
|
4642
|
+
if (r.ok) {
|
|
4643
|
+
const openBtn = document.createElement("button");
|
|
4644
|
+
openBtn.textContent = "Open Default-apps settings";
|
|
4645
|
+
openBtn.style.cssText = "padding:6px 14px;font-weight:500;";
|
|
4646
|
+
openBtn.addEventListener("click", () => {
|
|
4647
|
+
const api = (window as any).mailxapi;
|
|
4648
|
+
if (api?.openExternal) api.openExternal("ms-settings:defaultapps");
|
|
4649
|
+
backdrop.remove();
|
|
4650
|
+
});
|
|
4651
|
+
btnRow.append(openBtn);
|
|
4652
|
+
}
|
|
4653
|
+
panel.append(heading, body, btnRow);
|
|
4654
|
+
backdrop.append(panel);
|
|
4655
|
+
document.body.append(backdrop);
|
|
4656
|
+
});
|
|
4610
4657
|
// Allow other components (remote-content banner, etc.) to open the editor
|
|
4611
4658
|
// pre-selected to a specific file.
|
|
4612
4659
|
document.addEventListener("mailx-open-jsonc-editor", async (ev: Event) => {
|
|
@@ -1094,6 +1094,7 @@ __export(api_client_exports, {
|
|
|
1094
1094
|
reauthGoogleScopes: () => reauthGoogleScopes,
|
|
1095
1095
|
reauthenticate: () => reauthenticate,
|
|
1096
1096
|
recordSpamReport: () => recordSpamReport,
|
|
1097
|
+
registerMailto: () => registerMailto,
|
|
1097
1098
|
removeUserDictWord: () => removeUserDictWord,
|
|
1098
1099
|
renameFolder: () => renameFolder,
|
|
1099
1100
|
repairAccounts: () => repairAccounts,
|
|
@@ -1628,6 +1629,12 @@ async function openAttachment(accountId, uid, attachmentId, folderId, filename)
|
|
|
1628
1629
|
async function getMessageSource(accountId, uid, folderId) {
|
|
1629
1630
|
return ipc().getMessageSource(accountId, uid, folderId);
|
|
1630
1631
|
}
|
|
1632
|
+
async function registerMailto() {
|
|
1633
|
+
const fn = ipc().registerMailto;
|
|
1634
|
+
if (!fn)
|
|
1635
|
+
return { ok: false, message: "Not available in this host \u2014 run `rmfmail -register-mailto` from a terminal." };
|
|
1636
|
+
return fn();
|
|
1637
|
+
}
|
|
1631
1638
|
async function popoutWindow(accountId, uid, folderId, subject) {
|
|
1632
1639
|
const fn = ipc().popoutWindow;
|
|
1633
1640
|
if (!fn)
|
|
@@ -4199,10 +4206,18 @@ setActiveEditorBadge(activeEditorType);
|
|
|
4199
4206
|
var fromInput = document.getElementById("compose-from-input");
|
|
4200
4207
|
var fromOptions = document.getElementById("compose-from-options");
|
|
4201
4208
|
if (fromInput) {
|
|
4209
|
+
const openFromPicker = () => {
|
|
4210
|
+
try {
|
|
4211
|
+
fromInput.showPicker?.();
|
|
4212
|
+
} catch {
|
|
4213
|
+
}
|
|
4214
|
+
};
|
|
4202
4215
|
fromInput.addEventListener("focus", () => {
|
|
4203
4216
|
fromInput.dataset.prevFrom = fromInput.value;
|
|
4204
4217
|
fromInput.value = "";
|
|
4218
|
+
openFromPicker();
|
|
4205
4219
|
});
|
|
4220
|
+
fromInput.addEventListener("click", openFromPicker);
|
|
4206
4221
|
fromInput.addEventListener("blur", () => {
|
|
4207
4222
|
if (fromInput.value.trim() === "" && fromInput.dataset.prevFrom) {
|
|
4208
4223
|
fromInput.value = fromInput.dataset.prevFrom;
|