TagSpaces is an offline, open source, document manager with tagging support
fix: make copy sharing link url accessible in read-only mode
Ilian Sapundshievc4a04a0677cc
diff --git a/app/components/CustomDragLayer.tsx b/app/components/CustomDragLayer.tsxindex 52efa55d8..3ca194839 100644--- a/app/components/CustomDragLayer.tsx+++ b/app/components/CustomDragLayer.tsx@@ -56,7 +56,9 @@ const CustomDragLayer: React.FC<CustomDragLayerProps> = props => {function renderItem() {switch (itemType) {case DragItemTypes.FILE:- return <FilesDragPreview entries={item.selectedEntries} path={item.path} />;+ return (+ <FilesDragPreview entries={item.selectedEntries} path={item.path} />+ );case DragItemTypes.TAG:return <TagDragPreview tag={item.tag} />;diff --git a/app/components/menus/FileMenu.tsx b/app/components/menus/FileMenu.tsxindex cbdad20f0..b27fd2a81 100644--- a/app/components/menus/FileMenu.tsx+++ b/app/components/menus/FileMenu.tsx@@ -359,20 +359,6 @@ const FileMenu = (props: Props) => {</MenuItem>);}- if (selectedEntries.length === 1) {- menuItems.push(- <MenuItem- key="copySharingLink"- data-tid="copyFileSharingLink"- onClick={copySharingLink}- >- <ListItemIcon>- <ShareIcon />- </ListItemIcon>- <ListItemText primary={i18n.t('core:copySharingLink')} />- </MenuItem>- );- }menuItems.push(<MenuItemkey="fileMenuDeleteFile"@@ -387,6 +373,21 @@ const FileMenu = (props: Props) => {);}+ if (selectedEntries.length === 1) {+ menuItems.push(+ <MenuItem+ key="copySharingLink"+ data-tid="copyFileSharingLink"+ onClick={copySharingLink}+ >+ <ListItemIcon>+ <ShareIcon />+ </ListItemIcon>+ <ListItemText primary={i18n.t('core:copySharingLink')} />+ </MenuItem>+ );+ }+return (<div style={{ overflowY: 'hidden' }}><Menudiff --git a/app/reducers/app.ts b/app/reducers/app.tsindex bfb6211ca..b33bb30fe 100644--- a/app/reducers/app.ts+++ b/app/reducers/app.ts@@ -1835,7 +1835,11 @@ export const actions = {// Delete sidecar file and thumbdeleteFilesPromise([getMetaFileLocationForFile(filePath, PlatformIO.getDirSeparator()),- getThumbFileLocationForFile(filePath, PlatformIO.getDirSeparator(), false)+ getThumbFileLocationForFile(+ filePath,+ PlatformIO.getDirSeparator(),+ false+ )]).then(() => {console.log(