diff options
author | elijah <elijah@riseup.net> | 2017-02-28 22:12:09 -0600 |
---|---|---|
committer | elijah <elijah@riseup.net> | 2017-02-28 22:12:31 -0600 |
commit | 4a5e181138e4ccd324d33426f3903825c178af48 (patch) | |
tree | bcaaa8eda80bd783b720e493d9b1919c614903a9 /ui/app/models/account.js | |
parent | bcfd0c7fd461876d080bca14ed4d038837834f02 (diff) |
[bug] correctly determine available services in the ui
Diffstat (limited to 'ui/app/models/account.js')
-rw-r--r-- | ui/app/models/account.js | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/ui/app/models/account.js b/ui/app/models/account.js index 3656d2c..1477360 100644 --- a/ui/app/models/account.js +++ b/ui/app/models/account.js @@ -4,6 +4,7 @@ // import bitmask from 'lib/bitmask' +import Provider from 'models/provider' export default class Account { @@ -46,8 +47,17 @@ export default class Account { return this._authenticated } - get hasEmail() { - return true + getProvider() { + if (this.provider) { + return new Promise((resolve, reject) => { + resolve(this.provider) + }) + } else { + return Provider.get(this.domain).then(provider => { + this.provider = provider + return provider + }) + } } // |