-
Notifications
You must be signed in to change notification settings - Fork 872
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
First round of improvements #42
Merged
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
ba69296
Merge pull request #27 from ipfs/structure
jbenet b6c6775
update readme
daviddias 151018c
bump ipfsd-ctl version
daviddias 70efae8
bump ipfsd-ctl version
daviddias 7823a67
Use local browserify
harlantwood 0c1174e
Merge pull request #38 from harlantwood/patch-1
daviddias 72c0b3c
Add line to README explaining that this is a menu bar app
jeffd 6609c6f
Merge pull request #40 from jeffd/master
jbenet b350f7a
add menubar screenshot
jbenet 87af9e3
Merge branch 'master' into settings
dignifiedquire d265676
Cleanup menubar rendering and linting
dignifiedquire File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
var React = require('react') | ||
var _ = require('lodash') | ||
|
||
module.exports = React.createClass({ | ||
displayName: 'Files', | ||
|
||
propTypes: { | ||
values: React.PropTypes.object | ||
}, | ||
|
||
getDefaultProps: function () { | ||
return { | ||
values: [] | ||
} | ||
}, | ||
|
||
_renderFile (value, name) { | ||
if (value.uploaded) { | ||
var nameTrimmed = value.Name.slice(0, 10) + '...' | ||
var hashTrimmed = value.Hash.slice(0, 6) + '...' | ||
return ( | ||
<h5>{nameTrimmed} + {hashTrimmed}</h5> | ||
) | ||
} | ||
|
||
return ( | ||
<div className='progress'> | ||
<div className='progress-bar progress-bar-striped active' role='progressbar' aria-valuenow='100' aria-valuemin='0' aria-valuemax='100' style={{width: '100%'}}> | ||
<span className='sr-only'>Uploading {value.Name}</span> | ||
</div> | ||
</div> | ||
) | ||
}, | ||
|
||
render () { | ||
var self = this | ||
|
||
return ( | ||
<div className='row'> | ||
{_.map(self.props.values, self._renderFile)} | ||
</div> | ||
) | ||
} | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
var React = require('react') | ||
|
||
module.exports = React.createClass({ | ||
displayName: 'OpenLinks', | ||
|
||
propTypes: { | ||
onConsoleClick: React.PropTypes.func, | ||
onBrowserClick: React.PropTypes.func | ||
}, | ||
|
||
getDefaultProps: function () { | ||
return { | ||
onConsoleClick: function () {}, | ||
onBrowserClick: function () {} | ||
} | ||
}, | ||
|
||
render () { | ||
var self = this | ||
|
||
return ( | ||
<div className='row panel panel-default'> | ||
<div className='list-group'> | ||
<a href='#' | ||
className='list-group-item' | ||
onClick={self.props.onConsoleClick}> | ||
Open Console | ||
</a> | ||
<a href='#' | ||
className='list-group-item' | ||
onClick={self.props.onBrowserClick}> | ||
Open in Browser | ||
</a> | ||
</div> | ||
</div> | ||
) | ||
} | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
var React = require('react') | ||
|
||
module.exports = React.createClass({ | ||
displayName: 'Quit', | ||
|
||
propTypes: { | ||
onClick: React.PropTypes.func | ||
}, | ||
|
||
getDefaultProps: function () { | ||
return { | ||
onClick: function () {} | ||
} | ||
}, | ||
|
||
render () { | ||
var self = this | ||
|
||
return ( | ||
<div className='row'> | ||
<div className='panel panel-default version'> | ||
<a href='#' | ||
onClick={self.props.onClick}> | ||
Quit | ||
</a> | ||
</div> | ||
</div> | ||
) | ||
} | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
var React = require('react') | ||
|
||
module.exports = React.createClass({ | ||
displayName: 'Settings', | ||
|
||
propTypes: { | ||
onClick: React.PropTypes.func | ||
}, | ||
|
||
getDefaultProps: function () { | ||
return { | ||
onClick: function () {} | ||
} | ||
}, | ||
|
||
render () { | ||
var self = this | ||
|
||
return ( | ||
<div className='row'> | ||
<div className='panel panel-default version'> | ||
<a href='#' | ||
onClick={self.props.onClick}> | ||
Settings | ||
</a> | ||
</div> | ||
</div> | ||
) | ||
} | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
var React = require('react') | ||
var _ = require('lodash') | ||
|
||
module.exports = React.createClass({ | ||
displayName: 'Stats', | ||
|
||
propTypes: { | ||
values: React.PropTypes.object | ||
}, | ||
|
||
getDefaultProps: function () { | ||
return { | ||
values: [] | ||
} | ||
}, | ||
|
||
_renderStat (value, name) { | ||
return ( | ||
<tr key={name}> | ||
<td>{name}</td> | ||
<td className='value'>{value}</td> | ||
</tr> | ||
) | ||
}, | ||
|
||
render () { | ||
var self = this | ||
|
||
return ( | ||
<div className='row stats'> | ||
<div className='panel panel-default'> | ||
<div className='panel-body'> | ||
<table className='table nomarginbottom'> | ||
{_.map(self.props.values, self._renderStat)} | ||
</table> | ||
</div> | ||
</div> | ||
</div> | ||
) | ||
} | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
var React = require('react') | ||
|
||
module.exports = React.createClass({ | ||
displayName: 'Status', | ||
|
||
propTypes: { | ||
status: React.PropTypes.string | ||
}, | ||
|
||
getDefaultProps: function () { | ||
return { | ||
state: '' | ||
} | ||
}, | ||
|
||
render () { | ||
var self = this | ||
|
||
return ( | ||
<div className='row status'> | ||
{ self.props.status } | ||
</div> | ||
) | ||
} | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
var React = require('react') | ||
|
||
module.exports = React.createClass({ | ||
displayName: 'Version', | ||
|
||
propTypes: { | ||
value: React.PropTypes.string | ||
}, | ||
|
||
getDefaultProps: function () { | ||
return { | ||
value: '' | ||
} | ||
}, | ||
|
||
render () { | ||
var self = this | ||
|
||
return ( | ||
<div className='row'> | ||
<div className='panel panel-default version'> | ||
{self.props.value} | ||
</div> | ||
</div> | ||
) | ||
} | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is this comment out now?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was never called (linting complained) but I wasn't sure if I could remove it