pixl-xyapp 2.1.22 → 2.1.24

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/js/base.js CHANGED
@@ -298,6 +298,12 @@ var app = {
298
298
  // send HTTP GET to API endpoint
299
299
  // Debug.trace('api', "Sending API request: " + url );
300
300
 
301
+ // add csrf token if we have one
302
+ if (app.csrf_token && (opts.method == 'POST')) {
303
+ if (!opts.headers) opts.headers = {};
304
+ opts.headers['X-CSRF-Token'] = app.csrf_token;
305
+ }
306
+
301
307
  // default 10 sec timeout
302
308
  var timeout = opts.timeout || 10000;
303
309
  delete opts.timeout;
package/js/select.js CHANGED
@@ -1105,11 +1105,22 @@ var KeySelect = {
1105
1105
  return parts.join('+');
1106
1106
  },
1107
1107
 
1108
- getkeyLabel(key_id, glue = '+') {
1108
+ getKeyLabel(key_id, glue = '+') {
1109
1109
  // get formatted label based on key id
1110
1110
  var os = app.os;
1111
1111
  return key_id.split(/\+/).map( function(key) {
1112
1112
  if (key == 'Meta') return os.mac ? 'Command' : (os.win ? 'Windows' : 'Super');
1113
+ else if (key == 'Alt') return os.mac ? 'Option' : 'Alt';
1114
+ else return key.replace(/^(Key|Digit)/, '');
1115
+ } ).join(glue);
1116
+ },
1117
+
1118
+ getShortKeyLabel(key_id, glue = '+') {
1119
+ // get formatted label based on key id
1120
+ var os = app.os;
1121
+ return key_id.split(/\+/).map( function(key) {
1122
+ if (key == 'Meta') return os.mac ? 'Cmd' : (os.win ? 'Win' : 'Super');
1123
+ else if (key == 'Alt') return os.mac ? 'Opt' : 'Alt';
1113
1124
  else return key.replace(/^(Key|Digit)/, '');
1114
1125
  } ).join(glue);
1115
1126
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pixl-xyapp",
3
- "version": "2.1.22",
3
+ "version": "2.1.24",
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",