Skip to content
This repository has been archived by the owner on Jun 11, 2021. It is now read-only.

Commit

Permalink
Merge pull request #171 from kitematic/jmorgan-wip-tests
Browse files Browse the repository at this point in the history
Making default port a checkbox
  • Loading branch information
JeffDM committed Feb 3, 2015
2 parents 9c8d664 + b5979ff commit 923468f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
2 changes: 1 addition & 1 deletion browser/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ app.on('ready', function() {

// Auto Updates
if (process.env.NODE_ENV !== 'development' && !argv.test) {
autoUpdater.setFeedUrl('https://updates.kitematic.com/releases/latest?version=' + app.getVersion());
autoUpdater.setFeedUrl('https://updates.kitematic.com/releases/latest?version=' + app.getVersion() + '&beta=' + settingsjson.beta);

autoUpdater.on('checking-for-update', function (e) {
console.log('Checking for update...');
Expand Down
16 changes: 11 additions & 5 deletions src/ContainerDetails.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -147,10 +147,16 @@ var ContainerDetails = React.createClass({
if (err) { throw err; }
});
},
handleChangeDefaultPort: function (port) {
this.setState({
defaultPort: port
});
handleChangeDefaultPort: function (port, e) {
if (e.target.checked) {
this.setState({
defaultPort: null
});
} else {
this.setState({
defaultPort: port
});
}
},
handleViewDropdown: function(e) {
this.setState({
Expand Down Expand Up @@ -486,7 +492,7 @@ var ContainerDetails = React.createClass({
<div key={key} className="table-values">
<span className="value-left">{key}</span><span className="icon icon-arrow-right"></span>
<a className="value-right" onClick={self.handleViewLink.bind(self, val.url)}>{val.display}</a>
<input onChange={self.handleChangeDefaultPort.bind(self, key)} type="radio" checked={self.state.defaultPort === key}/> <label>Default</label>
<input onChange={self.handleChangeDefaultPort.bind(self, key)} type="checkbox" checked={self.state.defaultPort === key}/> <label>Default</label>
</div>
);
});
Expand Down

0 comments on commit 923468f

Please sign in to comment.