import { revealItemInDir } from "@tauri-apps/plugin-opener"; import { patchModel, settingsAtom } from "@yaakapp-internal/models"; import { Heading, VStack } from "@yaakapp-internal/ui"; import { useAtomValue } from "jotai"; import { useCheckForUpdates } from "../../hooks/useCheckForUpdates"; import { appInfo } from "../../lib/appInfo"; import { revealInFinderText } from "../../lib/reveal"; import { CargoFeature } from "../CargoFeature"; import { DismissibleBanner } from "../core/DismissibleBanner"; import { IconButton } from "../core/IconButton"; import { ModelSettingRowBoolean, ModelSettingSelectControl, SettingValue, SettingRow, SettingRowBoolean, SettingRowSelect, SettingsList, SettingsSection, } from "../core/SettingRow"; const WORKSPACE_SETTINGS_MOVED_AT = "2026-06-30"; export function SettingsGeneral() { const settings = useAtomValue(settingsAtom); const checkForUpdates = useCheckForUpdates(); if (settings == null) { return null; } const showWorkspaceSettingsMovedBanner = settings.createdAt.slice(0, 10) < WORKSPACE_SETTINGS_MOVED_AT; return (
General

Configure general settings for update behavior and more.

checkForUpdates.mutateAsync()} />
patchModel(settings, { autoupdate: v === "auto" }) } options={[ { label: "Automatic", value: "auto" }, { label: "Manual", value: "manual" }, ]} /> {}} />
{showWorkspaceSettingsMovedBanner && (

Workspace specific settings have moved to{" "} Workspace Settings, accessible from the workspace switcher menu.

)} revealItemInDir(appInfo.appDataDir), }, ]} /> revealItemInDir(appInfo.appLogDir), }, ]} />
); }