Skip to content

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

Copy folder implementation for Android (#1899)

Stanimir73d2fe8b7475
diff --git a/app/components/dialogs/MoveCopyFilesDialog.tsx b/app/components/dialogs/MoveCopyFilesDialog.tsx
index e0de75b7f..71a514e87 100644
--- a/app/components/dialogs/MoveCopyFilesDialog.tsx
+++ b/app/components/dialogs/MoveCopyFilesDialog.tsx
@@ -44,6 +44,8 @@ import useMediaQuery from '@mui/material/useMediaQuery';
import { actions as AppActions, getSelectedEntries } from '-/reducers/app';
import { TS } from '-/tagspaces.namespace';
import DirectoryListView from '-/components/DirectoryListView';
+import AppConfig from '-/AppConfig';
+import Tooltip from '-/components/Tooltip';
interface Props {
open: boolean;
@@ -93,7 +95,8 @@ function MoveCopyFilesDialog(props: Props) {
: [];
useEffect(() => {
- if (selectedDirs.length > 0) {
+ if (selectedDirs.length > 0 && AppConfig.isElectron) {
+ // getDirProperties have Electron impl only
const promises = selectedDirs.map(dirPath => {
return PlatformIO.getDirProperties(dirPath).then(prop => {
dirProp.current[dirPath] = prop;
@@ -246,15 +249,24 @@ function MoveCopyFilesDialog(props: Props) {
<Button data-tid="closeMoveCopyDialog" onClick={() => props.onClose()}>
{i18n.t('core:cancel')}
</Button>
- {/* <Box> */}
- <Button
- data-tid="confirmMoveFiles"
- disabled={!targetPath}
- onClick={handleMoveFiles}
- color="primary"
+ <Tooltip
+ title={i18n.t(
+ AppConfig.isAndroid
+ ? 'core:platformImplMissing'
+ : 'core:moveEntriesButton'
+ )}
>
- {i18n.t('core:moveEntriesButton')}
- </Button>
+ <span>
+ <Button
+ data-tid="confirmMoveFiles"
+ disabled={!targetPath || AppConfig.isAndroid}
+ onClick={handleMoveFiles}
+ color="primary"
+ >
+ {i18n.t('core:moveEntriesButton')}
+ </Button>
+ </span>
+ </Tooltip>
<Button
onClick={handleCopyFiles}
data-tid="confirmCopyFiles"
@@ -263,7 +275,6 @@ function MoveCopyFilesDialog(props: Props) {
>
{i18n.t('core:copyEntriesButton')}
</Button>
- {/* </Box> */}
</DialogActions>
</Dialog>
);
diff --git a/app/locales/en/core.json b/app/locales/en/core.json
index 1fcf35bec..248fd8b4c 100644
--- a/app/locales/en/core.json
+++ b/app/locales/en/core.json
@@ -773,5 +773,6 @@
"copyingFoldersFailed": "Copying folders failed",
"directories": "Folders",
"files": "Files",
+ "platformImplMissing": "Not implemented on this Platform",
"-": "-"
}
diff --git a/app/package.json b/app/package.json
index 1b7255ee2..3cd04eade 100644
--- a/app/package.json
+++ b/app/package.json
@@ -16,7 +16,7 @@
"@tagspaces/extensions": "1.0.79"
},
"nodeDependencies": {
- "@tagspaces/tagspaces-ws": "2.1.27",
+ "@tagspaces/tagspaces-ws": "2.1.28",
"@tagspaces/extensions": "1.0.79",
"sharp": "0.31.3"
}
diff --git a/package.json b/package.json
index 7db451c2b..cd8530759 100644
--- a/package.json
+++ b/package.json
@@ -161,7 +161,7 @@
"@mui/styles": "5.10.15",
"@mui/x-date-pickers": "^5.0.8",
"@tagspaces/tagspaces-md": "2.1.6",
- "@tagspaces/tagspaces-platforms": "2.1.27",
+ "@tagspaces/tagspaces-platforms": "2.1.28",
"aws-amplify": "^4.3.8",
"aws-sdk": "^2.1036.0",
"babel-polyfill": "^6.26.0",