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