Skip to content

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

feat: empty folder ui optimization

Ilian Sapundshiev8eb1fcbe746a
diff --git a/app/locales/en/core.json b/app/locales/en/core.json
index ebc8f33dc..f805e1089 100644
--- a/app/locales/en/core.json
+++ b/app/locales/en/core.json
@@ -486,6 +486,7 @@
"cancelIndexing": "Cancel Indexing",
"getLatestVersionPro": "Please download the latest version from the link in the purchase confirmation email.",
"noFileButFoldersFound": "Some folders found! Turn on the folder visibility from the perspective's toolbar to view them.",
+ "dragAndDropToImport": "Drag and drop files here to copy or upload them.",
"selectTags": "Select tags",
"location": "Location",
"locationId": "Location ID",
diff --git a/app/perspectives/grid-perspective/components/GridPagination.tsx b/app/perspectives/grid-perspective/components/GridPagination.tsx
index cb8c8fad0..5b811a109 100644
--- a/app/perspectives/grid-perspective/components/GridPagination.tsx
+++ b/app/perspectives/grid-perspective/components/GridPagination.tsx
@@ -26,6 +26,7 @@ import {
getSearchResultCount,
isLoading
} from '-/reducers/app';
+import EntryIcon from '-/components/EntryIcon';
import AppConfig from '-/config';
import { TS } from '-/tagspaces.namespace';
@@ -129,21 +130,33 @@ const GridPagination = (props: Props) => {
</Typography>
)}
{!isAppLoading && files.length < 1 && directories.length < 1 && (
- <Typography
- style={{ padding: 15, color: theme.palette.text.primary }}
- >
- {i18n.t('core:noFileFolderFound')}
- </Typography>
+ <div style={{ textAlign: 'center' }}>
+ <EntryIcon isFile={false} />
+ <Typography
+ style={{ padding: 15, color: theme.palette.text.secondary }}
+ >
+ {i18n.t('core:noFileFolderFound')}
+ </Typography>
+ <Typography style={{ color: theme.palette.text.secondary }}>
+ {i18n.t('core:dragAndDropToImport')}
+ </Typography>
+ </div>
)}
{!isAppLoading &&
files.length < 1 &&
directories.length >= 1 &&
!showDirectories && (
- <Typography
- style={{ padding: 15, color: theme.palette.text.primary }}
- >
- {i18n.t('core:noFileButFoldersFound')}
- </Typography>
+ <div style={{ textAlign: 'center' }}>
+ <EntryIcon isFile={false} />
+ <Typography
+ style={{ padding: 15, color: theme.palette.text.secondary }}
+ >
+ {i18n.t('core:noFileButFoldersFound')}
+ </Typography>
+ <Typography style={{ color: theme.palette.text.secondary }}>
+ {i18n.t('core:dragAndDropToImport')}
+ </Typography>
+ </div>
)}
</div>
{showPagination && (