Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
hacdias committed Dec 21, 2017
1 parent 7a63e06 commit 14ce00a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 12 deletions.
17 changes: 8 additions & 9 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,12 +118,16 @@ function onStartDaemon (ipfsd) {
logger.info('Start daemon')
send('node-status', 'starting')

console.log(ipfsd.repoPath)

ipfsd.start((err, api) => {
if (err) {
handleKnownErrors(err)
return
}

logger.info('Started daemon')

poller = new StatsPoller(api, logger)

if (mb.window && mb.window.isVisible()) {
Expand All @@ -136,8 +140,8 @@ function onStartDaemon (ipfsd) {

mb.tray.setImage(logoIpfsIce)

send('node-status', 'running')
IPFS = api
send('node-status', 'running')
})
}

Expand Down Expand Up @@ -171,9 +175,7 @@ function onStopDaemon (ipfsd, done) {

function onWillQuit (ipfsd, event) {
logger.info('Shutting down application')
event.preventDefault()

console.log(IPFS)
if (IPFS == null) {
mb.app.quit()
} else {
Expand Down Expand Up @@ -255,7 +257,7 @@ function initialize (path, ipfsd) {
return send('initialization-error', String(err))
}

fs.writeFileSync(config.ipfsPathFile, path)
fs.writeFileSync(config.ipfsPathFile, userPath)

send('initialization-complete')
send('node-status', 'stopped')
Expand All @@ -278,16 +280,13 @@ export function getIPFS () {
return IPFS
}

// main entry point
DaemonFactory.create().spawn({
repoPath: config.ipfsPath,
disposable: false,
init: false,
start: false,
repoPath: config.ipfsPath
start: false
}, (err, node) => {
if (err) {
// We can't start if we fail to aquire
// a ipfs node
logger.error(err)
process.exit(1)
}
Expand Down
6 changes: 3 additions & 3 deletions src/js/screens/setup/intro.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,22 @@ import IconDropdownList from '../../components/view/icon-dropdown-list'
export default class Intro extends Component {
constructor (props) {
super(props)
this.state = {showAdvanced: false}
this.state = { showAdvanced: false }
}

static propTypes = {
onInstallClick: PropTypes.func,
configPath: PropTypes.string,
keySizes: PropTypes.arrayOf(PropTypes.number),
keySize: PropTypes.number,
onInstallClick: PropTypes.func,
onKeySizeChange: PropTypes.func
}

static defaultProps = {
onInstallClick () {},
configPath: '',
keySizes: [],
keySize: 0,
onInstallClick () {},
onKeySizeChange () {}
}

Expand Down

0 comments on commit 14ce00a

Please sign in to comment.