feat: add command palette with cross-board search and actions

This commit is contained in:
Your Name
2026-02-15 19:12:49 +02:00
parent b527d441e3
commit 5b3bf2b058
5 changed files with 283 additions and 4 deletions

View File

@@ -1,4 +1,4 @@
import { useState } from "react";
import { useState, useEffect } from "react";
import { Plus } from "lucide-react";
import { Button } from "@/components/ui/button";
import { useAppStore } from "@/stores/app-store";
@@ -9,6 +9,17 @@ export function BoardList() {
const boards = useAppStore((s) => s.boards);
const [dialogOpen, setDialogOpen] = useState(false);
// Listen for custom event to open new board dialog from command palette
useEffect(() => {
function handleOpenDialog() {
setDialogOpen(true);
}
document.addEventListener("open-new-board-dialog", handleOpenDialog);
return () => {
document.removeEventListener("open-new-board-dialog", handleOpenDialog);
};
}, []);
if (boards.length === 0) {
return (
<>