import { createSignal } from "solid-js"; /** * Opening a repository by path. * * A plain form, because a native folder picker needs the Tauri dialog plugin * and that is a dependency this change does not need. The picker arrives with * the repository-picker work, along with recent repositories; until then a path * still gets you in, and anything below a repository's root works because the * Rust side searches upwards the way git does. */ export default function OpenRepository(props: { busy: boolean; onOpen: (path: string) => void }) { const [path, setPath] = createSignal(""); function onSubmit(event: SubmitEvent) { event.preventDefault(); const trimmed = path().trim(); if (trimmed) props.onOpen(trimmed); } return (
); }