TagSpaces is an offline, open source, document manager with tagging support
js styling and cleaning up
Ilian Sapundshiev1e29a8ef517e
diff --git a/app/components/dialogs/Dialogs.css.js b/app/components/dialogs/Dialogs.css.jsindex 5e49f2782..b24e5d144 100644--- a/app/components/dialogs/Dialogs.css.js+++ b/app/components/dialogs/Dialogs.css.js@@ -17,7 +17,7 @@* @flow*/-export default (theme) => ({+export default (theme: Object) => ({panel: {height: '100%',maxHeight: '100%',diff --git a/app/components/dialogs/LocalForm.js b/app/components/dialogs/LocalForm.jsindex 8d9dd202b..5331bfad5 100644--- a/app/components/dialogs/LocalForm.js+++ b/app/components/dialogs/LocalForm.js@@ -1,4 +1,21 @@-/* eslint-disable react/prop-types, react/jsx-handler-names */+/**+ * TagSpaces - universal file and folder organizer+ * Copyright (C) 2017-present TagSpaces UG (haftungsbeschraenkt)+ *+ * 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/>.+ *+ * @flow+ */import React from 'react';diff --git a/app/components/dialogs/ObjectStoreForm.js b/app/components/dialogs/ObjectStoreForm.jsindex c51b4b917..27eb21119 100644--- a/app/components/dialogs/ObjectStoreForm.js+++ b/app/components/dialogs/ObjectStoreForm.js@@ -1,9 +1,23 @@-/* eslint-disable react/prop-types, react/jsx-handler-names */+/**+ * TagSpaces - universal file and folder organizer+ * Copyright (C) 2017-present TagSpaces UG (haftungsbeschraenkt)+ *+ * 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/>.+ *+ * @flow+ */import React from 'react';-// import PropTypes from 'prop-types';-// import classNames from 'classnames';-// import Select from 'react-select';import CreatableSelect from 'react-select/lib/Creatable';import { withStyles } from '@material-ui/core/styles';import Typography from '@material-ui/core/Typography';@@ -11,14 +25,11 @@ import NoSsr from '@material-ui/core/NoSsr';import TextField from '@material-ui/core/TextField';import Paper from '@material-ui/core/Paper';import Grid from '@material-ui/core/Grid';-// import Chip from '@material-ui/core/Chip';import MenuItem from '@material-ui/core/MenuItem';import FormControl from '@material-ui/core/FormControl';import FormHelperText from '@material-ui/core/FormHelperText';import Input from '@material-ui/core/Input';import InputLabel from '@material-ui/core/InputLabel';-// import CancelIcon from '@material-ui/icons/Cancel';-// import { emphasize } from '@material-ui/core/styles/colorManipulator';import i18n from '../../services/i18n';export const suggestions = [@@ -59,15 +70,6 @@ const styles = theme => ({alignItems: 'center',overflow: 'hidden',},- /* chip: {- margin: `${theme.spacing.unit / 2}px ${theme.spacing.unit / 4}px`,- },- chipFocused: {- backgroundColor: emphasize(- theme.palette.type === 'light' ? theme.palette.grey[300] : theme.palette.grey[700],- 0.08,- ),- }, */noOptionsMessage: {padding: `${theme.spacing.unit}px ${theme.spacing.unit * 2}px`,},@@ -165,20 +167,6 @@ function ValueContainer(props) {return <div className={props.selectProps.classes.valueContainer}>{props.children}</div>;}-/* function MultiValue(props) {- return (- <Chip- tabIndex={-1}- label={props.children}- className={classNames(props.selectProps.classes.chip, {- [props.selectProps.classes.chipFocused]: props.isFocused,- })}- onDelete={props.removeProps.onClick}- deleteIcon={<CancelIcon {...props.removeProps} />}- />- );-} */-function Menu(props) {return (<Paper square className={props.selectProps.classes.paper} {...props.innerProps}>@@ -212,10 +200,6 @@ class ObjectStoreForm extends React.Component<Props> {};handleInputSelectChange = (inputValue: any, actionMeta: any) => {- /* console.group('Input Changed');- console.log(inputValue);- console.log(`action: ${actionMeta.action}`);- console.groupEnd(); */if (actionMeta.action === 'set-value') {suggestions.push({ label: this.props.state.region, value: this.props.state.region });} else if (actionMeta.action === 'input-change') {@@ -352,38 +336,6 @@ class ObjectStoreForm extends React.Component<Props> {</Grid>);- /* return (- <div className={classes.root}>- <NoSsr>- <Select- classes={classes}- styles={selectStyles}- options={suggestions}- components={components}- value={this.state.single}- onChange={this.handleChange('single')}- placeholder="Search a country (start with a)"- />- {/!* <div className={classes.divider} />- <Select- classes={classes}- styles={selectStyles}- textFieldProps={{- label: 'Label',- InputLabelProps: {- shrink: true,- },- }}- options={suggestions}- components={components}- value={this.state.multi}- onChange={this.handleChange('multi')}- placeholder="Select multiple countries"- isMulti- /> *!/}- </NoSsr>- </div>- ); */}}