Skip to content

Commit

Permalink
refactor: Upgrade dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
dignifiedquire committed Feb 20, 2016
1 parent 8d759ba commit 9b64498
Show file tree
Hide file tree
Showing 11 changed files with 2,750 additions and 3,043 deletions.
6 changes: 3 additions & 3 deletions app/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,10 @@ const ipfsPath = () => {

// -- Window URLs

const fileURL = name => `file://${__dirname}/${name}.html`
const serverURL = name => `http://localhost:3000/${name}.html`
const fileURL = (name) => `file://${__dirname}/${name}.html`
const serverURL = (name) => `http://localhost:3000/${name}.html`

const currentURL = name => isProduction ? fileURL(name) : serverURL(name)
const currentURL = (name) => isProduction ? fileURL(name) : serverURL(name)

export default {
menuBar,
Expand Down
2 changes: 1 addition & 1 deletion app/controls/drag-drop.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export default function dragDrop (event, files) {

logger.info('Uploading files', {files})

res.forEach(file => {
res.forEach((file) => {
const url = `https://ipfs.io/ipfs/${file.Hash}`
clipboard.writeText(url)
filesUploaded.push(file)
Expand Down
4 changes: 2 additions & 2 deletions app/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ function onStopDaemon (node, done = () => {}) {
poll = null
}

node.stopDaemon(err => {
node.stopDaemon((err) => {
if (err) return logger.error(err.stack)

logger.info('Stopped daemon')
Expand Down Expand Up @@ -161,7 +161,7 @@ function initialize (path, node) {
'openDirectory',
'createDirectory'
]
}, res => {
}, (res) => {
if (!res) return

userPath = res[0]
Expand Down
2 changes: 1 addition & 1 deletion app/js/components/view/directory-input.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export default class DirectoryInput extends Component {
disabled: false
}

_onClick = e => {
_onClick = (e) => {
e.preventDefault()

ipc.send('setup-browse-path')
Expand Down
6 changes: 3 additions & 3 deletions app/js/screens/menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@ export default class Menu extends Component {

// -- Event Listeners

_onVersion = arg => {
_onVersion = (arg) => {
this.setState({version: arg})
}

_onNodeStatus = status => {
_onNodeStatus = (status) => {
this.setState({status: status})
}

_onStats = stats => {
_onStats = (stats) => {
this.setState({stats: stats})
}

Expand Down
19 changes: 9 additions & 10 deletions app/js/screens/menu/start.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,16 +51,15 @@ export default class StartScreen extends Component {
<Header onCloseClick={this.props.onCloseClick} />
<div style={styles.content}>
<image
src={require('../../../img/offline-icon.png')}
width='64'
height='64'
style={{margin: '0 auto'}}
/>
<div style={styles.text}>
Oh snap, it looks like your node<br/>
is not running yet. Let’s change<br/>
that by clicking that button
</div>
src={require('../../../img/offline-icon.png')}
width='64'
height='64'
style={{margin: '0 auto'}}/>
<div style={styles.text}>
Oh snap, it looks like your node<br/>
is not running yet. Let’s change<br/>
that by clicking that button
</div>
</div>
<Button onClick={this.props.onStartClick}>
Start Node
Expand Down
6 changes: 3 additions & 3 deletions app/js/screens/setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@ export default class Setup extends Component {
this.setState({status: INTITIALZING})
}

_onError = error => {
_onError = (error) => {
this.setState({
status: ERROR,
error
})
}

_onConfigPath = path => {
_onConfigPath = (path) => {
console.log('got path', path)
this.setState({configPath: path})
}
Expand All @@ -54,7 +54,7 @@ export default class Setup extends Component {
ipc.send('initialize', {keySize: this.state.keySize})
}

_onKeySizeChange = keySize => {
_onKeySizeChange = (keySize) => {
this.setState({keySize})
}

Expand Down
7 changes: 3 additions & 4 deletions app/js/screens/setup/intro.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,9 @@ export default class Intro extends Component {
<Icon name='download' style={styles.icon}/> Install IPFS
</Button>
<a
key='advanced-link'
onClick={this.props.onAdvancedClick}
style={styles.advancedLink}
>
key='advanced-link'
onClick={this.props.onAdvancedClick}
style={styles.advancedLink}>
Advanced Options
</a>
</div>
Expand Down
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const logger = new (winston.Logger)({
]
})

process.on('uncaughtException', error => {
process.on('uncaughtException', (error) => {
const msg = error.message || error
logger.error(`Uncaught Exception: ${msg}`, error, error.stack, arguments)
process.exit(1)
Expand Down
Loading

0 comments on commit 9b64498

Please sign in to comment.