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 00c0f699f..6655f8310 100644 --- a/src/models/Recipe.js +++ b/src/models/Recipe.js | |||
@@ -44,7 +44,7 @@ export default class Recipe { | |||
44 | } | 44 | } |
45 | 45 | ||
46 | if (!data.id) { | 46 | if (!data.id) { |
47 | // Franz 4 recipes do not have an Id | 47 | // Ferdi 4 recipes do not have an Id |
48 | throw Error(`Recipe '${data.name}' requires Id`); | 48 | throw Error(`Recipe '${data.name}' requires Id`); |
49 | } | 49 | } |
50 | 50 | ||
diff --git a/src/models/Service.js b/src/models/Service.js index e45c39564..ddc169d47 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, |
@@ -180,11 +180,15 @@ export default class Service { | |||
180 | } | 180 | } |
181 | 181 | ||
182 | @computed get userAgent() { | 182 | @computed get userAgent() { |
183 | let userAgent = window.navigator.userAgent; | 183 | let { userAgent } = window.navigator; |
184 | if (typeof this.recipe.overrideUserAgent === 'function') { | 184 | if (typeof this.recipe.overrideUserAgent === 'function') { |
185 | userAgent = this.recipe.overrideUserAgent(); | 185 | userAgent = this.recipe.overrideUserAgent(); |
186 | } | 186 | } |
187 | 187 | ||
188 | // Remove Ferdi as it can cause incompatabilities with services. | ||
189 | // This way, Ferdi will look like a normal Chrome instance | ||
190 | userAgent = userAgent.replace(/(Ferdi|Electron)([^\s]+\s)/g, ''); | ||
191 | |||
188 | return userAgent; | 192 | return userAgent; |
189 | } | 193 | } |
190 | 194 | ||
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; |