summaryrefslogtreecommitdiff
path: root/ui/app/app.js
diff options
context:
space:
mode:
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})
})