From 65128fdb69ac9f7bd2f4653ee1bea95a9ab59559 Mon Sep 17 00:00:00 2001 From: Stephen Smith Date: Tue, 20 Sep 2022 13:12:57 -0400 Subject: [PATCH] 16073: Make default view icon optional, hide tabs when panel is empty Arvados-DCO-1.1-Signed-off-by: Stephen Smith --- src/components/default-view/default-view.tsx | 4 +- src/views/process-panel/process-io-card.tsx | 70 +++++++++++--------- 2 files changed, 40 insertions(+), 34 deletions(-) diff --git a/src/components/default-view/default-view.tsx b/src/components/default-view/default-view.tsx index 014b8cc4..5acea619 100644 --- a/src/components/default-view/default-view.tsx +++ b/src/components/default-view/default-view.tsx @@ -29,7 +29,7 @@ export interface DefaultViewDataProps { messages: string[]; filtersApplied?: boolean; classMessage?: string; - icon: IconType; + icon?: IconType; classIcon?: string; } @@ -38,7 +38,7 @@ type DefaultViewProps = DefaultViewDataProps & WithStyles; export const DefaultView = withStyles(styles)( ({ classes, classRoot, messages, classMessage, icon: Icon, classIcon }: DefaultViewProps) => - + {Icon && } {messages.map((msg: string, index: number) => { return {msg}; diff --git a/src/views/process-panel/process-io-card.tsx b/src/views/process-panel/process-io-card.tsx index 282ce936..f54fac85 100644 --- a/src/views/process-panel/process-io-card.tsx +++ b/src/views/process-panel/process-io-card.tsx @@ -225,40 +225,46 @@ export const ProcessIOCard = withStyles(styles)(connect(null, mapDispatchToProps
{mainProcess ? (<> - - - - - {mainProcTabState === 0 &&
- {params.length ? - : - - - } -
} - {mainProcTabState === 1 &&
- {params.length ? - : - - - } -
} + {params.length ? + <> + + + + + {mainProcTabState === 0 &&
+ +
} + {mainProcTabState === 1 &&
+ +
} + : + + + + } ) : (<> - - {label === ProcessIOCardType.INPUT && } - {label === ProcessIOCardType.OUTPUT && } - -
- {label === ProcessIOCardType.INPUT && } - {label === ProcessIOCardType.OUTPUT && <> - {outputUuid && - Output Collection: {navigateTo(outputUuid)}}> - {outputUuid} - } - - } -
+ {((mounts && mounts.length) || outputUuid) ? + <> + + {label === ProcessIOCardType.INPUT && } + {label === ProcessIOCardType.OUTPUT && } + +
+ {label === ProcessIOCardType.INPUT && } + {label === ProcessIOCardType.OUTPUT && <> + {outputUuid && + Output Collection: {navigateTo(outputUuid || "")}}> + {outputUuid} + } + + } +
+ : + + + + } ) }
-- 2.39.5