diff options
author | Stefan Malzner <stefan@adlk.io> | 2019-09-05 11:14:51 +0200 |
---|---|---|
committer | Stefan Malzner <stefan@adlk.io> | 2019-09-05 11:14:51 +0200 |
commit | 4152b7f78687105e759912626ba3c055e70bc304 (patch) | |
tree | bfda77d21041889b5802b0092cc7325ec0b68f8c /src/stores | |
parent | create test build (diff) | |
download | ferdium-app-4152b7f78687105e759912626ba3c055e70bc304.tar.gz ferdium-app-4152b7f78687105e759912626ba3c055e70bc304.tar.zst ferdium-app-4152b7f78687105e759912626ba3c055e70bc304.zip |
Fix isPro state
Diffstat (limited to 'src/stores')
-rw-r--r-- | src/stores/UserStore.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/stores/UserStore.js b/src/stores/UserStore.js index d44208923..365336cbf 100644 --- a/src/stores/UserStore.js +++ b/src/stores/UserStore.js | |||
@@ -160,6 +160,10 @@ export default class UserStore extends Store { | |||
160 | return !!this.data.isPremium; | 160 | return !!this.data.isPremium; |
161 | } | 161 | } |
162 | 162 | ||
163 | @computed get isPremiumOverride() { | ||
164 | return (!this.team.plan && this.isPremium) || (this.team.state === 'expired' && this.isPremium); | ||
165 | } | ||
166 | |||
163 | @computed get isPersonal() { | 167 | @computed get isPersonal() { |
164 | if (!this.team.plan) return false; | 168 | if (!this.team.plan) return false; |
165 | const plan = getPlan(this.team.plan); | 169 | const plan = getPlan(this.team.plan); |
@@ -168,7 +172,7 @@ export default class UserStore extends Store { | |||
168 | } | 172 | } |
169 | 173 | ||
170 | @computed get isPro() { | 174 | @computed get isPro() { |
171 | if ((!this.team.plan || this.team.state !== 'expired') && this.isPremium) return true; | 175 | if (this.isPremiumOverride) return true; |
172 | 176 | ||
173 | if ((!this.team.plan || this.team.state === 'expired')) return false; | 177 | if ((!this.team.plan || this.team.state === 'expired')) return false; |
174 | const plan = getPlan(this.team.plan); | 178 | const plan = getPlan(this.team.plan); |