From e7281dd47f375c1b0a72ae85505319c4d87fb524 Mon Sep 17 00:00:00 2001 From: elijah Date: Thu, 29 Sep 2016 11:56:44 -0700 Subject: [feat] ui - improved account list, show multiple login sessions --- ui/app/app.js | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) (limited to 'ui/app/app.js') diff --git a/ui/app/app.js b/ui/app/app.js index 45f87dd..3b3ac5d 100644 --- a/ui/app/app.js +++ b/ui/app/app.js @@ -1,5 +1,6 @@ import bitmask from 'lib/bitmask' import Account from 'models/account' +import Provider from 'models/provider' class Application { constructor() { @@ -17,12 +18,18 @@ class Application { } start() { - Account.active().then(account => { - if (account == null) { - this.show('greeter') - } else { - this.show('main', {initialAccount: account}) - } + Provider.list(false).then(domains => { + Account.initialize_list(domains) + Account.active().then(account => { + if (account == null) { + this.show('greeter') + } else { + Account.add_primary(account) + this.show('main', {initialAccount: account}) + } + }, error => { + this.show('error', {error: error}) + }) }, error => { this.show('error', {error: error}) }) -- cgit v1.2.3