Skip to content

Remove new app dialog #23

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 29, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions components/Sidebar/AppsMenu.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import React from 'react';
import styles from 'components/Sidebar/Sidebar.scss';
import { unselectable } from 'stylesheets/base.scss';

let AppsMenu = ({ apps, current, height, onSelect, showCreateDialog }) => (
let AppsMenu = ({ apps, current, height, onSelect }) => (
<div style={{ height }} className={[styles.appsMenu, unselectable].join(' ')}>
<div className={styles.currentApp} onClick={onSelect.bind(null, current.slug)}>
{current.name}
Expand All @@ -29,8 +29,6 @@ let AppsMenu = ({ apps, current, height, onSelect, showCreateDialog }) => (
</Link>
);
})}

<a onClick={showCreateDialog} className={styles.createApp}>Create a new app</a>
</div>
);

Expand Down
8 changes: 2 additions & 6 deletions components/Sidebar/AppsSelector.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import AppsMenu from 'components/Sidebar/AppsMenu.react';
import { Directions } from 'lib/Constants';
import Popover from 'components/Popover/Popover.react';
import history from 'dashboard/history';
import NewAppDialog from 'dashboard/Apps/NewAppDialog.react';
import ParseApp from 'lib/ParseApp';
import Position from 'lib/Position';
import React from 'react';
Expand All @@ -23,7 +22,6 @@ export default class AppsSelector extends React.Component {
this.state = {
open: false,
position: null,
showDialog: false,
}
}

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

componentWillReceiveProps(nextProps, nextContext) {
if (this.context !== nextContext) {
this.setState({ open: false, showDialog: false });
this.setState({ open: false });
}
}

Expand Down Expand Up @@ -76,8 +74,7 @@ export default class AppsSelector extends React.Component {
apps={this.props.apps}
current={this.context.currentApp}
height={height}
onSelect={this.select.bind(this)}
showCreateDialog={() => this.setState({ showDialog: true })} />
onSelect={this.select.bind(this)} />
</Popover>
);
}
Expand All @@ -87,7 +84,6 @@ export default class AppsSelector extends React.Component {
{this.context.currentApp.name}
</div>
{popover}
<NewAppDialog open={this.state.showDialog} onCancel={() => this.setState({ showDialog: false })} />
</div>
);
}
Expand Down
15 changes: 2 additions & 13 deletions dashboard/Apps/AppsIndex.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import howLongAgo from 'lib/howLongAgo';
import html from 'lib/htmlString';
import Icon from 'components/Icon/Icon.react';
import LiveReload from 'components/LiveReload/LiveReload.react';
import NewAppDialog from 'dashboard/Apps/NewAppDialog.react';
import pluralize from 'lib/pluralize';
import prettyNumber from 'lib/prettyNumber';
import React from 'react';
Expand Down Expand Up @@ -108,7 +107,7 @@ let AppCard = (props) => {
export default class AppsIndex extends React.Component {
constructor() {
super();
this.state = { search: '', dialogOpen: false };
this.state = { search: '' };
this.focusField = this.focusField.bind(this);
}

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

focusField() {
if (this.refs.search && !this.state.dialogOpen) {
if (this.refs.search) {
this.refs.search.focus();
}
}
Expand All @@ -144,9 +143,7 @@ export default class AppsIndex extends React.Component {
<Icon width={110} height={110} name='cloud-surprise' fill='#1e3b4d' />
</div>
<div className={styles.alert}>You don't have any apps</div>
<a href='javascript:;' role='button' className={styles.cta} onClick={() => this.setState({ dialogOpen: true })}>Create a new app</a>
</div>
<NewAppDialog open={this.state.dialogOpen} onCancel={() => this.setState({ dialogOpen: false })} />
</div>
);
}
Expand All @@ -161,13 +158,6 @@ export default class AppsIndex extends React.Component {
onChange={this.updateSearch.bind(this)}
value={this.state.search}
placeholder='Start typing to filter&hellip;' />
<a
href='javascript:;'
role='button'
className={styles.create}
onClick={() => this.setState({ dialogOpen: true })}>
Create a new app
</a>
</div>
<ul className={styles.apps}>
{apps.map(app =>
Expand All @@ -176,7 +166,6 @@ export default class AppsIndex extends React.Component {
null
)}
</ul>
<NewAppDialog open={this.state.dialogOpen} onCancel={() => this.setState({ dialogOpen: false })} />
</div>
);
}
Expand Down
149 changes: 0 additions & 149 deletions dashboard/Apps/NewAppDialog.react.js

This file was deleted.

25 changes: 0 additions & 25 deletions dashboard/Apps/NewAppDialog.scss

This file was deleted.