Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -188,16 +188,11 @@
"ampersand-collection": "^1.5.0",
"ampersand-collection-filterable": "^0.2.1",
"ampersand-dom-bindings": "^3.7.0",
"ampersand-filtered-subcollection": "^2.0.4",
"ampersand-form-view": "^5.2.2",
"ampersand-input-view": "^5.0.0",
"ampersand-model": "^6.0.2",
"ampersand-rest-collection": "^5.0.0",
"ampersand-router": "^3.0.2",
"ampersand-select-view": "^4.3.2",
"ampersand-state": "4.8.2",
"ampersand-view": "^9.0.0",
"ampersand-view-switcher": "^2.0.0",
"app-migrations": "mongodb-js/app-migrations#v0.1.2",
"async": "^1.5.2",
"backoff": "^2.4.1",
Expand Down
14 changes: 0 additions & 14 deletions src/app/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ var electron = require('electron');
var APP_VERSION = electron.remote.app.getVersion();

var _ = require('lodash');
var ViewSwitcher = require('ampersand-view-switcher');
var View = require('ampersand-view');
var async = require('async');
var ipc = require('hadron-ipc');
Expand Down Expand Up @@ -117,8 +116,6 @@ var Application = View.extend({
return debug('router already started!');
}
this.router = new Router();
debug('Listening for page changes from the router...');
this.listenTo(this.router, 'page', this.onPageChange);

debug('Starting router...');
this.router.history.start({
Expand Down Expand Up @@ -180,11 +177,6 @@ var Application = View.extend({

this.el = document.querySelector('#application');
this.renderWithTemplate(this);
this.pageSwitcher = new ViewSwitcher(this.queryByHook('layout-container'), {
show: function() {
document.scrollTop = 0;
}
});
debug('rendering statusbar...');
this.statusComponent = app.appRegistry.getRole('Application.Status')[0].component;
ReactDOM.render(React.createElement(this.statusComponent), this.queryByHook('statusbar'));
Expand Down Expand Up @@ -258,12 +250,6 @@ var Application = View.extend({
this.showOptIn();
}
},
onPageChange: function(view) {
// connect dialog
if (view.screenName) {
this.pageSwitcher.set(view);
}
},
onLinkClick: function(event) {
const localLinks = require('local-links');
const pathname = localLinks.getLocalPathname(event);
Expand Down
19 changes: 6 additions & 13 deletions src/app/router.js
Original file line number Diff line number Diff line change
@@ -1,24 +1,17 @@
var AmpersandRouter = require('ampersand-router');
var app = require('hadron-app');
var React = require('react');
var ReactDOM = require('react-dom');
const AmpersandRouter = require('ampersand-router');
const React = require('react');
const ReactDOM = require('react-dom');

module.exports = AmpersandRouter.extend({
routes: {
'': 'home',
home: 'home',
'home/:ns': 'home',
'(*path)': 'catchAll'
'': 'home'
},
home: function(ns) {
this.homeView = app.appRegistry.getComponent('Home.Home');
this.homeView = global.hadronApp.appRegistry.getComponent('Home.Home');
this.trigger('page',
ReactDOM.render(
React.createElement(this.homeView, {ns: ns}),
app.state.queryByHook('layout-container')
global.hadronApp.state.queryByHook('layout-container')
));
},
catchAll: function() {
this.redirectTo('');
}
});
2 changes: 1 addition & 1 deletion src/main/window-manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ if (process.platform === 'linux') {
* The app's HTML shell which is the output of `./src/index.html`
* created by the `build:pages` gulp task.
*/
var DEFAULT_URL = 'file://' + path.join(RESOURCES, 'index.html#connect');
var DEFAULT_URL = 'file://' + path.join(RESOURCES, 'index.html');
var LOADING_URL = 'file://' + path.join(RESOURCES, 'loading', 'loading.html');

// track if app was launched, @see `renderer ready` handler below
Expand Down