diff --git a/Gruntfile.js b/Gruntfile.js
index 7624bb252b..0b66b1426b 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -315,7 +315,7 @@ module.exports = function (grunt) {
grunt.registerTask('default', ['download-binary', 'newer:babel', 'less', 'newer:copy:dev', 'shell:electron', 'watchChokidar']);
if (process.platform === 'win32') {
- grunt.registerTask('release', ['clean:release', 'download-binary', 'babel', 'less', 'copy:dev', 'electron:windows', 'copy:windows', 'rcedit:exes', 'compress', 'create-windows-installer', 'rename:installer']);
+ grunt.registerTask('release', ['clean:release', 'download-binary', 'babel', 'less', 'copy:dev', 'electron:windows', 'copy:windows', 'rcedit:exes', 'compress']);
} else {
grunt.registerTask('release', ['clean:release', 'download-binary', 'babel', 'less', 'copy:dev', 'electron:osx', 'copy:osx', 'shell:sign', 'shell:zip']);
}
diff --git a/__tests__/SetupStore-test.js b/__tests__/SetupStore-test.js
index 184a2f3185..7436f140a8 100644
--- a/__tests__/SetupStore-test.js
+++ b/__tests__/SetupStore-test.js
@@ -55,7 +55,6 @@ describe('SetupStore', function () {
machine.stop.mockReturnValue(Promise.resolve());
machine.start.mockReturnValue(Promise.resolve());
machine.upgrade.mockReturnValue(Promise.resolve());
- util.packagejson.mockReturnValue({'docker-version':'1.8.0'});
util.compareVersions.mockReturnValue(-1);
machine.create.mockClear();
machine.upgrade.mockClear();
diff --git a/package.json b/package.json
index 74dde77156..dc0104c73c 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "Kitematic",
- "version": "0.8.5",
+ "version": "0.8.6",
"author": "Kitematic",
"description": "Simple Docker Container management for Mac OS X.",
"homepage": "https://kitematic.com/",
diff --git a/src/app.js b/src/app.js
index 7c2c2bfe38..45f46a4d54 100644
--- a/src/app.js
+++ b/src/app.js
@@ -14,7 +14,6 @@ import request from 'request';
import docker from './utils/DockerUtil';
import hub from './utils/HubUtil';
import Router from 'react-router';
-import createHashHistory from 'history/lib/createHashHistory'
import routes from './routes';
import routerContainer from './router';
import repositoryActions from './actions/RepositoryActions';
@@ -41,16 +40,19 @@ setInterval(function () {
metrics.track('app heartbeat');
}, 14400000);
-let history = createHashHistory()
-React.render({routes}, document.body)
+var router = Router.create({
+ routes: routes
+});
+router.run(Handler => React.render(, document.body));
+routerContainer.set(router);
setupUtil.setup().then(() => {
Menu.setApplicationMenu(Menu.buildFromTemplate(template()));
docker.init();
if (!hub.prompted() && !hub.loggedin()) {
- history.replaceState(null, '/account/login');
+ router.transitionTo('login');
} else {
- history.replaceState(null, '/containers/new');
+ router.transitionTo('search');
}
}).catch(err => {
metrics.track('Setup Failed', {
diff --git a/src/browser.js b/src/browser.js
index 61d5f74273..9908b04041 100644
--- a/src/browser.js
+++ b/src/browser.js
@@ -74,6 +74,7 @@ app.on('ready', function () {
mainWindow.webContents.send('application:quitting');
return true;
});
+
app.on('window-all-closed', function() {
app.quit();
});
diff --git a/src/components/About.react.js b/src/components/About.react.js
index 7ddd23ba36..1793da5810 100644
--- a/src/components/About.react.js
+++ b/src/components/About.react.js
@@ -39,7 +39,6 @@ var Preferences = React.createClass({
Docker Engine
-
{packages["docker-version"]}
diff --git a/src/components/ContainerHome.react.js b/src/components/ContainerHome.react.js
index cd9aeab3a0..51867620d7 100644
--- a/src/components/ContainerHome.react.js
+++ b/src/components/ContainerHome.react.js
@@ -1,7 +1,6 @@
import _ from 'underscore';
import $ from 'jquery';
import React from 'react/addons';
-import Radial from './Radial.react';
import ContainerProgress from './ContainerProgress.react';
import ContainerHomePreview from './ContainerHomePreview.react';
import ContainerHomeLogs from './ContainerHomeLogs.react';
@@ -88,14 +87,14 @@ var ContainerHome = React.createClass({
body = (
Waiting For Another Download
-
+
);
} else {
body = (
Connecting to Docker Hub
-
+
);
}
diff --git a/src/components/Containers.react.js b/src/components/Containers.react.js
index 492d76cba7..d7b611168f 100644
--- a/src/components/Containers.react.js
+++ b/src/components/Containers.react.js
@@ -10,6 +10,10 @@ import shell from 'shell';
import machine from '../utils/DockerMachineUtil';
var Containers = React.createClass({
+ contextTypes: {
+ router: React.PropTypes.func
+ },
+
getInitialState: function () {
return {
sidebarOffset: 0,
@@ -48,9 +52,7 @@ var Containers = React.createClass({
let containers = containerStore.getState().containers;
let sorted = this.sorted(containerStore.getState().containers);
- console.log(this.props);
-
- let name = this.props.params.name;
+ let name = this.context.router.getCurrentParams().name;
if (containerStore.getState().pending) {
this.context.router.transitionTo('pull');
} else if (name && !containers[name]) {
@@ -82,7 +84,7 @@ var Containers = React.createClass({
handleNewContainer: function () {
$(this.getDOMNode()).find('.new-container-item').parent().fadeIn();
- this.context.router.transitionTo('new');
+ this.context.router.transitionTo('search');
metrics.track('Pressed New Container');
},
@@ -149,7 +151,7 @@ var Containers = React.createClass({
sidebarHeaderClass += ' sep';
}
- var container = this.props.params ? this.state.containers[ this.props.params] : {};
+ var container = this.context.router.getCurrentParams().name ? this.state.containers[this.context.router.getCurrentParams().name] : {};
return (
@@ -158,7 +160,7 @@ var Containers = React.createClass({
Containers
-
+
New
diff --git a/src/components/Loading.react.js b/src/components/Loading.react.js
new file mode 100644
index 0000000000..0f63f86349
--- /dev/null
+++ b/src/components/Loading.react.js
@@ -0,0 +1,15 @@
+import React from 'react/addons';
+import Header from './Header.react';
+
+module.exports = React.createClass({
+ render: function () {
+ return (
+
+ );
+ }
+});
diff --git a/src/components/NewContainerPull.react.js b/src/components/NewContainerPull.react.js
deleted file mode 100644
index c8e5bdd74c..0000000000
--- a/src/components/NewContainerPull.react.js
+++ /dev/null
@@ -1,50 +0,0 @@
-import React from 'react/addons';
-import Router from 'react-router';
-import shell from 'shell';
-import containerActions from '../actions/ContainerActions';
-import containerStore from '../stores/ContainerStore';
-import metrics from '../utils/MetricsUtil';
-
-module.exports = React.createClass({
- mixins: [Router.Navigation],
- handleOpenClick: function () {
- var repo = this.props.pending.repo;
- if (repo.indexOf('/') === -1) {
- shell.openExternal(`https://registry.hub.docker.com/_/${this.props.pending.repo}`);
- } else {
- shell.openExternal(`https://registry.hub.docker.com/u/${this.props.pending.repo}`);
- }
- },
- handleCancelClick: function () {
- metrics.track('Canceled Click-To-Pull');
- containerActions.clearPending();
- this.transitionTo('new');
- },
- handleConfirmClick: function () {
- metrics.track('Created Container', {
- from: 'click-to-pull'
- });
- containerActions.clearPending();
- let name = containerStore.generateName(this.props.pending.repo);
- containerActions.run(name, this.props.pending.repo, this.props.pending.tag);
- this.transitionTo('containerHome', {name});
- },
- render: function () {
- if (!this.props.pending) {
- return false;
- }
- return (
-
-
-
-
-
Please confirm to create the container.
-
-
-
-
- );
- }
-});
diff --git a/src/components/Setup.react.js b/src/components/Setup.react.js
index f54702cb8b..cea965ec32 100644
--- a/src/components/Setup.react.js
+++ b/src/components/Setup.react.js
@@ -31,7 +31,7 @@ var Setup = React.createClass({
);
@@ -47,29 +47,8 @@ var Setup = React.createClass({
-
{this.state.title}
-
{this.state.message}
-
-
-
-
- );
- },
- renderCancelled: function () {
- return (
-