Skip to content

Commit a9017a0

Browse files
authored
Merge pull request #21 from co2-git/feature/16
Fix #16
2 parents 33d7a57 + 753eaa6 commit a9017a0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+91
-295
lines changed

.flowconfig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
./flow/app.js.flow
1414
./app/components/App/App.js.flow
1515
./app/components/App/AppBar.js.flow
16+
./app/components/Base/Animated.js.flow
17+
./app/components/FlexBox/Flex.js.flow
1618
./app/components/Layout/AppCard.js.flow
1719
./app/components/Layout/Header.js.flow
1820
./app/components/Layout/Home.js.flow
@@ -23,6 +25,7 @@
2325
./app/components/Layout/Router.js.flow
2426
./app/components/ReactNative/Info.js.flow
2527
./app/components/Terminal/Console.js.flow
28+
./app/lib/exec.js.flow
2629

2730
[options]
2831
emoji=true

app/App.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,13 @@ const Loading = () => (
1212
<div>Loading</div>
1313
);
1414

15+
const persistor = persistStore(store);
16+
17+
// persistor.purge();
18+
1519
const App = () => (
1620
<Provider store={store}>
17-
<PersistGate loading={<Loading />} persistor={persistStore(store)}>
21+
<PersistGate loading={<Loading />} persistor={persistor}>
1822
<Layout />
1923
</PersistGate>
2024
</Provider>

app/components/Base/Animated.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// @flow
12
import React from 'react';
23
import omit from 'lodash/omit';
34

@@ -80,7 +81,7 @@ const effects = [
8081
'slideOutUp',
8182
];
8283

83-
const Animated = (props) => {
84+
const Animated = (props: $AnimatedProps) => {
8485
const names = ['animated'];
8586
const remove = [];
8687
for (const effect of effects) {
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
// @flow
2+
3+
declare type $AnimatedReactProps = {
4+
+children?: any,
5+
};
6+
7+
declare type $AnimatedProps =
8+
& $AnimatedReactProps;

app/components/FlexBox/Flex.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
1+
// @flow
12
import React from 'react';
23

3-
type $FlexProps = {
4-
children: any,
5-
};
6-
74
const makeStyle = (props: $FlexProps) => {
85
const {style: propsStyle = {}} = props;
96
const style = {...propsStyle, display: 'flex', flexDirection: 'row'};
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
// @flow
2+
3+
declare type $FlexReactProps = {
4+
children: any,
5+
};
6+
7+
declare type $FlexProps =
8+
& $FlexReactProps;

app/components/Layout/Init.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ class Init extends PureComponent<$InitProps, $InitState> {
6767
};
6868
onToggle = (
6969
event: SyntheticInputEvent<HTMLInputElement>,
70-
isInputChecked: boolean
70+
isInputChecked: boolean,
7171
) => this.setState({expo: isInputChecked});
7272
onChangeName = (event: SyntheticInputEvent<HTMLInputElement>) => this.setState({
7373
name: event.target.value,

app/components/Layout/Page.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// @flow
12
import React from 'react';
23

34
import {pageStyle} from '../../styles/main';

app/components/Terminal/Console.js

Lines changed: 9 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
11
// @flow
2-
import map from 'lodash/map';
3-
import React, {PureComponent} from 'react';
42
import {Card, CardHeader, CardActions} from 'material-ui/Card';
5-
import Chip from 'material-ui/Chip';
3+
import {green800, redA700} from 'material-ui/styles/colors';
64
import Avatar from 'material-ui/Avatar';
7-
import OpenFolderIcon from 'material-ui/svg-icons/file/folder-open';
8-
import TermIcon from 'material-ui/svg-icons/action/code';
9-
import stripAnsi from 'strip-ansi';
5+
import Chip from 'material-ui/Chip';
106
import DoneIcon from 'material-ui/svg-icons/action/done';
117
import ErrorIcon from 'material-ui/svg-icons/alert/error';
12-
import {green800, redA700} from 'material-ui/styles/colors';
8+
import map from 'lodash/map';
9+
import OpenFolderIcon from 'material-ui/svg-icons/file/folder-open';
10+
import React, {PureComponent} from 'react';
11+
import stripAnsi from 'strip-ansi';
12+
import TermIcon from 'material-ui/svg-icons/action/code';
1313

14+
import {consoleStyle} from '../../styles/main';
1415
import exec from '../../lib/exec';
1516
import Row from '../FlexBox/Row';
1617

@@ -96,7 +97,7 @@ class Terminal extends PureComponent<$TerminalProps, $TerminalState> {
9697
{this.props.cwd}
9798
</Chip>
9899
</Row>
99-
<div style={styles.console} id="terminal">
100+
<div style={consoleStyle} id="terminal">
100101
{map(this.state.output, (output, index) => {
101102
const lines = stripAnsi(output.message).split('\n');
102103
return (
@@ -113,16 +114,3 @@ class Terminal extends PureComponent<$TerminalProps, $TerminalState> {
113114
}
114115

115116
export default Terminal;
116-
117-
const styles = {
118-
console: {
119-
backgroundColor: '#000',
120-
borderRadius: 8,
121-
boxShadow: '1px 1px 2px 2px rgba(0, 0, 0, 0.25)',
122-
color: '#fff',
123-
marginTop: 12,
124-
maxHeight: 300,
125-
overflow: 'auto',
126-
padding: 10,
127-
},
128-
};

app/components/Terminal/Runner.js

Lines changed: 0 additions & 71 deletions
This file was deleted.

0 commit comments

Comments
 (0)