mirror of https://github.com/docker/docs.git
Fixing a few small button bugs
This commit is contained in:
parent
e2b4261ac9
commit
2ed92d9d22
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "Kitematic",
|
"name": "Kitematic",
|
||||||
"version": "0.5.19",
|
"version": "0.5.20",
|
||||||
"author": "Kitematic",
|
"author": "Kitematic",
|
||||||
"description": "Simple Docker Container management for Mac OS X.",
|
"description": "Simple Docker Container management for Mac OS X.",
|
||||||
"homepage": "https://kitematic.com/",
|
"homepage": "https://kitematic.com/",
|
||||||
|
|
|
@ -59,10 +59,11 @@ ipc.on('application:quitting', () => {
|
||||||
// Event fires when the app receives a docker:// URL such as
|
// Event fires when the app receives a docker:// URL such as
|
||||||
// docker://repository/run/redis
|
// docker://repository/run/redis
|
||||||
ipc.on('application:open-url', opts => {
|
ipc.on('application:open-url', opts => {
|
||||||
request.get('https://kitematic.com/flags.json', (flags, err) => {
|
request.get('https://kitematic.com/flags.json', (err, response, body) => {
|
||||||
if (err || !flags) {
|
if (err || response.statusCode !== 200) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
var flags = JSON.parse(body);
|
||||||
urlUtil.openUrl(opts.url, flags, app.getVersion());
|
urlUtil.openUrl(opts.url, flags, app.getVersion());
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -5,6 +5,9 @@ var ContainerStore = require('../stores/ContainerStore');
|
||||||
var metrics = require('../utils/MetricsUtil');
|
var metrics = require('../utils/MetricsUtil');
|
||||||
|
|
||||||
var ContainerListNewItem = React.createClass({
|
var ContainerListNewItem = React.createClass({
|
||||||
|
contextTypes: {
|
||||||
|
router: React.PropTypes.func
|
||||||
|
},
|
||||||
handleItemMouseEnter: function () {
|
handleItemMouseEnter: function () {
|
||||||
var $action = $(this.getDOMNode()).find('.action');
|
var $action = $(this.getDOMNode()).find('.action');
|
||||||
$action.show();
|
$action.show();
|
||||||
|
@ -20,10 +23,10 @@ var ContainerListNewItem = React.createClass({
|
||||||
type: 'new'
|
type: 'new'
|
||||||
});
|
});
|
||||||
var containers = ContainerStore.sorted();
|
var containers = ContainerStore.sorted();
|
||||||
$(self.getDOMNode()).fadeOut(300, function () {
|
$(self.getDOMNode()).fadeOut(300, () => {
|
||||||
if (containers.length > 0) {
|
if (containers.length > 0) {
|
||||||
var name = containers[0].Name;
|
var name = containers[0].Name;
|
||||||
self.transitionTo('containerHome', {name: name});
|
this.context.router.transitionTo('containerHome', {name: name});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
|
@ -59,9 +59,9 @@ var Containers = React.createClass({
|
||||||
});
|
});
|
||||||
if (status === 'destroy') {
|
if (status === 'destroy') {
|
||||||
if (sorted.length) {
|
if (sorted.length) {
|
||||||
this.transitionTo('containerHome', {name: sorted[0].Name});
|
this.context.router.transitionTo('containerHome', {name: sorted[0].Name});
|
||||||
} else {
|
} else {
|
||||||
this.transitionTo('containers');
|
this.context.router.transitionTo('containers');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -15,7 +15,7 @@ module.exports = React.createClass({
|
||||||
},
|
},
|
||||||
handleCancelClick: function () {
|
handleCancelClick: function () {
|
||||||
ContainerStore.clearPending();
|
ContainerStore.clearPending();
|
||||||
this.transitionTo('new');
|
this.context.router.transitionTo('new');
|
||||||
},
|
},
|
||||||
handleConfirmClick: function () {
|
handleConfirmClick: function () {
|
||||||
ContainerStore.clearPending();
|
ContainerStore.clearPending();
|
||||||
|
|
|
@ -307,6 +307,7 @@ var ContainerStore = assign(Object.create(EventEmitter.prototype), {
|
||||||
var containerName = this._generateName(repository);
|
var containerName = this._generateName(repository);
|
||||||
|
|
||||||
_placeholders[containerName] = {
|
_placeholders[containerName] = {
|
||||||
|
Id: require('crypto').randomBytes(32).toString('hex'),
|
||||||
Name: containerName,
|
Name: containerName,
|
||||||
Image: imageName,
|
Image: imageName,
|
||||||
Config: {
|
Config: {
|
||||||
|
|
Loading…
Reference in New Issue