diff --git a/src/components/table.tsx b/src/components/table.tsx index d982a40..e4566a4 100644 --- a/src/components/table.tsx +++ b/src/components/table.tsx @@ -50,6 +50,7 @@ export function KernelTable(props: { query: string; onClick: (item: IKernelItem) => void; hideColumns?: string[]; + showWidgetType?: boolean; }) { const { trans } = props; let query: string; @@ -121,6 +122,18 @@ export function KernelTable(props: { } ); + if (props.showWidgetType) { + extraColumns.push({ + id: 'widget-type', + label: trans.__('Type'), + renderCell: (row: IKernelItem) => { + return row.command.split(':')[0]; + }, + sort: (a: IKernelItem, b: IKernelItem) => + a.command.localeCompare(b.command) + }); + } + const availableColumns: Table.IColumn[] = [ { id: 'kernel', diff --git a/src/launcher.tsx b/src/launcher.tsx index 6d21122..35bc7d9 100644 --- a/src/launcher.tsx +++ b/src/launcher.tsx @@ -83,6 +83,10 @@ function LauncherBody(props: { } } + const starred = [...props.notebookItems, ...props.consoleItems].filter( + item => item.starred + ); + return (
@@ -130,17 +134,20 @@ function LauncherBody(props: { icon={starIcon} open={true} // TODO: store this in layout/state higher up > - item.starred - )} - commands={props.commands} - showSearchBox={false} - query={query} - settings={props.settings} - trans={trans} - onClick={item => item.execute()} - /> + {starred.length > 0 ? ( + item.execute()} + /> + ) : ( + 'No starred items' + )} ) : null}