TagSpaces is an offline, open source, document manager with tagging support
chore: improving files list in the move files dialogs
Ilian Sapundshiev145ba7d618ef
diff --git a/app/components/dialogs/AddRemoveTagsDialog.tsx b/app/components/dialogs/AddRemoveTagsDialog.tsxindex 6c5b2a8ce..5658c486f 100644--- a/app/components/dialogs/AddRemoveTagsDialog.tsx+++ b/app/components/dialogs/AddRemoveTagsDialog.tsx@@ -160,7 +160,7 @@ function AddRemoveTagsDialog(props: Props) {style={{ width: 550, marginLeft: -15 }}subheader={<ListSubheader component="div">- {i18n.t('selectedFileAndFolders')}+ {i18n.t('selectedFilesAndFolders')}</ListSubheader>}>diff --git a/app/components/dialogs/MoveCopyFilesDialog.tsx b/app/components/dialogs/MoveCopyFilesDialog.tsxindex c2df82887..07b5fcb17 100644--- a/app/components/dialogs/MoveCopyFilesDialog.tsx+++ b/app/components/dialogs/MoveCopyFilesDialog.tsx@@ -23,7 +23,8 @@ import Button from '@mui/material/Button';import List from '@mui/material/List';import ListItem from '@mui/material/ListItem';import ListItemIcon from '@mui/material/ListItemIcon';-import Input from '@mui/material/Input';+import ListSubheader from '@mui/material/ListSubheader';+import TextField from '@mui/material/TextField';import InputAdornment from '@mui/material/InputAdornment';import FolderIcon from '@mui/icons-material/Folder';import FileIcon from '@mui/icons-material/InsertDriveFileOutlined';@@ -124,7 +125,15 @@ function MoveCopyFilesDialog(props: Props) {<DialogCloseButton onClose={onCloseDialog} /></DialogTitle><DialogContent>- <List dense style={{ width: 550 }}>+ <List+ dense+ style={{ width: 550, marginLeft: -15 }}+ subheader={+ <ListSubheader component="div">+ {i18n.t('selectedFiles')}+ </ListSubheader>+ }+ >{props.selectedFiles &&props.selectedFiles.length > 0 &&props.selectedFiles.map(path => (@@ -139,7 +148,7 @@ function MoveCopyFilesDialog(props: Props) {))}</List><FormControl fullWidth={true}>- <Input+ <TextFieldautoFocusrequiredmargin="dense"@@ -152,23 +161,24 @@ function MoveCopyFilesDialog(props: Props) {setTargetPath(target.value);}}value={targetPath}- endAdornment={- PlatformIO.haveObjectStoreSupport() ||- PlatformIO.haveWebDavSupport() ||- AppConfig.isWeb ? (- undefined- ) : (- <InputAdornment position="end" style={{ height: 33 }}>- <IconButton- data-tid="openDirectoryMoveCopyDialog"- onClick={selectDirectory}- size="large"- >- <FolderIcon />- </IconButton>- </InputAdornment>- )- }+ InputProps={{+ endAdornment:+ PlatformIO.haveObjectStoreSupport() ||+ PlatformIO.haveWebDavSupport() ||+ AppConfig.isWeb ? (+ undefined+ ) : (+ <InputAdornment position="end" style={{ height: 33 }}>+ <IconButton+ data-tid="openDirectoryMoveCopyDialog"+ onClick={selectDirectory}+ size="large"+ >+ <FolderIcon />+ </IconButton>+ </InputAdornment>+ )+ }}/>{inputError && <FormHelperText>Empty Input Field</FormHelperText>}</FormControl>diff --git a/app/components/dialogs/MoveOrCopyFilesDialog.tsx b/app/components/dialogs/MoveOrCopyFilesDialog.tsxindex 44bb2b97c..c6e428ea9 100644--- a/app/components/dialogs/MoveOrCopyFilesDialog.tsx+++ b/app/components/dialogs/MoveOrCopyFilesDialog.tsx@@ -16,11 +16,17 @@**/+/**+ * Used for the import functionality with drag and drop from the+ * file manager or desktop of the operating system+ */+import React from 'react';import Button from '@mui/material/Button';import List from '@mui/material/List';import ListItem from '@mui/material/ListItem';import ListItemIcon from '@mui/material/ListItemIcon';+import ListSubheader from '@mui/material/ListSubheader';import FileIcon from '@mui/icons-material/InsertDriveFileOutlined';import DialogActions from '@mui/material/DialogActions';import DialogContent from '@mui/material/DialogContent';@@ -55,7 +61,15 @@ function MoveOrCopyFilesDialog(props: Props) {<DialogCloseButton onClose={() => onClose()} /></DialogTitle><DialogContent>- <List dense style={{ width: 550 }}>+ <List+ dense+ style={{ width: 550, marginLeft: -15 }}+ subheader={+ <ListSubheader component="div">+ {i18n.t('selectedFiles')}+ </ListSubheader>+ }+ >{props.selectedFiles &&props.selectedFiles.length > 0 &&props.selectedFiles.map((file: File) => (diff --git a/app/locales/en/core.json b/app/locales/en/core.jsonindex 4764a5d2a..aa989fe61 100644--- a/app/locales/en/core.json+++ b/app/locales/en/core.json@@ -653,6 +653,7 @@"exifDialogExplanation": "This functionality will traverse all JPG files from the current folder and import the data from the selected EXIF/IPTC fields as tags","webDavToken": "WebDAV token","WebdavAuth": "WebDAV authorization type",- "selectedFileAndFolders": "Selected files and folders",+ "selectedFiles": "Selected files",+ "selectedFilesAndFolders": "Selected files and folders","-": "-"}