Skip to content

TagSpaces is an offline, open source, document manager with tagging support

design changes - column color, add column title actions and improvements

stanimiredf22a002769
diff --git a/app/components/EntryContainer.tsx b/app/components/EntryContainer.tsx
index 78269fee9..09c49fc68 100644
--- a/app/components/EntryContainer.tsx
+++ b/app/components/EntryContainer.tsx
@@ -289,7 +289,11 @@ class EntryContainer extends React.Component<Props, State> {
return true;
}
- this.setState({ currentEntry: nextEntry });
+ const obj: any = { currentEntry: nextEntry };
+ if (!nextEntry.isFile) {
+ obj.isPropertiesPanelVisible = true;
+ }
+ this.setState(obj);
if (nextProps.isReadOnlyMode) {
this.setState({ editingSupported: false });
@@ -769,16 +773,18 @@ class EntryContainer extends React.Component<Props, State> {
renderFileToolbar = classes => (
<div className={classes.toolbar2}>
<div className={classes.flexLeft}>
- <IconButton
- title={i18n.t('core:toggleProperties')}
- aria-label={i18n.t('core:toggleProperties')}
- onClick={this.togglePanel}
- data-tid="fileContainerToggleProperties"
- >
- <DetailsIcon
- color={this.state.isPropertiesPanelVisible ? 'primary' : 'action'}
- />
- </IconButton>
+ {this.state.currentEntry.isFile && (
+ <IconButton
+ title={i18n.t('core:toggleProperties')}
+ aria-label={i18n.t('core:toggleProperties')}
+ onClick={this.togglePanel}
+ data-tid="fileContainerToggleProperties"
+ >
+ <DetailsIcon
+ color={this.state.isPropertiesPanelVisible ? 'primary' : 'action'}
+ />
+ </IconButton>
+ )}
<IconButton
title={i18n.t('core:switchToFullscreen')}
aria-label={i18n.t('core:switchToFullscreen')}
diff --git a/app/components/FolderContainer.tsx b/app/components/FolderContainer.tsx
index f29a96ee9..46b1b6585 100644
--- a/app/components/FolderContainer.tsx
+++ b/app/components/FolderContainer.tsx
@@ -364,6 +364,7 @@ class FolderContainer extends React.Component<Props, State> {
return (
<KanBanPerspectiveAsync
directoryContent={this.props.directoryContent}
+ loadDirectoryContent={this.props.loadDirectoryContent}
openFile={this.props.openFile}
loadParentDirectoryContent={this.props.loadParentDirectoryContent}
deleteFile={this.props.deleteFile}