UNPKG

@baseplate-dev/project-builder-web

Version:

Web interface for constructing project builder JSON

3 lines (2 loc) 1.64 kB
import{i as t}from"./_virtual___federation_fn_import-C4el_tlG.js";import{j as e}from"./jsx-runtime-D_zvdyIk.js";import{h as d}from"./index--XHV4ygU.js";import{N as r}from"./new-app-dialog-DNFClapi.js";import{s as l}from"./sortBy-C9bvycg5.js";const{appEntityType:m,AppUtils:h}=await t("@baseplate-dev/project-builder-lib"),{useProjectDefinition:x}=await t("@baseplate-dev/project-builder-lib/web"),{Badge:j,Button:i,Card:y,EmptyDisplay:u}=await t("@baseplate-dev/ui-components"),{Link:f}=await t("@tanstack/react-router"),k=function(){const{definition:n}=x(),{apps:o}=n,p=n.settings.monorepo,a=l(o,[s=>s.name]);return a.length===0?e.jsx(u,{icon:d,header:"No Apps",subtitle:"You haven't created any apps yet",actions:e.jsx(r,{children:e.jsx(i,{children:"New App"})})}):e.jsxs("div",{className:"space-y-4 p-4",children:[e.jsx("h1",{children:"Apps"}),e.jsx("p",{children:"These are the apps that are defined in your project. You can edit them here."}),e.jsx(r,{children:e.jsx(i,{children:"New App"})}),e.jsx("div",{className:"max-w-xl space-y-4",children:a.map(s=>{const c=h.getAppDirectory(s,p);return e.jsxs(y,{className:"flex justify-between space-x-4 p-4",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("h3",{children:s.name}),e.jsx(j,{variant:"secondary",children:s.type})]}),e.jsxs("p",{className:"text-sm text-muted-foreground",children:["Location: ",c]})]}),e.jsx(f,{to:"/apps/edit/$key",params:{key:m.keyFromId(s.id)},className:"inline-block",children:e.jsx(i,{variant:"secondary",children:"Edit"})})]},s.id)})})]})};export{k as component}; //# sourceMappingURL=index-jzvFV20H.js.map