import { VStack } from "@yaakapp-internal/ui"; import { openWorkspaceSettings } from "../../commands/openWorkspaceSettings"; import { useKeyValue } from "../../hooks/useKeyValue"; import { showToast } from "../../lib/toast"; import { FeatureHint } from "../core/FeatureHint"; const DOCS_URL = "https://yaak.app/docs/collaboration/local-directory-git-sync"; /** What the sidebar's Git slot shows while the workspace only lives in the app's database. */ export function SyncWorkspaceHint({ workspaceId }: { workspaceId: string }) { // Hidden from the menu this replaced, so honor it const { value: legacyHidden } = useKeyValue>({ key: "setup_sync", fallback: {}, }); if (legacyHidden == null || legacyHidden[workspaceId]) return null; return ( openWorkspaceSettings("settings", "sync_dir") }} onDismiss={showSyncLocationToast} > Sync this workspace to a folder of plain files to back it up or track it with Git. ); } function showSyncLocationToast() { showToast({ id: "sync-hint-dismissed", color: "info", timeout: 8000, message: (

Sync whenever you're ready

Directory sync and Git are in Workspace Settings

), }); }