import { useSession } from "@/store/session"; import { client } from "@/jmap/client"; import { DEFAULT_SOURCE_URL } from "@/lib/source"; import { APP_VERSION } from "@/lib/version"; import { t } from "@/lib/i18n"; export function AboutSettings() { const session = useSession((s) => s.session); const caps = Object.keys(session?.capabilities ?? {}); // A deployment running modified code should offer its own source, not ours. const sourceUrl = session?.ihasmail?.sourceUrl ?? DEFAULT_SOURCE_URL; return (

{t("About ihasmail")}

A fast, friendly, open-source webmail for {t("Stalwart Mail Server")}, built on JMAP.

{t("ihasmail")}
ihasmail v{APP_VERSION}
AGPL-3.0-or-later · {sourceUrl.replace(/^https?:\/\//, "")}

{t("Server")}

{t("Signed in as")}{session?.username}
{t("Stalwart")}{describeServer(session?.ihasmail?.server)}
{t("Accounts")}{Object.values(session?.accounts ?? {}).map((a) => a.name).join(", ")}
{t("Max upload")}{Math.round(client.maxSizeUpload / 1048576)} MB
{t("Image privacy proxy")}{session?.ihasmail?.imageProxy ? "enabled" : "disabled"}

{t("Stalwart does not publish its version number to mail clients, so ihasmail reports the edition where the server gives one. ihasmail requires 0.16 or newer, and sign-in refuses anything older.")}

ihasmail's own version is the date of the commit it was built from, followed by where that commit came from: {t("v2026.8.30+pr129")} was built from a commit dated the 30th of August 2026 that arrived through pull request 129. A commit that did not come through one carries its short SHA instead — +g1fa6578. The version deliberately says nothing about Stalwart; what this build needs from the server is the line above.

{t("Server capabilities")}

{caps.map((c) => {c.replace("urn:ietf:params:jmap:", "")})}
); } /** * Stalwart deliberately withholds its version from clients (it reports a fixed * "1.0.0" wherever it publishes one at all), so the edition is all there is to * show. The generation used to be reported here too, back when ihasmail spoke * to both 0.15 and 0.16; it requires 0.16 now, so signing in at all is the * answer to that question. */ function describeServer(server: { edition?: string | null } | undefined): string { return server?.edition ? `0.16 or newer (${server.edition})` : "0.16 or newer"; }