chore: generate
This commit is contained in:
parent
ecdfcd91ca
commit
a7bd1cd0d0
@ -56,7 +56,9 @@ export function usePromptMove(input: { projectID: () => string | undefined; sess
|
||||
dialog.replace(() => (
|
||||
<DialogMoveSession
|
||||
projectID={projectID}
|
||||
current={homeDestination?.destination() ?? (session ? { type: "directory", directory: session.directory } : undefined)}
|
||||
current={
|
||||
homeDestination?.destination() ?? (session ? { type: "directory", directory: session.directory } : undefined)
|
||||
}
|
||||
onSelect={(selection) => {
|
||||
const sessionID = input.sessionID()
|
||||
if (!sessionID) {
|
||||
|
||||
@ -1,4 +1,12 @@
|
||||
import { createContext, createMemo, createSignal, useContext, type Accessor, type ParentProps, type Setter } from "solid-js"
|
||||
import {
|
||||
createContext,
|
||||
createMemo,
|
||||
createSignal,
|
||||
useContext,
|
||||
type Accessor,
|
||||
type ParentProps,
|
||||
type Setter,
|
||||
} from "solid-js"
|
||||
import { useSync } from "../../context/sync"
|
||||
|
||||
export type HomeSessionDestination = { type: "directory"; directory: string } | { type: "new" }
|
||||
@ -14,8 +22,8 @@ const HomeSessionDestinationContext = createContext<Context>()
|
||||
export function HomeSessionDestinationProvider(props: ParentProps) {
|
||||
const sync = useSync()
|
||||
const [selected, setDestination] = createSignal<HomeSessionDestination>()
|
||||
const destination = createMemo<HomeSessionDestination>(() =>
|
||||
selected() ?? { type: "directory", directory: sync.path.directory || process.cwd() },
|
||||
const destination = createMemo<HomeSessionDestination>(
|
||||
() => selected() ?? { type: "directory", directory: sync.path.directory || process.cwd() },
|
||||
)
|
||||
return (
|
||||
<HomeSessionDestinationContext.Provider
|
||||
|
||||
@ -603,23 +603,13 @@ export function DialogSelect<T>(props: DialogSelectProps<T>) {
|
||||
</Show>
|
||||
</box>
|
||||
<Show when={props.footer || visibleActions().length} fallback={<box flexShrink={0} />}>
|
||||
<box
|
||||
paddingRight={2}
|
||||
paddingLeft={4}
|
||||
flexDirection="row"
|
||||
justifyContent="space-between"
|
||||
flexShrink={0}
|
||||
>
|
||||
<box paddingRight={2} paddingLeft={4} flexDirection="row" justifyContent="space-between" flexShrink={0}>
|
||||
<box flexDirection="row" gap={2}>
|
||||
{props.footer}
|
||||
<For each={left()}>
|
||||
{(item) => <FooterAction item={item} />}
|
||||
</For>
|
||||
<For each={left()}>{(item) => <FooterAction item={item} />}</For>
|
||||
</box>
|
||||
<box flexDirection="row" gap={2}>
|
||||
<For each={right()}>
|
||||
{(item) => <FooterAction item={item} />}
|
||||
</For>
|
||||
<For each={right()}>{(item) => <FooterAction item={item} />}</For>
|
||||
</box>
|
||||
</box>
|
||||
</Show>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user