TagSpaces is an offline, open source, document manager with tagging support
chore: removing dnd component
Ilian Sapundshiev48d275cef928
diff --git a/src/renderer/components/DnD.css.tsx b/src/renderer/components/DnD.css.tsxdeleted file mode 100644index e848c2b70..000000000--- a/src/renderer/components/DnD.css.tsx+++ /dev/null@@ -1,45 +0,0 @@-/**- * TagSpaces - universal file and folder organizer- * Copyright (C) 2017-present TagSpaces GmbH- *- * This program is free software: you can redistribute it and/or modify- * it under the terms of the GNU Affero General Public License (version 3) as- * published by the Free Software Foundation.- *- * This program is distributed in the hope that it will be useful,- * but WITHOUT ANY WARRANTY; without even the implied warranty of- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the- * GNU Affero General Public License for more details.- *- * You should have received a copy of the GNU Affero General Public License- * along with this program. If not, see <https://www.gnu.org/licenses/>.- *- */--import { styled } from '@mui/material/styles';--const PREFIX = 'DnD';-export const classes = {- dropzone: `${PREFIX}-dropzone`,-};--export const DnD = styled('div')(({ theme }) => ({- [`& .${classes.dropzone}`]: {- margin: 5,- position: 'absolute',- top: 0,- left: 0,- right: 0,- bottom: 0,- backgroundColor: '#1dd19f40',- zIndex: 1000,- border: '3px dashed white',- display: 'flex',- justifyContent: 'center',- alignItems: 'center',- textAlign: 'center',- fontSize: '40px',- fontWeight: 'bold',- color: 'white',- },-}));diff --git a/src/renderer/components/TargetMoveFileBox.tsx b/src/renderer/components/TargetMoveFileBox.tsxindex 37a74e0af..685996646 100644--- a/src/renderer/components/TargetMoveFileBox.tsx+++ b/src/renderer/components/TargetMoveFileBox.tsx@@ -16,26 +16,9 @@**/-import React from 'react';-import { useDrop } from 'react-dnd';-import { TS } from '-/tagspaces.namespace';-import { classes, DnD } from '-/components/DnD.css';+import AppConfig from '-/AppConfig';import { CommonLocation } from '-/utils/CommonLocation';--/*const styles: any = () => ({- dropzone: {- margin: 5,- position: 'absolute',- top: 0,- left: 0,- right: 0,- bottom: 0,- backgroundColor: '#1dd19f40',- zIndex: 1,- border: '3px dashed white',- display: 'flex',- },-});*/+import { useDrop } from 'react-dnd';interface Props {accepts: string[];@@ -72,9 +55,27 @@ const TargetMoveFileBox = (props: Props) => {return (<div ref={drop}>{canDrop && isOver && (- <DnD>- <div className={classes.dropzone}></div>- </DnD>+ <div+ style={{+ borderRadius: AppConfig.defaultCSSRadius,+ margin: 2,+ position: 'absolute',+ top: 0,+ left: 0,+ right: 0,+ bottom: 0,+ backgroundColor: '#1dd19f40',+ zIndex: 1000,+ border: '3px dashed white',+ display: 'flex',+ justifyContent: 'center',+ alignItems: 'center',+ textAlign: 'center',+ fontSize: '40px',+ fontWeight: 'bold',+ color: 'white',+ }}+ ></div>)}{children}</div>