fix: quick add opens create ui

Add createKey to quick-add manifests and client create dialog host.

FAB and command palette open in-place create UIs instead of navigating away.
This commit is contained in:
ginnoir
2026-07-04 11:47:35 -05:00
parent 76f68548b2
commit 68a573c4d6
24 changed files with 1017 additions and 20 deletions
+55
View File
@@ -0,0 +1,55 @@
"use client";
import { useQuickAdd } from "@/components/quick-add-provider";
import { BangRecordDialog } from "@/components/quick-add/dialogs/bang-record-dialog";
import { CalendarCreateDialog } from "@/components/quick-add/dialogs/calendar-create-dialog";
import { CalendarEventCreateDialog } from "@/components/quick-add/dialogs/calendar-event-create-dialog";
import { ContainerCreateDialog } from "@/components/quick-add/dialogs/container-create-dialog";
import { GardenCareLogDialog } from "@/components/quick-add/dialogs/garden-care-log-dialog";
import { ListCreateDialog } from "@/components/quick-add/dialogs/list-create-dialog";
import { ListItemCreateDialog } from "@/components/quick-add/dialogs/list-item-create-dialog";
import { NoteCreateDialog } from "@/components/quick-add/dialogs/note-create-dialog";
import { PlantCreateDialog } from "@/components/quick-add/dialogs/plant-create-dialog";
export function QuickAddCreateHost() {
const { activeCreateKey, closeCreate } = useQuickAdd();
const onOpenChange = (next: boolean) => {
if (!next) closeCreate();
};
return (
<>
<CalendarEventCreateDialog
open={activeCreateKey === "calendar.event"}
onOpenChange={onOpenChange}
/>
<CalendarCreateDialog
open={activeCreateKey === "calendar.calendar"}
onOpenChange={onOpenChange}
/>
<NoteCreateDialog open={activeCreateKey === "notes.note"} onOpenChange={onOpenChange} />
<ListItemCreateDialog
open={activeCreateKey === "lists.add-shopping"}
onOpenChange={onOpenChange}
listType="shopping"
/>
<ListItemCreateDialog
open={activeCreateKey === "lists.add-task"}
onOpenChange={onOpenChange}
listType="task"
/>
<ListCreateDialog open={activeCreateKey === "lists.new-list"} onOpenChange={onOpenChange} />
<PlantCreateDialog open={activeCreateKey === "garden.plant"} onOpenChange={onOpenChange} />
<ContainerCreateDialog
open={activeCreateKey === "garden.container"}
onOpenChange={onOpenChange}
/>
<GardenCareLogDialog
open={activeCreateKey === "garden.log-care"}
onOpenChange={onOpenChange}
/>
<BangRecordDialog open={activeCreateKey === "bangs.record"} onOpenChange={onOpenChange} />
</>
);
}