Skip to content

TagSpaces is an offline, open source, document manager with tagging support

making dialog mobile friendly

Ilian Sapundshiev58d53793b130
diff --git a/app/components/dialogs/AddRemoveTagsDialog.js b/app/components/dialogs/AddRemoveTagsDialog.js
index 6dc2583d7..1717c9258 100644
--- a/app/components/dialogs/AddRemoveTagsDialog.js
+++ b/app/components/dialogs/AddRemoveTagsDialog.js
@@ -18,6 +18,7 @@
*/
import React from 'react';
+import withMobileDialog from '@material-ui/core/withMobileDialog';
import Button from '@material-ui/core/Button';
import DialogActions from '@material-ui/core/DialogActions';
import DialogContent from '@material-ui/core/DialogContent';
@@ -35,6 +36,7 @@ import { extractFileName } from '../../utils/paths';
type Props = {
open: boolean,
+ fullScreen: boolean,
selectedEntries: Array<Object>,
onClose: () => void,
addTags: (paths: Array<string>, tags: Array<Tag>) => void,
@@ -98,6 +100,7 @@ class AddRemoveTagsDialog extends React.Component<Props, State> {
selectedEntries = [],
removeTags,
removeAllTags,
+ fullScreen,
onClose
} = this.props;
const { newlyAddedTags = [] } = this.state;
@@ -105,6 +108,7 @@ class AddRemoveTagsDialog extends React.Component<Props, State> {
return (
<GenericDialog
open={open}
+ fullScreen={fullScreen}
onClose={onClose}
onEnterKey={(event) => onEnterKeyHandler(event, this.addTags)}
renderTitle={() => (
@@ -185,4 +189,4 @@ class AddRemoveTagsDialog extends React.Component<Props, State> {
}
}
-export default AddRemoveTagsDialog;
+export default withMobileDialog()(AddRemoveTagsDialog);
diff --git a/app/components/dialogs/MoveCopyFilesDialog.js b/app/components/dialogs/MoveCopyFilesDialog.js
index 77b88aa37..a760ad64f 100644
--- a/app/components/dialogs/MoveCopyFilesDialog.js
+++ b/app/components/dialogs/MoveCopyFilesDialog.js
@@ -20,6 +20,7 @@
import React, { useState, useEffect } from 'react';
import { bindActionCreators } from 'redux';
import { connect } from 'react-redux';
+import withMobileDialog from '@material-ui/core/withMobileDialog';
import Button from '@material-ui/core/Button';
import List from '@material-ui/core/List';
import ListItem from '@material-ui/core/ListItem';
@@ -47,6 +48,7 @@ import { extractFileName } from '../../utils/paths';
type Props = {
classes: Object,
open: boolean,
+ fullScreen: boolean,
onClose: () => void,
copyFiles: (files: Array<string>, destination: string) => void,
moveFiles: (files: Array<string>, destination: string) => void,
@@ -190,6 +192,7 @@ const MoveCopyFilesDialog = (props: Props) => {
<GenericDialog
open={props.open}
onClose={props.onClose}
+ fullScreen={props.fullScreen}
// onEnterKey={(event) => onEnterKeyHandler(event, this.onConfirm)}
renderTitle={renderTitle}
renderContent={renderContent}
@@ -205,4 +208,6 @@ function mapActionCreatorsToProps(dispatch) {
}, dispatch);
}
-export default connect(null, mapActionCreatorsToProps)(MoveCopyFilesDialog);
+export default connect(null, mapActionCreatorsToProps)(
+ withMobileDialog()(MoveCopyFilesDialog)
+);