From 7569ac8bd58174095f3f897548e26d0ba905236c Mon Sep 17 00:00:00 2001 From: elijah Date: Wed, 21 Sep 2016 15:39:03 -0700 Subject: [feat] the setup wizard for the new ui --- ui/app/app.js | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) (limited to 'ui/app/app.js') diff --git a/ui/app/app.js b/ui/app/app.js index 57120a4..45f87dd 100644 --- a/ui/app/app.js +++ b/ui/app/app.js @@ -8,10 +8,18 @@ class Application { // // main entry point for the application // + initialize() { + if (this.debugging()) { + this.show(this.debug_panel) + } else { + this.start() + } + } + start() { Account.active().then(account => { if (account == null) { - this.show('greeter', {onLogin: this.onLogin.bind(this)}) + this.show('greeter') } else { this.show('main', {initialAccount: account}) } @@ -20,13 +28,14 @@ class Application { }) } - onLogin(account) { - this.show('main', {initialAccount: account}) - } - show(panel, properties) { this.switcher.show(panel, properties) } + + debugging() { + this.debug_panel = window.location.hash.replace('#', '') + return this.debug_panel && this.debug_panel != 'main' + } } var App = new Application -- cgit v1.2.3