@bobfrankston/mailx 1.0.166 → 1.0.167

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/client/index.html CHANGED
@@ -46,11 +46,11 @@
46
46
  <span class="tb-icon">↻</span> Sync
47
47
  </button>
48
48
  <div class="tb-menu" id="restart-menu">
49
- <button class="tb-btn" id="btn-restart" title="Restart server and reload page">
49
+ <button class="tb-btn" id="btn-restart" title="Reload">
50
50
  <span class="tb-icon">⚡</span> Restart ▾
51
51
  </button>
52
52
  <div class="tb-menu-dropdown" id="restart-dropdown" hidden>
53
- <button class="tb-menu-item" id="btn-restart-quick" title="Restart the server process">Restart server</button>
53
+ <button class="tb-menu-item" id="btn-restart-quick" title="Reload the page">Reload</button>
54
54
  <button class="tb-menu-item" id="btn-rebuild" title="Wipe local DB and message cache, re-download everything. Accounts and settings are preserved. Safe and fast.">Rebuild local cache</button>
55
55
  <hr class="tb-menu-sep">
56
56
  <span class="tb-menu-hint">CLI: mailx --rebuild for full reset</span>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bobfrankston/mailx",
3
- "version": "1.0.166",
3
+ "version": "1.0.167",
4
4
  "description": "Local-first email client with IMAP sync and standalone native app",
5
5
  "type": "module",
6
6
  "main": "bin/mailx.js",
@@ -24,7 +24,7 @@
24
24
  "@bobfrankston/iflow-node": "^0.1.1",
25
25
  "@bobfrankston/miscinfo": "^1.0.7",
26
26
  "@bobfrankston/oauthsupport": "^1.0.20",
27
- "@bobfrankston/msger": "^0.1.216",
27
+ "@bobfrankston/msger": "^0.1.217",
28
28
  "@capacitor/android": "^8.3.0",
29
29
  "@capacitor/cli": "^8.3.0",
30
30
  "@capacitor/core": "^8.3.0",
@@ -318,7 +318,21 @@ export class ImapManager extends EventEmitter {
318
318
  // For OAuth accounts, provide a tokenProvider using oauthsupport
319
319
  let tokenProvider;
320
320
  if (account.imap.auth === "oauth2" || (!account.imap.password && account.imap.host?.includes("gmail"))) {
321
- const credPath = path.join(getConfigDir(), "google-credentials.json");
321
+ // Find Google OAuth credentials — check ~/.mailx first, then iflow-direct package
322
+ let credPath = path.join(getConfigDir(), "google-credentials.json");
323
+ if (!fs.existsSync(credPath)) {
324
+ try {
325
+ const pkgDir = path.dirname(import.meta.resolve("@bobfrankston/iflow-direct").replace("file:///", "").replace("file://", ""));
326
+ for (const name of ["credentials.json", "iflow-credentials.json"]) {
327
+ const p = path.join(pkgDir, name);
328
+ if (fs.existsSync(p)) {
329
+ credPath = p;
330
+ break;
331
+ }
332
+ }
333
+ }
334
+ catch { /* iflow-direct not resolvable */ }
335
+ }
322
336
  const tokenDir = path.join(getConfigDir(), "tokens", account.imap.user.replace(/[@.]/g, "_"));
323
337
  tokenProvider = async () => {
324
338
  const result = await authenticateOAuth(credPath, {