@bobfrankston/mailx 1.0.43 → 1.0.44
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/app.js +2 -1
- package/package.json +2 -2
- package/packages/mailx-server/index.js +7 -2
package/client/app.js
CHANGED
|
@@ -614,8 +614,9 @@ optFlagged?.addEventListener("change", () => {
|
|
|
614
614
|
const isApp = typeof mailxapi !== "undefined" && mailxapi?.isApp;
|
|
615
615
|
fetch("/api/version").then(r => r.json()).then(d => {
|
|
616
616
|
const el = document.getElementById("app-version");
|
|
617
|
+
const driveName = d.drive === "local" ? "" : ` [${d.drive?.split(/[/\\]/).pop() || d.drive}]`;
|
|
617
618
|
if (el)
|
|
618
|
-
el.textContent = `mailx s${d.server}/c${d.client}${isApp ? "" : " [browser]"}`;
|
|
619
|
+
el.textContent = `mailx s${d.server}/c${d.client}${driveName}${isApp ? "" : " [browser]"}`;
|
|
619
620
|
}).catch(async () => {
|
|
620
621
|
// Server not running — try to start it if we're in the app
|
|
621
622
|
const startupStatus = document.getElementById("startup-status");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bobfrankston/mailx",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.44",
|
|
4
4
|
"description": "Local-first email client with IMAP sync and standalone native app",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "bin/mailx.js",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"postinstall": "node launcher/builder/postinstall.js"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@bobfrankston/iflow": "^1.0.
|
|
23
|
+
"@bobfrankston/iflow": "^1.0.24",
|
|
24
24
|
"@bobfrankston/miscinfo": "^1.0.6",
|
|
25
25
|
"@bobfrankston/oauthsupport": "^1.0.11",
|
|
26
26
|
"@bobfrankston/rust-builder": "^0.1.2",
|
|
@@ -9,7 +9,7 @@ import * as fs from "node:fs";
|
|
|
9
9
|
import { MailxDB } from "@bobfrankston/mailx-store";
|
|
10
10
|
import { ImapManager } from "@bobfrankston/mailx-imap";
|
|
11
11
|
import { createApiRouter } from "@bobfrankston/mailx-api";
|
|
12
|
-
import { loadSettings, getConfigDir, initLocalConfig } from "@bobfrankston/mailx-settings";
|
|
12
|
+
import { loadSettings, getConfigDir, getSharedDir, initLocalConfig } from "@bobfrankston/mailx-settings";
|
|
13
13
|
import { ports } from "@bobfrankston/miscinfo";
|
|
14
14
|
import { createServer } from "node:http";
|
|
15
15
|
const PORT = ports.mailx;
|
|
@@ -81,7 +81,12 @@ app.use("/node_modules", express.static(path.join(rootDir, "node_modules"), { et
|
|
|
81
81
|
// Mount API
|
|
82
82
|
const apiRouter = createApiRouter(db, imapManager);
|
|
83
83
|
app.use("/api", apiRouter);
|
|
84
|
-
app.get("/api/version", (req, res) =>
|
|
84
|
+
app.get("/api/version", (req, res) => {
|
|
85
|
+
const sharedDir = getSharedDir();
|
|
86
|
+
const localDir = getConfigDir();
|
|
87
|
+
const drive = sharedDir === localDir ? "local" : sharedDir;
|
|
88
|
+
res.json({ server: SERVER_VERSION, client: CLIENT_VERSION, theme: settings.ui?.theme || "system", drive });
|
|
89
|
+
});
|
|
85
90
|
app.get("/status", (req, res) => {
|
|
86
91
|
const accounts = db.getAccounts();
|
|
87
92
|
const pendingSync = db.getTotalPendingSyncCount();
|