Skip to content

Commit

Permalink
chore: cleaning up comments
Browse files Browse the repository at this point in the history
  • Loading branch information
uggrock committed Mar 24, 2023
1 parent 5065ef4 commit 6c12052
Showing 1 changed file with 3 additions and 14 deletions.
17 changes: 3 additions & 14 deletions app/components/dialogs/MoveCopyFilesDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,12 @@ 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 TextField from '@mui/material/TextField';
import InputAdornment from '@mui/material/InputAdornment';
import DialogActions from '@mui/material/DialogActions';
import DialogContent from '@mui/material/DialogContent';
import DialogTitle from '@mui/material/DialogTitle';
import FormControl from '@mui/material/FormControl';
import FormHelperText from '@mui/material/FormHelperText';
import Typography from '@mui/material/Typography';
import Dialog from '@mui/material/Dialog';
import IconButton from '@mui/material/IconButton';
import { FolderIcon, FileIcon } from '-/components/CommonIcons';
import AppConfig from '-/AppConfig';
import i18n from '-/services/i18n';
import PlatformIO from '-/services/platform-facade';
import IOActions from '-/reducers/io-actions';
Expand Down Expand Up @@ -73,7 +67,6 @@ interface Props {
}

function MoveCopyFilesDialog(props: Props) {
//const [inputError, setInputError] = useState(false);
const [disableConfirmButton, setDisableConfirmButton] = useState(true);
const [targetPath, setTargetPath] = useState('');
const dirProp = useRef({});
Expand Down Expand Up @@ -114,10 +107,8 @@ function MoveCopyFilesDialog(props: Props) {

function handleValidation() {
if (targetPath && targetPath.length > 0) {
//setInputError(false);
setDisableConfirmButton(false);
} else {
//setInputError(true);
setDisableConfirmButton(true);
}
}
Expand All @@ -133,7 +124,6 @@ function MoveCopyFilesDialog(props: Props) {
if (!disableConfirmButton) {
if (selectedFiles.length > 0) {
props.copyFiles(selectedFiles, targetPath);
//setInputError(false);
setDisableConfirmButton(true);
setTargetPath('');
}
Expand All @@ -155,7 +145,6 @@ function MoveCopyFilesDialog(props: Props) {
if (!disableConfirmButton) {
if (selectedFiles.length > 0) {
props.moveFiles(selectedFiles, targetPath);
//setInputError(false);
setDisableConfirmButton(true);
setTargetPath('');
}
Expand Down Expand Up @@ -222,7 +211,7 @@ function MoveCopyFilesDialog(props: Props) {
<ListItemIcon>
{entry.isFile ? <FileIcon /> : <FolderIcon />}
</ListItemIcon>
<Typography variant="inherit" noWrap>
<Typography variant="subtitle2" noWrap>
{entry.name}
{dirProp.current[entry.path] &&
' (' +
Expand All @@ -235,11 +224,11 @@ function MoveCopyFilesDialog(props: Props) {
))}
</List>
{targetPath ? (
<Typography variant="inherit">
<Typography variant="subtitle2">
{i18n.t('moveCopyToPath') + ': ' + targetPath}
</Typography>
) : (
<Typography variant="inherit">
<Typography variant="subtitle2">
{i18n.t('chooseTargetLocationAndPath')}
</Typography>
)}
Expand Down

0 comments on commit 6c12052

Please sign in to comment.