import { useSession } from "@/store/session"; import { client } from "@/jmap/client"; import { DEFAULT_SOURCE_URL } from "@/lib/source"; 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 (

About ihasmail

A fast, friendly, open-source webmail for Stalwart Mail Server, built on JMAP.

ihasmail
ihasmail 2.0
AGPL-3.0-or-later ยท {sourceUrl.replace(/^https?:\/\//, "")}

Server

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

Stalwart does not publish its version number to mail clients, so ihasmail reports the API generation it detected instead.

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 most honest thing we can * show is which generation of its API answered us, plus the edition where the * server reports it. */ function describeServer(server: { generation?: "0.16+" | "pre-0.16" | null; edition?: string | null } | undefined): string { if (!server?.generation) return "not detected"; const generation = server.generation === "0.16+" ? "0.16 or newer" : "older than 0.16"; return server.edition ? `${generation} (${server.edition})` : generation; }