Skip to content

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

Add MoveToBottom

sytolk99c28dba6828
diff --git a/app/components/menus/FileMenu.tsx b/app/components/menus/FileMenu.tsx
index d5c547d8b..da7051746 100644
--- a/app/components/menus/FileMenu.tsx
+++ b/app/components/menus/FileMenu.tsx
@@ -29,6 +29,7 @@ import OpenFolderInternally from '@mui/icons-material/Folder';
import AddRemoveTags from '@mui/icons-material/Loyalty';
import MoveCopy from '@mui/icons-material/FileCopy';
import MoveToTopIcon from '@mui/icons-material/VerticalAlignTop';
+import MoveToBottomIcon from '@mui/icons-material/VerticalAlignBottom';
import DuplicateFile from '@mui/icons-material/PostAdd';
import ImageIcon from '@mui/icons-material/Image';
import ShareIcon from '@mui/icons-material/Link';
@@ -89,6 +90,7 @@ interface Props {
locations: Array<TS.Location>;
setLastBackgroundImageChange: (number) => void;
reorderTop?: () => void;
+ reorderBottom?: () => void;
}
function FileMenu(props: Props) {
@@ -375,6 +377,23 @@ function FileMenu(props: Props) {
</MenuItem>
);
}
+ if (props.reorderBottom) {
+ menuItems.push(
+ <MenuItem
+ key="reorderBottom"
+ data-tid="reorderBottomTID"
+ onClick={() => {
+ onClose();
+ props.reorderBottom();
+ }}
+ >
+ <ListItemIcon>
+ <MoveToBottomIcon />
+ </ListItemIcon>
+ <ListItemText primary={i18n.t('core:moveToBottom')} />
+ </MenuItem>
+ );
+ }
menuItems.push(
<MenuItem
key="fileMenuRenameFile"
diff --git a/app/locales/en/core.json b/app/locales/en/core.json
index b4249672a..3eeaf004b 100644
--- a/app/locales/en/core.json
+++ b/app/locales/en/core.json
@@ -705,6 +705,7 @@
"show": "Show",
"chooseKanbanJSON": "Choose Trello JSON file",
"moveToTop": "Move to top",
+ "moveToBottom": "Move to bottom",
"openInMainArea": "Open in main area",
"-": "-"
}
diff --git a/app/services/utils-io.ts b/app/services/utils-io.ts
index 00058aa94..2e52eddcf 100644
--- a/app/services/utils-io.ts
+++ b/app/services/utils-io.ts
@@ -872,9 +872,7 @@ export function loadDirMetaDataPromise(
tags: metaData.tags || [],
appName: metaData.appName || '',
appVersion: metaData.appVersion || '',
- lastUpdated: metaData.lastUpdated || '',
- files: metaData.files || [],
- dirs: metaData.dirs || []
+ lastUpdated: metaData.lastUpdated || ''
};
});
}