Bundles in-flight ECHODO work with the Coolify deployment configuration: App - New routes: ai, forms, planner, settings (templates/types), teams, doc detail, whiteboard detail - New components: app shell rework (icon-rail, top-header), forms builder/renderer/responses, types manager, objects creation dialog, card primitive, form + overview views - New tRPC routers: favorites, forms, types, workspaces; updates to health and objects routers - Markdown backlog sync (packages/database) + cursor-sync schema/migrations - Schema additions: forms, types, favorites, markdown_backlog, cursor_sync - Initial Drizzle migrations checked in Deployment - docker/docker-compose.coolify.yml: drops bundled Postgres/Redis (uses CT 102 shared services), removes host port mappings, adds Coolify SERVICE_FQDN_* magic vars for web + collab - .env.example rewritten as the full ECHODO/Coolify variable manifest - NextAuth gains an Authentik OIDC provider (gated on env presence) - Root layout injects Umami tracking script when configured; metadata title flipped to ECHODO Security - .gitignore expanded to exclude AGENT-DEPLOY.md, .env.*, secrets/, credentials.*, *.key, *.crt, *.pem, ssh keys Made-with: Cursor
49 lines
2 KiB
TypeScript
49 lines
2 KiB
TypeScript
"use client";
|
|
|
|
import * as Tabs from "@radix-ui/react-tabs";
|
|
import { ClipboardList, LayoutDashboard, LayoutGrid, List, Table2 } from "lucide-react";
|
|
|
|
import { cn } from "@/lib/utils";
|
|
import { type ActiveViewType, useViewStore } from "@/lib/stores/view-store";
|
|
|
|
const tabs: { id: ActiveViewType; label: string; icon: typeof List }[] = [
|
|
{ id: "overview", label: "Overview", icon: LayoutDashboard },
|
|
{ id: "list", label: "List", icon: List },
|
|
{ id: "board", label: "Board", icon: LayoutGrid },
|
|
{ id: "table", label: "Table", icon: Table2 },
|
|
{ id: "form", label: "Form", icon: ClipboardList },
|
|
];
|
|
|
|
export function ViewSwitcher() {
|
|
const activeView = useViewStore((s) => s.activeView);
|
|
const setActiveView = useViewStore((s) => s.setActiveView);
|
|
|
|
const tabValue = tabs.some((t) => t.id === activeView) ? activeView : "list";
|
|
|
|
return (
|
|
<Tabs.Root value={tabValue} onValueChange={(v) => setActiveView(v as ActiveViewType)}>
|
|
<Tabs.List
|
|
className="inline-flex h-8 items-stretch gap-1 border-b border-border"
|
|
aria-label="View type"
|
|
>
|
|
{tabs.map(({ id, label, icon: Icon }) => (
|
|
<Tabs.Trigger
|
|
key={id}
|
|
value={id}
|
|
className={cn(
|
|
"relative inline-flex items-center gap-1.5 px-2.5 text-xs font-medium text-muted-foreground transition-colors",
|
|
"hover:text-foreground",
|
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",
|
|
"data-[state=active]:text-primary",
|
|
"after:pointer-events-none after:absolute after:bottom-0 after:left-1 after:right-1 after:h-0.5 after:rounded-full after:bg-primary after:opacity-0 after:transition-opacity",
|
|
"data-[state=active]:after:opacity-100",
|
|
)}
|
|
>
|
|
<Icon className="size-3.5 shrink-0" aria-hidden />
|
|
<span>{label}</span>
|
|
</Tabs.Trigger>
|
|
))}
|
|
</Tabs.List>
|
|
</Tabs.Root>
|
|
);
|
|
}
|