@widgetic/editor 3.10.39 → 3.10.40

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@widgetic/editor",
3
- "version": "3.10.39",
3
+ "version": "3.10.40",
4
4
  "scripts": {
5
5
  "start": "webpack --config webpack.config.js --watch --progress",
6
6
  "build": "webpack --config webpack.config.js",
@@ -272,14 +272,21 @@ export default class EmbedController {
272
272
  }
273
273
 
274
274
  _showBranding() {
275
+ // read branding value
276
+ let brandingValue = new URLSearchParams(window.location.search).get('branding')
277
+ // console.log("read brandingValue:", brandingValue);
278
+ if(!brandingValue) brandingValue = 'off'
279
+
280
+ // check if user is premium
275
281
  let isPremium = (this.user && this.user.premium) ? this.user.premium : false;
276
- // console.log("_showBranding:", this.user, isPremium, window.location.search.indexOf('branding'));
277
- if(isPremium) return;
278
282
 
279
- // show branding only if the flag is on
280
- if (window.location.search.indexOf('branding') >= 0) {
281
- window.initBranding();
282
- }
283
+ // establish branding
284
+ if(!isPremium) brandingValue = "on";
285
+ // console.log("final brandingValue:", this.user, isPremium, brandingValue);
286
+
287
+
288
+ // show branding if user is free or flag is on
289
+ if (brandingValue != "off") window.initBranding();
283
290
  }
284
291
 
285
292
  _onSkinSet(skin) {
@@ -1,14 +1,14 @@
1
1
  Service = require '../../../browser/model'
2
2
 
3
3
  # Instagram service config
4
- host = 'https://widgetic.com'
4
+ host = 'https://widgetic.com' + '/wservices/instagram'
5
5
  INSTAGRAM_DEFAULTS = {
6
6
  client_id: '542808610040105', #widgetic instagram basic display app id
7
7
  client_secret: '0a88504381f577dbbef400d4232a4258',
8
- redirect_uri: host + '/services/instagram/auth_token',
8
+ redirect_uri: host + '/auth_token',
9
9
  scope: 'user_profile,user_media',
10
10
  response_type: 'code',
11
- api_url: host + '/services/instagram/',
11
+ api_url: host,
12
12
  demo: "IGQVJVNUw5cHB5cUFiZATFxVmgyeWtSVFJjTDYyRmNnWDZAJZA3llVXREa1BsS1EtVGJ2UEdlbHJNbDV1UUQ2YkVSZA3YwS1dPWXJzYXFGQzdZAMlhBLTBWWWNkTVNHTGNDLW10dkdhNW0wMDVqMkhZAWEhqbgZDZD",
13
13
  token_storage: "redis",
14
14
  encodeToken: false,
@@ -2,14 +2,14 @@ Service = require '../../../browser/model'
2
2
  Entry = require '../../../browser/model/entry'
3
3
 
4
4
  # Instagram service config
5
- host = 'https://widgetic.com'
5
+ host = 'https://widgetic.com' + '/wservices/instagram/'
6
6
  INSTAGRAM_DEFAULTS = {
7
7
  client_id: '542808610040105', #widgetic instagram basic display app id
8
8
  client_secret: '0a88504381f577dbbef400d4232a4258',
9
- redirect_uri: host + '/services/instagram/auth_token',
9
+ redirect_uri: host + 'auth_token',
10
10
  scope: 'user_profile,user_media',
11
11
  response_type: 'code',
12
- api_url: host + '/services/instagram/',
12
+ api_url: host,
13
13
  demo: "IGQVJVNUw5cHB5cUFiZATFxVmgyeWtSVFJjTDYyRmNnWDZAJZA3llVXREa1BsS1EtVGJ2UEdlbHJNbDV1UUQ2YkVSZA3YwS1dPWXJzYXFGQzdZAMlhBLTBWWWNkTVNHTGNDLW10dkdhNW0wMDVqMkhZAWEhqbgZDZD",
14
14
  token_storage: "redis",
15
15
  encodeToken: false,