Skip to content

Commit

Permalink
Adjust names for files or folder
Browse files Browse the repository at this point in the history
  • Loading branch information
guergana committed Sep 20, 2024
1 parent 55057dd commit 58fdd96
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions client/components/Parts/Trees/File.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,8 @@ const StyledTreeItem = styled(
window?.opendataeditor?.openPathInExplorer('/tmp/' + folderPath)
handleClose()
}

const fileOrFolder = item.type === 'folder' ? 'folder': 'file'

return (
<Box sx={{ display: 'flex', justifyContent: 'space-between', position: 'relative' }}>
Expand Down Expand Up @@ -184,7 +186,7 @@ const StyledTreeItem = styled(
}}>
{<img src={openFileLocationIcon} alt="" />}
</ListItemIcon>
<ListItemText primary={`Open ${item.type === 'folder' ? 'Folder': 'File' } Location`} secondary="The ODE folder where this file exists" />
<ListItemText primary={`Open ${fileOrFolder} Location`} secondary={`The ODE folder where this ${fileOrFolder} exists`} />
</MenuItem>
<MenuItem onClick={handleDelete}>
<ListItemIcon sx={{
Expand All @@ -199,7 +201,7 @@ const StyledTreeItem = styled(
// @ts-ignore
color: (theme) => theme.palette.OKFNRed.main,
}}
primary={`Delete ${item.type === 'folder' ? 'Folder': 'File'}`} secondary={`Only removes this ${item.type === 'folder' ? 'folder': 'file'} from the ODE folder`} />
primary={`Delete ${fileOrFolder}`} secondary="Only removes this element from the ODE folder" />
</MenuItem>
</Menu>
</Box>
Expand Down

0 comments on commit 58fdd96

Please sign in to comment.