TagSpaces is an offline, open source, document manager with tagging support
feat: making open folder properties button in the toolbar toggling the properties
Ilian Sapundshiev54485aa4a81a
diff --git a/src/renderer/perspectives/grid/components/MainToolbar.tsx b/src/renderer/perspectives/grid/components/MainToolbar.tsxindex 5596ba64b..bd2682dcc 100644--- a/src/renderer/perspectives/grid/components/MainToolbar.tsx+++ b/src/renderer/perspectives/grid/components/MainToolbar.tsx@@ -85,7 +85,8 @@ function MainToolbar(props: Props) {const { t } = useTranslation();const theme = useTheme();- const { openEntry, openedEntry, fileChanged } = useOpenedEntryContext();+ const { openEntry, openedEntry, fileChanged, actuallyCloseFiles } =+ useOpenedEntryContext();const { loadParentDirectoryContent, currentDirectoryPath } =useDirectoryContentContext();const { selectedEntries } = useSelectedEntriesContext();@@ -95,7 +96,11 @@ function MainToolbar(props: Props) {useDeleteMultipleEntriesDialogContext();function showProperties() {- return openEntry(currentDirectoryPath, TabNames.propertiesTab);+ if (openedEntry?.path === currentDirectoryPath) {+ actuallyCloseFiles();+ } else {+ openEntry(currentDirectoryPath, TabNames.propertiesTab);+ }}function multipleDownload() {