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