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