More connect improvements

* Use extra route for disconnected/initial state
* Style connect screen properly
* Hide widget when connected in favor of custom UI
* Show account info in sidebar header
This commit is contained in:
2017-12-25 10:50:03 +01:00
parent 07be7dece8
commit 5d533d2c08
14 changed files with 354 additions and 25 deletions

View File

@@ -15,12 +15,14 @@ export default Route.extend({
},
beforeModel() {
return this.waitForConnectionState();
return this.waitForConnectionState().then(() => {
if (this.get('storage.disconnected')) {
this.transitionTo('connect');
}
});
},
model(params) {
if (this.get('storage.disconnected')) { return null; }
let path = params.path;
if (isEmpty(params.path)) { return null; }
@@ -35,7 +37,6 @@ export default Route.extend({
setupController(controller, model) {
this._super(controller, model);
if (this.get('storage.disconnected')) { return true; }
if (isEmpty(this.get('storage.categories')) && this.get('storage.connected')) {
this.get('storage').fetchRootListing();