diff --git a/frontend/app/tab/tabcontent.tsx b/frontend/app/tab/tabcontent.tsx index c7c0038..fdc9952 100644 --- a/frontend/app/tab/tabcontent.tsx +++ b/frontend/app/tab/tabcontent.tsx @@ -5,13 +5,52 @@ import { Block } from "@/app/block/block"; import { CenteredDiv } from "@/element/quickelems"; import { ContentRenderer, NodeModel, PreviewRenderer, TileLayout } from "@/layout/index"; import { TileLayoutContents } from "@/layout/lib/types"; -import { atoms, getApi } from "@/store/global"; +import { atoms, createBlock, getApi } from "@/store/global"; import * as services from "@/store/services"; import * as WOS from "@/store/wos"; +import { cn, fireAndForget } from "@/util/util"; import { atom, useAtomValue } from "jotai"; import * as React from "react"; import { useMemo } from "react"; +const EMPTY_TAB_BLOCK_DEFS: { label: string; blockDef: BlockDef }[] = [ + { + label: "Terminal", + blockDef: { meta: { view: "term", controller: "shell" } }, + }, + { + label: "Preview", + blockDef: { meta: { view: "preview", file: "~" } }, + }, + { + label: "Web", + blockDef: { meta: { view: "web" } }, + }, +]; + +const accentButtonClass = + "px-4 py-2 text-sm font-medium bg-accent/80 text-primary rounded hover:bg-accent transition-colors cursor-pointer"; + +function EmptyTabCreationStrip() { + return ( +