diff options
Diffstat (limited to 'app')
| -rw-r--r-- | app/components/AccountInput.js | 5 | ||||
| -rw-r--r-- | app/components/Settings.js | 32 | ||||
| -rw-r--r-- | app/components/Switch.js | 8 | ||||
| -rw-r--r-- | app/components/WindowChrome.js | 3 |
4 files changed, 27 insertions, 21 deletions
diff --git a/app/components/AccountInput.js b/app/components/AccountInput.js index dc61aeffc9..1759423437 100644 --- a/app/components/AccountInput.js +++ b/app/components/AccountInput.js @@ -5,8 +5,7 @@ import { formatAccount } from '../lib/formatters'; // @TODO: move it into types.js // ESLint issue: https://github.com/babel/babel-eslint/issues/445 -/* eslint-disable no-unused-vars */ -declare class ClipboardData { +declare class ClipboardData { // eslint-disable-line no-unused-vars setData(type: string, data: string): void; getData(type: string): string; } @@ -77,7 +76,7 @@ export default class AccountInput extends Component { render(): React.Element<*> { const displayString = formatAccount(this.state.value || ''); - const { value, onChange, onEnter, ...otherProps } = this.props; + const { value, onChange, onEnter, ...otherProps } = this.props; // eslint-disable-line no-unused-vars return ( <input { ...otherProps } type="text" diff --git a/app/components/Settings.js b/app/components/Settings.js index ade9dba8f5..df6947a258 100644 --- a/app/components/Settings.js +++ b/app/components/Settings.js @@ -58,9 +58,9 @@ export default class Settings extends Component { { /* show account options when logged in */ } <If condition={ isLoggedIn }> <Then> - <div> + <div className="settings__account"> - <div className="settings__cell settings__cell--active" onClick={ this.props.onViewAccount }> + <div className="settings__view-account settings__cell settings__cell--active" onClick={ this.props.onViewAccount }> <div className="settings__cell-label">Account</div> <div className="settings__cell-value"> <If condition={ isOutOfTime }> @@ -79,7 +79,7 @@ export default class Settings extends Component { <div className="settings__cell"> <div className="settings__cell-label">Auto-connect</div> <div className="settings__cell-value"> - <Switch onChange={ this.onAutoSecure } isOn={ this.props.settings.autoSecure } /> + <Switch className="settings__autosecure" onChange={ this.onAutoSecure } isOn={ this.props.settings.autoSecure } /> </div> </div> <div className="settings__cell-footer"> @@ -89,22 +89,24 @@ export default class Settings extends Component { </Then> </If> - <div className="settings__cell settings__cell--active" onClick={ this.onExternalLink.bind(this, 'faq') }> - <div className="settings__cell-label">FAQs</div> - <img className="settings__cell-icon" src="./assets/images/icon-extLink.svg" /> - </div> - <div className="settings__cell settings__cell--active" onClick={ this.onExternalLink.bind(this, 'guides') }> - <div className="settings__cell-label">Guides</div> - <img className="settings__cell-icon" src="./assets/images/icon-extLink.svg" /> - </div> - <div className="settings__cell settings__cell--active" onClick={ this.onExternalLink.bind(this, 'supportEmail') }> - <div className="settings__cell-label">Contact support</div> - <img className="settings__cell-icon" src="./assets/images/icon-email.svg" /> + <div className="settings__external"> + <div className="settings__cell settings__cell--active" onClick={ this.onExternalLink.bind(this, 'faq') }> + <div className="settings__cell-label">FAQs</div> + <img className="settings__cell-icon" src="./assets/images/icon-extLink.svg" /> + </div> + <div className="settings__cell settings__cell--active" onClick={ this.onExternalLink.bind(this, 'guides') }> + <div className="settings__cell-label">Guides</div> + <img className="settings__cell-icon" src="./assets/images/icon-extLink.svg" /> + </div> + <div className="settings__cell settings__cell--active" onClick={ this.onExternalLink.bind(this, 'supportEmail') }> + <div className="settings__cell-label">Contact support</div> + <img className="settings__cell-icon" src="./assets/images/icon-email.svg" /> + </div> </div> </div> <div className="settings__footer"> - <button className="button button--negative" onClick={ this.props.onQuit }>Quit app</button> + <button className="settings__quit button button--negative" onClick={ this.props.onQuit }>Quit app</button> </div> </div> diff --git a/app/components/Switch.js b/app/components/Switch.js index c278cfbd2c..4f97c4d992 100644 --- a/app/components/Switch.js +++ b/app/components/Switch.js @@ -120,8 +120,14 @@ export default class Switch extends Component { } render(): React.Element<*> { + const { isOn, onChange, ...otherProps } = this.props; // eslint-disable-line no-unused-vars + let className = ('switch' + ' ' + (otherProps.className || '')).trim(); return ( - <input type="checkbox" ref={ this.onRef } className="switch" checked={ this.props.isOn } + <input { ...otherProps } + type="checkbox" + ref={ this.onRef } + className={ className } + checked={ isOn } onMouseDown={ this.handleMouseDown } onChange={ this.handleChange } /> ); diff --git a/app/components/WindowChrome.js b/app/components/WindowChrome.js index 141c99fdb4..d7094813db 100644 --- a/app/components/WindowChrome.js +++ b/app/components/WindowChrome.js @@ -5,8 +5,7 @@ export default class WindowChrome extends Component { props: { children: Array<React.Element<*>> | React.Element<*> } - - render() { + render(): React.Element<*> { const chromeClass = ['window-chrome', 'window-chrome--' + process.platform]; return ( <div className={ chromeClass.join(' ') }> |
