TagSpaces is an offline, open source, document manager with tagging support
chore: making some dialogs dragable
Ilian Sapundshievd908ff53958b
diff --git a/src/renderer/components/dialogs/CreateEditLocationDialog.tsx b/src/renderer/components/dialogs/CreateEditLocationDialog.tsxindex 8759ba412..23d914f8a 100644--- a/src/renderer/components/dialogs/CreateEditLocationDialog.tsx+++ b/src/renderer/components/dialogs/CreateEditLocationDialog.tsx@@ -19,6 +19,7 @@import React, { ChangeEvent, useEffect, useState } from 'react';import { styled } from '@mui/material/styles';import CryptoJS from 'crypto-js';+import Paper from '@mui/material/Paper';import Button from '@mui/material/Button';import DialogActions from '@mui/material/DialogActions';import DialogContent from '@mui/material/DialogContent';@@ -55,6 +56,7 @@ import {Select,} from '@mui/material';import { Pro } from '-/pro';+import DraggablePaper from '-/components/DraggablePaper';import ObjectStoreForm from './ObjectStoreForm';import LocalForm from './LocalForm';import useFirstRender from '-/utils/useFirstRender';@@ -578,6 +580,8 @@ function CreateEditLocationDialog(props: Props) {fullScreen={fullScreen}keepMountedscroll="paper"+ PaperComponent={fullScreen ? Paper : DraggablePaper}+ aria-labelledby="draggable-dialog-title"onKeyDown={(event) => {if (event.key === 'Enter' || event.keyCode === 13) {event.preventDefault();@@ -589,7 +593,7 @@ function CreateEditLocationDialog(props: Props) {// }}}>- <DialogTitle>+ <DialogTitle style={{ cursor: 'move' }} id="draggable-dialog-title">{selectedLocation? t('core:editLocationTitle'): t('core:createLocationTitle')}diff --git a/src/renderer/perspectives/grid/components/GridSettingsDialog.tsx b/src/renderer/perspectives/grid/components/GridSettingsDialog.tsxindex 887718cfa..98dbf29d9 100644--- a/src/renderer/perspectives/grid/components/GridSettingsDialog.tsx+++ b/src/renderer/perspectives/grid/components/GridSettingsDialog.tsx@@ -27,21 +27,22 @@ import {FormGroup,Switch,Divider,- InputLabel,- Select,MenuItem,Button,FormHelperText,Typography,TextField,+ Paper,Box,} from '@mui/material';+import useMediaQuery from '@mui/material/useMediaQuery';import ListItemIcon from '@mui/material/ListItemIcon';import ListItemText from '@mui/material/ListItemText';import ThumbnailCoverIcon from '@mui/icons-material/PhotoSizeSelectActual';import ThumbnailContainIcon from '@mui/icons-material/PhotoSizeSelectLarge';import RadioCheckedIcon from '@mui/icons-material/RadioButtonChecked';import RadioUncheckedIcon from '@mui/icons-material/RadioButtonUnchecked';+import DraggablePaper from '-/components/DraggablePaper';import DialogCloseButton from '-/components/dialogs/DialogCloseButton';import { Pro } from '-/pro';import { useTheme } from '@mui/material/styles';@@ -79,6 +80,7 @@ function GridSettingsDialog(props: Props) {const [ignored, forceUpdate] = useReducer((x: number) => x + 1, 0, undefined);const theme = useTheme();+ const fullScreen = useMediaQuery(theme.breakpoints.down('md'));const { open, onClose, openHelpWebPage } = props;useEffect(() => {@@ -111,8 +113,14 @@ function GridSettingsDialog(props: Props) {}return (- <Dialog open={open} onClose={onClose} keepMounted scroll="paper">- <DialogTitle>+ <Dialog+ open={open}+ onClose={onClose}+ PaperComponent={fullScreen ? Paper : DraggablePaper}+ keepMounted+ scroll="paper"+ >+ <DialogTitle style={{ cursor: 'move' }} id="draggable-dialog-title">{t('core:perspectiveSettingsTitle')}<DialogCloseButtontestId="closePerspectiveSettingsTID"