(props: {
toolkits: readonly ToolkitResponse[];
onCreate: (input: { owner: Owner; name: string }) => Promise<void>;
})
| 662 | } |
| 663 | |
| 664 | function ToolkitGrid(props: { |
| 665 | toolkits: readonly ToolkitResponse[]; |
| 666 | onCreate: (input: { owner: Owner; name: string }) => Promise<void>; |
| 667 | }) { |
| 668 | const ownerDisplay = useOwnerDisplay(); |
| 669 | // Toolkit shelves are grouped by owner; the selected toolkit owns the page. |
| 670 | const workspaceToolkits = props.toolkits.filter((toolkit) => toolkit.owner === "org"); |
| 671 | const personalToolkits = props.toolkits.filter((toolkit) => toolkit.owner === "user"); |
| 672 | if (!ownerDisplay.showOwnerLabels) { |
| 673 | return ( |
| 674 | <div className="min-h-0 flex-1 overflow-y-auto"> |
| 675 | <div className="w-full space-y-7 px-4 py-4" style={toolkitGridContainerStyle}> |
| 676 | <ToolkitSection |
| 677 | owner="org" |
| 678 | showOwnerLabels={false} |
| 679 | toolkits={props.toolkits} |
| 680 | onCreate={props.onCreate} |
| 681 | /> |
| 682 | </div> |
| 683 | </div> |
| 684 | ); |
| 685 | } |
| 686 | |
| 687 | return ( |
| 688 | <div className="min-h-0 flex-1 overflow-y-auto"> |
| 689 | <div className="w-full space-y-7 px-4 py-4" style={toolkitGridContainerStyle}> |
| 690 | <ToolkitSection |
| 691 | owner="org" |
| 692 | showOwnerLabels |
| 693 | title="Workspace" |
| 694 | toolkits={workspaceToolkits} |
| 695 | onCreate={props.onCreate} |
| 696 | /> |
| 697 | <ToolkitSection |
| 698 | owner="user" |
| 699 | showOwnerLabels |
| 700 | title="Personal" |
| 701 | toolkits={personalToolkits} |
| 702 | onCreate={props.onCreate} |
| 703 | /> |
| 704 | </div> |
| 705 | </div> |
| 706 | ); |
| 707 | } |
| 708 | |
| 709 | function ToolkitContentsEmpty(props: { onManageConnections: () => void }) { |
| 710 | return ( |
nothing calls this directly
no test coverage detected