summaryrefslogtreecommitdiff
path: root/ui/app/app.js
diff options
context:
space:
mode:
authorelijah <elijah@riseup.net>2016-12-30 17:12:21 -0800
committerRuben Pollan <meskio@sindominio.net>2017-01-10 19:12:29 +0100
commit8f992ee6e84d21c3e6306b27856e4ba90accc1f2 (patch)
treebe314682a3aac223fd7c6ba7c12f8e9d25d5c487 /ui/app/app.js
parent7e86aa78721aa0a5a291bcf08fab2fb311cb8026 (diff)
[bug] For now, disable UI for supporting multiple accounts. It does not currently work with API tokens.
Diffstat (limited to 'ui/app/app.js')
-rw-r--r--ui/app/app.js25
1 files changed, 11 insertions, 14 deletions
diff --git a/ui/app/app.js b/ui/app/app.js
index 95e4283..05dadf1 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
}
}