import { getBrain, olderBrain } from "../app/brain.ts"; import { deleteBrain, exportSave, importSave, renameOwner, resetSave, setChatter, } from "../app/commands.ts"; import { CFG } from "../app/config.ts"; import { installApp, installEvent, isIOS, setAlerts, standalone } from "../app/pwa.ts"; import { brain, store, ui, upgrade } from "../app/store.ts"; import { fmtMB } from "../app/utils.ts"; import { brainStatus } from "./Brain.tsx"; import { HostingSettings } from "./Hosting.tsx"; import { isRemote } from "../app/hosting.ts"; export function Settings() { const s = store.state, st = brain.state, up = upgrade.state; const canUpgrade = !isRemote() && st === "ready" && olderBrain() && (up === "idle" || up === "error"); const installing = !standalone() && (!!installEvent || isIOS()); const alertNote = s.settings.alerts ? standalone() ? "Alerts arrive while the app is open or in the background; when it is closed, your device decides how often it may check." : "Alerts arrive while this tab is open in the background. Installed as an app, they can also come when it is closed, on some devices." : ui.alertsNote; return ( <>

Brain

{brainStatus()}