Skip to content

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

Improving flow support

Ilian Sapundshiev29979b951615
diff --git a/.flowconfig b/.flowconfig
index 2aeb8e2e2..aef9d7575 100644
--- a/.flowconfig
+++ b/.flowconfig
@@ -14,9 +14,11 @@
<PROJECT_ROOT>/cordova/.*
<PROJECT_ROOT>/reports/.*
<PROJECT_ROOT>/tsprofile/.*
+<PROJECT_ROOT>/flow-typed/.*
<PROJECT_ROOT>/web/.*
[include]
+<PROJECT_ROOT>/app/.*
[libs]
diff --git a/app/assets/tsgreen.js b/app/assets/tsgreen.js
deleted file mode 100644
index caf4c6ec1..000000000
--- a/app/assets/tsgreen.js
+++ /dev/null
@@ -1,37 +0,0 @@
-/**
- * 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 as
- * published by the Free Software Foundation, either version 3 of the
- * License.
- *
- * 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
- */
-const tsgreen = {
- 50: '#1DD19F',
- 100: '#1DD19F',
- 200: '#1DD19F',
- 300: '#1DD19F',
- 400: '#1DD19F',
- 500: '#1DD19F',
- 600: '#1DD19F',
- 700: '#1DD19F',
- 800: '#1DD19F',
- 900: '#1DD19F',
- A100: '#1DD19F',
- A200: '#1DD19F',
- A400: '#1DD19F',
- A700: '#1DD19F',
-};
-
-export default tsgreen;
diff --git a/app/assets/tspurple.js b/app/assets/tspurple.js
deleted file mode 100644
index 84fa63f0d..000000000
--- a/app/assets/tspurple.js
+++ /dev/null
@@ -1,37 +0,0 @@
-/**
- * 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 as
- * published by the Free Software Foundation, either version 3 of the
- * License.
- *
- * 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
- */
-const tspurple = {
- 50: '#a21547',
- 100: '#a21547',
- 200: '#a21547',
- 300: '#a21547',
- 400: '#a21547',
- 500: '#a21547',
- 600: '#a21547',
- 700: '#a21547',
- 800: '#a21547',
- 900: '#a21547',
- A100: '#a21547',
- A200: '#a21547',
- A400: '#a21547',
- A700: '#a21547',
-};
-
-export default tspurple;
diff --git a/app/containers/App.js b/app/containers/App.js
index 2b3107a34..7819cb3f1 100644
--- a/app/containers/App.js
+++ b/app/containers/App.js
@@ -18,15 +18,12 @@
*/
import React, { Component } from 'react';
-// import { bindActionCreators } from 'redux';
import { connect } from 'react-redux';
// import injectTapEventPlugin from 'react-tap-event-plugin';
import { I18nextProvider } from 'react-i18next'; // as we build ourself via webpack
import MuiThemeProvider from '@material-ui/core/styles/MuiThemeProvider';
import createMuiTheme from '@material-ui/core/styles/createMuiTheme';
import { HotKeys } from 'react-hotkeys';
-// import lightTheme from '../assets/tspurple';
-// import darkTheme from '../assets/tsgreen';
import '../assets/fonts/roboto/index.css';
import i18n from '../services/i18n';
import { getCurrentTheme, getKeyBindingObject } from '../reducers/settings';
@@ -69,22 +66,22 @@ const darkTheme = createMuiTheme({
}
});
-const lightBlueTheme = createMuiTheme({
- palette: {
- type: 'light', // Switching the dark mode on is a single property value change.
- primary: {
- light: '#cbe9fa',
- main: '#19aeff',
- dark: '#19aeff',
- contrastText: '#ffffff',
- },
- secondary: {
- main: '#19aeff',
- },
- divider: '#ddd'
- // secondary: { main: '#cccccc', 200: '#ddd' }
- }
-});
+// const lightBlueTheme = createMuiTheme({
+// palette: {
+// type: 'light', // Switching the dark mode on is a single property value change.
+// primary: {
+// light: '#cbe9fa',
+// main: '#19aeff',
+// dark: '#19aeff',
+// contrastText: '#ffffff',
+// },
+// secondary: {
+// main: '#19aeff',
+// },
+// divider: '#ddd'
+// // secondary: { main: '#cccccc', 200: '#ddd' }
+// }
+// });
class App extends Component {
props: {