Skip to content

Commit 6e1f1a4

Browse files
committed
Remove new app dialog
1 parent 3c904a3 commit 6e1f1a4

File tree

5 files changed

+5
-196
lines changed

5 files changed

+5
-196
lines changed

components/Sidebar/AppsMenu.react.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import React from 'react';
1212
import styles from 'components/Sidebar/Sidebar.scss';
1313
import { unselectable } from 'stylesheets/base.scss';
1414

15-
let AppsMenu = ({ apps, current, height, onSelect, showCreateDialog }) => (
15+
let AppsMenu = ({ apps, current, height, onSelect }) => (
1616
<div style={{ height }} className={[styles.appsMenu, unselectable].join(' ')}>
1717
<div className={styles.currentApp} onClick={onSelect.bind(null, current.slug)}>
1818
{current.name}
@@ -29,8 +29,6 @@ let AppsMenu = ({ apps, current, height, onSelect, showCreateDialog }) => (
2929
</Link>
3030
);
3131
})}
32-
33-
<a onClick={showCreateDialog} className={styles.createApp}>Create a new app</a>
3432
</div>
3533
);
3634

components/Sidebar/AppsSelector.react.js

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import AppsMenu from 'components/Sidebar/AppsMenu.react';
99
import { Directions } from 'lib/Constants';
1010
import Popover from 'components/Popover/Popover.react';
1111
import history from 'dashboard/history';
12-
import NewAppDialog from 'dashboard/Apps/NewAppDialog.react';
1312
import ParseApp from 'lib/ParseApp';
1413
import Position from 'lib/Position';
1514
import React from 'react';
@@ -23,7 +22,6 @@ export default class AppsSelector extends React.Component {
2322
this.state = {
2423
open: false,
2524
position: null,
26-
showDialog: false,
2725
}
2826
}
2927

@@ -35,7 +33,7 @@ export default class AppsSelector extends React.Component {
3533

3634
componentWillReceiveProps(nextProps, nextContext) {
3735
if (this.context !== nextContext) {
38-
this.setState({ open: false, showDialog: false });
36+
this.setState({ open: false });
3937
}
4038
}
4139

@@ -76,8 +74,7 @@ export default class AppsSelector extends React.Component {
7674
apps={this.props.apps}
7775
current={this.context.currentApp}
7876
height={height}
79-
onSelect={this.select.bind(this)}
80-
showCreateDialog={() => this.setState({ showDialog: true })} />
77+
onSelect={this.select.bind(this)} />
8178
</Popover>
8279
);
8380
}
@@ -87,7 +84,6 @@ export default class AppsSelector extends React.Component {
8784
{this.context.currentApp.name}
8885
</div>
8986
{popover}
90-
<NewAppDialog open={this.state.showDialog} onCancel={() => this.setState({ showDialog: false })} />
9187
</div>
9288
);
9389
}

dashboard/Apps/AppsIndex.react.js

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ import howLongAgo from 'lib/howLongAgo';
1212
import html from 'lib/htmlString';
1313
import Icon from 'components/Icon/Icon.react';
1414
import LiveReload from 'components/LiveReload/LiveReload.react';
15-
import NewAppDialog from 'dashboard/Apps/NewAppDialog.react';
1615
import pluralize from 'lib/pluralize';
1716
import prettyNumber from 'lib/prettyNumber';
1817
import React from 'react';
@@ -108,7 +107,7 @@ let AppCard = (props) => {
108107
export default class AppsIndex extends React.Component {
109108
constructor() {
110109
super();
111-
this.state = { search: '', dialogOpen: false };
110+
this.state = { search: '' };
112111
this.focusField = this.focusField.bind(this);
113112
}
114113

@@ -128,7 +127,7 @@ export default class AppsIndex extends React.Component {
128127
}
129128

130129
focusField() {
131-
if (this.refs.search && !this.state.dialogOpen) {
130+
if (this.refs.search) {
132131
this.refs.search.focus();
133132
}
134133
}
@@ -144,9 +143,7 @@ export default class AppsIndex extends React.Component {
144143
<Icon width={110} height={110} name='cloud-surprise' fill='#1e3b4d' />
145144
</div>
146145
<div className={styles.alert}>You don't have any apps</div>
147-
<a href='javascript:;' role='button' className={styles.cta} onClick={() => this.setState({ dialogOpen: true })}>Create a new app</a>
148146
</div>
149-
<NewAppDialog open={this.state.dialogOpen} onCancel={() => this.setState({ dialogOpen: false })} />
150147
</div>
151148
);
152149
}
@@ -161,13 +158,6 @@ export default class AppsIndex extends React.Component {
161158
onChange={this.updateSearch.bind(this)}
162159
value={this.state.search}
163160
placeholder='Start typing to filter&hellip;' />
164-
<a
165-
href='javascript:;'
166-
role='button'
167-
className={styles.create}
168-
onClick={() => this.setState({ dialogOpen: true })}>
169-
Create a new app
170-
</a>
171161
</div>
172162
<ul className={styles.apps}>
173163
{apps.map(app =>
@@ -176,7 +166,6 @@ export default class AppsIndex extends React.Component {
176166
null
177167
)}
178168
</ul>
179-
<NewAppDialog open={this.state.dialogOpen} onCancel={() => this.setState({ dialogOpen: false })} />
180169
</div>
181170
);
182171
}

dashboard/Apps/NewAppDialog.react.js

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

dashboard/Apps/NewAppDialog.scss

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

0 commit comments

Comments
 (0)