summaryrefslogtreecommitdiff
path: root/ui/app/app.js
diff options
context:
space:
mode:
authorelijah <elijah@riseup.net>2016-09-29 11:56:44 -0700
committerelijah <elijah@riseup.net>2016-09-29 11:58:51 -0700
commite7281dd47f375c1b0a72ae85505319c4d87fb524 (patch)
tree8cc4c3967eebefd26eaaedabbfd41ea4cde0390d /ui/app/app.js
parentbf6571764fc0d7c0ef0153e3e5e9174221aa167d (diff)
[feat] ui - improved account list, show multiple login sessions
Diffstat (limited to 'ui/app/app.js')
-rw-r--r--ui/app/app.js19
1 files changed, 13 insertions, 6 deletions
diff --git a/ui/app/app.js b/ui/app/app.js
index 45f87ddf..3b3ac5de 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})
})