code
stringlengths
122
4.99k
label
int64
0
14
diff --git a/.github/workflows/platformDeploy.yml b/.github/workflows/platformDeploy.yml @@ -13,9 +13,22 @@ env: DEVELOPER_DIR: /Applications/Xcode_12.5.app/Contents/Developer jobs: + validateActor: + runs-on: ubuntu-latest + outputs: + IS_DEPLOYER: ${{ steps.isUserDeployer.outputs.isTeamMember || github.actor == 'OSBotify' }} + steps: + - id: isUserDeployer + uses: tspascoal/get-user-teams-membership@baf2e6adf4c3b897bd65a7e3184305c165aec872 + with: + GITHUB_TOKEN: ${{ secrets.OS_BOTIFY_TOKEN }} + username: ${{ github.actor }} + team: mobile-deployers + android: name: Build and deploy Android - if: github.actor == 'OSBotify' + needs: validateActor + if: ${{ needs.validateActor.outputs.IS_DEPLOYER }} runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 @@ -78,7 +91,8 @@ jobs: desktop: name: Build and deploy Desktop - if: github.actor == 'OSBotify' + needs: validateActor + if: ${{ needs.validateActor.outputs.IS_DEPLOYER }} runs-on: macos-11 steps: - uses: actions/checkout@v2 @@ -133,7 +147,8 @@ jobs: iOS: name: Build and deploy iOS - if: github.actor == 'OSBotify' + needs: validateActor + if: ${{ needs.validateActor.outputs.IS_DEPLOYER }} runs-on: macos-11 steps: - uses: actions/checkout@v2 @@ -216,7 +231,8 @@ jobs: web: name: Build and deploy Web - if: github.actor == 'OSBotify' + needs: validateActor + if: ${{ needs.validateActor.outputs.IS_DEPLOYER }} runs-on: ubuntu-latest steps: - uses: actions/checkout@v2
11
diff --git a/assets/js/components/notifications/util.js b/assets/js/components/notifications/util.js @@ -28,7 +28,7 @@ import { camelCase } from 'lodash'; import { getDaysBetweenDates } from '../../util'; import WinsWithData from './wins-withdata'; import data, { TYPE_MODULES } from '../data'; - +import { getCache, deleteCache } from '../data/cache'; export const wincallbacks = applyFilters( 'googlesitekit.winCallbacks', {} ); export const winsNotificationsToRequest = () => { @@ -93,7 +93,7 @@ const removeDismissed = ( notifications ) => { } return notifications.filter( ( notification ) => { - const dismissed = data.getCache( `notification::dismissed::${ notification.id }` ); + const dismissed = getCache( `notification::dismissed::${ notification.id }` ); return ! dismissed; } ); }; @@ -120,7 +120,7 @@ const removeDisplayedWins = ( wins ) => { // Get only the wins that haven't been displayed yet. const notDisplayed = Object.values( wins ).filter( ( win ) => { - const displayed = data.getCache( `notification::displayed::${ win[ 0 ].id }` ); + const displayed = getCache( `notification::displayed::${ win[ 0 ].id }` ); if ( displayed ) { const displayedDate = new Date( displayed ); @@ -137,7 +137,7 @@ const removeDisplayedWins = ( wins ) => { // Remove the displayed storage if it has been displayed a week ago. const days = getDaysBetweenDates( displayedDate, today ); if ( 7 <= days ) { - data.deleteCache( `notification::displayed::${ win[ 0 ].id }` ); + deleteCache( `notification::displayed::${ win[ 0 ].id }` ); } }
3
diff --git a/packages/slack/src/models/errors.ts b/packages/slack/src/models/errors.ts -export class InvalidGrowiCommandError extends Error { +import ExtensibleCustomError from 'extensible-custom-error'; - constructor(e?: string) { - super(e); - this.name = new.target.name; - Object.setPrototypeOf(this, new.target.prototype); - } - -} +export class InvalidGrowiCommandError extends ExtensibleCustomError {}
7
diff --git a/server/preprocessing/conf/config.ini b/server/preprocessing/conf/config.ini @@ -27,7 +27,7 @@ snapshot_php = "server/services/snapshot/headstart_snapshot.php" # Thumbnail width snapshot_width = "1200px" # snapshot_local_protocol fallback for non-server environments -snapshot_local_protocol = "http" +snapshot_local_protocol = "http://" [output] # Relative paths for offline calculation
3
diff --git a/client/src/releaseNotes.json b/client/src/releaseNotes.json "Remove the LayoutDefault.", "Fixes adding decks and rooms in the simulator config.", "Fixes tactical map toggles for flash, WASD, etc.", - "Fixes the alert level selector in the simulator config." + "Fixes the alert level selector in the simulator config.", + "Removes a hover state on the station description field." ] }, "1.2.4": {
2
diff --git a/vis/js/HeadstartRunner.js b/vis/js/HeadstartRunner.js import ReactDOM from "react-dom"; import React from "react"; -import { createStore, applyMiddleware, compose } from 'redux'; +import { createStore } from "redux"; import { Provider } from "react-redux"; import rootReducer, { getInitialState } from "./reducers"; @@ -25,8 +25,6 @@ import handleZoomSelectQuery from "./utils/backButton"; import Bowser from "bowser"; -const composeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose; - class HeadstartRunner { constructor(config) { this.config = config; @@ -37,8 +35,7 @@ class HeadstartRunner { const initialState = getInitialState(this.config); const middleware = applyHeadstartMiddleware(this); - this.store = createStore(rootReducer, initialState, composeEnhancers(middleware) - ); + this.store = createStore(rootReducer, initialState, middleware); this.hsContainer = document.getElementById(this.config.tag); this.hsContainer.classList.add("headstart");
2
diff --git a/source/guides/core-concepts/interacting-with-elements.md b/source/guides/core-concepts/interacting-with-elements.md @@ -132,7 +132,7 @@ After we verify the element is actionable, Cypress will then fire all of the app cy.get('button').click({ position: 'topLeft' }) ``` -The coordinates we fired the event at will generally be available when clicking the command in the {% url 'Command Log' test-runner %}. +The coordinates we fired the event at will generally be available when clicking the command in the {% url 'Command Log' test-runner#Command-Log %}. ![event coordinates](/img/guides/coords.png)
7
diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/common/popover.js b/packages/node_modules/@node-red/editor-client/src/js/ui/common/popover.js @@ -363,7 +363,6 @@ RED.popover = (function() { panel.css({ display: "none" }); panel.appendTo(document.body); content.appendTo(panel); - var closeCallback; function hide(dispose) { $(document).off("mousedown.red-ui-popover-panel-close"); @@ -378,6 +377,7 @@ RED.popover = (function() { } function show(options) { var closeCallback = options.onclose; + var closeButton = options.closeButton; var target = options.target; var align = options.align || "right"; var offset = options.offset || [0,0]; @@ -393,7 +393,7 @@ RED.popover = (function() { top -= (top+panelHeight)-$(window).height() + 5; } if (top < 0) { - panelHeight.height(panelHeight+top) + panel.height(panelHeight+top) top = 0; } if (align === "right") { @@ -420,7 +420,8 @@ RED.popover = (function() { }); $(document).on("mousedown.red-ui-popover-panel-close", function(event) { - if(!$(event.target).closest(panel).length && !$(event.target).closest(".red-ui-editor-dialog").length) { + var hitCloseButton = closeButton && $(event.target).closest(closeButton).length; + if(!hitCloseButton && !$(event.target).closest(panel).length && !$(event.target).closest(".red-ui-editor-dialog").length) { if (closeCallback) { closeCallback(); }
11
diff --git a/src/tom-select.ts b/src/tom-select.ts @@ -2297,9 +2297,12 @@ export default class TomSelect extends MicroPlugin(MicroEvent){ i = Math.max(0, Math.min(self.items.length, i)); if( i != self.caretPos && !self.isPending ){ - var j, children = self.controlChildren(); + var j, child, + children = self.controlChildren(), + n = children.length; - for( j in children ){ + for( j = 0; j < n; j++ ){ + child = children[j]; if( j < i ){ self.control_input.insertAdjacentElement('beforebegin', children[j] ); } else {
13
diff --git a/translations/en-us.yaml b/translations/en-us.yaml @@ -1457,17 +1457,17 @@ monitoringPage: project: Project level monitoring is enabled. insufficientSize: prometheus: - cpu: Please make sure you have at least one node with {cpu} milli CPUs available to enable Prometheus workload. - memory: Please make sure you have at least one node with {memory} MiB of memory available to enable Prometheus workload. - all: Please make sure you have at least one node with {cpu} milli CPUs and {memory} MiB of memory available to enable Prometheus workload. + cpu: To enable Prometheus, you need at least one node with {cpu} milli CPUs available. + memory: To enable Prometheus, you need at least one node with {memory} MiB of memory available. + all: To enable Prometheus, you need at least one node with {cpu} milli CPUs and {memory} MiB of memory available. selectors: - cpu: Please make sure you have at least one node matches node selectors with {cpu} milli CPUs available to enable Prometheus workload. - memory: Please make sure you have at least one node matches node selectors with {memory} MiB of memory available to enable Prometheus workload. - all: Please make sure you have at least one node that matches node selectors with {cpu} milli CPUs and {memory} MiB of memory available to enable Prometheus workload. + cpu: To enable Prometheus, you need at least one node that matches the node selectors and has {cpu} milli CPUs available. + memory: To enable Prometheus, you need at least one node that matches the node selectors and has {memory} MiB of memory available. + all: To enable Prometheus, you need at least one node that matches the node selectors, has {cpu} milli CPUs available, and has {memory} MiB of memory available. total: - cpu: Please make sure you have at least {cpu} milli CPUs available to enable monitoring. - memory: Please make sure you have at least {memory} MiB of memory available to enable monitoring. - all: Please make sure you have at least {cpu} milli CPUs and {memory} MiB of memory available to enable monitoring. + cpu: To enable monitoring, you need at least {cpu} milli CPUs available. + memory: To enable monitoring, you need at least {memory} MiB of memory available. + all: To enable monitoring, you need at least {cpu} milli CPUs and {memory} MiB of memory available. clusterNotEnabled: Cluster level monitoring is not enabled. Only custom metrics will be collected. prometheus: Monitoring is not enabled yet, click the Save button below to enable it. resourceLimitsHelp: 'When enabling monitoring, you need to ensure your worker nodes and Prometheus pod have enough resources. Please visit <a href="https://rancher.com/docs/rancher/v2.x/en/cluster-admin/tools/monitoring/#resource-consumption" target="_blank" rel="nofollow noreferrer">the Rancher docs</a> for suggested resource limits.'
3
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml @@ -2,7 +2,7 @@ name: CI on: [push, pull_request, workflow_dispatch] jobs: Test-Git-Meta: - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 steps: - run: echo "The job was automatically triggered by a ${{ github.event_name }} event." - run: sudo apt-get install libkrb5-dev
3
diff --git a/articles/libraries/lock-ios/v1/touchid-authentication.md b/articles/libraries/lock-ios/v1/touchid-authentication.md @@ -5,10 +5,8 @@ description: How to implement Touch ID authentication with Lock iOS. --- # Lock iOS: Touch ID Authentication -<%= include('../_includes/_lock-version-1') %> - -::: warning -This feature is disabled for new tenants as of June 8th 2017. Any tenant created after that date won't have the necessary legacy [grant types](/clients/client-grant-types to use Touch ID. This document is offered as reference for older implementations. +::: version-warning +This feature is disabled for new tenants as of June 8th 2017. Any tenant created after that date won't have the necessary legacy [grant types](/clients/client-grant-types) to use Touch ID. This document is offered as reference for older implementations. We recommend that you [upgrade to v2](/libraries/lock-ios/v2/migration). ::: Lock provides passwordless authentication with TouchID for your Auth0 DB connection. To start authenticating your users with TouchID please follow those steps:
14
diff --git a/src/encoded/upgrade/donor.py b/src/encoded/upgrade/donor.py @@ -154,5 +154,5 @@ def human_donor_9_10(value, system): if value.get('life_stage') == 'postnatal': value['life_stage'] = 'newborn' value.pop('children', None) - if value.get('ethnicity') in ['NA', 'Unknown', 'unknown']: + if value.get('ethnicity') in ['NA', 'Unknown', 'unknown', '']: value.pop('ethnicity')
0
diff --git a/processors/processExpand.js b/processors/processExpand.js @@ -35,6 +35,28 @@ function processExpand(entries, meta) { })); } + // Tracks current aegis holder so we can ignore kills that pop aegis + let aegisHolder = null; + + // Used to ignore meepo clones killing themselves + let aegisDeathTime = null; + + function getAegisHolder(heroSlot) { + // There are two names for each hero stored in meta.hero_to_slot, + // so we need to get the one with the most underscores + const aegisHolderPossibilities = []; + Object.keys(meta.hero_to_slot).forEach((hero) => { + const slot = meta.hero_to_slot[hero]; + if (slot === heroSlot) { + aegisHolderPossibilities.push(hero); + } + }); + const ndx = aegisHolderPossibilities + .map(hero => hero.match(/_/g || []).length) // Get number of _'s + .reduce((iMax, x, i, arr) => (x > arr[iMax] ? i : iMax), 0); // Get index of most _'s + return aegisHolderPossibilities[ndx]; + } + const types = { DOTA_COMBATLOG_DAMAGE(e) { // damage @@ -104,11 +126,16 @@ function processExpand(entries, meta) { type: 'healing', })); }, - DOTA_COMBATLOG_MODIFIER_ADD() { + DOTA_COMBATLOG_MODIFIER_ADD(e) { // gain buff/debuff // e.attackername // unit that buffed (use source to get the hero? chen/enchantress) // e.inflictor // the buff // e.targetname // target of buff (possibly illusion) + + // Aegis expired + if (e.inflictor === 'modifier_aegis_regen') { + aegisHolder = null; + } }, DOTA_COMBATLOG_MODIFIER_REMOVE() { // modifier_lost @@ -134,16 +161,29 @@ function processExpand(entries, meta) { }); } - // If it is not a suicide - if (e.attackername !== key) { - expand(Object.assign({}, e, { - unit, - key, - type: 'killed', - })); + if (key === aegisHolder) { + // The aegis holder was killed + if (aegisDeathTime == null) { + // It is the first time they have been killed this tick + // If the hero is meepo than the clones will also get killed + aegisDeathTime = e.time; + return; + } else if (aegisDeathTime !== e.time) { + // We are after the aegis death tick, so clear everything + aegisDeathTime = null; + aegisHolder = null; + } else { + // We are on the same tick, so it is a clone dying + return; + } + } + + // Ignore suicides + if (e.attackername === key) { + return; } - // If a hero was killed + // If a hero was killed log extra information if (e.targethero && !e.targetillusion) { expand({ time: e.time, @@ -161,6 +201,12 @@ function processExpand(entries, meta) { type: 'killed_by', }); } + + expand(Object.assign({}, e, { + unit, + key, + type: 'killed', + })); }, DOTA_COMBATLOG_ABILITY(e) { // Value field is 1 or 2 for toggles @@ -368,6 +414,8 @@ function processExpand(entries, meta) { }); }, CHAT_MESSAGE_AEGIS(e) { + aegisHolder = getAegisHolder(e.player1); + expand({ time: e.time, type: e.type, @@ -375,6 +423,8 @@ function processExpand(entries, meta) { }); }, CHAT_MESSAGE_AEGIS_STOLEN(e) { + aegisHolder = getAegisHolder(e.player1); + expand({ time: e.time, type: e.type,
8
diff --git a/code/js/modules/Sitelist.js b/code/js/modules/Sitelist.js "plex": { name: "Plex", url: "http://www.plex.tv" }, "pluralsight": { name: "Pluralsight", url: "https://app.pluralsight.com" }, "pocketcasts": { name: "Pocketcasts", url: "https://play.pocketcasts.com" }, - "qq.com/portal/player.html": { name: "QQ Music", url: "https://y.qq.com/portal/player.html", controller: "QQController.js" }, + "music.qq": { name: "QQ Music", url: "https://y.qq.com/portal/player.html", controller: "QQController.js", alias: ["y.qq.com/portal/player.html"] }, "radd": { name: "radd.it", url: "http://radd.it", controller: "RadditController.js" }, "radioparadise": { name: "RadioParadise", url: "http://www.radioparadise.com" }, "radioswissjazz": { name: "RadioSwissJazz", url: "http://www.radioswissjazz.ch" },
10
diff --git a/include/Attribute.h b/include/Attribute.h @@ -47,7 +47,7 @@ public: int size = attribute_name.size(); - if ((size >0 && !isalpha(aname[0]))|| + if ((size >0 && !(isalpha(aname[0]) || aname[0] == '_')) || (size >=3 && (aname[0]=='X' && aname[1]=='M' && aname[2]=='L'))) { attribute_name.insert(0,"ONE_");
11
diff --git a/admin-base/ui.apps/src/main/content/jcr_root/apps/admin/components/contentview/template.vue b/admin-base/ui.apps/src/main/content/jcr_root/apps/admin/components/contentview/template.vue @@ -705,10 +705,10 @@ export default { event.dataTransfer.effectAllowed = '' } } else { - if (relMousePos.yPercentage <= 10 && dropLocation === 'before' && !isRoot) { + if (relMousePos['y%'] <= 10 && dropLocation === 'before' && !isRoot) { this.dropPosition = 'before' this.editable.class = 'drop-top' - } else if (relMousePos.yPercentage >= 90 && dropLocation === 'after' && !isRoot) { + } else if (relMousePos['y%'] >= 90 && dropLocation === 'after' && !isRoot) { this.dropPosition = 'after' this.editable.class = 'drop-bottom' } else if (dropLocation) { @@ -720,7 +720,7 @@ export default { } } } else if (!isRoot && !locked) { - if (relMousePos.yPercentage <= 43.5) { + if (relMousePos['y%'] <= 43.5) { this.dropPosition = 'before' this.editable.class = 'drop-top' } else { @@ -986,10 +986,10 @@ export default { return { width: offset.width, x: event.pageX - offset.left, - xPercentage: (event.pageX - offset.left) / offset.width * 100, + 'x%': (event.pageX - offset.left) / offset.width * 100, height: offset.height, y: event.pageY - offset.top - this.scrollTop, - yPercentage: (event.pageY - offset.top - this.scrollTop) / offset.height * 100 + 'y%': (event.pageY - offset.top - this.scrollTop) / offset.height * 100 } },
10
diff --git a/packages/tame-global-math-object/src/main.js b/packages/tame-global-math-object/src/main.js -const { defineProperties } = Object; +const { defineProperties, getOwnPropertyDescriptors } = Object; export default function tameGlobalMathObject() { - const throwingRandom = { + const safeMathDescs = getOwnPropertyDescriptors({ random() { throw Error('disabled'); }, - }.random; + }); defineProperties(Math, { random: { - value: throwingRandom, + value: safeMathDescs.random.value, enumerable: false, configurable: true, writable: true,
7
diff --git a/character-controller.js b/character-controller.js @@ -171,6 +171,9 @@ class Player extends THREE.Object3D { getActionsState() { return this.state.getArray(this.prefix + '.' + actionsMapName); } + getActionsArray() { + return Array.from(this.getActionsState()); + } getAvatarState() { return this.state.getMap(this.prefix + '.' + avatarMapName); }
0
diff --git a/webpack.config.js b/webpack.config.js @@ -217,15 +217,12 @@ const GOOGLESITEKIT_VERSION = googleSiteKitVersion const corePackages = [ 'api-fetch', - 'components', 'compose', 'data', 'dom-ready', 'element', - 'hooks', 'icons', 'keycodes', - 'scripts', 'url', ];
2
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md @@ -17,6 +17,7 @@ We use the following [labels](https://github.com/plotly/plotly.js/labels) to tra | `type: bug` | bug report confirmed by a plotly team member | | `type: regression` | bug that introduced a change in behavior from one version to the next | | `type: feature` | planned feature additions | +| `type: new trace type` | subset of `type: feature` reserved for planned new trace types | | `type: translation` | localization-related tasks | | `type: performance` | performance related tasks | | `type: maintenance` | source code cleanup resulting in no enhancement for users |
0
diff --git a/server/server.js b/server/server.js @@ -243,6 +243,7 @@ var Server = IgeClass.extend({ }, startWebServer: function () { const app = express(); + const port = process.env.PORT || 80; app.use(bodyParser.urlencoded({ extended: false })); // parse application/json @@ -345,7 +346,7 @@ var Server = IgeClass.extend({ return res.render('index.ejs', options); }); - app.listen(80, () => console.log(`Express listening on port 80!`)); + app.listen(port, () => console.log(`Express listening on port ${port}!`)); }, // run a specific game in this server @@ -359,8 +360,9 @@ var Server = IgeClass.extend({ } this.socket = {}; + var port = process.env.PORT || 80; - self.url = `http://${self.ip}:${self.gameServerPort}`; + self.url = `http://${self.ip}:${port}`; this.duplicateIpCount = {}; this.bannedIps = []; @@ -377,7 +379,7 @@ var Server = IgeClass.extend({ // Add the networking component ige.network.debug(self.isDebugging); // Start the network server - ige.network.start(self.gameServerPort, function (data) { + ige.network.start(self.port, function (data) { console.log('IgeNetIoComponent: listening to', self.url); console.log('connecting to BE:', global.beUrl);
13
diff --git a/sirepo/util.py b/sirepo/util.py @@ -22,4 +22,4 @@ def merge_dicts(base, derived, depth): merge_dicts(base[key], derived[key], depth-1) def err(obj, format='', *args, **kwargs): - return '{}: '.format(obj) + format.format(args, kwargs) + return '{}: '.format(obj) + format.format(*args, **kwargs)
1
diff --git a/lib/scheduler.js b/lib/scheduler.js @@ -52,7 +52,7 @@ class Scheduler { } restore(record) { - const { id, name, every, data, run } = record; + const { id, name, every, args, run } = record; this.stop(id); const task = { id, @@ -66,7 +66,7 @@ class Scheduler { executing: false, runCount: 0, timer: null, - data, + args, run, handler: findHandler(this.application.sandbox, run), }; @@ -107,7 +107,7 @@ class Scheduler { task.lastStart = Date.now(); task.executing = true; try { - task.result = await task.handler(task.data); + task.result = await task.handler(task.args); } catch (err) { task.error = err; }
10
diff --git a/docs/.vuepress/config.js b/docs/.vuepress/config.js @@ -869,7 +869,8 @@ module.exports = { }, '/zh/': { lang: 'zh-CN', - label: translate('language'), + label: translate('language', 'zh-CN'), + title: translate('ethereum', 'zh-CN'), nav: [ { text: translate('page-home', 'zh-CN'), link: '/zh/' }, {
13
diff --git a/assets/filters/mode7.js b/assets/filters/mode7.js @@ -5,10 +5,11 @@ Phaser.Filter.Mode7 = function (game) { this.uniforms.sin1 = {type: "1f", value: 1}; this.uniforms.sin2 = {type: "1f", value: 0}; this.uniforms.cos1 = {type: "1f", value: 0}; - this.uniforms.cos2 = {type: "1f", value: -1}; + this.uniforms.cos2 = {type: "1f", value: 1}; this.uniforms.scale = {type: "1f", value: .28}; this.uniforms.distance = {type: "1f", value: 1}; - this.uniforms.lookY = {type: "1f", value: 3.5}; + this.uniforms.lookY = {type: "1f", value: 4.5}; + this.uniforms.inclination = {type: "1f", value: 4}; this.fragmentSrc = [ "precision mediump float;", @@ -25,6 +26,7 @@ Phaser.Filter.Mode7 = function (game) { "uniform highp float scale;", "uniform highp float lookY;", + "uniform highp float inclination;", "uniform highp float distance;", "void main(void) {", @@ -32,7 +34,7 @@ Phaser.Filter.Mode7 = function (game) { " vec2 warped;", // perform mode7 transform on uvs - " warped = vec2(uv.x-0.5, 4) / vec2(uv.y + lookY, uv.y + lookY);", + " warped = vec2(uv.x-0.5, inclination) / vec2(-uv.y + lookY, -uv.y + lookY);", " warped.y -= distance;", " warped /= scale;", @@ -64,3 +66,21 @@ Object.defineProperty(Phaser.Filter.Mode7.prototype, 'angle', { this.uniforms.cos2.value = Math.cos(value - 0.5*Math.PI) } }); + +Object.defineProperty(Phaser.Filter.Mode7.prototype, 'inclination', { + get: function() { + return this.uniforms.inclination.value; + }, + set: function(value) { + this.uniforms.inclination.value = value; + } +}); + +Object.defineProperty(Phaser.Filter.Mode7.prototype, 'lookY', { + get: function() { + return this.uniforms.lookY.value; + }, + set: function(value) { + this.uniforms.lookY.value = value; + } +}); \ No newline at end of file
12
diff --git a/app/shared/components/Tools/Proxy.js b/app/shared/components/Tools/Proxy.js @@ -34,7 +34,7 @@ class ToolsProxy extends Component<Props> { return ( <Grid centered> <Grid.Column width={8} style={{ textAlign: 'center' }} > - {(keys && keys.key) ? + {(keys && keys.key || settings.walletMode === 'watch') ? ( <div> <Header>
11
diff --git a/packages/uikit-default/src/js/postmessage.js b/packages/uikit-default/src/js/postmessage.js @@ -19,6 +19,8 @@ if (self != top) { var parts = path.split("?"); var options = { "event": "patternLab.pageLoad", "path": parts[0] }; + patternData = document.getElementById('sg-pattern-data-footer').innerHTML; + patternData = JSON.parse(patternData); options.patternpartial = (patternData.patternPartial !== undefined) ? patternData.patternPartial : "all"; if (patternData.lineage !== "") { options.lineage = patternData.lineage;
4
diff --git a/articles/quickstart/spa/angular2/05-authorization.md b/articles/quickstart/spa/angular2/05-authorization.md @@ -74,7 +74,9 @@ The `userHasScopes` method can now be used alongside `isAuthenticated` to condit ## Protect Client-Side Routes -To completely prevent access to client-side routes based on a particular `scope`, use an `AuthGuard`. +For some routes in your application, you may want to only allow access if the user is authenticated. This check can be made with the `canActivate` hook. + +Create a new service called `AuthGuardService`. ```ts // src/app/auth/auth-guard.service.ts @@ -89,22 +91,17 @@ export class AuthGuardService implements CanActivate { constructor(public auth: AuthService, public router: Router) {} canActivate(): boolean { - if (this.auth.isAuthenticated()) { - if (this.auth.userHasScopes(['write:messages'])) { - return true; - } else { + if (!this.auth.isAuthenticated()) { this.router.navigate(['']); return false; } - } + return true; } } ``` -The guard implements the `CanActivate` interface which requires a method called `canActivate` on the service. This method returns `true` if the user is authenticated and has a `scope` of `write:messages`, and `false` if not. It also navigates the user to the home route if they don't have the appropriate `scope` to access the route. - -Use the `AuthGuard` in the routing definition. +In your route configuration, apply the `AuthGuardService` to the `canActivate` hook for whichever routes you wish to protect. ```ts // src/app/app.routes.ts @@ -113,7 +110,51 @@ import { AuthGuardService as AuthGuard } from './auth/auth-guard.service'; export const ROUTES: Routes = [ // ... - { path: 'admin', component: AdminComponent, canActivate: [AuthGuard] } + { path: 'profile', component: ProfileComponent, canActivate: [AuthGuard] }, + { path: 'ping', component: PingComponent, canActivate: [AuthGuard] }, +]; +``` + +The guard implements the `CanActivate` interface which requires a method called `canActivate` in the service. This method returns `true` if the user is authenticated and `false` if not. It also navigates the user to the home route if they aren't authenticated. + +### Limit Route Access Based on `scope` + +To prevent access to client-side routes based on a particular `scope`, create another service called `ScopeGuard`. This service should use `ActivatedRouteSnapshot` to check for a set of `expectedScopes` passed in the `data` key of the route configuration. + +```ts +// src/app/auth/scope-guard.service.ts + +import { Injectable } from '@angular/core'; +import { Router, CanActivate, ActivatedRouteSnapshot } from '@angular/router'; +import { AuthService } from './auth.service'; + +@Injectable() +export class ScopeGuardService implements CanActivate { + + constructor(public auth: AuthService, public router: Router) {} + + canActivate(route: ActivatedRouteSnapshot): boolean { + + const scopes = route.data.expectedScopes; + + if (!this.auth.isAuthenticated() || !this.auth.userHasScopes(scopes)) { + this.router.navigate(['']); + return false; + } + return true; + } + +} +``` + +```ts +// src/app/app.routes.ts + +import { ScopeGuardService as ScopeGuard } from './auth/scope-guard.service'; + +export const ROUTES: Routes = [ + // ... + { path: 'admin', component: AdminComponent, canActivate: [ScopeGuard], data: { expectedScopes: ['write:messages']} }, ]; ```
3
diff --git a/shared/js/background.js b/shared/js/background.js @@ -85,7 +85,7 @@ function Background() { if ((!settings.getSetting('hasSeenPostInstall')) && (!domain.match(regExpPostInstall))) { settings.updateSetting('hasSeenPostInstall', true) chrome.tabs.create({ - url: 'https://www.duckduckgo.com/app?post=1' + url: 'https://duckduckgo.com/app?post=1' }) } })
2
diff --git a/app/components/Account/AccountPage.jsx b/app/components/Account/AccountPage.jsx @@ -29,6 +29,12 @@ class AccountPage extends React.Component { accountUtils.getPossibleFees(this.props.account, "transfer"); } + componentWillReceiveProps(np) { + if (np.account) { + AccountActions.setCurrentAccount.defer(np.account.get("name")); + } + } + render() { let {linkedAccounts, account_name, searchAccounts, settings, wallet_locked, account, hiddenAssets} = this.props;
12
diff --git a/lib/plugins/physics.js b/lib/plugins/physics.js @@ -270,7 +270,7 @@ function inject (bot) { const tickListener = () => { ticks-- if (ticks === 0) { - this.bot.removeListener('physicTick', tickListener) + bot.removeListener('physicTick', tickListener) resolve() } }
2
diff --git a/app/models/carto/visualization.rb b/app/models/carto/visualization.rb @@ -39,8 +39,6 @@ class Carto::Visualization < ActiveRecord::Base has_many :likes, foreign_key: :subject has_many :shared_entities, foreign_key: :entity_id, inverse_of: :visualization - # TODO: duplicated with user_table? - belongs_to :table, class_name: Carto::UserTable, primary_key: :map_id, foreign_key: :map_id has_one :external_source has_many :unordered_children, class_name: Carto::Visualization, foreign_key: :parent_id @@ -85,8 +83,8 @@ class Carto::Visualization < ActiveRecord::Base def size # Only canonical visualizations (Datasets) have a related table and then count against disk quota, # but we want to not break and even allow ordering by size multiple types - if table - table.size + if user_table + user_table.size elsif type == TYPE_REMOTE && !external_source.nil? external_source.size else @@ -309,7 +307,7 @@ class Carto::Visualization < ActiveRecord::Base end def table_service - table.nil? ? nil : table.service + user_table.try(:service) end def has_read_permission?(user)
2
diff --git a/README.md b/README.md @@ -31,6 +31,21 @@ npm run start HiGlass provides an API for controlling the component from within a Javascript script. Complete documentation is availabe at [docs.higlass.io](http://docs.higlass.io/higlass_developer.html#public-api). Example: ``` +<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" type="text/css"> +<link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/styles/hglib.css" type="text/css"> + +<script src="https://cdnjs.cloudflare.com/ajax/libs/react/15.6.2/react.min.js"></script> +<script src="https://cdnjs.cloudflare.com/ajax/libs/react-dom/15.6.2/react-dom.min.js"></script> +<script src="https://cdnjs.cloudflare.com/ajax/libs/pixi.js/4.6.2/pixi.min.js"></script> +<script src="https://cdnjs.cloudflare.com/ajax/libs/react-bootstrap/0.31.0/react-bootstrap.min.js"></script> +<script src="https://unpkg.com/[email protected]/dist/scripts/hglib.js"></script> + +<div + id="development-demo" + style="position: absolute; left: 1rem; top: 1rem; bottom: 1rem; right: 1rem"> +</div> + +<script> var testViewConfig = { "editable": true, @@ -69,4 +84,10 @@ const api = hglib.createHgComponent( testViewConfig, { bounded: true } ); +</script> ``` + +### License + +HiGlass is provided under the MIT License. +
3
diff --git a/README.md b/README.md @@ -222,6 +222,8 @@ The component accepts the following props: |**`sort`**|boolean|true|Enable/disable sort on all columns. |**`sortFilterList`**|boolean|true|Enable/disable alphanumeric sorting of filter lists. |**`sortOrder`**|object|{}|Sets the column to sort by and its sort direction. To remove/reset sorting, input in an empty object. The object options are the column name and the direction: `name: string, direction: enum('asc', 'desc')` [Example](https://github.com/gregnb/mui-datatables/blob/master/examples/customize-columns/index.js) +|**`tableBodyHeight`**|string|'auto'|CSS string for the height of the table (ex: '500px', '100%', 'auto'). +|**`tableBodyMaxHeight`**|string||CSS string for the height of the table (ex: '500px', '100%', 'auto'). |**`textLabels`**|object||User provided labels to localize text. |**`viewColumns`**|boolean|true|Show/hide viewColumns icon from toolbar.
0
diff --git a/app.json b/app.json "scripts": { }, "env": { + "HEROKU_APP": "REVIEW", + "NPM_CONFIG_PRODUCTION": "false", + "NODE_MODULES_CACHE": "false" }, "formation": { }, ], "buildpacks": [ - + { + "url": "heroku/nodejs" + } ] }
12
diff --git a/app/addons/replication/controller.js b/app/addons/replication/controller.js @@ -249,6 +249,8 @@ export default class ReplicationController extends React.Component { getCrumbs () { if (this.state.tabSection === 'new replication') { return [{'name': 'Job Configuration'}]; + } else { + return [{'name': 'Replication'}]; } return [];
0
diff --git a/package.json b/package.json "release-legacy": "git pull origin 5.x && git push origin 5.x --tags && npm publish --tag legacy", "mongo": "node ./tools/repl.js", "test": "mocha --exit ./test/*.test.js ./test/typescript/main.test.js", - "test-types": "tsd", + "test-typings": "tsd", "tdd": "mocha ./test/*.test.js ./test/typescript/main.test.js --inspect --watch --recursive --watch-files ./**/*.js", "test-cov": "nyc --reporter=html --reporter=text npm test" },
10
diff --git a/example/ionExample.js b/example/ionExample.js @@ -141,7 +141,11 @@ function reinstantiateTiles() { let url = hashUrl || '../data/tileset.json'; - url = isInt( hashUrl ) ? hashUrl : url; + if ( hashUrl ) { + + params.ionAssetId = isInt( hashUrl ) ? hashUrl : ''; + + } if ( tiles ) {
12
diff --git a/packages/app/test/cypress/integration/60-home/60-home--home.spec.ts b/packages/app/test/cypress/integration/60-home/60-home--home.spec.ts @@ -11,7 +11,10 @@ context('Access Home', () => { it('Visit home', () => { cy.visit('/dummy'); cy.waitUntilSkeletonDisappear(); - cy.getByTestid('personal-dropdown-button').as('dropdown').should('be.visible').click() + cy.get('.grw-personal-dropdown').as('dropdown').should('be.visible').click() + cy.get('@dropdown').within(()=>{ + cy.getByTestid('personal-dropdown-menu').should('have.css', 'display', 'block'); + }); cy.getByTestid('grw-personal-dropdown-menu-user-home').should('be.visible').click(); cy.waitUntilSkeletonDisappear();
13
diff --git a/lib/MongoLite/Database.php b/lib/MongoLite/Database.php @@ -322,11 +322,18 @@ class UtilArrayQuery { case '$eq' : $r = $a == $b; break; + case '$not' : case '$ne' : $r = $a != $b; break; + case '$gte' : + if ( (is_numeric($a) && is_numeric($b)) || (is_string($a) && is_string($b)) ) { + $r = $a >= $b; + } + break; + case '$gt' : if ( (is_numeric($a) && is_numeric($b)) || (is_string($a) && is_string($b)) ) { $r = $a > $b; @@ -334,11 +341,17 @@ class UtilArrayQuery { break; case '$lte' : + if ( (is_numeric($a) && is_numeric($b)) || (is_string($a) && is_string($b)) ) { + $r = $a <= $b; + } + break; + case '$lt' : if ( (is_numeric($a) && is_numeric($b)) || (is_string($a) && is_string($b)) ) { $r = $a < $b; } break; + case '$in' : if (is_array($a)) { $r = is_array($b) ? count(array_intersect($a, $b)) : false;
1
diff --git a/Source/ThirdParty/GltfPipeline/updateVersion.js b/Source/ThirdParty/GltfPipeline/updateVersion.js @@ -687,19 +687,62 @@ define([ } function moveByteStrideToBufferView(gltf) { + var bufferViews = gltf.bufferViews; + var bufferViewsToDelete = {}; ForEach.accessor(gltf, function(accessor) { - if (defined(accessor.byteStride)) { - var byteStride = accessor.byteStride; - if (byteStride !== 0) { - var bufferView = gltf.bufferViews[accessor.bufferView]; - if (defined(bufferView.byteStride) && bufferView.byteStride !== byteStride) { - // another accessor uses this with a different byte stride - bufferView = clone(bufferView); - accessor.bufferView = addToArray(gltf.bufferViews, bufferView); + var oldBufferViewId = accessor.bufferView; + if (!defined(bufferViewsToDelete[oldBufferViewId])) { + bufferViewsToDelete[oldBufferViewId] = true; + } + var bufferView = clone(bufferViews[oldBufferViewId]); + var accessorByteStride = accessor.byteStride; + if (defined(accessorByteStride)) { + bufferView.byteStride = accessorByteStride; + if (bufferView.byteStride !== 0) { + bufferView.byteLength = accessor.count * bufferView.byteStride; + } + bufferView.byteOffset += accessor.byteOffset; + accessor.byteOffset = 0; + delete accessor.byteStride; } - bufferView.byteStride = byteStride; + accessor.bufferView = addToArray(bufferViews, bufferView); + }); + + var bufferViewShiftMap = {}; + var bufferViewRemovalCount = 0; + ForEach.bufferView(gltf, function(bufferView, bufferViewId) { + if (defined(bufferViewsToDelete[bufferViewId])) { + bufferViewRemovalCount++; + } else { + bufferViewShiftMap[bufferViewId] = bufferViewId - bufferViewRemovalCount; } - delete accessor.byteStride; + }); + + var removedCount = 0; + for (var bufferViewId in bufferViewsToDelete) { + var index = parseInt(bufferViewId) - removedCount; + bufferViews.splice(index, 1); + removedCount++; + } + + ForEach.accessor(gltf, function(accessor) { + var accessorBufferView = accessor.bufferView; + if (defined(accessorBufferView)) { + accessor.bufferView = bufferViewShiftMap[accessorBufferView]; + } + }); + + ForEach.shader(gltf, function(shader) { + var shaderBufferView = shader.bufferView; + if (defined(shaderBufferView)) { + shader.bufferView = bufferViewShiftMap[shaderBufferView]; + } + }); + + ForEach.image(gltf, function(image) { + var imageBufferView = image.bufferView; + if (defined(imageBufferView)) { + image.bufferView = bufferViewShiftMap[imageBufferView]; } }); }
1
diff --git a/grocy.openapi.json b/grocy.openapi.json ], "parameters": [ { - "in": "path", + "in": "query", "name": "expiring_days", "required": false, "description": "The number of days in which products are considered expiring soon", "properties": { "amount": { "type": "number", - "format": "double", + "format": "number", "description": "The amount to add - please note that when tare weight handling for the product is enabled, this needs to be the amount including the container weight (gross), the amount to be posted will be automatically calculated based on what is in stock and the defined tare weight" }, "best_before_date": { }, "price": { "type": "number", - "format": "double", + "format": "number", "description": "The price per purchase quantity unit in configured currency" }, "location_id": { "type": "object", "properties": { "amount": { - "type": "double", + "type": "number", "description": "The amount to remove - please note that when tare weight handling for the product is enabled, this needs to be the amount including the container weight (gross), the amount to be posted will be automatically calculated based on what is in stock and the defined tare weight" }, "transaction_type": { }, "price": { "type": "number", - "format": "double", + "format": "number", "description": "If omitted, the last price of the product is used (only applies to added products)" } } "type": "object", "properties": { "amount": { - "type": "double", + "type": "number", "description": "The amount to mark as opened" }, "stock_entry_id": { }, "qu_factor_purchase_to_stock": { "type": "number", - "format": "double" + "format": "number" }, "tare_weight": { "type": "number", - "format": "double" + "format": "number" }, "barcode": { "type": "string", "type": "integer" }, "amount": { - "type": "double" + "type": "number" }, "best_before_date": { "type": "string", "description": "A unique id which references this stock entry during its lifetime" }, "price": { - "type": "double" + "type": "number" }, "open": { "type": "integer" }, "costs": { "type": "number", - "format": "double" + "format": "number" } }, "example": { }, "last_price": { "type": "number", - "format": "double" + "format": "number" }, "location": { "$ref": "#/components/schemas/Location" }, "spoil_rate_percent": { "type": "number", - "format": "double" + "format": "number" } }, "example": { }, "price": { "type": "number", - "format": "double" + "format": "number" } } }, }, "qu_factor_purchase_to_stock": { "type": "number", - "format": "double" + "format": "number" }, "barcode": { "type": "string", "type": "string" }, "amount": { - "type": "double", + "type": "number", "minimum": 0, "default": 0, "description": "The manual entered amount" "type": "integer" }, "amount": { - "type": "double" + "type": "number" }, "best_before_date": { "type": "string", "type": "integer" }, "amount": { - "type": "double" + "type": "number" + }, + "amount_aggregated": { + "type": "number" + }, + "amount_opened": { + "type": "number" + }, + "amount_opened_aggregated": { + "type": "number" }, "best_before_date": { "type": "string", "format": "date", "description": "The next best before date for this product" + }, + "is_aggregated_amount": { + "type": "boolean", + "description": "Indicates wheter this product has sub-products or not / if the fields `amount_aggregated` and `amount_opened_aggregated` are filled" } } }, "expiring_products": { "type": "array", "items":{ - "$ref": "#/components/schemas/Product" + "$ref": "#/components/schemas/CurrentStockResponse" } }, "expired_products": { "type": "array", "items": { - "$ref": "#/components/schemas/Product" + "$ref": "#/components/schemas/CurrentStockResponse" } }, "missing_products": { "type": "array", "items": { - "$ref": "#/components/schemas/Product" + "$ref": "#/components/schemas/CurrentStockResponse" } } }
1
diff --git a/Apps/Sandcastle/gallery/3D Tiles Next CDB Yemen.html b/Apps/Sandcastle/gallery/3D Tiles Next CDB Yemen.html // 3D Tiles Next converted from CDB of Aden, Yemen (CDB provided by Presagis) var terrainTileset = viewer.scene.primitives.add( new Cesium.Cesium3DTileset({ - url: Cesium.IonResource.fromAssetId(666748), + url: Cesium.IonResource.fromAssetId(667788), }) ); var buildingsTileset = viewer.scene.primitives.add(
3
diff --git a/src/lib/draw-and-pick.js b/src/lib/draw-and-pick.js @@ -325,6 +325,8 @@ function getPickedColors(gl, { // Make sure we clear scissor test and fbo bindings in case of exceptions // We are only interested in one pixel, no need to render anything else // Note that the callback here is called synchronously. + // Set blend mode for picking + // always overwrite existing pixel with [r,g,b,layerIndex] return withParameters(gl, { framebuffer: pickingFBO, scissorTest: true, @@ -338,15 +340,6 @@ function getPickedColors(gl, { // Clear the frame buffer gl.clear(GL.COLOR_BUFFER_BIT | GL.DEPTH_BUFFER_BIT); - // Set blend mode for picking - // always overwrite existing pixel with [r,g,b,layerIndex] - const settings = { - blend: true, - blendFunc: [gl.ONE, gl.ZERO, gl.CONSTANT_ALPHA, gl.ZERO], - blendEquation: gl.FUNC_ADD - }; - - withParameters(gl, settings, () => { // Render all pickable layers in picking colors layers.forEach((layer, layerIndex) => { if (!layer.isComposite && layer.props.visible && layer.props.pickable) { @@ -366,7 +359,6 @@ function getPickedColors(gl, { }); } }); - }); // Read color in the central pixel, to be mapped with picking colors const pickedColors = new Uint8Array(width * height * 4);
2
diff --git a/lib/plugins/aws/invokeLocal/index.js b/lib/plugins/aws/invokeLocal/index.js @@ -128,13 +128,17 @@ class AwsInvokeLocal { NODE_PATH: '/var/runtime:/var/task:/var/runtime/node_modules', }; - const credentialEnvVars = this.provider.cachedCredentials - ? { - AWS_ACCESS_KEY_ID: this.provider.cachedCredentials.accessKeyId, - AWS_SECRET_ACCESS_KEY: this.provider.cachedCredentials.secretAccessKey, - AWS_SESSION_TOKEN: this.provider.cachedCredentials.sessionToken, + const { cachedCredentials } = this.provider; + const credentialEnvVars = {}; + if (cachedCredentials.accessKeyId) { + credentialEnvVars.AWS_ACCESS_KEY_ID = cachedCredentials.accessKeyId; + } + if (cachedCredentials.secretAccessKey) { + credentialEnvVars.AWS_SECRET_ACCESS_KEY = cachedCredentials.secretAccessKey; + } + if (cachedCredentials.sessionToken) { + credentialEnvVars.AWS_SESSION_TOKEN = cachedCredentials.sessionToken; } - : {}; // profile override from config const profileOverride = this.provider.getProfile();
1
diff --git a/lib/utils/config/index.js b/lib/utils/config/index.js @@ -5,6 +5,7 @@ const p = require('path'); const os = require('os'); const _ = require('lodash'); const rc = require('rc'); +const chalk = require('chalk'); const writeFileAtomic = require('write-file-atomic'); const fileExistsSync = require('../fs/fileExistsSync'); const readFileSync = require('../fs/readFileSync'); @@ -18,6 +19,24 @@ if (process.env.SERVERLESS_PLATFORM_STAGE && process.env.SERVERLESS_PLATFORM_STA serverlessrcPath = p.join(os.homedir(), `.${rcFileBase}rc`); } +function storeConfig(config) { + try { + writeFileAtomic.sync(serverlessrcPath, JSON.stringify(config, null, 2)); + } catch (error) { + if (process.env.SLS_DEBUG) process.stdout.write(`${chalk.red(error.stack)}\n`); + process.stdout.write( + `Serverless: ${chalk.red(`Unable to store serverless config due to ${error.code} error`)}\n` + ); + try { + return JSON.parse(readFileSync(serverlessrcPath)); + } catch (readError) { + // Ignore + } + return {}; + } + return config; +} + function createConfig() { // set default config options const config = { @@ -35,8 +54,7 @@ function createConfig() { initialSetup.removeLegacyFrameworkIdFiles(); // save new config - writeFileAtomic.sync(serverlessrcPath, JSON.stringify(config, null, 2)); - return JSON.parse(readFileSync(serverlessrcPath)); + return storeConfig(config); } // check for global .serverlessrc file @@ -78,8 +96,7 @@ function set(key, value) { config.meta = config.meta || {}; config.meta.updated_at = Math.round(+new Date() / 1000); // write to .serverlessrc file - writeFileAtomic.sync(serverlessrcPath, JSON.stringify(config, null, 2)); - return config; + return storeConfig(config); } function deleteValue(key) { @@ -90,8 +107,7 @@ function deleteValue(key) { config = _.omit(config, key); } // write to .serverlessrc file - writeFileAtomic.sync(serverlessrcPath, JSON.stringify(config, null, 2)); - return config; + return storeConfig(config); } /* Get config value with object path */
7
diff --git a/src/controllers/chatTribes.ts b/src/controllers/chatTribes.ts @@ -38,12 +38,12 @@ export async function joinTribe(req, res) { const existing = await models.Chat.findOne({ where: { uuid, tenant } }) if (existing) { - console.log('[tribes] u are already in this tribe') + sphinxLogger.error('You are already in this tribe', logging.Tribes) return failure(res, 'cant find tribe') } if (!owner_pubkey || !group_key || !uuid) { - console.log('[tribes] missing required params') + sphinxLogger.error('missing required params', logging.Tribes) return failure(res, 'missing required params') } @@ -152,7 +152,7 @@ export async function joinTribe(req, res) { } export async function receiveMemberRequest(payload) { - if (logging.Network) console.log('=> receiveMemberRequest') + sphinxLogger.info('=> receiveMemberRequest', logging.Network) const { owner, chat, @@ -167,10 +167,10 @@ export async function receiveMemberRequest(payload) { } = await helpers.parseReceiveParams(payload) const tenant: number = owner.id - if (!chat) return console.log('no chat') + if (!chat) return sphinxLogger.error('no chat') const isTribe = chat_type === constants.chat_types.tribe - if (!isTribe || !isTribeOwner) return console.log('not a tribe') + if (!isTribe || !isTribeOwner) return sphinxLogger.error('not a tribe') var date = new Date() date.setMilliseconds(0) @@ -199,16 +199,19 @@ export async function receiveMemberRequest(payload) { theSender = createdContact } } - if (!theSender) return console.log('no sender') // fail (no contact key?) + if (!theSender) return sphinxLogger.error('no sender') // fail (no contact key?) - console.log('UPSERT', { + sphinxLogger.info([ + 'UPSERT', + { contactId: theSender.id, chatId: chat.id, role: constants.chat_roles.reader, status: constants.chat_statuses.pending, lastActive: date, lastAlias: senderAlias, - }) + }, + ]) // maybe check here manually???? try { await models.ChatMember.upsert({ @@ -346,7 +349,7 @@ export async function approveOrRejectMember(req, res) { if (!req.owner) return failure(res, 'no owner') const tenant: number = req.owner.id - console.log('=> approve or reject tribe member') + sphinxLogger.info('=> approve or reject tribe member') const msgId = parseInt(req.params['messageId']) const contactId = parseInt(req.params['contactId']) const status: ChatMemberStatus = req.params['status'] @@ -415,7 +418,7 @@ export async function receiveMemberApprove(payload) { sphinxLogger.info('-> receiveMemberApprove', logging.Network) const { owner, chat, sender, network_type } = await helpers.parseReceiveParams(payload) - if (!chat) return console.log('no chat') + if (!chat) return sphinxLogger.error('no chat') await chat.update({ status: constants.chat_statuses.approved }) const tenant: number = owner.id @@ -476,7 +479,7 @@ export async function receiveMemberReject(payload) { sphinxLogger.info('-> receiveMemberReject', logging.Network) const { owner, chat, sender, chat_name, network_type } = await helpers.parseReceiveParams(payload) - if (!chat) return console.log('no chat') + if (!chat) return sphinxLogger.error('no chat') await chat.update({ status: constants.chat_statuses.rejected }) const tenant: number = owner.id @@ -515,7 +518,7 @@ export async function receiveTribeDelete(payload) { sphinxLogger.info('-> receiveTribeDelete', logging.Network) const { owner, chat, sender, network_type } = await helpers.parseReceiveParams(payload) - if (!chat) return console.log('no chat') + if (!chat) return sphinxLogger.error('no chat') const tenant: number = owner.id // await chat.update({status: constants.chat_statuses.rejected}) // update on tribes server too @@ -552,7 +555,7 @@ export async function replayChatHistory(chat, contact, ownerRecord) { const tenant: number = owner.id sphinxLogger.info('-> replayHistory', logging.Tribes) if (!(chat && chat.id && contact && contact.id)) { - return console.log('[tribes] cant replay history') + return sphinxLogger.info('cant replay history', logging.Tribes) } try { @@ -647,7 +650,7 @@ export async function replayChatHistory(chat, contact, ownerRecord) { ) }) } catch (e) { - console.log('replayChatHistory ERROR', e) + sphinxLogger.error(['replayChatHistory ERROR', e]) } }
3
diff --git a/includes/Core/Permissions/Permissions.php b/includes/Core/Permissions/Permissions.php @@ -213,8 +213,8 @@ final class Permissions { // Special setup and authentication rules. if ( ( isset( $this->primitive_to_core[ $cap ] ) || isset( $this->meta_to_core[ $cap ] ) ) ) { // If setup has not yet been completed, require administrator capabilities for everything. - if ( self::MANAGE_OPTIONS !== $cap && ! $this->authentication->is_setup_completed() ) { - $caps[] = self::MANAGE_OPTIONS; + if ( self::SETUP !== $cap && ! $this->authentication->is_setup_completed() ) { + $caps[] = self::SETUP; } if ( ! in_array( $cap, array( self::AUTHENTICATE, self::SETUP ), true ) ) {
4
diff --git a/lib/tests/test.js b/lib/tests/test.js @@ -33,6 +33,7 @@ class Test { this.contracts = {}; this.events = new Events(); this.ready = true; + this.error = false; this.builtContracts = {}; this.compiledContracts = {}; @@ -111,13 +112,19 @@ class Test { } onReady(callback) { + const self = this; if (this.ready) { return callback(); } + if (this.error) { + return callback(this.error); + } this.events.once('ready', () => { + self.events.removeListener('deployError', () => {}); callback(); }); this.events.once('deployError', (err) => { + self.events.removeListener('ready', () => {}); callback(err); }); } @@ -180,9 +187,11 @@ class Test { self._deploy(options, (err, accounts) => { if (err) { self.events.emit('deployError', err); + self.error = err; return next(err); } self.ready = true; + self.error = false; self.events.emit('ready'); next(null, accounts); });
2
diff --git a/src/client/js/legacy/crowi.js b/src/client/js/legacy/crowi.js @@ -355,12 +355,13 @@ $(function() { }); $('#renamePageForm, #unportalize-form').submit(function(e) { // create name-value map + let name = $('input', this).val(); let nameValueMap = {}; $(this).serializeArray().forEach((obj) => { nameValueMap[obj.name] = obj.value; }); - const data = $(this).serialize() + `&socketClientId=${crowi.getSocketClientId()}`; + const data = $(this).serialize() + `&new_path=${name}&socketClientId=${crowi.getSocketClientId()}`; $.ajax({ type: 'POST', @@ -393,6 +394,7 @@ $(function() { }); $('#duplicatePageForm, #unportalize-form').submit(function(e) { // create name-value map + let name = $('input', this).val(); let nameValueMap = {}; $(this).serializeArray().forEach((obj) => { nameValueMap[obj.name] = obj.value; @@ -401,7 +403,7 @@ $(function() { $.ajax({ type: 'POST', url: '/_api/pages.duplicate', - data: $(this).serialize(), + data: $(this).serialize() + `&new_path=${name}`, dataType: 'json' }).done(function(res) { // error
10
diff --git a/docs/lambda_hooks/README.md b/docs/lambda_hooks/README.md @@ -57,12 +57,22 @@ Add importable content packages in the `./ui_imports/content` folder using two f - \<name>.json -- the JSON representation of the QnA documents to be imported (can be a file that was previous exported from Content Designer. - \<name>.txt -- a short tagline description of the content that will be displayed in the Content Designer listing. -## Preprocessing and postprocessing Lambda hooks +## Pre-processing and post-processing Lambda hooks +A Lambda hook can be called as the first step in the fulfillment pipeline (PREPROCESS), as part of processing a specific question (HOOK) or after processing has completed (POSTPROCESS ) and before the `userInfo` is saved to DynamoDB and the result has been sent back to the client. -You can also add Lambda hooks globally that run before (preprocessing) and after every question is run via the settings page. +You can add pre-processing and post-processing Lambda hooks (that run before preprocessing and after every question is run) via the `Settings` page. ![settings hooks](./images/pre_post_hook.png) + +## Lambda Hook SDK (Javascript) +Lambda hook SDK hides the internal and lower-level complexities of modifying the QnABot request and response, and provides a simple high-level code layer. +For more details on the supported methods refer to the [Lambda Hook SDK readme](../lambda_hook_sdk.MD). + +Additionally, with a QnABot deployment, the Lambda Hook SDK (Javascript) is also available as a Lambda Layer (with the layer name as: `JsLambdaHookSDK`), which can be included in a custom Lambda function. + +For an example implementation using Lambda Hook -- refer to this example [../../templates/examples/extensions/js_lambda_hooks/CreateRecentTopicsResponse/CreateRecentTopicsResponse.js] javascript file. + ## [](#notes)NOTES - The `Makefile` residing in the extensions folder creates separate zip packages for each separate Lambda hook function
3
diff --git a/src/pages/workspace/WorkspaceInvitePage.js b/src/pages/workspace/WorkspaceInvitePage.js @@ -81,7 +81,7 @@ class WorkspaceInvitePage extends React.Component { personalDetails, selectedOptions: [], userToInvite, - welcomeNote: this.getWelcomeNotePlaceholder(), + welcomeNote: this.getWelcomeNote(), }; } @@ -99,7 +99,7 @@ class WorkspaceInvitePage extends React.Component { * * @returns {Object} */ - getWelcomeNotePlaceholder() { + getWelcomeNote() { return this.props.translate('workspace.invite.welcomeNote', { workspaceName: this.props.policy.name, }); @@ -215,7 +215,7 @@ class WorkspaceInvitePage extends React.Component { const logins = _.map(this.state.selectedOptions, option => option.login); const filteredLogins = _.uniq(_.compact(_.map(logins, login => login.toLowerCase().trim()))); - Policy.invite(filteredLogins, this.state.welcomeNote || this.getWelcomeNotePlaceholder(), this.props.route.params.policyID); + Policy.invite(filteredLogins, this.state.welcomeNote || this.getWelcomeNote(), this.props.route.params.policyID); } /**
10
diff --git a/generate-constants.sh b/generate-constants.sh #!/bin/bash -ex -rm -fv ./resources/provision/node_modules.zip -rm -rf ./resources/provision/node_modules - -pushd ./resources/provision -npm install -popd - -pushd ./resources/provision/ -zip -r ./node_modules.zip ./node_modules/* -popd # Create the embedded version -rm -rf ./resources/provision/node_modules +#rm -rf ./resources/provision/node_modules go run $GOPATH/src/github.com/mjibson/esc/main.go \ -o ./CONSTANTS.go \ -private \ -pkg sparta \ ./resources -# Cleanup the zip file that we just embedded -unzip -vl ./resources/provision/node_modules.zip -rm -fv ./resources/provision/node_modules.zip - -# Create a secondary CONSTANTS_AWSBINARY.go file with empty content. The next step will insert the -# build tags at the head of each file so that they are mutually exclusive, similar to the -# lambdabinaryshims.go file +# Create a secondary CONSTANTS_AWSBINARY.go file with empty content. +# The next step will insert the +# build tags at the head of each file so that they are mutually exclusive go run $GOPATH/src/github.com/mjibson/esc/main.go \ -o ./CONSTANTS_AWSBINARY.go \ -private \ @@ -32,5 +18,5 @@ go run $GOPATH/src/github.com/mjibson/esc/main.go \ ./resources/awsbinary/README.md # Tag the builds... -go run ./resources/awsbinary/insertTags.go ./CONSTANTS !lambdabinary -go run ./resources/awsbinary/insertTags.go ./CONSTANTS_AWSBINARY lambdabinary \ No newline at end of file +go run ./cmd/insertTags/main.go ./CONSTANTS !lambdabinary +go run ./cmd/insertTags/main.go ./CONSTANTS_AWSBINARY lambdabinary
2
diff --git a/lib/grammars.coffee b/lib/grammars.coffee @@ -378,6 +378,14 @@ module.exports = command: "node" args: (context) -> [context.filepath] + 'JavaScript with JSX': + "Selection Based": + command: "node" + args: (context) -> ['-e', context.getCode()] + "File Based": + command: "node" + args: (context) -> [context.filepath] + "JavaScript for Automation (JXA)": "Selection Based": command: "osascript"
9
diff --git a/modules/Collections/bootstrap.php b/modules/Collections/bootstrap.php @@ -602,7 +602,7 @@ function cockpit_populate_collection(&$items, $maxlevel = -1, $level = 0, $field if (isset($v['_id'], $v['link'])) { $link = $v['link']; $items[$k] = cockpit('collections')->_resolveLinkedItem($v['link'], $v['_id'], $fieldsFilter); - $items[$k]['link'] = $link; + $items[$k]['_link'] = $link; $items[$k] = cockpit_populate_collection($items[$k], $maxlevel, $level, $fieldsFilter); } }
10
diff --git a/src/encoded/tests/test_audit_file.py b/src/encoded/tests/test_audit_file.py @@ -253,15 +253,6 @@ def test_audit_file_mismatched_paired_with(testapp, file1, file4): assert any(error['category'] == 'inconsistent paired_with' for error in errors_list) -def test_audit_file_size(testapp, file1): - res = testapp.get(file1['@id'] + '@@index-data') - errors = res.json['audit'] - errors_list = [] - for error_type in errors: - errors_list.extend(errors[error_type]) - assert any(error['category'] == 'missing file_size' for error in errors_list) - - def test_audit_file_missing_controlled_by(testapp, file3): res = testapp.get(file3['@id'] + '@@index-data') errors = res.json['audit']
2
diff --git a/docs/modules/casper.rst b/docs/modules/casper.rst @@ -1787,7 +1787,7 @@ Sets the maximum number of listeners that can be added for each type of listener .. note:: Incorrect registering of listeners in your casper scripts can result in a warning - message indicating that a possible EventEmitter lead has been detected. Ensure you + message indicating that a possible EventEmitter leak has been detected. Ensure you are adding listeners in the required way. If you need a listener that will be processed by all of your scripts then ensure it
1
diff --git a/packages/react-devtools-inline/webpack.config.js b/packages/react-devtools-inline/webpack.config.js @@ -95,6 +95,7 @@ module.exports = { loader: 'workerize-loader', options: { inline: true, + name: '[name]', }, }, {
7
diff --git a/server/game/gamesteps/forcedtriggeredabilitywindow.js b/server/game/gamesteps/forcedtriggeredabilitywindow.js @@ -145,6 +145,7 @@ class ForcedTriggeredAbilityWindow extends BaseStep { emitEvents() { this.choices = []; + this.events = _.reject(this.events, event => event.cancelled); _.each(this.events, event => { this.game.emit(event.name + ':' + this.abilityType, event, this); });
2
diff --git a/site/src/pages/HomePageNative.js b/site/src/pages/HomePageNative.js @@ -223,7 +223,7 @@ export default class HomePageNative extends Component { style={{ width: '100%', flexWrap: 'wrap' }} > - <Flex className={card} onClick={() => this.openLink('https://medium.com/@siddharthlatest/v2-ui-components-for-elasticsearch-23743d9a1070')}> + <Flex className={card} onClick={() => this.openLink('https://medium.appbase.io/build-your-next-react-native-app-with-reactivesearch-ce21829f3bf5')}> <div> <img src="images/rocket.png" alt="Data-driven UIs" /> </div> @@ -254,7 +254,7 @@ export default class HomePageNative extends Component { </div> </Flex> - <Flex className={card} onClick={() => this.openLink('https://opensource.appbase.io/reactive-manual/theming/themes.html')}> + <Flex className={card} onClick={() => this.openLink('https://opensource.appbase.io/reactive-manual/native/advanced/style.html')}> <div> <img src="images/configurablestyles.png" alt="Data-driven UIs" /> </div>
3
diff --git a/assets/js/components/setup/setup-proxy.js b/assets/js/components/setup/setup-proxy.js @@ -98,7 +98,7 @@ class SetupUsingProxy extends Component { <Button href={ proxySetupURL } onClick={ () => { - sendAnalyticsTrackingEvent( 'plugin_setup', 'signin_with_google' ); + sendAnalyticsTrackingEvent( 'plugin_setup', 'proxy_start_setup_landing_page' ); } } > { __( 'Start setup', 'google-site-kit' ) }
3
diff --git a/doc/index.md b/doc/index.md @@ -45,8 +45,8 @@ What objection.js **doesn't** give you: to you. knex has a great [migration tool](http://knexjs.org/#Migrations) that we recommend for this job. Check out the [example project](https://github.com/Vincit/objection.js/tree/master/examples/express-es6). -Objection.js uses Promises and coding practices that make it ready for the future. We use Well known -[OOP](https://en.wikipedia.org/wiki/Object-oriented_programming) techniques and ES2015 classes and inheritance +Objection.js uses Promises and coding practices that make it ready for the future. We use well known +[OOP](https://en.wikipedia.org/wiki/Object-oriented_programming) techniques, ES2015 classes, and inheritance in the codebase. You can use things like [async/await](http://jakearchibald.com/2014/es7-async-functions/) using node ">=7.6.0" or alternatively with a transpiler such as [Babel](https://babeljs.io/). Check out our [ES2015](https://github.com/Vincit/objection.js/tree/master/examples/express-es6) and [ESNext](https://github.com/Vincit/objection.js/tree/master/examples/express-es7) example projects.
7
diff --git a/packages/helpers/classes/mail.d.ts b/packages/helpers/classes/mail.d.ts @@ -152,7 +152,7 @@ export interface MailData { substitutionWrappers?: string[], isMultiple?: boolean, - dynamicTemplateData?: { [key: string]: string }, + dynamicTemplateData?: { [key: string]: any }, } export interface MailJSON {
11
diff --git a/source/views/controls/ButtonView.js b/source/views/controls/ButtonView.js @@ -285,7 +285,6 @@ const ButtonView = Class({ automatically double click everything (yep! that's a type of user), we won't trigger twice. This is important if you automatically select the next item after applying an action. - . */ noRepeatWithin: 200,
2
diff --git a/src/modules/router/tab.js b/src/modules/router/tab.js @@ -91,6 +91,7 @@ function tabLoad(tabRoute, loadOptions = {}) { const { url, content, el, template, templateUrl, component, componentUrl } = loadTabParams; // Component/Template Callbacks function resolve(contentEl) { + router.allowPageChange = true; if (!contentEl) return; if (typeof contentEl === 'string') { $newTabEl.html(contentEl);
11
diff --git a/resources/js/MusicKitInterop.js b/resources/js/MusicKitInterop.js @@ -15,20 +15,20 @@ const MusicKitInterop = { const nowPlayingItem = MusicKit.getInstance().nowPlayingItem; if (typeof nowPlayingItem != "undefined") { if (nowPlayingItem["type"] === "musicVideo") { - document.querySelector(`div[aria-label="Media Controls"]`).setAttribute('style', 'display: none !important'); + document.querySelector(`div[aria-label="Media Controls"]`).setAttribute('style', 'height: 25px !important'); } else { - document.querySelector(`div[aria-label="Media Controls"]`).setAttribute('style', 'display: flex !important'); + document.querySelector(`div[aria-label="Media Controls"]`).setAttribute('style', 'height: 55px !important'); } } } else { - document.querySelector(`div[aria-label="Media Controls"]`).setAttribute('style', 'display: flex !important'); + document.querySelector(`div[aria-label="Media Controls"]`).setAttribute('style', 'height: 55px !important'); try { const nowPlayingItem = MusicKit.getInstance().nowPlayingItem; if (typeof nowPlayingItem != "undefined") { if (nowPlayingItem["type"] === "musicVideo") { - document.querySelector(`div[aria-label="Media Controls"]`).setAttribute('style', 'display: none !important'); + document.querySelector(`div[aria-label="Media Controls"]`).setAttribute('style', 'height: 25px !important'); } else { - document.querySelector(`div[aria-label="Media Controls"]`).setAttribute('style', 'display: flex !important'); + document.querySelector(`div[aria-label="Media Controls"]`).setAttribute('style', 'height: 55px !important'); } } } catch (e) {
11
diff --git a/src/components/dashboard/ReceiveByQR.web.js b/src/components/dashboard/ReceiveByQR.web.js @@ -30,12 +30,26 @@ const ReceiveByQR = ({ screenProps }) => { log.debug({ url }) if (url === null) { - throw new Error('Invalid QR Code.') + store.set('currentScreen')({ + dialogData: { + visible: true, + title: 'Error', + message: 'Invalid QR Code. Probably this QR code is for sending GD', + dismissText: 'Ok' + } + }) } else { const { receiveLink, reason } = extractQueryParams(url) if (!receiveLink) { - throw new Error('No receiveLink available') + store.set('currentScreen')({ + dialogData: { + visible: true, + title: 'Error', + message: 'Invalid QR Code. Probably this QR code is for sending GD', + dismissText: 'Ok' + } + }) } setWithdrawParams({ receiveLink, reason })
14
diff --git a/source/api/utilities/blob.md b/source/api/utilities/blob.md @@ -47,6 +47,26 @@ cy.get('input[type=file]').then(function($input) { }) ``` +### Using an image fixture for upload + +```javascript +// programmatically upload the logo +cy.fixture('images/logo.png').as('logo') +cy.get('input[type=file]').then(function(el) { + // convert the logo base64 string to a blob + const blob = Cypress.Blob.base64StringToBlob(this.logo, 'image/png') + + const file = new File([blob], 'images/logo.png', { type: 'image/png' }) + const list = new DataTransfer() + + list.items.add(file) + const myFileList = list.files + + el[0].files = myFileList + el[0].dispatchEvent(new Event('change', { bubbles: true })) +}) +``` + ## Getting dataUrl string ### Create an `img` element and set its `src` to the `dataUrl`
4
diff --git a/contracts/ExternStateFeeToken.sol b/contracts/ExternStateFeeToken.sol @@ -252,8 +252,8 @@ contract ExternStateFeeToken is Proxyable, SafeDecimalMath { returns (bool) { // The fee is deducted from the amount sent - uint fee = safeSub(value, priceToSpend(value)); - uint amountReceived = safeSub(value, fee); + uint amountReceived = priceToSpend(value); + uint fee = safeSub(value, amountReceived); // Reduce the allowance by the amount we're transferring tokenState.setAllowance(from, sender, safeSub(tokenState.allowance(from, sender), value));
2
diff --git a/src/libs/actions/Policy.js b/src/libs/actions/Policy.js @@ -146,14 +146,16 @@ function create(name = '') { Report.fetchChatReportsByIDs([response.policy.chatReportIDAdmins, response.policy.chatReportIDAnnounce, response.ownerPolicyExpenseChatID]); // We are awaiting this merge so that we can guarantee our policy is available to any React components connected to the policies collection before we navigate to a new route. - return Onyx.merge(`${ONYXKEYS.COLLECTION.POLICY}${response.policyID}`, { - employeeList: getSimplifiedEmployeeList(response.policy.employeeList), + return Promise.all( + Onyx.merge(`${ONYXKEYS.COLLECTION.POLICY}${response.policyID}`, { id: response.policyID, type: response.policy.type, name: response.policy.name, role: CONST.POLICY.ROLE.ADMIN, outputCurrency: response.policy.outputCurrency, - }); + }), + Onyx.merge(`${ONYXKEYS.COLLECTION.POLICY_MEMBER_LIST}${response.policyID}`, getSimplifiedEmployeeList(response.policy.employeeList)), + ); }) .then(() => Promise.resolve(lodashGet(res, 'policyID'))); }
4
diff --git a/democracylab/settings.py b/democracylab/settings.py @@ -322,8 +322,8 @@ ENVIRONMENT_VARIABLE_WARNINGS = { } } -# TODO: Set to True in productions -# SESSION_COOKIE_SECURE = True +CSRF_COOKIE_SECURE = not DEBUG +SESSION_COOKIE_SECURE = not DEBUG CSRF_COOKIE_SAMESITE = 'None' SESSION_COOKIE_SAMESITE = 'None'
12
diff --git a/src/services/events/events.hooks.js b/src/services/events/events.hooks.js @@ -2,13 +2,13 @@ import { disallow } from 'feathers-hooks-common'; export default { before: { - all: [disallow('external')], + all: [], find: [], get: [], - create: [], - update: [], - patch: [], - remove: [], + create: [disallow('external')], + update: [disallow('external')], + patch: [disallow('external')], + remove: [disallow('external')], }, after: {
11
diff --git a/generators/server/templates/build.gradle.ejs b/generators/server/templates/build.gradle.ejs @@ -532,7 +532,6 @@ dependencies { liquibaseRuntime "com.oracle.ojdbc:ojdbc8" <%_ } _%> <%_ if (messageBroker === 'kafka') { _%> - testImplementation "org.testcontainers:database-commons" testImplementation "org.testcontainers:kafka" <%_ } _%> //jhipster-needle-gradle-dependency - JHipster will add additional dependencies here
2
diff --git a/packages/node_modules/@node-red/runtime/lib/storage/localfilesystem/projects/defaultFileSet.js b/packages/node_modules/@node-red/runtime/lib/storage/localfilesystem/projects/defaultFileSet.js @@ -18,7 +18,7 @@ var i18n = require("@node-red/util").i18n; module.exports = { "package.json": function(project) { - var package = { + var packageDetails = { "name": project.name, "description": project.summary||i18n._("storage.localfilesystem.projects.summary"), "version": "0.0.1", @@ -30,11 +30,11 @@ module.exports = { }; if (project.files) { if (project.files.flow) { - package['node-red'].settings.flowFile = project.files.flow; - package['node-red'].settings.credentialsFile = project.files.credentials; + packageDetails['node-red'].settings.flowFile = project.files.flow; + packageDetails['node-red'].settings.credentialsFile = project.files.credentials; } } - return JSON.stringify(package,"",4); + return JSON.stringify(packageDetails,"",4); }, "README.md": function(project) { var content = project.name+"\n"+("=".repeat(project.name.length))+"\n\n";
10
diff --git a/packages/cx/src/widgets/overlay/Dropdown.js b/packages/cx/src/widgets/overlay/Dropdown.js @@ -19,6 +19,8 @@ export class Dropdown extends Overlay { this.trackMouseX = true; this.trackMouseY = true; } + if (this.autoFocus && !this.hasOwnProperty(this.focusable)) + this.focusable = true; super.init(); }
11
diff --git a/lib/devstates.js b/lib/devstates.js @@ -2042,6 +2042,7 @@ const states = { min: 0, max: 100, unit: '%', + getter: payload => (payload.position !== null) ? payload.position : undefined, }, curtain_stop: { id: 'stop',
8
diff --git a/userscript.user.js b/userscript.user.js @@ -73133,6 +73133,11 @@ var $$IMU_EXPORT$$; waitingel.style.display = "none"; } + // camhub.cc (ublock origin blocks any setTimeout'd function with 'stop' in the name) + function dont_wait_anymore() { + stop_waiting(); + } + var not_allowed_timer = null; function cursor_not_allowed() { if (_nir_debug_) { @@ -73149,7 +73154,7 @@ var $$IMU_EXPORT$$; not_allowed_timer = null; if (waitingel_cursor === "not-allowed") - stop_waiting(); + dont_wait_anymore(); }, settings.mouseover_notallowed_duration); } @@ -75390,11 +75395,6 @@ var $$IMU_EXPORT$$; can_close_popup[1] = true; } - // camhub.cc (ublock origin blocks any setTimeout'd function with 'stop' in the name) - var dont_wait_anymore = function() { - stop_waiting(); - }; - setTimeout(function() { dont_wait_anymore(); }, 1);
7
diff --git a/lib/determine-basal/determine-basal.js b/lib/determine-basal/determine-basal.js @@ -535,7 +535,8 @@ var determine_basal = function determine_basal(glucose_status, currenttemp, iob_ rT.carbsReq = carbsReq; rT.reason += "~" + carbsReq + " add'l carbs req + 30m zero temp; "; } - if (bg < threshold) { // low glucose suspend mode: BG is < ~80 + // low glucose suspend mode: BG is < ~80 and IOB > 20m worth of basal + if (bg < threshold && iob_data.iob > profile.current_basal*sens*20/60) { rT.reason += "BG " + convert_bg(bg, profile) + "<" + convert_bg(threshold, profile) + "; "; if ((glucose_status.delta <= 0 && minDelta <= 0) || (glucose_status.delta < expectedDelta && minDelta < expectedDelta) || bg < 60 ) { // BG is still falling / rising slower than predicted
11
diff --git a/angular/projects/spark-angular/src/lib/components/sprk-card/directives/sprk-card-media/sprk-card-media.directive.spec.ts b/angular/projects/spark-angular/src/lib/components/sprk-card/directives/sprk-card-media/sprk-card-media.directive.spec.ts @@ -11,7 +11,7 @@ import { SprkCardMediaDirective } from './sprk-card-media.directive'; }) class TestComponent {} -describe('Spark Card Content Directive', () => { +describe('Spark Card Media Directive', () => { let component: TestComponent; let fixture: ComponentFixture<TestComponent>; let mediaElement0: HTMLElement;
3
diff --git a/packages/bitcore-wallet-service/src/config.ts b/packages/bitcore-wallet-service/src/config.ts @@ -140,12 +140,24 @@ module.exports = { // defaultUnit: 'btc', // publicTxUrlTemplate: { // btc: { - // livenet: 'https://insight.bitcore.io/#/BTC/mainnet/tx/{{txid}}', - // testnet: 'https://insight.bitcore.io/#/BTC/testnet/tx/{{txid}}', + // livenet: 'https://bitpay.com/insight/#/BTC/mainnet/tx/{{txid}}', + // testnet: 'https://bitpay.com/insight/#/BTC/testnet/tx/{{txid}}', // }, // bch: { - // livenet: 'https://insight.bitcore.io/#/BCH/mainnet/tx/{{txid}}', - // testnet: 'https://insight.bitcore.io/#/BCH/testnet/tx/{{txid}}', + // livenet: 'https://bitpay.com/insight/#/BCH/mainnet/tx/{{txid}}', + // testnet: 'https://bitpay.com/insight/#/BCH/testnet/tx/{{txid}}', + // }, + // eth: { + // livenet: 'https://etherscan.io/tx/{{txid}}', + // testnet: 'https://kovan.etherscan.io/tx/{{txid}}', + // }, + // xrp: { + // livenet: 'https://xrpscan.com/tx/{{txid}}', + // testnet: 'https://test.bithomp.com/explorer//tx/{{txid}}', + // }, + // doge: { + // livenet: 'https://blockchair.com/dogecoin/transaction/{{txid}}', + // testnet: 'https://sochain.com/tx/DOGETEST/{{txid}}', // } // }, // },
3
diff --git a/src/govuk/components/input/input.yaml b/src/govuk/components/input/input.yaml @@ -88,7 +88,7 @@ params: - name: classes type: string required: false - description: Classes to add to the form group (e.g. to show error state for the whole group) + description: Classes to add to the form group (for example to show error state for the whole group) - name: classes type: string required: false
14
diff --git a/styles/override-editor.scss b/styles/override-editor.scss @@ -744,10 +744,15 @@ body { .components-button { justify-content: flex-start !important; + gap: 0.4rem; } .components-button:not(.is-pressed) { border: 1px solid #F2F2F2; + + &:hover { + border-color: var(--wp-admin-theme-color, #111111); + } } }
7
diff --git a/src/components/views/Sensors/GridDom/index.js b/src/components/views/Sensors/GridDom/index.js @@ -84,7 +84,10 @@ class GridDom extends Component { opacity: nextProps.pings ? this.contactPing(c, Date.now() - nextProps.pingTime) : 1, - destination: c.destination + destination: + this.state.movingContact === c.id + ? locations[c.id].destination + : c.destination }; } });
1
diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md **PR Checklist:** +- [ ] This PR is made against the dev branch (all proposed changes except releases should be against dev, not master). - [ ] This PR has **no** breaking changes. - [ ] I have added my changes to the [CHANGELOG](https://github.com/radiantearth/stac-spec/blob/dev/CHANGELOG.md) **or** a CHANGELOG entry is not required. - [ ] This PR affects the [STAC API spec](https://github.com/radiantearth/stac-api-spec), and I have opened issue/PR #XXX to track the change.
0
diff --git a/src/pages/home/report/ReportActionCompose.js b/src/pages/home/report/ReportActionCompose.js @@ -393,7 +393,7 @@ class ReportActionCompose extends React.Component { const newComment = EmojiUtils.replaceEmojis(comment, this.props.isSmallScreenWidth); this.setState((prevState) => { const newState = { - isCommentEmpty: !!newComment.match(/^(\s|`)*$/), + isCommentEmpty: !!newComment.match(/^(\s)*$/), value: newComment, }; if (comment !== newComment) { @@ -465,6 +465,7 @@ class ReportActionCompose extends React.Component { */ prepareCommentAndResetComposer() { const trimmedComment = this.comment.trim(); + console.log('!!!', trimmedComment, this.state.isCommentEmpty) // Don't submit empty comments or comments that exceed the character limit if (this.state.isCommentEmpty || trimmedComment.length > CONST.MAX_COMMENT_LENGTH) {
11
diff --git a/articles/client-auth/client-side-web.md b/articles/client-auth/client-side-web.md @@ -59,6 +59,7 @@ This endpoint supports the following query string parameters: | redirect_uri | The URL in your application where the user will be redirected to after they have authenticated, e.g. `https://YOUR_APP/callback`<br><br>**Note:** Be sure to add this URL to the list of **Allowed Callback URLs** in the **Settings** tab of your Client inside the [Auth0 Dashboard](${manage_url}) | | connection | This is an optional parameter which allows you to force the user to sign in with a specific connection. You can for example pass a value of `github` to send the user directly to GitHub to log in with their GitHub account.<br /><br /> If this parameter is not specified the user will be presented with the normal Auth0 Lock screen from where they can sign in with any of the available connections. You can see the list of configured connections on the **Connections** tab of your client. | | state | The state parameter will be sent back should be used for XSRF and contextual information (like a return url) | +| nonce | A string value which will be included in the response from Auth0, [used to prevent token replay attacks](/api-auth/tutorials/nonce). It is required for `response_type=id_token token`. | ## Handle the callback
0
diff --git a/src/components/Spinner.js b/src/components/Spinner.js -import React from 'react'; +import React, {Fragment} from 'react'; import PropTypes from 'prop-types'; -import {omit} from 'ramda'; +import {omit, type} from 'ramda'; import {Spinner as RSSpinner} from 'reactstrap'; const Spinner = props => { - const {children, ...otherProps} = props; - return <RSSpinner {...omit(['setProps'], otherProps)}>{children}</RSSpinner>; + const {children, loading_state, spinnerStyle, ...otherProps} = props; + let modSpinnerStyle; + if (children) { + // this spacing is consistent with the behaviour of dcc.Loading + // it can be overridden with spinnerStyle + modSpinnerStyle = {display: 'block', margin: '1rem auto'}; + } else { + modSpinnerStyle = {}; + } + modSpinnerStyle = {...modSpinnerStyle, ...spinnerStyle}; + if (!children || (loading_state && loading_state.is_loading)) { + return ( + <RSSpinner + style={modSpinnerStyle} + {...omit(['setProps', 'className', 'style'], otherProps)} + /> + ); + } + if (type(children) !== 'Object' || type(children) !== 'Function') { + return <Fragment>{children}</Fragment>; + } + return children; }; +Spinner._dashprivate_isLoadingComponent = true; + Spinner.propTypes = { /** * The ID of this component, used to identify dash components @@ -26,11 +48,21 @@ Spinner.propTypes = { */ style: PropTypes.object, + /** + * Inline CSS styles to apply to the spinner. + */ + spinnerStyle: PropTypes.object, + /** * Often used with CSS to style elements with common properties. */ className: PropTypes.string, + /** + * CSS class names to apply to the spinner. + */ + spinnerClassName: PropTypes.string, + /** * Spinner color, options: primary, secondary, success, info, warning, danger, * link. If not specified will default to text colour.
11
diff --git a/packages/inertia-vue3/src/head.js b/packages/inertia-vue3/src/head.js @@ -44,8 +44,10 @@ export default { ].indexOf(vnode.type) > -1 }, renderFullTag(vnode) { - if (typeof vnode.type === 'symbol') { + if (vnode.type.toString() === 'Symbol(Text)') { return vnode.children + } else if (vnode.type.toString() === 'Symbol(Comment)') { + return '' } let html = this.renderStartTag(vnode) if (vnode.children) {
1
diff --git a/apps/waypoints/lib.js b/apps/waypoints/lib.js exports.load = (num) => { - return require("Storage").readJSON(`waypoints${num?`.${num}`:""}.json`)||[{name:"NONE"}]; + return require("Storage").readJSON(`waypoints${num?".${num}":""}.json`)||[{name:"NONE"}]; }; exports.save = (waypoints,num) => { - require("Storage").writeJSON(`waypoints${num?`.${num}`:""}.json`, waypoints); + require("Storage").writeJSON(`waypoints${num?".${num}":""}.json`, waypoints); };
14
diff --git a/core/block_svg.js b/core/block_svg.js @@ -487,25 +487,6 @@ Blockly.BlockSvg.prototype.getBoundingRectangle = function() { return {topLeft: topLeft, bottomRight: bottomRight}; }; -/** - * Set block opacity for SVG rendering. - * @param {number} opacity Intended opacity, betweeen 0 and 1 - */ -Blockly.BlockSvg.prototype.setOpacity = function(opacity) { - this.opacity_ = opacity; - if (this.rendered) { - this.updateColour(); - } -}; - -/** - * Get block opacity for SVG rendering. - * @return {number} Intended opacity, betweeen 0 and 1 - */ -Blockly.BlockSvg.prototype.getOpacity = function() { - return this.opacity_; -}; - /** * Set whether the block is collapsed or not. * @param {boolean} collapsed True if collapsed.
2
diff --git a/home.scn b/home.scn { "objects": [ + { + "name": "home", + "position": [0, 0, 0], + "quaternion": [0, 0, 0, 1], + "scale": [1, 1, 1], + "start_url": "https://avaer.github.io/home/home.glb", + "physics": true + }, { "name": "physicscube", "position": [0, 0, 0],
0
diff --git a/tests/operations/index.mjs b/tests/operations/index.mjs @@ -86,8 +86,6 @@ import "./tests/Media"; // Cannot test operations that use the File type yet //import "./tests/SplitColourChannels"; -import "./tests/nodeApi/nodeApi"; -import "./tests/nodeApi/ops"; let allTestsPassing = true; const testStatusCounts = {
2
diff --git a/.travis.yml b/.travis.yml @@ -33,7 +33,7 @@ script: npm i -q --no-save gemini@^4.0.0 gemini-sauce gemini-polyserve && gemini test test/visual && gemini test test/visual -c .gemini-chrome.yml; else - wct --env saucelabs; + wct --env saucelabs:$TEST_SUITE; fi; else xvfb-run -s '-screen 0 1024x768x24' wct; @@ -49,7 +49,7 @@ script: magi p3-convert --out . --import-style=name && yarn install --flat && if [[ "$TRAVIS_EVENT_TYPE" != "pull_request" && "$TRAVIS_BRANCH" != quick/* ]]; then - wct --module-resolution=node --npm --env saucelabs; + wct --module-resolution=node --npm --env saucelabs:$TEST_SUITE; else xvfb-run -s '-screen 0 1024x768x24' wct --module-resolution=node --npm; fi;
4
diff --git a/tests/date-picker/date-picker.test.jsx b/tests/date-picker/date-picker.test.jsx @@ -14,7 +14,7 @@ import { createMountNode, destroyMountNode } from '../enzyme-helpers'; // Import your internal dependencies (for example): import Datepicker from '../../components/date-picker'; import Input from '../../components/forms/input'; -import KEYS from '../../utilities/keys'; +import KEYS from '../../utilities/KEYS'; /* Set Chai to use chaiEnzyme for enzyme compatible assertions: * https://github.com/producthunt/chai-enzyme
13
diff --git a/website/src/_posts/2018-12-0.29.md b/website/src/_posts/2018-12-0.29.md --- -title: "Uppy 0.29" +title: "Uppy 0.29: Separate Core and Plugin styles, React Native in tus-js-client" date: 2018-12-11 author: arturi image: "https://uppy.io/images/blog/0.29/uppy-core-plugins-separate-styles.jpg"
0
diff --git a/docs/providers/aws/events/alexa-skill.md b/docs/providers/aws/events/alexa-skill.md @@ -14,9 +14,10 @@ layout: Doc ## Event definition -This will enable your Lambda function to be called by an Alexa Skill kit. -`amzn1.ask.skill.xx-xx-xx-xx-xx` is a skill ID for Alexa Skills kit. You receive a skill ID once you register and create a skill in [Amazon Developer Console](https://developer.amazon.com/). -After deploying, add your deployed Lambda function ARN to which this event is attached to the Service Endpoint under Configuration on Amazon Developer Console. +This definition will enable your Lambda function to be called by an Alexa Skill kit. + +`amzn1.ask.skill.xx-xx-xx-xx-xx` is an example skill ID for the Alexa Skills kit. You will receive a skill ID once you register and create a skill in the [Amazon Developer Console](https://developer.amazon.com/). +After deploying, add your deployed Lambda function ARN associated with this event to the Service Endpoint under Configuration on your Amazon Developer Console. ```yml functions: @@ -26,14 +27,13 @@ functions: - alexaSkill: amzn1.ask.skill.xx-xx-xx-xx-xx ``` -You can find detailed guides on how to create an Alexa Skill with Serverless using NodeJS [here](https://github.com/serverless/examples/tree/master/aws-node-alexa-skill) as well as in combination with Python [here](https://github.com/serverless/examples/tree/master/aws-python-alexa-skill). +You can find detailed guides on how to create an Alexa Skill with Serverless using Node.js [here](https://github.com/serverless/examples/tree/master/aws-node-alexa-skill) as well as in combination with Python [here](https://github.com/serverless/examples/tree/master/aws-python-alexa-skill). ## Enabling / Disabling **Note:** `alexaSkill` events are enabled by default. -This will create and attach a alexaSkill event for the `mySkill` function which is disabled. If enabled it will call -the `mySkill` function by an Alexa Skill. +This will create and attach a disabled alexaSkill event for the `mySkill` function. If `enabled` is set to `true`, the attached alexaSkill will execute the function. ```yaml functions: @@ -47,8 +47,8 @@ functions: ## Backwards compatibility -Previous syntax of this event didn't require a skill ID as parameter, but according to [Amazon's documentation](https://developer.amazon.com/docs/custom-skills/host-a-custom-skill-as-an-aws-lambda-function.html#configuring-the-alexa-skills-kit-trigger) you should restrict your lambda function to be executed only by your skill. +The previous syntax of this event didn't require a skill ID as parameter, but according to [Amazon's documentation](https://developer.amazon.com/docs/custom-skills/host-a-custom-skill-as-an-aws-lambda-function.html#configuring-the-alexa-skills-kit-trigger) you should restrict your lambda function to be executed only by your skill. -Omitting the skill id will make your Lambda function available for the public, allowing any other skill developer to invoke it. +Omitting the skill id will make your Lambda function publically available, which will allow any other skill developer to invoke it. -(This is important, as [opposing to custom HTTPS endpoints](https://developer.amazon.com/docs/custom-skills/handle-requests-sent-by-alexa.html#request-verify), there's no way to validate the request was sent by your skill.) +(This is important, as [opposed to custom HTTPS endpoints](https://developer.amazon.com/docs/custom-skills/handle-requests-sent-by-alexa.html#request-verify), there's no way to validate the request was sent by your skill.)
7
diff --git a/js/views/external_agent_support.js b/js/views/external_agent_support.js @@ -72,16 +72,31 @@ define(["../globals", "underscore"], function(Globals, _) { } } + function determineCanonicalLinkHref(contentWindow) { + // Only grab the href if there's no potential cross-domain violation + // and the reader application URL has a CFI value in a 'goto' query param. + var isSameDomain = Object.keys(contentWindow).indexOf('document') !== -1; + if (isSameDomain && contentWindow.location.search.match(/goto=.*cfi/i)) { + return contentWindow.location.href.split("#")[0]; + } + } + + function getContentDocumentCanonicalLink(contentDocument) { + var contentDocWindow = contentDocument.defaultView; + if (contentDocWindow && (contentDocWindow.parent|| contentDocWindow.top)) { + var parentWindowCanonicalHref = determineCanonicalLinkHref(contentDocWindow.parent); + var topWindowCanonicalHref = determineCanonicalLinkHref(contentDocWindow.top); + return topWindowCanonicalHref || parentWindowCanonicalHref; + } + } + function injectAppUrlAsCanonicalLink(contentDocument, spineItem) { if (contentDocument.defaultView && contentDocument.defaultView.parent) { - var parentWindow = contentDocument.defaultView.parent; - var isParentInSameDomain = Object.keys(parentWindow).indexOf('document') !== -1; - // Only do this if there's no potential cross-domain violation - // and the reader application URL has a CFI value in a 'goto' query param. - if (isParentInSameDomain && parentWindow.location.search.match(/goto=.*cfi/i)) { + var canonicalLinkHref = getContentDocumentCanonicalLink(contentDocument); + if (canonicalLinkHref) { var link = contentDocument.createElement('link'); link.setAttribute('rel', 'canonical'); - link.setAttribute('href', parentWindow.location.href); + link.setAttribute('href', canonicalLinkHref); contentDocument.head.appendChild(link); contentDocumentStates[spineItem.idref].canonicalLinkElement = link; } @@ -157,13 +172,10 @@ define(["../globals", "underscore"], function(Globals, _) { if (contentDocument && state) { - if (state.canonicalLinkElement && - contentDocument.defaultView && - contentDocument.defaultView.parent) { - var parentWindow = contentDocument.defaultView.parent; - var isParentInDifferentDomain = 'document' in Object.keys(parentWindow); - if (!isParentInDifferentDomain) { - state.canonicalLinkElement.setAttribute('href', parentWindow.location.href); + if (state.canonicalLinkElement) { + var canonicalLinkHref = getContentDocumentCanonicalLink(contentDocument); + if (canonicalLinkHref) { + state.canonicalLinkElement.setAttribute('href', canonicalLinkHref); } }
4
diff --git a/packages/app/src/components/Sidebar/PageTree/Item.tsx b/packages/app/src/components/Sidebar/PageTree/Item.tsx @@ -181,9 +181,6 @@ const Item: FC<ItemProps> = (props: ItemProps) => { return; } - if (pagePathUtils.isUsersProtectedPages(page.path)) { - return toastError(t('pagetree.forbidden_to_move_target_page')); - } const newPagePath = getNewPathAfterMoved(droppedPage.path, page.path); @@ -229,7 +226,10 @@ const Item: FC<ItemProps> = (props: ItemProps) => { }, canDrop: (item) => { const { page: droppedPage } = item; - return canMoveUnderNewParent(droppedPage, page); + if (page.path == null) { + return false; + } + return canMoveUnderNewParent(droppedPage, page) && !pagePathUtils.isUsersProtectedPages(page.path); }, collect: monitor => ({ isOver: monitor.isOver(),
7
diff --git a/module/gurps.js b/module/gurps.js @@ -206,15 +206,15 @@ GURPS.hitlocationRolls = { "Eyeslit (in helmet)": { penalty: -10}, "Skull": { roll: "3-4", penalty: -7}, "Face": { roll: "5", penalty: -5}, - "Nose": { penalty: -7, desc: "front only, miss by 1 hit chest"}, - "Jaw": { penalty: -6, desc: "front only, miss by 1 hit chest"}, - "Neck Vein/Artery": { penalty: -8, desc: "miss by 1 hit neck"}, - "Limb Vein/Artery": { penalty: -5, desc: "miss by 1 hit limb"}, + "Nose": { penalty: -7, desc: "front only, *hit chest"}, + "Jaw": { penalty: -6, desc: "front only, *hit chest"}, + "Neck Vein/Artery": { penalty: -8, desc: "*hit neck"}, + "Limb Vein/Artery": { penalty: -5, desc: "*hit limb"}, "Right Leg": { roll: "6-7", penalty: -2}, "Right Arm": { roll: "8", penalty: -2}, "Torso": { roll: "9-10", penalty: 0}, "Vitals": { roll: "-", penalty: -3, desc: "IMP/PI* only" }, - "Vitals (Heart)": {penalty: -5, desc: "IMP/PI* only"}, + "Vitals, Heart": {penalty: -5, desc: "IMP/PI* only"}, "Groin": { roll: "11", penalty: -3}, "Left Arm": { roll: "12", penalty: -2}, "Left Leg": { roll: "13-14", penalty: -2}, @@ -445,40 +445,40 @@ GURPS.CoverHitlocModifiers = [ "-4 to hit, Head and shoulders exposed", "-3 to hit, Body half exposed", "-2 to hit, Behind light cover", - "-4 to hit, Behind human-sized figure (per figure)", + "-4 to hit, Behind same-sized figure", "-4 to hit, Lying prone without cover", - "-5 to hit, Lying prone, minimum cover, head up", - "-7 to hit, Lying prone, minimum cover, head down", + "-5 to hit, Lying prone, some cover, head up", + "-7 to hit, Lying prone, some cover, head down", "-2 to hit, Crouching or kneeling, no cover", "-4 to hit, firing through occupied hex", - "*Hit Locations" + "*Hit Locations (miss by one *)" ]; GURPS.SizeModifiers = [ - "Size Modifier (Melee: Difference, Ranged: Absolute)", - "-10 0.05 yard (1.8\")", - "-9 0.07 yard (2.5\")", - "-8 0.1 yard (3.5\")", - "-7 0.15 yard (5\")", - "-6 0.2 yard (7\")", - "-5 0.3 yard (10\")", - "-4 0.5 yard (18\")", - "-3 0.7 yard (2')", - "-2 1 yard (3')", - "-1 1.5 yards (4.5')", - "+0 2 yards (6')", - - "+1 3 yards (9')", - "+2 5 yards (15')", - "+3 7 yards (21')", - "+4 10 yards (30')", - "+5 15 yards (45')", - "+6 20 yards (60')", - "+7 30 yards (90')", - "+8 50 yards (150')", - "+9 70 yards (210')", - "+10 100 yards (300')", - "+11 150 yards (450')" + "Size Modifier", + "-10 Size 0.05 yard (1.8\")", + "-9 Size 0.07 yard (2.5\")", + "-8 Size 0.1 yard (3.5\")", + "-7 Size 0.15 yard (5\")", + "-6 Size 0.2 yard (7\")", + "-5 Size 0.3 yard (10\")", + "-4 Size 0.5 yard (18\")", + "-3 Size 0.7 yard (2')", + "-2 Size 1 yard (3')", + "-1 Size 1.5 yards (4.5')", + "+0 Size 2 yards (6')", + + "+1 Size 3 yards (9')", + "+2 Size 5 yards (15')", + "+3 Size 7 yards (21')", + "+4 Size 10 yards (30')", + "+5 Size 15 yards (45')", + "+6 Size 20 yards (60')", + "+7 Size 30 yards (90')", + "+8 Size 50 yards (150')", + "+9 Size 70 yards (210')", + "+10 Size 100 yards (300')", + "+11 Size 150 yards (450')" ]; for (let loc in GURPS.hitlocationRolls) {
1