import { useSettings } from "@/store/settings"; import { Switch, useIsTouch } from "@/ui/misc"; import { SWIPE_CHOICES, type SwipeAction } from "@/lib/swipe"; import { UI_LANGUAGES } from "@/lib/languages"; import { t as translate } from "@/lib/i18n"; /** * The theme cards, each previewing the background it actually paints. Kept as * data rather than three inline ternaries so a fourth does not mean editing a * conditional in three places. */ const THEMES = [ { id: "system", label: "Match system", preview: "linear-gradient(90deg,#f6f8fa 50%,#0b1220 50%)" }, { id: "light", label: "Light", preview: "#f6f8fa" }, { id: "dark", label: "Dark", preview: "#0b1220" }, // The ihasmail.org palette: its background, with its teal and the logo's // orange showing, so the card looks like what picking it does. { id: "ihasmail", label: "ihasmail", preview: "linear-gradient(135deg,#0d2430 0%,#12303e 55%,#46cac3 55%,#46cac3 78%,#f9a34b 78%)" }, ] as const; const ACCENTS = [ { id: "teal", color: "#0f766e" }, { id: "blue", color: "#2563eb" }, { id: "purple", color: "#7c3aed" }, { id: "rose", color: "#e11d48" }, { id: "orange", color: "#ea580c" }, { id: "green", color: "#16a34a" }, ]; export function AppearanceSettings() { const s = useSettings((st) => st.settings); const update = useSettings((st) => st.update); const isTouch = useIsTouch(); return (
{translate("Make ihasmail yours.")}
{translate("ihasmail")} {translate("is the palette from")} {translate("ihasmail.org")}{translate(", and what a new account starts on. It is a dark theme, so it counts as dark wherever that matters, and the accent colour below still applies on top of it.")}
{translate("Only languages ihasmail has been translated into appear here, so this list grows as translations land rather than ahead of them — a language offered without strings behind it would leave the page claiming to be in a language it is not.")}
{translate("This is separate from")} {translate("Language & region")} {translate("in General, which decides how dates, times and numbers are written. You can read an English interface with German dates, or the other way round.")}
{translate("On a touchscreen, drag a message sideways to act on it. Each direction can do one thing, or nothing. These follow your account, so a phone and a tablet agree; a mouse ignores them and keeps dragging messages into folders instead.")}
{translate("This screen has no touchscreen, so nothing here changes what it does. Your phone or tablet will pick these up.")}
)}{translate("Holding a message selects it, and holding a folder opens its menu. Pull the top of the message list down to check for new mail.")}