From 4b6b871dfa9aefaf1e9ca31e38d33a71a422064d Mon Sep 17 00:00:00 2001 From: Lucas Di Pentima Date: Wed, 18 Nov 2020 12:19:35 -0300 Subject: [PATCH] 13494: Enhances collection versions browser's layout. Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima --- .../details-panel/collection-details.tsx | 51 +++++++++++-------- 1 file changed, 30 insertions(+), 21 deletions(-) diff --git a/src/views-components/details-panel/collection-details.tsx b/src/views-components/details-panel/collection-details.tsx index 51b09b4f..500b0506 100644 --- a/src/views-components/details-panel/collection-details.tsx +++ b/src/views-components/details-panel/collection-details.tsx @@ -15,15 +15,15 @@ import { formatDate, formatFileSize } from '~/common/formatters'; import { Dispatch } from 'redux'; import { navigateTo } from '~/store/navigation/navigation-action'; -export type CssRules = 'versionBrowserHeader' | 'selectedVersion'; +export type CssRules = 'versionBrowserHeader' | 'versionBrowserItem'; const styles: StyleRulesCallback = theme => ({ versionBrowserHeader: { textAlign: 'center', - fontWeight: 'bold' + fontWeight: 'bold', }, - selectedVersion: { - fontWeight: 'bold' + versionBrowserItem: { + textAlign: 'center', } }); @@ -85,38 +85,47 @@ const CollectionVersionBrowser = withStyles(styles)( connect(mapStateToProps, mapDispatchToProps)( ({ currentCollection, versions, showVersion, classes }: CollectionVersionBrowserProps & CollectionVersionBrowserDispatchProps & WithStyles) => { return <> - - - Version - - - Size - - - Date - - + + + + Nr + + + + + Size + + + + + Date + + { versions.map(item => { const isSelectedVersion = !!(currentCollection && currentCollection.uuid === item.uuid); return ( - showVersion(item)} selected={isSelectedVersion}> - - + + {item.version} - + + + {formatFileSize(item.fileSizeTotal)} - + + + {formatDate(item.modifiedAt)} ); })} + ; })); \ No newline at end of file -- 2.30.2