From 8f992ee6e84d21c3e6306b27856e4ba90accc1f2 Mon Sep 17 00:00:00 2001 From: elijah Date: Fri, 30 Dec 2016 17:12:21 -0800 Subject: [bug] For now, disable UI for supporting multiple accounts. It does not currently work with API tokens. --- ui/app/app.js | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) (limited to 'ui/app/app.js') diff --git a/ui/app/app.js b/ui/app/app.js index 95e4283f..05dadf1f 100644 --- a/ui/app/app.js +++ b/ui/app/app.js @@ -10,13 +10,9 @@ class Application { // main entry point for the application // initialize() { - window.addEventListener("error", this.handleError.bind(this)) - window.addEventListener("unhandledrejection", this.handleError.bind(this)) - if (this.debugging()) { - this.show(this.debug_panel) - } else { - this.start() - } + window.addEventListener("error", this.showError.bind(this)) + window.addEventListener("unhandledrejection", this.showError.bind(this)) + this.start() } start() { @@ -30,10 +26,10 @@ class Application { this.show('main', {initialAccount: account}) } }, error => { - this.show('error', {error: error}) + this.showError(error) }) }, error => { - this.show('error', {error: error}) + this.showError(error) }) } @@ -41,13 +37,14 @@ class Application { this.switcher.show(panel, properties) } - debugging() { - this.debug_panel = window.location.hash.replace('#', '') - return this.debug_panel && this.debug_panel != 'main' + showError(e) { + this.switcher.showError(e) + return true } - handleError(e) { - this.show('error', {error: e}) + hideError() { + this.switcher.hideError() + return true } } -- cgit v1.2.3