diff options
Diffstat (limited to 'src/models')
-rw-r--r-- | src/models/Recipe.js | 2 | ||||
-rw-r--r-- | src/models/Service.js | 8 | ||||
-rw-r--r-- | src/models/User.js | 6 |
3 files changed, 10 insertions, 6 deletions
diff --git a/src/models/Recipe.js b/src/models/Recipe.js index b0d60e75e..3f7299e34 100644 --- a/src/models/Recipe.js +++ b/src/models/Recipe.js | |||
@@ -42,7 +42,7 @@ export default class Recipe { | |||
42 | } | 42 | } |
43 | 43 | ||
44 | if (!data.id) { | 44 | if (!data.id) { |
45 | // Franz 4 recipes do not have an Id | 45 | // Ferdi 4 recipes do not have an Id |
46 | throw Error(`Recipe '${data.name}' requires Id`); | 46 | throw Error(`Recipe '${data.name}' requires Id`); |
47 | } | 47 | } |
48 | 48 | ||
diff --git a/src/models/Service.js b/src/models/Service.js index 848a84aa2..b48233237 100644 --- a/src/models/Service.js +++ b/src/models/Service.js | |||
@@ -2,7 +2,7 @@ import { computed, observable, autorun } from 'mobx'; | |||
2 | import path from 'path'; | 2 | import path from 'path'; |
3 | import normalizeUrl from 'normalize-url'; | 3 | import normalizeUrl from 'normalize-url'; |
4 | 4 | ||
5 | const debug = require('debug')('Franz:Service'); | 5 | const debug = require('debug')('Ferdi:Service'); |
6 | 6 | ||
7 | export const RESTRICTION_TYPES = { | 7 | export const RESTRICTION_TYPES = { |
8 | SERVICE_LIMIT: 0, | 8 | SERVICE_LIMIT: 0, |
@@ -177,11 +177,15 @@ export default class Service { | |||
177 | } | 177 | } |
178 | 178 | ||
179 | @computed get userAgent() { | 179 | @computed get userAgent() { |
180 | let userAgent = window.navigator.userAgent; | 180 | let { userAgent } = window.navigator; |
181 | if (typeof this.recipe.overrideUserAgent === 'function') { | 181 | if (typeof this.recipe.overrideUserAgent === 'function') { |
182 | userAgent = this.recipe.overrideUserAgent(); | 182 | userAgent = this.recipe.overrideUserAgent(); |
183 | } | 183 | } |
184 | 184 | ||
185 | // Remove Ferdi as it can cause incompatabilities with services. | ||
186 | // This way, Ferdi will look like a normal Chrome instance | ||
187 | userAgent = userAgent.replace(/(Ferdi|Electron)([^\s]+\s)/g, ''); | ||
188 | |||
185 | return userAgent; | 189 | return userAgent; |
186 | } | 190 | } |
187 | 191 | ||
diff --git a/src/models/User.js b/src/models/User.js index 0a2b1f62a..5a614efbe 100644 --- a/src/models/User.js +++ b/src/models/User.js | |||
@@ -20,11 +20,11 @@ export default class User { | |||
20 | 20 | ||
21 | @observable isSubscriptionOwner = false; | 21 | @observable isSubscriptionOwner = false; |
22 | 22 | ||
23 | @observable hasSubscription = false; | 23 | @observable hasSubscription = true; |
24 | 24 | ||
25 | @observable hadSubscription = false; | 25 | @observable hadSubscription = false; |
26 | 26 | ||
27 | @observable isPremium = false; | 27 | @observable isPremium = true; |
28 | 28 | ||
29 | @observable beta = false; | 29 | @observable beta = false; |
30 | 30 | ||
@@ -50,7 +50,7 @@ export default class User { | |||
50 | this.lastname = data.lastname || this.lastname; | 50 | this.lastname = data.lastname || this.lastname; |
51 | this.organization = data.organization || this.organization; | 51 | this.organization = data.organization || this.organization; |
52 | this.accountType = data.accountType || this.accountType; | 52 | this.accountType = data.accountType || this.accountType; |
53 | this.isPremium = data.isPremium || this.isPremium; | 53 | this.isPremium = true; |
54 | this.beta = data.beta || this.beta; | 54 | this.beta = data.beta || this.beta; |
55 | this.donor = data.donor || this.donor; | 55 | this.donor = data.donor || this.donor; |
56 | this.isDonor = data.isDonor || this.isDonor; | 56 | this.isDonor = data.isDonor || this.isDonor; |