pixl-xyapp 2.1.32 → 2.1.33

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.
Files changed (2) hide show
  1. package/js/base.js +5 -3
  2. package/package.json +1 -1
package/js/base.js CHANGED
@@ -304,8 +304,10 @@ var app = {
304
304
  opts.headers['X-CSRF-Token'] = app.csrf_token;
305
305
  }
306
306
 
307
- // default 10 sec timeout
308
- var timeout = opts.timeout || 10000;
307
+ // default 10 sec timeout if not configured
308
+ var default_timeout = 10000;
309
+ if (window.config && window.config.api_timeout_ms) default_timeout = window.config.api_timeout_ms;
310
+ var timeout = opts.timeout || default_timeout;
309
311
  delete opts.timeout;
310
312
 
311
313
  // retry delay (w/exp backoff)
@@ -320,7 +322,7 @@ var app = {
320
322
  Debug.trace('api', "HTTP Error: " + err);
321
323
 
322
324
  if (errorCallback) errorCallback({ code: 'http', description: '' + (err.message || err) });
323
- else app.doError( "HTTP Error: " + err.message || err );
325
+ else app.doError( "HTTP Error: " + err.message || err, 8 ); // hide timeout messages after 8s
324
326
  }, timeout );
325
327
 
326
328
  window.fetch( url, opts )
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pixl-xyapp",
3
- "version": "2.1.32",
3
+ "version": "2.1.33",
4
4
  "description": "Front-end web application and theme for xyOps.",
5
5
  "author": "Joseph Huckaby <jhuckaby@pixlcore.com>",
6
6
  "homepage": "https://github.com/pixlcore/pixl-xyapp",