code
stringlengths 122
4.99k
| label
int64 0
14
|
---|---|
diff --git a/lib/assets/javascripts/new-dashboard/pages/Data.vue b/lib/assets/javascripts/new-dashboard/pages/Data.vue @@ -192,6 +192,7 @@ export default {
params: this.$route.params,
query: {
...this.$route.query,
+ page: 1,
order: orderParams.order,
order_direction: orderParams.direction
}
| 12 |
diff --git a/tests/e2e/specs/editor/media/insertMediaFromLibrary.js b/tests/e2e/specs/editor/media/insertMediaFromLibrary.js @@ -50,12 +50,12 @@ describe('Inserting Media from Media Library', () => {
// Clicking will only act on the first element.
await expect(page).toClick('[data-testid="mediaElement"]');
- await expect(page).toMatchElement('#media-search-input');
- await page.type('#media-search-input', 'video');
+ await expect(page).toMatchElement('input[placeholder="Search"]');
+ await page.type('input[placeholder="Search"]', 'video');
// First match is for the background element, second for the image.
await expect(page).toMatchElement(
- '[data-testid="frameElement"]:nth-of-type(2)'
+ '[data-testid="frameElement"]:nth-of-type(1)'
);
await percySnapshot(page, 'Inserting Media from Media Library');
| 7 |
diff --git a/src/js/utils/createPopperElement.js b/src/js/utils/createPopperElement.js @@ -48,7 +48,7 @@ export default function createPopperElement(id, title, options) {
if (arrowType === 'round') {
arrow.classList.add('tippy-roundarrow')
arrow.innerHTML =
- '<svg viewBox="0 0 24 8" xmlns="http://www.w3.org/2000/svg"><path d="M1 8s4.577-.019 7.253-4.218c2.357-3.698 5.175-3.721 7.508 0C18.404 7.997 23 8 23 8H1z"/></svg>'
+ '<svg viewBox="0 0 24 8" xmlns="http://www.w3.org/2000/svg"><path d="M3 8s2.021-.015 5.253-4.218C9.584 2.051 10.797 1.007 12 1c1.203-.007 2.416 1.035 3.761 2.782C19.012 8.005 21 8 21 8H3z"/></svg>'
} else {
arrow.classList.add('tippy-arrow')
}
| 7 |
diff --git a/public/javascripts/Choropleth.js b/public/javascripts/Choropleth.js @@ -81,13 +81,7 @@ function Choropleth(_, $, difficultRegionIds, params, layers, polygonData, polyg
if (params.choroplethType === 'results') {
return getRegionStyleFromIssueCount(rates[i])
} else {
- return {
- color: '#888',
- weight: 1,
- opacity: 0.25,
- fillColor: getColor(100.0 * rates[i].rate),
- fillOpacity: 0.35 + (0.4 * rates[i].rate)
- }
+ return getRegionStyleFromCompletionRate(rates[i]);
}
}
}
@@ -251,7 +245,7 @@ function Choropleth(_, $, difficultRegionIds, params, layers, polygonData, polyg
/**
* This function finds the color for a specific region of the accessibility choropleth.
*
- * @param {*} rate Object from which information about labels is retrieved.
+ * @param {*} polygonData Object from which information about labels is retrieved.
*/
function getRegionStyleFromIssueCount(polygonData) {
var totalIssues = 0;
@@ -272,6 +266,21 @@ function Choropleth(_, $, difficultRegionIds, params, layers, polygonData, polyg
}
}
+ /**
+ * This function finds the color for a specific region of the choropleth.
+ *
+ * @param {*} polygonData Object from which information about labels is retrieved.
+ */
+ function getRegionStyleFromCompletionRate(polygonData) {
+ return {
+ color: '#888',
+ weight: 1,
+ opacity: 0.25,
+ fillColor: getColor(100.0 * polygonData.rate),
+ fillOpacity: 0.35 + (0.4 * polygonData.rate)
+ }
+ }
+
/**
* This function sets the specific popup content of each region of the accessibility choropleth.
*
| 3 |
diff --git a/docs/common/changelog.md b/docs/common/changelog.md @@ -18,6 +18,10 @@ this will be evened out from v24
- Upgrade rnkiwimobile to version `0.0.43` or `0.0.44`, both are compatible with this target-version. The latter contains a patch in the initialization of code-push to fix a crash when upating fails.
+### v33
+
+- Log all graphql errors
+
### v29
- Set statusbar background color on hotel detail screen, MOBILE-2920
@@ -42,6 +46,10 @@ this will be evened out from v24
## Target version 7.0.0
+### v32
+
+- Log all graphql errors
+
### 30
- Set statusbar background color on hotel detail screen, MOBILE-2920
| 0 |
diff --git a/src/utils.js b/src/utils.js @@ -78,9 +78,14 @@ function getExtension(filename)
function getFileName(filePath)
{
- const split = filePath.toLowerCase().split("/");
+ const split = filePath.split("/");
return split[split.length - 1];
}
+function getFileNameWithoutExtension(filePath)
+{
+ return getFileName(filePath).split(".")[0];
+}
+
// marker interface used to for parsing the uniforms
class UniformStruct { }
| 7 |
diff --git a/js/bootstrap-select.js b/js/bootstrap-select.js that.viewObj._currentLis[that.viewObj.currentliObj[that.activeIndex]] = $active.addClass('active')[0].outerHTML;
- if (that.activeIndex && that.activeIndex !== that.selectedIndex && $selected.length) {
+ if (that.activeIndex && that.activeIndex !== that.selectedIndex && $selected && $selected.length) {
that.viewObj._currentLis[that.viewObj.currentliObj[that.selectedIndex]] = $selected.removeClass('active')[0].outerHTML;
}
}
- if (that.prevActiveIndex !== undefined && that.prevActiveIndex !== that.activeIndex && that.prevActiveIndex !== that.selectedIndex && $prevActive) {
+ if (that.prevActiveIndex !== undefined && that.prevActiveIndex !== that.activeIndex && that.prevActiveIndex !== that.selectedIndex && $prevActive && $prevActive.length) {
that.viewObj._currentLis[that.viewObj.currentliObj[that.prevActiveIndex]] = $prevActive.removeClass('active')[0].outerHTML;
}
if (!that.options.liveSearch) {
$lis.filter('.active').children('a').focus();
} else if (searchLis && init) {
- $lis.eq(0).addClass('active');
+ $lis.removeClass('active').eq(0).addClass('active');
}
that.doneScrolling = true;
var that = this,
$selectOptions = this.$element.find('option');
+ that.noScroll = false;
+
if (that.viewObj.visibleLis && that.viewObj.visibleLis.length) {
for (var i = 0; i < that.viewObj.visibleLis.length; i++) {
var li = that.viewObj.visibleLis[i],
*/
setSelected: function (index, selected) {
var liIndex = this.liObj[index],
- $lis = $(this._lis[liIndex]);
+ $lis = $(this._lis[liIndex]),
+ visibleLiIndex;
if (selected) this.selectedIndex = index;
$lis.toggleClass('selected', selected).find('a').attr('aria-selected', selected);
if ($lis.length) {
- // set this if not searching (should be automatically updated when searching, so don't need to do it again - would also cause duplicates to show in results)
- if (this.viewObj.currentliObj === this.liObj) {
- this.viewObj.visibleLis[liIndex - this.viewObj.position0] = $lis[0].outerHTML;
- }
+ visibleLiIndex = this.viewObj.currentliObj[index] - this.viewObj.position0;
+
+ if ($(this.viewObj.visibleLis[visibleLiIndex]).hasClass('active')) $lis.addClass('active');
+
+ this.viewObj.visibleLis[visibleLiIndex] = $lis[0].outerHTML;
$lis.toggleClass('active', selected && !this.multiple);
*/
setDisabled: function (index, disabled) {
var liIndex = this.liObj[index],
- $lis = $(this._lis[liIndex]);
+ $lis = $(this._lis[liIndex]),
+ visibleLiIndex;
if (disabled) {
- this.disabledIndex = index;
$lis.addClass('disabled').children('a').attr('href', '#').attr('tabindex', -1).attr('aria-disabled', true);
} else {
$lis.removeClass('disabled').children('a').removeAttr('href').attr('tabindex', 0).attr('aria-disabled', false);
}
if ($lis.length) {
- // set this if not searching (should be automatically updated when searching, so don't need to do it again - would also cause duplicates to show in results)
- if (this.viewObj.currentliObj === this.liObj) {
- this.viewObj.visibleLis[liIndex - this.viewObj.position0] = $lis[0].outerHTML;
- }
+ visibleLiIndex = this.viewObj.currentliObj[index] - this.viewObj.position0;
+
+ this.viewObj.visibleLis[visibleLiIndex] = $lis[0].outerHTML;
if (this._lis[liIndex] !== $lis[0].outerHTML) {
this._lis[liIndex] = $lis[0].outerHTML;
isActive,
$liActive,
rowRemainder = 2,
- selector = ':not(.disabled, .hidden, .dropdown-header, .divider)',
+ selector = ':not(.disabled, .dropdown-header, .divider)',
keyCodeMap = {
32: ' ',
48: '0',
that.$menuInner.data('prevIndex', index);
e.preventDefault();
- $liActive = $items.removeClass('active').eq(index).addClass('active');
+ that.findLis().removeClass('active');
+ $liActive = $items.eq(index).addClass('active');
if (e.keyCode == 40 || downOnTab) { // down
// check to see how many options are hidden at the bottom of the menu (1 or 2 depending on scroll position)
| 7 |
diff --git a/unlock-app/src/components/creator/CreatorLockForm.js b/unlock-app/src/components/creator/CreatorLockForm.js @@ -135,7 +135,7 @@ const CreatorLockForm = ({ hideAction, lock, saveLock }) => {
if (!isPositiveNumber(value) && value !== INFINITY) {
return 'The number of keys needs to be greater than 0'
}
- if (parseInt(value, 10) <= lock.outstandingKeys) {
+ if (parseInt(value, 10) < lock.outstandingKeys) {
return `The number of keys needs to be greater than existing number of keys (${lock.outstandingKeys})`
}
break
| 11 |
diff --git a/test/jasmine/tests/axes_test.js b/test/jasmine/tests/axes_test.js @@ -4382,24 +4382,28 @@ describe('Test axes', function() {
return d3Select(gd).select(sel).node().getBoundingClientRect()
}
- function assert_layout() {
- var title_top = getPos(gd, '.xtitle').top;
- var tick_bottom = getPos(gd, '.xtick').bottom;
- expect(title_top).toBeLessThan(tick_bottom);
+ function assertLayout() {
+ var titleTop = getPos(gd, '.xtitle').top;
+ var tickBottom = getPos(gd, '.xtick').bottom;
+ expect(tickBottom).toBeLessThan(titleTop);
}
// TODO: This is failing now.
// Is it maybe because there's overlap in these elements because of some padding?
// I'm also not sure that I've accessed the correct properties
var fig = require('@mocks/z-automargin-zoom.json');
+
Plotly.newPlot(gd, fig)
+ console.log(d3Select(gd).select('.xtitle').node().getBoundingClientRect().top)
+ console.log(d3Select(gd).select('.xtitle').node().getBoundingClientRect().bottom)
+
.then(function() {
- assert_layout();
+ assertLayout();
})
.then(function() {
return Plotly.relayout(gd, {'xaxis.range': [6, 14]});
})
.then(function() {
- assert_layout();
+ assertLayout();
})
.then(done, done.fail);
});
| 0 |
diff --git a/webaverse.js b/webaverse.js @@ -39,6 +39,7 @@ import renderSettingsManager from './rendersettings-manager.js';
import metaversefileApi from 'metaversefile';
import WebaWallet from './src/components/wallet.js';
import {OffscreenEngine} from './offscreen-engine.js';
+import mobManager from './mob-manager.js';
const localVector = new THREE.Vector3();
const localVector2 = new THREE.Vector3();
@@ -318,6 +319,7 @@ export default class Webaverse extends EventTarget {
world.appManager.tick(timestamp, timeDiffCapped, frame);
hpManager.update(timestamp, timeDiffCapped);
+ mobManager.update(timestamp, timeDiffCapped);
cameraManager.updatePost(timestamp, timeDiffCapped);
ioManager.updatePost();
| 0 |
diff --git a/react/src/base/inputs/SprkLabel/SprkLabel.test.js b/react/src/base/inputs/SprkLabel/SprkLabel.test.js @@ -64,13 +64,17 @@ describe('SprkLabel:', () => {
expect(wrapper.find('[data-id="321"]').length).toBe(1);
});
- it('should assign htmlFor when htmlFor has a value', () => {
+ it('should assign for attribute when htmlFor has a value', () => {
const wrapper = mount(<SprkLabel htmlFor="321" />);
- expect(wrapper.find('.sprk-b-Label').prop('htmlFor')).toBe('321');
+ expect(wrapper.find('.sprk-b-Label').getDOMNode().getAttribute('for')).toBe(
+ '321',
+ );
});
- it('should assign default htmlFor when htmlFor has no value', () => {
+ it('should assign default for attribute when htmlFor has no value', () => {
const wrapper = mount(<SprkLabel />);
- expect(wrapper.find('.sprk-b-Label').prop('htmlFor')).toContain('sprk-');
+ expect(
+ wrapper.find('.sprk-b-Label').getDOMNode().getAttribute('for'),
+ ).toContain('sprk-');
});
});
| 3 |
diff --git a/js/core/bis_bidsutils.js b/js/core/bis_bidsutils.js @@ -95,7 +95,7 @@ let dicom2BIDS = async function (opts) {
}
}
- await writeDicomMetadataFiles(dicomobj, outputdirectory, changedFilenames);
+ await writeDicomMetadataFiles(outputdirectory, dicomobj, changedFilenames);
labelsMap = {};
return outputdirectory;
@@ -489,7 +489,14 @@ let parseDate = (dcm2niiImage) => {
return dateMatch[0];
};
-let writeDicomMetadataFiles = async (dicomJobs, outputdirectory, changedFilenames) => {
+/**
+ * Writes dicom_job_info.json, dataset_desciption.json, .bidsignore, and name_change_log.txt to disk.
+ *
+ * @param {String} outputdirectory - Location of the root directory of the study.
+ * @param {Object} dicomJobs - JSON representation of dicom_jobs.
+ * @param {Array} changedFilenames - The full list of filenames changed from their DCM2NIIx form to a BIDS formatted name (old name -> new name)
+ */
+let writeDicomMetadataFiles = async (outputdirectory, dicomJobs, changedFilenames) => {
let bidsignore = '**/localizer\n**/dicom_job_info.json\n**/name_change_log.txt';
console.log('Bidsignore=', bidsignore);
| 3 |
diff --git a/src/geo/paths.js b/src/geo/paths.js @@ -166,20 +166,30 @@ function pointsToPath(points, offset, open, miter = 1.5) {
// calculate segment normals which are used to calculate vertex normals
// next segment info is associated with the current point
const nupoints = [];
- for (let i=0, l=points.length; i<l; i++) {
+ const length = points.length;
+ if (length === 2 && points[0].isEqual(points[1])) {
+ return { };
+ }
+ const dedup = (open && length > 2) || (!open && length > 3);
+ for (let i=0; i<length; i++) {
let p1 = points[i];
- let p2 = points[(i+1)%l];
+ let p2 = points[(i + 1) % length];
p1.normal = calc_normal(p1, p2);
// drop next duplicate point if segment length is 0
// is possible there are 3 dups in a row and this is
// not handled. could make if a while, but that could
- // end up in a loop without additional checks
- if (p1.normal.len === 0) {
- p1.normal = calc_normal(p1, points[(i+2)%l]);
+ // end up in a loop without additional checks. ignore
+ // the case when the last and first point are the same
+ // which is valid when the line is an open path
+ if (dedup && p1.normal.len === 0 && i !== length - 1) {
+ p1.normal = calc_normal(p1, points[(i + 2) % length]);
i++;
}
nupoints.push(p1);
}
+ if (nupoints.length === 1) {
+ console.log({points, nupoints});
+ }
// when points are dropped, we need the new array
points = nupoints;
// generate left / right paths and triangle faces
@@ -291,6 +301,9 @@ function pointsToPath(points, offset, open, miter = 1.5) {
function pathTo3D(path, height, z) {
const { faces, left, right, open } = path;
const out = [];
+ if (!(faces && left && right)) {
+ return [];
+ }
if (z !== undefined) {
for (let p of faces) {
p.z = z;
| 1 |
diff --git a/lib/cartodb/profiler.rb b/lib/cartodb/profiler.rb @@ -42,8 +42,6 @@ module CartoDB
case printer
when ::RubyProf::FlatPrinter
'txt'
- when ::RubyProf::FlatPrinterWithLineNumbers
- 'txt'
when ::RubyProf::GraphPrinter
'txt'
when ::RubyProf::GraphHtmlPrinter
| 2 |
diff --git a/src/js/services/correspondentService.js b/src/js/services/correspondentService.js @@ -258,8 +258,8 @@ angular.module("copayApp.services").factory("correspondentService", function($ro
var testnet = constants.version.match(/t$/) ? "testnet" : "";
if (field === "unit") {
var text = 'Unit with contract hash was posted into DAG\nhttps://'+testnet+'explorer.obyte.org/#' + value;
- var payer_guidance_text = '\n\nNow you can pay to the contract for seller services by opening the contract window.';
- var payee_guidance_text = '\n\nNow wait for buyer to pay to the contract.';
+ var payer_guidance_text = "\n\nNow you can pay to the contract for the seller's services by opening the contract window.";
+ var payee_guidance_text = '\n\nNow wait for the buyer to pay to the contract.';
addContractEventIntoChat(objContract, "event", true, text + (objContract.me_is_payer ? payer_guidance_text : payee_guidance_text));
}
if (field === 'status') {
@@ -270,17 +270,17 @@ angular.module("copayApp.services").factory("correspondentService", function($ro
addContractEventIntoChat(objContract, 'event', true, 'Contract is in dispute now. Arbiter is notified. Wait for them to get online and pair with both contract parties.');
}
if (value === 'in_appeal') {
- addContractEventIntoChat(objContract, "event", true, "Moderator is notified. Wait for them to get online and pair with both contract parties.");
+ addContractEventIntoChat(objContract, "event", true, "Moderator is notified. Wait for them to get online and pair with both contract parties and the arbiter.");
}
if (value === 'appeal_approved' || value === 'appeal_declined') {
- addContractEventIntoChat(objContract, "event", true, "Moderator has " + (value === 'appeal_approved' ? 'approved' : 'declined')+ " your appeal. You will receive a compensation for wrong arbiter decision.");
+ addContractEventIntoChat(objContract, "event", true, "Moderator has " + (value === 'appeal_approved' ? 'approved' : 'declined')+ " your appeal. You will receive a compensation for the arbiter's wrong decision.");
}
if (value === 'paid') {
- addContractEventIntoChat(objContract, 'event', true, 'Contract was paid, unit: ' + 'https://'+testnet+'explorer.obyte.org/#' + unit + '.\n\nYou can start fulfilling your contract obligations.');
+ addContractEventIntoChat(objContract, 'event', true, 'Contract was paid, unit: ' + 'https://'+testnet+'explorer.obyte.org/#' + unit + '.\n\nYou can start fulfilling your contract obligations. When done, please let the buyer know so that they can review your work and release the funds from the contract to you.');
}
if (value === 'cancelled' || value === 'completed') {
if (!isPrivate)
- addContractEventIntoChat(objContract, 'event', true, 'Contract was '+objContract.status+', unit: ' + 'https://'+testnet+'explorer.obyte.org/#' + unit + '.\n\nFunds locked on contract were sent to you.');
+ addContractEventIntoChat(objContract, 'event', true, 'Contract was '+objContract.status+', unit: ' + 'https://'+testnet+'explorer.obyte.org/#' + unit + '.\n\nFunds locked on the contract were sent to you.');
else
addContractEventIntoChat(objContract, 'event', true, 'Contract was '+objContract.status+', unit: ' + 'https://'+testnet+'explorer.obyte.org/#' + unit + '.\n\nYou can now claim your funds from the contract.');
}
@@ -766,7 +766,7 @@ angular.module("copayApp.services").factory("correspondentService", function($ro
}
$rootScope.$emit("NewOutgoingTx");
var testnet = constants.version.match(/t$/) ? "testnet" : "";
- addContractEventIntoChat(objContract, 'event', false, 'Contract was paid, unit: ' + 'https://'+testnet+'explorer.obyte.org/#' + unit + '.\n\nThe seller can now start fulfilling their contract obligations.');
+ addContractEventIntoChat(objContract, 'event', false, 'Contract was paid, unit: ' + 'https://'+testnet+'explorer.obyte.org/#' + unit + '.\n\nThe seller can now start fulfilling their contract obligations. When they are done, please review their work and release the funds from the contract to the seller.');
$modalInstance.dismiss();
});
});
| 7 |
diff --git a/js/templates/modals/purchase/purchase.html b/js/templates/modals/purchase/purchase.html @@ -86,7 +86,6 @@ const totalPrice = ob.prices[0].price + ob.prices[0].vPrice;
<input
type="checkbox"
name="moderated"
- checked
id="purchaseModerated">
<label for="purchaseModerated"><%= ob.polyT('purchase.moderatedPayment') %></label>
<p class="clrT2 tx6">
| 7 |
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md @@ -77,14 +77,14 @@ Badges are a great way of highlighting the area of contribution by any given com
#### Possible Badges:
-- <img src="https://github.com/layer5io/layer5/blob/master/src/sections/Community/Member-single/community-green.svg" width="25px" height="25px"/> Community
-- <img src="https://github.com/layer5io/layer5/blob/master/src/sections/Community/Member-single/landscape-green.png" width="25px" height="25px"/> Landscape
-- <img src="https://github.com/layer5io/layer5/blob/master/src/sections/Community/Member-single/layer5-image-hub.svg" width="25px" height="25px"/> ImageHub
-- <img src="https://github.com/layer5io/layer5/blob/master/src/sections/Community/Member-single/meshery-logo-light.svg" width="25px" height="25px"/> Meshery
-- <img src="https://github.com/layer5io/layer5/blob/master/src/sections/Community/Member-single/meshery-operator-dark.svg" width="25px" height="25px"/> Meshery Operator
-- <img src="https://github.com/layer5io/layer5/blob/master/src/sections/Community/Member-single/smp-dark-text.svg" width="25px" height="25px"/> SMP
+- <img src="https://github.com/layer5io/layer5/blob/master/src/assets/images/community/Layer5-mentor-program.png" width="25px" height="25px"/> Community
+- <img src="https://github.com/layer5io/layer5/blob/master/src/assets/images/landscape/comparison-of-service-mesh-strengths-dark.png" width="25px" height="25px"/> Landscape
+- <img src="https://github.com/layer5io/layer5/blob/master/src/assets/images/image-hub/layer5-image-hub.svg" width="25px" height="25px"/> ImageHub
+- <img src="https://github.com/layer5io/layer5/blob/master/src/assets/images/meshery/meshery-logo-white-side.svg" width="25px" height="25px"/> Meshery
+- <img src="https://github.com/layer5io/layer5/blob/master/src/assets/images/meshery-operator/meshery-operator-dark.svg" width="25px" height="25px"/> Meshery Operator
+- <img src="https://github.com/layer5io/layer5/blob/master/src/assets/images/service-mesh-performance/horizontal/smp-dark-text-side.svg" width="25px" height="25px"/> SMP
- <img src="https://github.com/layer5io/layer5/blob/master/src/assets/images/nighthawk/icon-only/SVG/nighthawk-logo.svg" width="25px" height="25px"/> Nighthawk
-- <img src="https://github.com/layer5io/layer5/blob/master/src/sections/Community/Member-single/patterns-logo.png" width="25px" height="25px"/> Patterns
+- <img src="https://github.com/layer5io/layer5/blob/master/src/assets/images/service-mesh-patterns/service-mesh-pattern.svg" width="25px" height="25px"/> Patterns
## Updating the Service Mesh Landscape
| 1 |
diff --git a/converters/fromZigbee.js b/converters/fromZigbee.js @@ -5613,9 +5613,10 @@ const converters = {
},
greenpower_on_off_switch: {
cluster: 'greenPower',
- type: 'commandNotification',
+ type: ['commandNotification', 'commandCommisioningNotification'],
convert: (model, msg, publish, options, meta) => {
const commandID = msg.data.commandID;
+ if (commandID === 224) return; // Skip commisioning command.
const lookup = {
0x00: 'identify',
0x10: 'recall_scene_0',
@@ -5654,9 +5655,10 @@ const converters = {
},
greenpower_7: {
cluster: 'greenPower',
- type: 'commandNotification',
+ type: ['commandNotification', 'commandCommisioningNotification'],
convert: (model, msg, publish, options, meta) => {
const commandID = msg.data.commandID;
+ if (commandID === 224) return; // Skip commisioning command.
let postfix = '';
if (msg.data.commandFrame && msg.data.commandFrame.raw) {
| 9 |
diff --git a/public/javascripts/SVLabel/src/SVLabel/keyboard/Keyboard.js b/public/javascripts/SVLabel/src/SVLabel/keyboard/Keyboard.js @@ -373,6 +373,7 @@ function Keyboard (svl, canvas, contextMenu, googleMap, ribbon, zoomControl) {
break;
case 90:
// "z" for zoom. By default, it will zoom in. If "shift" is down, it will zoom out.
+ if (!status.focusOnTextField) {
if (contextMenu.isOpen()) {
contextMenu.hide();
}
@@ -388,6 +389,7 @@ function Keyboard (svl, canvas, contextMenu, googleMap, ribbon, zoomControl) {
svl.modalExample.hide();
break;
}
+ }
contextMenu.updateRadioButtonImages();
}
| 11 |
diff --git a/packages/blueprints/src/Blueprints.js b/packages/blueprints/src/Blueprints.js @@ -287,9 +287,6 @@ class Blueprints {
!oldContainerParams ||
(!!newContainerParams.width &&
newContainerParams.width !== oldContainerParams.width),
- scrollBase:
- !!newContainerParams.scrollBase &&
- newContainerParams.scrollBase !== oldContainerParams.scrollBase,
};
return Object.keys(containerHasChanged).reduce((is, key) => {
if (containerHasChanged[key]) {
| 2 |
diff --git a/pages/Mixins.md b/pages/Mixins.md @@ -58,7 +58,7 @@ setTimeout(() => smartObj.interact(), 1000);
function applyMixins(derivedCtor: any, baseCtors: any[]) {
baseCtors.forEach(baseCtor => {
Object.getOwnPropertyNames(baseCtor.prototype).forEach(name => {
- derivedCtor.prototype[name] = baseCtor.prototype[name];
+ Object.defineProperty(derivedCtor.prototype, name, Object.getOwnPropertyDescriptor(baseCtor.prototype, name));
});
});
}
@@ -131,7 +131,7 @@ This will run through the properties of each of the mixins and copy them over to
function applyMixins(derivedCtor: any, baseCtors: any[]) {
baseCtors.forEach(baseCtor => {
Object.getOwnPropertyNames(baseCtor.prototype).forEach(name => {
- derivedCtor.prototype[name] = baseCtor.prototype[name];
+ Object.defineProperty(derivedCtor.prototype, name, Object.getOwnPropertyDescriptor(baseCtor.prototype, name));
});
});
}
| 7 |
diff --git a/public/viewjs/productform.js b/public/viewjs/productform.js @@ -215,6 +215,22 @@ $("#enable_tare_weight_handling").on("click", function()
Grocy.FrontendHelpers.ValidateForm("product-form");
});
+$("#allow_partial_units_in_stock").on("click", function()
+{
+ if (this.checked)
+ {
+ $("#min_stock_amount").attr("min", "0.00");
+ $("#min_stock_amount").attr("step", "0.01");
+ }
+ else
+ {
+ $("#min_stock_amount").attr("min", "0");
+ $("#min_stock_amount").attr("step", "1");
+ }
+
+ Grocy.FrontendHelpers.ValidateForm("product-form");
+});
+
Grocy.DeleteProductPictureOnSave = false;
$('#delete-current-product-picture-button').on('click', function (e)
{
@@ -245,3 +261,7 @@ if (Grocy.EditMode === 'create')
$('#name').focus();
$('.input-group-qu').trigger('change');
Grocy.FrontendHelpers.ValidateForm('product-form');
+
+// Click twice to trigger on-click but not change the actual checked state
+$("#allow_partial_units_in_stock").click();
+$("#allow_partial_units_in_stock").click();
| 11 |
diff --git a/token-metadata/0xF4edA77f0B455A12f3eb44F8653835f377e36b76/metadata.json b/token-metadata/0xF4edA77f0B455A12f3eb44F8653835f377e36b76/metadata.json "symbol": "TIKTOK",
"address": "0xF4edA77f0B455A12f3eb44F8653835f377e36b76",
"decimals": 0,
- "dharmaVerificationStatus": {
"dharmaVerificationStatus": "VERIFIED"
}
\ No newline at end of file
-}
\ No newline at end of file
| 3 |
diff --git a/weapons-manager.js b/weapons-manager.js import * as THREE from './three.module.js';
+import {GLTFLoader} from './GLTFLoader.js';
import {BufferGeometryUtils} from './BufferGeometryUtils.js';
import geometryManager from './geometry-manager.js';
import cameraManager from './camera-manager.js';
@@ -31,6 +32,8 @@ const localMatrix2 = new THREE.Matrix4();
const localColor = new THREE.Color();
const localBox = new THREE.Box3();
+const gltfLoader = new GLTFLoader();
+
const items1El = document.getElementById('items-1');
const items2El = document.getElementById('items-2');
const items3El = document.getElementById('items-3');
@@ -449,6 +452,11 @@ const _ungrab = () => {
const crosshairEl = document.querySelector('.crosshair');
const _updateWeapons = () => {
const transforms = rigManager.getRigTransforms();
+ const now = Date.now();
+
+ for (const wearable of wearables) {
+ wearable.update(now);
+ }
const _handleHighlight = () => {
if (!editedObject) {
@@ -1424,6 +1432,36 @@ renderer.domElement.addEventListener('drop', async e => {
}
});
+const wearables = [];
+const _loadWearable = async () => {
+ const srcUrl = './cat-in-hat/cat-in-hat.glb';
+ let o = await new Promise((accept, reject) => {
+ gltfLoader.load(srcUrl, accept, function onprogress() {}, reject);
+ });
+ const {animations} = o;
+ o = o.scene;
+ o.scale.multiplyScalar(0.1);
+ scene.add(o);
+
+ let lastTimestamp = Date.now();
+ const smoothVelocity = new THREE.Vector3();
+ const update = now => {
+ const timeDiff = now - lastTimestamp;
+ const {localRig} = rigManager;
+ const head = localRig.modelBones.Head;
+
+ head.matrixWorld.decompose(o.position, o.quaternion, localVector);
+
+ const deltaSeconds = timeDiff / 1000;
+ // mixer.update(deltaSeconds);
+ lastTimestamp = now;
+ };
+ wearables.push({
+ update,
+ });
+};
+_loadWearable();
+
const weaponsManager = {
// weapons,
// cubeMesh,
| 0 |
diff --git a/lib/Chunk.js b/lib/Chunk.js @@ -205,9 +205,9 @@ class Chunk {
other.chunks.length = 0;
other.blocks.forEach(b => {
- b.chunks = (b.chunks || [this]).map(c => {
+ b.chunks = b.chunks ? b.chunks.map(c => {
return c === other ? this : c;
- }, this);
+ }, this) : [this];
b.chunkReason = reason;
this.addBlock(b);
}, this);
| 2 |
diff --git a/app/builtin-pages/views/library-view.js b/app/builtin-pages/views/library-view.js @@ -48,7 +48,7 @@ async function setup () {
archiveFsRoot = new FSArchive(null, archive.info)
filesBrowser = new FilesBrowser(archiveFsRoot)
filesBrowser.onSetCurrentSource = onSetCurrentSource
- await readSelectedPathFromURL()
+ await readViewStateFromUrl()
// set up download progress
await archive.startMonitoringDownloadProgress()
@@ -534,7 +534,7 @@ async function onEdit () {
}
function onPopState (e) {
- readSelectedPathFromURL()
+ readViewStateFromUrl()
}
// helpers
@@ -544,7 +544,7 @@ function onPopState (e) {
// it mimics some of the behaviors of the click functions
// (eg onChangeView and the files-browser onClickNode)
// but it works entirely by reading the current url
-async function readSelectedPathFromURL () {
+async function readViewStateFromUrl () {
// active view
let oldView = activeView
| 10 |
diff --git a/assets/src/edit-story/components/library/panes/media/common/paginatedMediaGallery.js b/assets/src/edit-story/components/library/panes/media/common/paginatedMediaGallery.js @@ -60,6 +60,7 @@ const AttributionPill = styled.div`
display: flex;
flex-wrap: nowrap;
font-size: 12px;
+ color: ${theme.colors.fg.v1};
background-color: rgba(0, 0, 0, 0.7);
cursor: pointer;
`;
@@ -165,12 +166,6 @@ function PaginatedMediaGallery({
};
}, [handleScrollOrResize]);
- const openLink = useCallback(() => {
- if (providerType === ProviderType.UNSPLASH) {
- window.open('https://unsplash.com');
- }
- }, [providerType]);
-
const mediaGallery =
isMediaLoaded && resources.length === 0 ? (
<MediaGalleryMessage>
@@ -202,10 +197,12 @@ function PaginatedMediaGallery({
<MediaGalleryInnerContainer>{mediaGallery}</MediaGalleryInnerContainer>
</MediaGalleryContainer>
{providerType === ProviderType.UNSPLASH && (
- <AttributionPill onClick={openLink}>
+ <a href={'https://unsplash.com'} target={'_blank'} rel={'noreferrer'}>
+ <AttributionPill>
{__('Powered by', 'web-stories')}
<UnsplashLogoFull style={LOGO_PROPS} />
</AttributionPill>
+ </a>
)}
</>
);
| 4 |
diff --git a/CHANGELOG.md b/CHANGELOG.md All notable changes to this project are documented in this file.
-## Head
+## 13.1.0
- Fixed: `media-feature-name-*` false negatives for range context ([#4581](https://github.com/stylelint/stylelint/pull/4581)).
- Fixed: `indentation` RangeError regression ([#4572](https://github.com/stylelint/stylelint/pull/4572)).
| 6 |
diff --git a/lib/net/networking_engine.js b/lib/net/networking_engine.js @@ -296,14 +296,18 @@ shaka.net.NetworkingEngine.prototype.request = function(type, request) {
// Add the request to the array.
this.requests_.push(p);
return p.then(function(response) {
+ if (this.requests_.indexOf(p) >= 0) {
this.requests_.splice(this.requests_.indexOf(p), 1);
+ }
if (this.onSegmentDownloaded_ &&
type == shaka.net.NetworkingEngine.RequestType.SEGMENT) {
this.onSegmentDownloaded_(response.timeMs, response.data.byteLength);
}
return response;
}.bind(this)).catch(function(e) {
+ if (this.requests_.indexOf(p) >= 0) {
this.requests_.splice(this.requests_.indexOf(p), 1);
+ }
return Promise.reject(e);
}.bind(this));
};
| 1 |
diff --git a/src/components/home/Action.js b/src/components/home/Action.js @@ -55,7 +55,7 @@ const Action = LargeButton.withComponent(Link)
const Promo = () => (
<PromoBox p={[3, 4, 5]}>
<PromoHeading f={[4, 5, 6]} my={0}>
- Get started.
+ Hack Club.
</PromoHeading>
<Text f={[2, 4]} mt={3} mb={2}>
Start a new chapter or join the network with an existing computer
@@ -64,7 +64,7 @@ const Promo = () => (
<Text f={[2, 4]} mb={4}>
We're excited to get to know you.
</Text>
- <Action to="/start" chevronRight scale children="Learn About Joining" />
+ <Action to="/start" chevronRight scale children="Get Started" />
</PromoBox>
)
| 7 |
diff --git a/assets/js/modules/search-console/components/dashboard/index.js b/assets/js/modules/search-console/components/dashboard/index.js export { default as DashboardClicksWidget } from './DashboardClicksWidget';
export { default as DashboardImpressionsWidget } from './DashboardImpressionsWidget';
export { default as LegacyDashboardPopularity } from './LegacyDashboardPopularity';
-export { default as DashboardPopularityInner } from './DashboardPopularityInner';
+export { default as LegacyDashboardPopularityInner } from './LegacyDashboardPopularityInner';
export { default as DashboardWidgetPopularKeywordsTable } from './DashboardWidgetPopularKeywordsTable';
export { default as GoogleSitekitSearchConsoleDashboardWidget } from './GoogleSitekitSearchConsoleDashboardWidget';
export { default as LegacyDashboardSearchFunnel } from './LegacyDashboardSearchFunnel';
| 1 |
diff --git a/src/web/App.js b/src/web/App.js @@ -402,10 +402,14 @@ App.prototype.loadURIParams = function() {
// Read in input data from URI params
if (this.uriParams.input) {
+ this.autoBakePause = true;
try {
const inputData = Utils.fromBase64(this.uriParams.input);
this.setInput(inputData);
- } catch (err) {}
+ } catch (err) {
+ } finally {
+ this.autoBakePause = false;
+ }
}
this.autoBake();
| 2 |
diff --git a/README.md b/README.md @@ -22,6 +22,12 @@ If, however, your webserver does not support URL rewriting, set `DISABLE_URL_REW
## How to update
Just overwrite everything with the latest release while keeping the `/data` directory, check `config-dist.php` for new configuration options and add them to your `data/config.php` (the default from values `config-dist.php` will be used for not in `data/config.php` defined settings).
+## Localization
+grocy is fully localizable - the default language is English (integrated into code), a German localization is always maintained by me. There is one file per language in the `localization` directory, if you want to create a translation, it's best to copy `localization/de.php` to a new one (e. g. `localization/it.php`) and translating all strings there. (Language can be changed in `data/config.php`, e. g. `Setting('CULTURE', 'it');`)
+
+### Maintaining your own localization
+As the German translation will always be the most complete one, for maintaining your localization it would be easiest when you compare your localization with the German one with a diff tool of your choice.
+
## Things worth to know
### REST API & data model documentation
@@ -50,9 +56,6 @@ Products can be directly added to the database via looking them up against exter
This is currently only possible through the REST API.
There is no plugin included for any service, see the reference implementation in `data/plugins/DemoBarcodeLookupPlugin.php`.
-### Localization
-grocy is fully localizable - the default language is English (integrated into code), a German localization is always maintained by me. There is one file per language in the `localization` directory, if you want to create a translation, it's best to copy `localization/de.php` to a new one (e. g. `localization/it.php`) and translating all strings there. (Language can be changed in `data/config.php`, e. g. `Setting('CULTURE', 'it');`)
-
### Database migrations
Database schema migration is automatically done when visiting the root (`/`) route (click on the logo in the left upper edge).
| 0 |
diff --git a/src/plugins/Url/index.js b/src/plugins/Url/index.js @@ -54,6 +54,9 @@ module.exports = class Url extends Plugin {
// Bind all event handlers for referencability
this.getMeta = this.getMeta.bind(this)
this.addFile = this.addFile.bind(this)
+ this.handleDrop = this.handleDrop.bind(this)
+ this.handleDragOver = this.handleDragOver.bind(this)
+ this.handleDragLeave = this.handleDragLeave.bind(this)
this.server = new RequestClient(uppy, {host: this.opts.host})
}
@@ -144,6 +147,31 @@ module.exports = class Url extends Plugin {
})
}
+ handleDrop (e) {
+ e.preventDefault()
+ if (e.dataTransfer.items) {
+ const items = Array.from(e.dataTransfer.items)
+ items.forEach((item) => {
+ if (item.kind === 'string' && item.type.match('^text/uri-list')) {
+ item.getAsString((url) => {
+ this.uppy.log(`[URL] Adding file from dropped url: ${url}`)
+ this.addFile(url)
+ })
+ }
+ })
+ }
+ }
+
+ handleDragOver (e) {
+ e.preventDefault()
+ this.el.classList.add('drag')
+ }
+
+ handleDragLeave (e) {
+ e.preventDefault()
+ this.el.classList.remove('drag')
+ }
+
render (state) {
return <UrlUI
i18n={this.i18n}
@@ -155,9 +183,17 @@ module.exports = class Url extends Plugin {
if (target) {
this.mount(target, this)
}
+
+ this.el.addEventListener('drop', this.handleDrop)
+ this.el.addEventListener('dragover', this.handleDragOver)
+ this.el.addEventListener('dragleave', this.handleDragLeave)
}
uninstall () {
+ this.el.removeEventListener('drop', this.handleDrop)
+ this.el.removeEventListener('dragover', this.handleDragOver)
+ this.el.removeEventListener('dragleave', this.handleDragLeave)
+
this.unmount()
}
}
| 0 |
diff --git a/pages/api/sign-in.js b/pages/api/sign-in.js @@ -66,10 +66,6 @@ export default async (req, res) => {
if (user.authVersion === 1) {
const clientHash = await encryptPasswordClient(req.body.data.password);
hash = await Utilities.encryptPassword(clientHash, user.salt);
- Monitor.message(
- "pages/api/sign-in.js",
- `User ${user.username} was rolled back to v1 when they were really v2! Correcting it now.`
- );
if (hash !== user.password) {
return res.status(403).send({ decorator: "SERVER_SIGN_IN_WRONG_CREDENTIALS", error: true });
}
| 2 |
diff --git a/docs/bdd.md b/docs/bdd.md @@ -71,13 +71,13 @@ Every step in this scenario requires a code which defines it.
## Gherkin
-Let's learn some more about Gherkin format and then we will see how to execute it with CodeceptJS. We can enable Gherkin for current project by running `gherkin:init` command:
+Let's learn some more about Gherkin format and then we will see how to execute it with CodeceptJS. We can enable Gherkin for current project by running `gherkin:init` command on **already initialized project**:
```
codeceptjs gherkin:init
```
-It will add `gherkin` section to config. It will also prepare directories for features and step definition. And it will create the first feature file for you.
+It will add `gherkin` section to the current config. It will also prepare directories for features and step definition. And it will create the first feature file for you.
### Features
| 7 |
diff --git a/assets/js/components/data/index.js b/assets/js/components/data/index.js @@ -28,7 +28,7 @@ import {
getQueryParameter,
sortObjectProperties,
} from 'SiteKitCore/util';
-import { cloneDeep, each, sortBy } from 'lodash';
+import { cloneDeep, each, get, sortBy } from 'lodash';
/**
* WordPress dependencies
@@ -203,39 +203,13 @@ const dataAPI = {
method: 'POST',
} ).then( ( results ) => {
each( results, ( result, key ) => {
- if ( result.xdebug_message ) {
- console.log( 'data_error', result.xdebug_message ); // eslint-disable-line no-console
- } else {
if ( ! keyIndexesMap[ key ] ) {
- console.log( 'data_error', 'unknown response key ' + key ); // eslint-disable-line no-console
+ console.error( 'data_error', 'unknown response key ' + key ); // eslint-disable-line no-console
return;
}
- // Handle insufficient scope warnings by informing the user.
- if (
- result.error_data &&
- result.error_data[ 403 ] &&
- result.error_data[ 403 ].reason
- ) {
- if ( 'insufficientPermissions' === result.error_data[ 403 ].reason ) {
- // Insufficient scopes - add a notice.
- addFilter( 'googlesitekit.DashboardNotifications',
- 'googlesitekit.AuthNotification',
- fillFilterWithComponent( DashboardAuthAlert ), 1 );
- } else if ( 'forbidden' === result.error_data[ 403 ].reason ) {
- // Insufficient access permissions - add a notice.
- addFilter( 'googlesitekit.DashboardNotifications',
- 'googlesitekit.AuthNotification',
- fillFilterWithComponent( DashboardPermissionAlert ), 1 );
- }
-
- // Increase the notice count.
- addFilter( 'googlesitekit.TotalNotifications',
- 'googlesitekit.AuthCountIncrease', ( count ) => {
- // Only run once.
- removeFilter( 'googlesitekit.TotalNotifications', 'googlesitekit.AuthCountIncrease' );
- return count + 1;
- } );
+ if ( result.code && result.data && result.data.reason ) {
+ this.handleWpError( result );
}
each( keyIndexesMap[ key ], ( index ) => {
@@ -244,7 +218,6 @@ const dataAPI = {
this.setCache( request.key, result );
this.resolve( request, result );
} );
- }
// Trigger an action indicating this data load completed from the API.
if ( 0 === remainingDatapoints.length ) {
@@ -259,6 +232,54 @@ const dataAPI = {
} );
},
+ handleWpError( error ) {
+ const { code, data, message } = error;
+ // eslint-disable-next-line no-console
+ console.log( 'handleError', { error } );
+
+ if ( ! code || ! data ) {
+ return;
+ }
+
+ // eslint-disable-next-line no-console
+ console.log(
+ {
+ 'error.errors': get( message, 'error.errors' ),
+ 'error.errors.0.reason': get( message, 'error.errors.0.reason' ),
+ 'error.errors[0].reason': get( message, 'error.errors[0].reason' ),
+ }
+ );
+
+ const reason = data.reason || get( message, 'error.errors[ 0 ].reason' );
+
+ // eslint-disable-next-line no-console
+ console.log( { code, data, message, reason, msgReason: get( message, 'error.errors.0.reason' ) } );
+
+ if ( [ 'authError', 'insufficientPermissions' ].includes( reason ) ) {
+ // Handle insufficient scope warnings by informing the user.
+ addFilter( 'googlesitekit.DashboardNotifications',
+ 'googlesitekit.AuthNotification',
+ fillFilterWithComponent( DashboardAuthAlert ), 1 );
+ }
+
+ if ( 'forbidden' === reason ) {
+ // Insufficient access permissions - add a notice.
+ addFilter( 'googlesitekit.DashboardNotifications',
+ 'googlesitekit.AuthNotification',
+ fillFilterWithComponent( DashboardPermissionAlert ), 1 );
+ }
+
+ // Increase the notice count.
+ addFilter( 'googlesitekit.TotalNotifications',
+ 'googlesitekit.AuthCountIncrease', ( count ) => {
+ // Only run once.
+ removeFilter( 'googlesitekit.TotalNotifications', 'googlesitekit.AuthCountIncrease' );
+ return count + 1;
+ } );
+
+ throw error;
+ },
+
/**
* Resolves a request.
*
@@ -428,10 +449,10 @@ const dataAPI = {
this.setCache( cacheKey, results );
}
- return new Promise( ( resolve ) => {
- resolve( results );
- } );
+ return Promise.resolve( results );
} ).catch( ( err ) => {
+ this.handleWpError( err );
+
return Promise.reject( err );
} );
},
| 3 |
diff --git a/articles/appliance/disaster-recovery-raci.md b/articles/appliance/disaster-recovery-raci.md ---
description: An in-depth summary of the roles and responsibilities allocated between Auth0 and the subscriber
+section: appliance
---
# Disaster Recovery: Detailed Division of Responsibility
| 12 |
diff --git a/src/libs/Navigation/AppNavigator/AuthScreens.js b/src/libs/Navigation/AppNavigator/AuthScreens.js @@ -173,7 +173,7 @@ class AuthScreens extends React.Component {
returnValueList: 'nameValuePairs',
nvpNames: ONYXKEYS.NVP_PREFERRED_LOCALE,
}).then((response) => {
- const preferredLocale = response.nameValuePairs.preferredLocale || CONST.DEFAULT_LOCALE;
+ const preferredLocale = lodashGet(response, ['nameValuePairs', 'preferredLocale'], CONST.DEFAULT_LOCALE);
if ((currentPreferredLocale !== CONST.DEFAULT_LOCALE) && (preferredLocale !== currentPreferredLocale)) {
setLocale(currentPreferredLocale);
} else {
| 9 |
diff --git a/pages/blog/index.js b/pages/blog/index.js @@ -83,6 +83,7 @@ function BlogIndex({posts}) {
</Section>
<style jsx>{`
.blog-section {
+ padding-top: 1em;
display: grid;
grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
grid-gap: 3em 5em;
| 0 |
diff --git a/token-metadata/0x6CA88Cc8D9288f5cAD825053B6A1B179B05c76fC/metadata.json b/token-metadata/0x6CA88Cc8D9288f5cAD825053B6A1B179B05c76fC/metadata.json "symbol": "UPT",
"address": "0x6CA88Cc8D9288f5cAD825053B6A1B179B05c76fC",
"decimals": 18,
- "dharmaVerificationStatus": {
"dharmaVerificationStatus": "VERIFIED"
}
\ No newline at end of file
-}
\ No newline at end of file
| 3 |
diff --git a/includes/Modules/Tag_Manager.php b/includes/Modules/Tag_Manager.php @@ -771,12 +771,6 @@ final class Tag_Manager extends Module
);
return array_values( $containers );
- case 'GET:tags':
- /* @var Google_Service_TagManager_ListTagsResponse $response Response object */
- return $response->getTag();
- case 'GET:workspaces':
- /* @var Google_Service_TagManager_ListWorkspacesResponse $response Response object. */
- return $response->getWorkspace();
}
return $response;
| 2 |
diff --git a/config/env.dev.js b/config/env.dev.js module.exports = {
NODE_ENV: 'development',
FILE_UPLOAD: 'local',
+ SESSION_NAME: 'connect.growi-dev.sid',
// MATHJAX: 1,
ELASTICSEARCH_URI: 'http://localhost:9200/growi',
HACKMD_URI: 'http://localhost:3100',
| 12 |
diff --git a/articles/libraries/lock/v11/migration-guide.md b/articles/libraries/lock/v11/migration-guide.md @@ -5,7 +5,7 @@ description: How to migrate to Lock v11
---
# Migrating to Lock v11
-Lock 11 is designed for embedded login scenarios. It operates with enhanced security and removes dependencies that have been deprecated as per Auth0's roadmap. In some cases, these security enhancements may impact application behavior when upgrading from an earlier version of Lock.
+Lock 11 is designed for **embedded login** scenarios. It operates with enhanced security and removes dependencies that have been deprecated as per Auth0's roadmap. In some cases, these security enhancements may impact application behavior when upgrading from an earlier version of Lock.
We recommend that instead of using Lock embedded in your application, you use **Centralized Login**, as it is the [most secure, powerful and flexible approach for authentication](/guides/login/centralized-vs-embedded).
@@ -15,19 +15,19 @@ If you decide to keep using Lock you will need to migrate to Lock 11.
The documents below describe all the changes that you should be aware of when migrating from different versions of Lock. Make sure you go through them before upgrading.
-[Migrating from Lock.js v10](/libraries/lock/v11/migration-v10-v11)
+[Migrating from Lock v10](/libraries/lock/v11/migration-v10-v11)
-[Migrating from Lock.js v9](/libraries/lock/v11/migration-v9-v11)
+[Migrating from Lock v9](/libraries/lock/v11/migration-v9-v11)
-[Migrating from Lock.js v8](/libraries/lock/v11/migration-v8-v11)
+[Migrating from Lock v8](/libraries/lock/v11/migration-v8-v11)
-[Migrating from Lock.js v10 in Angular 1.x Applications](/libraries/lock/v11/migration-angularjs-v10)
+[Migrating from Lock v10 in Angular 1.x Applications](/libraries/lock/v11/migration-angularjs-v10)
-[Migrating from Lock.js v9 in Angular 1.x Applications](/libraries/lock/v11/migration-angularjs-v9)
+[Migrating from Lock v9 in Angular 1.x Applications](/libraries/lock/v11/migration-angularjs-v9)
-[Migrating from Lock.js v10 in Angular 2+ Applications](/libraries/lock/v11/migration-angular)
+[Migrating from Lock v10 in Angular 2+ Applications](/libraries/lock/v11/migration-angular)
-[Migrating from Lock.js v10 in React Applications](/libraries/lock/v11/migration-react)
+[Migrating from Lock v10 in React Applications](/libraries/lock/v11/migration-react)
:::note
If you have any questions or concerns, you can submit them using the [Support Center](${env.DOMAIN_URL_SUPPORT}), or directly through your account representative, if applicable.
| 2 |
diff --git a/src/lib/geolocation.test.js b/src/lib/geolocation.test.js @@ -200,7 +200,7 @@ describe("passiveLocationStream", () => {
});
});
- it(" with result of checking", done => {
+ it("emits result of checking", done => {
expect.assertions(1);
// $FlowFixMe
Permissions.check.mockReturnValue(Promise.resolve("authorized"));
@@ -253,7 +253,7 @@ describe("activeLocationStream", () => {
});
});
- it(" with result of checking", done => {
+ it("emits result of requesting", done => {
expect.assertions(1);
// $FlowFixMe
Permissions.request.mockReturnValue(Promise.resolve("authorized"));
| 1 |
diff --git a/articles/compliance/gdpr/features-aiding-compliance/protect-user-data.md b/articles/compliance/gdpr/features-aiding-compliance/protect-user-data.md @@ -68,9 +68,9 @@ For information on how to use them see [Password Strength](/connections/database
With step-up authentication, applications can ask users to authenticate with a stronger authentication mechanism to access sensitive resources. For example, you may have a banking application which does not require [Multifactor Authentication (MFA)](/multifactor-authentication) to view the accounts basic information, but when users try to transfer money between accounts then they must authenticate with one more factor (for example, a code sent via SMS).
-You can check if a user has logged in with MFA by reviewing the contents of their ID Token. You can then configure your application to deny access to sensitive resources if the ID Token indicates that the user did not log in with MFA.
+You can check if a user has logged in with MFA by reviewing the contents of their ID Token or Access Token. You can then configure your application to deny access to sensitive resources if the token indicates that the user did not log in with MFA.
-For details see [Step-up Authentication with ID Tokens](/multifactor-authentication/developer/mfa-from-id-token).
+For details see [Step-up Authentication](/multifactor-authentication/developer/step-up-authentication).
## Availability and resilience
| 3 |
diff --git a/gulpfile.js b/gulpfile.js @@ -133,12 +133,16 @@ gulp.task('requirejs', function(done) {
}, done);
});
+// optimizeApproximateTerrainHeights can be used to regenerate the approximateTerrainHeights
+// file from an overly precise terrain heights file to reduce bandwidth
gulp.task('optimizeApproximateTerrainHeights', function() {
+ const precision = 1;
return gulp.src('Source/Assets/approximateTerrainHeightsPrecise.json')
.pipe(gulpJsonTransform(function(data, file) {
Object.entries(data).forEach(function(entry) {
var values = entry[1];
- data[entry[0]] = [Math.floor(values[0]), Math.ceil(values[1]) ];
+ data[entry[0]] = [Math.floor(values[0] * precision) / precision,
+ Math.ceil(values[1] * precision) / precision ];
});
return data;
}))
| 7 |
diff --git a/src/components/accounts/ledger/SignInLedger.js b/src/components/accounts/ledger/SignInLedger.js @@ -10,6 +10,8 @@ import RequestStatusBox from '../../common/RequestStatusBox'
export function SignInLedger(props) {
const dispatch = useDispatch();
+
+ const [accountId, setAccountId] = useState('');
const account = useSelector(({ account }) => account);
const signInWithLedgerState = useSelector(({ ledger }) => ledger.signInWithLedger);
const txSigned = useSelector(({ ledger }) => ledger.txSigned);
@@ -27,6 +29,10 @@ export function SignInLedger(props) {
const signingIn = !!signInWithLedgerStatus
+ const handleChange = (e, { name, value }) => {
+ setAccountId(value)
+ }
+
const handleSignIn = async () => {
const { error } = await dispatch(signInWithLedger())
| 9 |
diff --git a/src/api/catalog.ts b/src/api/catalog.ts @@ -10,9 +10,9 @@ import loadCustomFilters from '../helpers/loadCustomFilters'
import { elasticsearch, SearchQuery } from 'storefront-query-builder'
import { apiError } from '../lib/util'
-function _cacheStorageHandler (config, result, hash, tags) {
+async function _cacheStorageHandler (config, result, hash, tags) {
if (config.server.useOutputCache && cache) {
- cache.set(
+ return cache.set(
'api:' + hash,
result,
tags
@@ -155,7 +155,7 @@ export default ({config, db}) => async function (req, res, body) {
} else {
_cacheStorageHandler(config, _resBody, reqHash, tagsArray)
}
- res.json(_outputFormatter(_resBody, responseFormat));
+ res.json(_outputFormatter(Object.assign({}, _resBody), responseFormat))
} else { // no cache storage if no results from Elastic
res.json(_resBody);
}
@@ -176,7 +176,7 @@ export default ({config, db}) => async function (req, res, body) {
res.setHeader('X-VS-Cache-Tag', tagsHeader)
delete output.tags
}
- res.json(output)
+ res.json(_outputFormatter(output, responseFormat))
console.log(`cache hit [${req.url}], cached request: ${Date.now() - s}ms`)
} else {
res.setHeader('X-VS-Cache', 'Miss')
| 4 |
diff --git a/scene-previewer.js b/scene-previewer.js @@ -232,36 +232,32 @@ class ScenePreviewer extends THREE.Object3D {
this.previewContainer.matrix.copy(this.matrix);
this.previewContainer.matrixWorld.copy(this.matrixWorld);
- if (this.scene) {
- /* const apps = this.scene.children;
- for (const app of apps) {
- app.setComponent('rendering', true);
- } */
-
- const renderSettings = renderSettingsManager.findRenderSettings(this.previewScene);
- renderSettingsManager.applyRenderSettingsToScene(renderSettings, this.previewScene);
- }
-
return () => {
this.previewContainer.position.copy(oldPosition);
this.previewContainer.quaternion.copy(oldQuaternion);
this.previewContainer.scale.copy(oldScale);
this.previewContainer.matrix.copy(oldMatrix);
this.previewContainer.matrixWorld.copy(oldMatrixWorld);
-
- /* if (this.scene) {
- const apps = this.scene.children;
- for (const app of apps) {
- app.setComponent('rendering', false);
+ };
}
- } */
+ #pushRenderSettings() {
+ if (this.scene) {
+ const renderSettings = renderSettingsManager.findRenderSettings(this.previewScene);
+ renderSettingsManager.applyRenderSettingsToScene(renderSettings, this.previewScene);
+
+ return () => {
+ renderSettingsManager.applyRenderSettingsToScene(null, this.previewScene);
};
+ } else {
+ return () => {};
+ }
}
render() {
const renderer = getRenderer();
// push old state
const popPreviewContainerTransform = this.#pushPreviewContainerTransform();
+ const popRenderSettings = this.#pushRenderSettings();
this.cubeCamera.position.setFromMatrixPosition(this.skyboxMesh.matrixWorld);
// this.cubeCamera.quaternion.setFromRotationMatrix(this.skyboxMesh.matrixWorld);
@@ -273,6 +269,7 @@ class ScenePreviewer extends THREE.Object3D {
// pop old state
popPreviewContainerTransform();
+ popRenderSettings();
}
};
export {
| 0 |
diff --git a/src/encoded/schemas/human_donor.json b/src/encoded/schemas/human_donor.json "items": {
"title": "Parent",
"description": "A donor ID of a biological parent, if known.",
- "comment": "For human biosamples, see human_donor.json for available identifiers. For mouse biosamples, see mouse_donor.json for available identifiers.",
+ "comment": "For human biosamples, see human_donor.json for available identifiers.",
"type": "string",
"linkTo": "HumanDonor"
}
"items": {
"title": "Child",
"description": "A donor that genetic material was supplied to.",
- "comment": "For human biosamples, see human_donor.json for available identifiers. For mouse biosamples, see mouse_donor.json for available identifiers.",
+ "comment": "For human biosamples, see human_donor.json for available identifiers.",
"type": "string",
"linkTo": "HumanDonor"
}
"items": {
"title": "Sibling",
"description": "A donors that has at least one parent in common.",
- "comment": "For human biosamples, see human_donor.json for available identifiers. For mouse biosamples, see mouse_donor.json for available identifiers.",
+ "comment": "For human biosamples, see human_donor.json for available identifiers.",
"type": "string",
"linkTo": "HumanDonor"
}
},
"fraternal_twin": {
"title": "Fraternal twin",
- "comment": "For human biosamples, see human_donor.json for available identifiers. For mouse biosamples, see mouse_donor.json for available identifiers.",
+ "comment": "For human biosamples, see human_donor.json for available identifiers.",
"type": "string",
"linkTo": "HumanDonor"
},
"identical_twin": {
"title": "Identical twin",
"description": "A donor that have identical genetic material.",
- "comment": "For human biosamples, see human_donor.json for available identifiers. For mouse biosamples, see mouse_donor.json for available identifiers.",
+ "comment": "For human biosamples, see human_donor.json for available identifiers.",
"type": "string",
"linkTo": "HumanDonor"
},
| 2 |
diff --git a/env.sample b/env.sample @@ -12,8 +12,8 @@ MONSOON_OPENSTACK_AUTH_API_ENDPOINT=http://localhost:5000/v3/auth/tokens
MONSOON_OPENSTACK_AUTH_API_USERID=admin
MONSOON_OPENSTACK_AUTH_API_PASSWORD=devstack
MONSOON_OPENSTACK_AUTH_API_DOMAIN=Default
-# openstack service endpoint interface, default internal
-# DEFAULT_SERVICE_INTERFACE=internal
+# openstack service endpoint interface, default internal (for local development you most likely need to set this to public)
+DEFAULT_SERVICE_INTERFACE=public
MONSOON_DASHBOARD_REGION=eu-de-1
MONSOON_DASHBOARD_MAIL_SERVER=<your-server>
| 12 |
diff --git a/client/GameComponents/PlayerRow.jsx b/client/GameComponents/PlayerRow.jsx @@ -196,16 +196,13 @@ class PlayerRow extends React.Component {
{hand}
</div>
- <CardCollection className='draw' title='Draw' source='draw deck' cards={this.props.drawDeck}
+ <CardCollection className='draw' title='Conflict' source='conflict draw deck' cards={this.props.conflictDrawDeck}
onMouseOver={this.props.onMouseOver} onMouseOut={this.props.onMouseOut} onCardClick={this.props.onCardClick}
popupLocation={this.props.isMe || this.props.spectating ? 'top' : 'bottom'} onDragDrop={this.props.onDragDrop}
menu={drawDeckMenu} hiddenTopCard cardCount={this.props.numDrawCards} popupMenu={drawDeckPopupMenu} />
- <CardCollection className='discard' title='Discard' source='discard pile' cards={this.props.discardPile}
+ <CardCollection className='discard' title='Conflict Discard' source='conflict discard pile' cards={this.props.conflictDiscardPile}
onMouseOver={this.props.onMouseOver} onMouseOut={this.props.onMouseOut} onCardClick={this.props.onCardClick}
popupLocation={this.props.isMe || this.props.spectating ? 'top' : 'bottom'} onDragDrop={this.props.onDragDrop} />
- <CardCollection className='dead' title='Dead' source='dead pile' cards={this.props.deadPile}
- onMouseOver={this.props.onMouseOver} onMouseOut={this.props.onMouseOut} onCardClick={this.props.onCardClick}
- popupLocation={this.props.isMe || this.props.spectating ? 'top' : 'bottom'} onDragDrop={this.props.onDragDrop} orientation='kneeled' />
{additionalPiles}
</div>
</div>
@@ -216,9 +213,8 @@ class PlayerRow extends React.Component {
PlayerRow.displayName = 'PlayerRow';
PlayerRow.propTypes = {
additionalPiles: React.PropTypes.object,
- deadPile: React.PropTypes.array,
- discardPile: React.PropTypes.array,
- drawDeck: React.PropTypes.array,
+ conflictDiscardPile: React.PropTypes.array,
+ conflictDrawDeck: React.PropTypes.array,
hand: React.PropTypes.array,
isMe: React.PropTypes.bool,
numDrawCards: React.PropTypes.number,
@@ -231,7 +227,7 @@ PlayerRow.propTypes = {
onMouseOver: React.PropTypes.func,
onShuffleClick: React.PropTypes.func,
plotDeck: React.PropTypes.array,
- power: React.PropTypes.number,
+ honor: React.PropTypes.number,
showDrawDeck: React.PropTypes.bool,
spectating: React.PropTypes.bool
};
| 2 |
diff --git a/test/jasmine/tests/finance_test.js b/test/jasmine/tests/finance_test.js @@ -963,3 +963,79 @@ describe('finance charts updates:', function() {
});
});
});
+
+describe('finance charts *special* handlers:', function() {
+
+ afterEach(destroyGraphDiv);
+
+ it('`editable: true` handles should work', function(done) {
+
+ function editText(itemNumber, newText) {
+ var textNode = d3.selectAll('text.legendtext')
+ .filter(function(_, i) { return i === itemNumber; }).node();
+ textNode.dispatchEvent(new window.MouseEvent('click'));
+
+ var editNode = d3.select('.plugin-editable.editable').node();
+ editNode.dispatchEvent(new window.FocusEvent('focus'));
+
+ editNode.textContent = newText;
+ editNode.dispatchEvent(new window.FocusEvent('focus'));
+ editNode.dispatchEvent(new window.FocusEvent('blur'));
+
+ editNode.remove();
+ }
+
+ Plotly.plot(createGraphDiv(), [
+ Lib.extendDeep({}, mock0, { type: 'ohlc' }),
+ Lib.extendDeep({}, mock0, { type: 'candlestick' })
+ ], {}, {
+ editable: true
+ })
+ .then(function(gd) {
+ return new Promise(function(resolve) {
+ gd.once('plotly_restyle', function(eventData) {
+ expect(eventData[0]['increasing.name']).toEqual('0');
+ expect(eventData[1]).toEqual([0]);
+ resolve(gd);
+ });
+
+ editText(0, '0');
+ });
+ })
+ .then(function(gd) {
+ return new Promise(function(resolve) {
+ gd.once('plotly_restyle', function(eventData) {
+ expect(eventData[0]['decreasing.name']).toEqual('1');
+ expect(eventData[1]).toEqual([0]);
+ resolve(gd);
+ });
+
+ editText(1, '1');
+ });
+ })
+ .then(function(gd) {
+ return new Promise(function(resolve) {
+ gd.once('plotly_restyle', function(eventData) {
+ expect(eventData[0]['decreasing.name']).toEqual('2');
+ expect(eventData[1]).toEqual([1]);
+ resolve(gd);
+ });
+
+ editText(3, '2');
+ });
+ })
+ .then(function(gd) {
+ return new Promise(function(resolve) {
+ gd.once('plotly_restyle', function(eventData) {
+ expect(eventData[0]['increasing.name']).toEqual('3');
+ expect(eventData[1]).toEqual([1]);
+ resolve(gd);
+ });
+
+ editText(2, '3');
+ });
+ })
+ .then(done);
+ });
+
+});
| 0 |
diff --git a/server/game/player.js b/server/game/player.js @@ -901,7 +901,7 @@ class Player extends Spectator {
return !_.any(this.game.getPlayers(), player => {
return player.anyCardsInPlay(c => (
c.name === card.name
- && (c.owner === this || c.controller === this)
+ && ((c.owner === this || c.controller === this) || (c.owner === card.owner))
&& c !== card
));
});
| 3 |
diff --git a/src/core/operations/ParseQRCode.mjs b/src/core/operations/ParseQRCode.mjs @@ -23,11 +23,17 @@ class ParseQRCode extends Operation {
this.name = "Parse QR Code";
this.module = "Image";
- this.description = "Reads an image file and attempts to detect and read a QR code from the image.";
+ this.description = "Reads an image file and attempts to detect and read a QR code from the image.<br><br><u>Normalise Image</u><br>Attempt to normalise the image before parsing it, to try and improve detection of a QR code.";
this.infoURL = "https://wikipedia.org/wiki/QR_code";
this.inputType = "byteArray";
this.outputType = "string";
- this.args = [];
+ this.args = [
+ {
+ "name": "Normalise image",
+ "type": "boolean",
+ "value": true
+ }
+ ];
}
/**
@@ -37,38 +43,55 @@ class ParseQRCode extends Operation {
*/
async run(input, args) {
const type = Magic.magicFileType(input);
+ const [normalise] = args;
// Make sure that the input is an image
if (type && type.mime.indexOf("image") === 0){
-
- return new Promise((resolve, reject) => {
- // Read the input
+ let normalisedImage = null;
+ if (normalise){
+ // Process the image to be easier to read by jsqr
+ // Disables the alpha channel
+ // Sets the image default background to white
+ // Normalises the image colours
+ // Makes the image greyscale
+ // Converts image to a JPEG
+ normalisedImage = await new Promise((resolve, reject) => {
jimp.read(Buffer.from(input))
.then(image => {
- image.rgba(false); // Disable RGBA (uses just RGB)
-
- // Get the buffer of the new image and read it in Jimp
- // Don't actually need the new image buffer, just need
- // Jimp to refresh the current object
- image.getBuffer(image.getMIME(), (err, buffer) => {
- jimp.read(buffer)
- .then(newImage =>{
- // If the image has been read correctly, try to find a QR code
+ image
+ .rgba(false)
+ .background(0xFFFFFFFF)
+ .normalize()
+ .greyscale()
+ .getBuffer(jimp.MIME_JPEG, (error, result) => {
+ resolve([...result]);
+ });
+ })
+ .catch(err => {
+ reject(new OperationError("Error reading the image file."));
+ });
+ });
+ } else {
+ normalisedImage = input;
+ }
+ if (normalisedImage instanceof OperationError){
+ return normalisedImage;
+ }
+ return new Promise((resolve, reject) => {
+ jimp.read(Buffer.from(normalisedImage))
+ .then(image => {
if (image.bitmap != null){
const qrData = jsqr(image.bitmap.data, image.getWidth(), image.getHeight());
if (qrData != null){
resolve(qrData.data);
} else {
- log.error(image.bitmap);
- reject(new OperationError("Error parsing QR code from image."));
+ reject(new OperationError("Couldn't read a QR code from the image."));
}
} else {
- reject(new OperationError("Error reading the image data."));
+ reject(new OperationError("Error reading the normalised image file."));
}
- });
- });
})
.catch(err => {
- reject(new OperationError("Error opening the image. Are you sure this is an image file?"));
+ reject(new OperationError("Error reading the normalised image file."));
});
});
} else {
| 7 |
diff --git a/src/components/TimeSeriesCard/TimeSeriesCard.jsx b/src/components/TimeSeriesCard/TimeSeriesCard.jsx @@ -166,7 +166,11 @@ const TimeSeriesCard = ({
}
};
- const ticksInterval = Math.round(valueSort.length / maxTicksPerSize(size));
+ const ticksInterval =
+ Math.round(valueSort.length / maxTicksPerSize(size)) !== 0
+ ? Math.round(valueSort.length / maxTicksPerSize(size))
+ : 1;
+
const labels = valueSort.map((i, idx) =>
idx % ticksInterval === 0
? formatInterval(i[timeDataSourceId], idx, ticksInterval)
| 1 |
diff --git a/AdditionalPostModActions.user.js b/AdditionalPostModActions.user.js // @description Adds a menu with mod-only quick actions in post sidebar
// @homepage https://github.com/samliew/SO-mod-userscripts
// @author @samliew
-// @version 2.4
+// @version 2.5
//
// @include https://*stackoverflow.com/*
// @include https://*serverfault.com/*
}
+ // Edit individual post to remove more than one @ symbols to be able to convert to comment without errors
+ function tryRemoveMultipleAtFromPost(pid) {
+ return new Promise(function(resolve, reject) {
+ if(typeof pid === 'undefined' || pid === null) { reject(); return; }
+
+ $.get(`https://${location.hostname}/posts/${pid}/edit`)
+ .done(function(data) {
+ const editUrl = $('#post-form-' + pid, data).attr('action');
+ let postText = $('#wmd-input-' + pid, data).val();
+
+ const matches = postText.match(/[@]/g);
+ if(matches && matches.length <= 1) { resolve(); return; }
+
+ postText = postText.replace(/ [@]([\w.-]+)\b/g, ' $1');
+ console.log(editUrl, postText);
+
+ $.post({
+ url: `https://${location.hostname}${editUrl}`,
+ data: {
+ 'is-current': true,
+ 'edit-comment': 'remove additional @ for converting to comment',
+ 'post-text': postText,
+ 'fkey': fkey
+ }
+ })
+ .done(resolve)
+ .fail(reject);
+ });
+ });
+ }
// Convert to comment
function convertToComment(pid, targetId) {
return new Promise(function(resolve, reject) {
if(typeof pid === 'undefined' || pid === null) { reject(); return; }
if(typeof targetId === 'undefined' || targetId === null) { reject(); return; }
+ tryRemoveMultipleAtFromPost(pid).then(v => {
$.post({
url: `https://${location.hostname}/admin/posts/${pid}/convert-to-comment`,
data: {
.done(resolve)
.fail(reject);
});
+ });
}
// Convert to edit
function convertToEdit(pid, targetId) {
| 2 |
diff --git a/src/components/DayPickerRangeController.jsx b/src/components/DayPickerRangeController.jsx @@ -84,6 +84,7 @@ const propTypes = forbidExtraProps({
onOutsideClick: PropTypes.func,
renderCalendarDay: PropTypes.func,
renderDayContents: PropTypes.func,
+ renderCalendarInfo: PropTypes.func,
renderKeyboardShortcutsButton: PropTypes.func,
calendarInfoPosition: CalendarInfoPositionShape,
firstDayOfWeek: DayOfWeekShape,
@@ -147,6 +148,7 @@ const defaultProps = {
renderCalendarDay: undefined,
renderDayContents: null,
+ renderCalendarInfo: null,
renderMonthElement: null,
renderKeyboardShortcutsButton: undefined,
calendarInfoPosition: INFO_POSITION_BOTTOM,
| 14 |
diff --git a/lib/assets/test/spec/new-dashboard/unit/specs/core/visualization.spec.js b/lib/assets/test/spec/new-dashboard/unit/specs/core/visualization.spec.js @@ -13,21 +13,24 @@ function configCartoModels (attributes = {}) {
}
describe('visualization.js', () => {
- it('should say the map is shared', () => {
+ describe('isShared', () => {
+ it('should return true when logged in user is different than map owner', () => {
const $cartoModels = configCartoModels({ user: usersArray[0] });
const map = mapArray.visualizations[0];
expect(Visualization.isShared(map, $cartoModels)).toBe(false);
});
- it('should say the map is not shared', () => {
+ it('should return false when logged in user is equal to the map owner', () => {
const $cartoModels = configCartoModels({ user: usersArray[1] });
const map = mapArray.visualizations[0];
expect(Visualization.isShared(map, $cartoModels)).toBe(true);
});
+ });
- it('should return correct own url', () => {
+ describe('getURL', () => {
+ it('should return url with the map id when map is not shared', () => {
const $cartoModels = configCartoModels();
const map = mapArray.visualizations[0];
const url = Visualization.getURL(map, $cartoModels);
@@ -35,7 +38,7 @@ describe('visualization.js', () => {
expect(url).toBe('http://example.com/viz/e97e0001-f1c2-425e-8c9b-0fb28da59200');
});
- it('should return correct shared url', () => {
+ it('should return the shared map url when the map is shared', () => {
const $cartoModels = configCartoModels({ user: usersArray[1] });
const map = mapArray.visualizations[0];
@@ -44,8 +47,10 @@ describe('visualization.js', () => {
expect(url).toBe('http://cdb.localhost.lan:3000/viz/hello.e97e0001-f1c2-425e-8c9b-0fb28da59200');
});
+ });
- it('should return correct regular thumbnail url', () => {
+ describe('getThumbnailUrl', () => {
+ it('should return correct regular thumbnail url when cdn config is missing', () => {
const $cartoModels = configCartoModels();
const map = mapArray.visualizations[0];
@@ -54,14 +59,13 @@ describe('visualization.js', () => {
expect(thumbnailUrl).toBe('http://hello.example.com/api/v1/map/static/named/tpl_e97e0001_f1c2_425e_8c9b_0fb28da59200/288/125.png');
});
- it('should return correct cdn thumbnail url', () => {
+ it('should return correct cdn thumbnail url when cdn config is provided', () => {
const cdnConfig = {
cdn_url: {
http: 'cdn.example.com',
https: 'cdn.example.com'
}
};
-
const $cartoModels = configCartoModels({ config: cdnConfig });
const map = mapArray.visualizations[0];
@@ -70,3 +74,4 @@ describe('visualization.js', () => {
expect(thumbnailUrl).toBe('http://cdn.example.com/hello/api/v1/map/static/named/tpl_e97e0001_f1c2_425e_8c9b_0fb28da59200/288/125.png');
});
});
+});
| 3 |
diff --git a/src/components/common/Balance.test.js b/src/components/common/Balance.test.js import React from 'react';
-import { shallow, configure, render } from 'enzyme';
+import { shallow, configure } from 'enzyme';
import Adapter from 'enzyme-adapter-react-16';
import Balance from './Balance'
| 1 |
diff --git a/api/models/community.js b/api/models/community.js @@ -170,7 +170,7 @@ export const getCommunitiesOnlineMemberCounts = (
) => {
return db
.table('usersCommunities')
- .getAll('e8792514-dc32-43ff-a26e-81c85754f193', '-Kh6RfPYjmSaIWbkck8i', {
+ .getAll(...communityIds, {
index: 'communityId',
})
.filter({ isBlocked: false, isMember: true })
| 1 |
diff --git a/assets/sass/components/idea-hub/_googlesitekit-idea-hub-pagination.scss b/assets/sass/components/idea-hub/_googlesitekit-idea-hub-pagination.scss padding: 0;
width: 36px;
- &:first-child {
- margin: 0 12px 0 16px;
- }
-
&:hover {
background-color: $c-idea-hub-button-hover;
}
| 2 |
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', 'height: 20px !important');
+ document.querySelector(`.web-chrome`).setAttribute('style', 'height: 20px !important');
} else {
- document.querySelector(`div[aria-label="Media Controls"]`).setAttribute('style', 'height: 55px !important');
+ document.querySelector(`.web-chrome`).setAttribute('style', 'height: 55px !important');
}
}
} else {
- document.querySelector(`div[aria-label="Media Controls"]`).setAttribute('style', 'height: 55px !important');
+ document.querySelector(`.web-chrome`).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', 'height: 20px !important');
+ document.querySelector(`.web-chrome`).setAttribute('style', 'height: 20px !important');
} else {
- document.querySelector(`div[aria-label="Media Controls"]`).setAttribute('style', 'height: 55px !important');
+ document.querySelector(`.web-chrome`).setAttribute('style', 'height: 55px !important');
}
}
} catch (e) {
| 1 |
diff --git a/src/scrivito_extensions.js b/src/scrivito_extensions.js +import * as React from "react";
+import * as Scrivito from "scrivito";
+import * as ReactDOM from "react-dom";
+
import "./Objs";
import "./Objs/editingConfigs";
import "./Widgets";
@@ -6,4 +10,5 @@ import { configure } from "./config";
import "./Components/ScrivitoExtensions";
import "./assets/stylesheets/index.scss";
+ReactDOM.render(<Scrivito.Extensions />, document.createElement("div"));
configure();
| 4 |
diff --git a/src/library/modules/TsunDBSubmission.js b/src/library/modules/TsunDBSubmission.js const apiData = http.response.api_data;
this.celldata.map = this.data.map;
- this.celldata.data = apiData.api_cell_data;4
+ this.celldata.data = apiData.api_cell_data;
//this.sendData(this.celldata, '???');
},
this.data.sortiedFleet = Number(http.params.api_deck_id);
this.data.fleetType = PlayerManager.combinedFleet;
- // Sets the map ID
+ // Sets the map value
const world = Number(apiData.api_maparea_id);
const map = Number(apiData.api_mapinfo_no);
this.currentMap = [world, map];
- const mapId = this.currentMap.join('');
- const mapData = this.mapInfo.find(i => i.api_id == mapId) || {};
this.data.map = this.currentMap.join('-');
- // Sets whether the map is cleared or not
- this.data.cleared = mapData.api_cleared;
-
this.processCellData(http);
this.processNext(http);
// Sets player's HQ level
this.data.hqLvl = PlayerManager.hq.level;
+ // Sets the map id
+ const mapId = this.currentMap.join('');
+ const mapData = this.mapInfo.find(i => i.api_id == mapId) || {};
+
+ // Sets whether the map is cleared or not
+ this.data.cleared = mapData.api_cleared;
+
// Charts the route array using edge ids as values
this.data.edgeID.push(apiData.api_no);
| 1 |
diff --git a/ranvier b/ranvier @@ -16,6 +16,7 @@ const semver = require('semver');
const net = require('net');
const commander = require('commander');
const argv = require('optimist').argv;
+const fs = require('fs');
// for dev clone the github:ranviermud/core repo, and run npm link in that folder, then come
// back to the ranviermud repo and run npm link ranvier
@@ -34,7 +35,15 @@ if (!semver.satisfies(process.version, pkg.engines.node)) {
// Wrapper for ranvier.json
Ranvier.Data.setDataPath(__dirname + '/data/');
+if (fs.existsSync('./ranvier.conf.js')) {
+ console.log(require('./ranvier.conf.js').dataSources);
+ Config.load(require('./ranvier.conf.js'));
+} else if (fs.existsSync('./ranvier.json')) {
Config.load(require('./ranvier.json'));
+} else {
+ console.error('ERROR: No ranvier.json or ranvier.conf.js found');
+ process.exit(1);
+}
// cmdline options
commander
| 11 |
diff --git a/definitions/npm/ramda_v0.x.x/flow_v0.82.x-/ramda_v0.x.x.js b/definitions/npm/ramda_v0.x.x/flow_v0.82.x-/ramda_v0.x.x.js @@ -1141,8 +1141,8 @@ declare module ramda {
declare function pathEq(
path: Array<string>,
- ): ((val: any, o: Object) => boolean) &
- ((val: any) => (o: Object) => boolean);
+ ): ((val: any) => (o: Object) => boolean) &
+ ((val: any, o: Object) => boolean);
declare function pathEq(
path: Array<string>,
val: any,
@@ -1354,8 +1354,8 @@ declare module ramda {
src: { [k: string]: T }
): { [k: string]: T };
- declare function evolve<A: Object>(NestedObject<Function>, A): A;
declare function evolve<A: Object>(NestedObject<Function>): A => A;
+ declare function evolve<A: Object>(NestedObject<Function>, A): A;
declare function eqProps(
key: string,
@@ -1369,8 +1369,8 @@ declare module ramda {
): (o2: Object) => boolean;
declare function eqProps(key: string, o1: Object, o2: Object): boolean;
- declare function has(key: string, o: Object): boolean;
declare function has(key: string): (o: Object) => boolean;
+ declare function has(key: string, o: Object): boolean;
declare function hasIn(key: string, o: Object): boolean;
declare function hasIn(key: string): (o: Object) => boolean;
| 1 |
diff --git a/Bundle/CoreBundle/Resources/public/js/edit/widget.js b/Bundle/CoreBundle/Resources/public/js/edit/widget.js @@ -52,19 +52,19 @@ $vic(document).on('click', '.v-modal--widget a[data-modal="update"], .v-modal--w
var forms = [];
$vic('[data-group="tab-widget-quantum"]').each(function() {
- var quantumLetter = $(this).data('quantum');
+ var quantumLetter = $vic(this).data('quantum');
// matches widget edit form with more than one mode available
- var activeForm = $(this).find('[data-group="picker-' + quantumLetter + '"][data-state="visible"] [data-flag="v-collapse"][data-state="visible"] > form');
+ var activeForm = $vic(this).find('[data-group="picker-' + quantumLetter + '"][data-state="visible"] [data-flag="v-collapse"][data-state="visible"] > form');
// matches widget edit form with only static mode available
if (activeForm.length == 0) {
- activeForm = $(this).find('[data-group="picker-' + quantumLetter + '"][data-state="visible"] form');
+ activeForm = $vic(this).find('[data-group="picker-' + quantumLetter + '"][data-state="visible"] form');
}
// matches widget stylize form
- if (activeForm.length == 0 && $(this).attr('data-state') == 'visible') {
- activeForm = $(this).find('form[name="widget_style"]');
+ if (activeForm.length == 0 && $vic(this).attr('data-state') == 'visible') {
+ activeForm = $vic(this).find('form[name="widget_style"]');
}
forms = $vic.merge(forms, [activeForm]);
| 4 |
diff --git a/userscript.user.js b/userscript.user.js @@ -12408,8 +12408,8 @@ var $$IMU_EXPORT$$;
subcategory: "ui"
},
mouseover_apply_blacklist: {
- name: "Don't popup blacklisted images",
- description: "This option prevents a popup from appearing altogether for blacklisted images",
+ name: "Don't popup blacklisted URLs",
+ description: "This option popping up for source media with blacklisted URLs. If this is disabled, the popup will open if the end URL isn't blacklisted, regardless of whether the source is blacklisted.",
requires: {
mouseover: true
},
| 7 |
diff --git a/token-metadata/0x1D287CC25dAD7cCaF76a26bc660c5F7C8E2a05BD/metadata.json b/token-metadata/0x1D287CC25dAD7cCaF76a26bc660c5F7C8E2a05BD/metadata.json "symbol": "FET",
"address": "0x1D287CC25dAD7cCaF76a26bc660c5F7C8E2a05BD",
"decimals": 18,
- "dharmaVerificationStatus": {
"dharmaVerificationStatus": "VERIFIED"
}
\ No newline at end of file
-}
\ No newline at end of file
| 3 |
diff --git a/src/markdown/handbook/grow/career-paths/individual-contributor.mdx b/src/markdown/handbook/grow/career-paths/individual-contributor.mdx @@ -19,7 +19,7 @@ The individual contributor (IC) career path starts with people beginning their d
caption="To provide room for growth and relevance in the market, each skill is assessed on an exponential scale."
/>
-Each skill is split into 5 levels in an approximately exponential scale. This is designed to accomodate early-career designers leveling up at an appropriate rate, and prevent the inflation or creation of essentially meaningless job titles that serve to confuse rather than reflect the true value a mid and senior level designer brings.
+Each skill is split into 5 levels in an approximately exponential scale. This is designed to accomodate early-career designers leveling up at an appropriate rate. This helps prevent the creation of functionally meaningless job titles that often confuse, rather than reflect the true value mid and senior level designers bring.
## Support | Starting their professional journey
| 7 |
diff --git a/src/lang/en-US.json b/src/lang/en-US.json "npc_dota_lone_druid_bear#": "Spirit Bear",
"npc_dota_brewmaster_storm_#": "Storm Brewling",
"npc_dota_visage_familiar#": "Familiar",
- "npc_dota_warlock_golem_#": "Warlocks Golem",
- "npc_dota_warlock_golem_scepter_#": "Warlocks Golem",
+ "npc_dota_warlock_golem_#": "Warlock Golem",
+ "npc_dota_warlock_golem_scepter_#": "Warlock Golem",
"npc_dota_witch_doctor_death_ward": "Death Ward",
"npc_dota_tusk_frozen_sigil#": "Frozen Sigil",
"npc_dota_juggernaut_healing_ward": "Healing Ward",
| 1 |
diff --git a/src/2_resources.js b/src/2_resources.js @@ -282,8 +282,7 @@ resources.deepview = {
"stage": validator(false, validationTypes.STRING),
"tags": validator(false, validationTypes.ARRAY),
"deepview_type": validator(true, validationTypes.STRING),
- "source": validator(true, validationTypes.STRING),
- "identity": validator(true, validationTypes.STRING)
+ "source": validator(true, validationTypes.STRING)
})
};
| 2 |
diff --git a/electron/operations/runParity.js b/electron/operations/runParity.js @@ -24,7 +24,7 @@ let parity = null; // Will hold the running parity instance
// parity-ui tries to launch another one.
const catchableErrors = [
'is already in use, make sure that another instance of an Ethereum client is not running or change the address using the --ws-port and --ws-interface options.',
- 'Error(Msg("IO error: While lock file:'
+ 'IO error: While lock file:'
];
module.exports = {
| 1 |
diff --git a/admin-base/ui.apps/src/main/content/jcr_root/apps/admin/components/explorer/template.vue b/admin-base/ui.apps/src/main/content/jcr_root/apps/admin/components/explorer/template.vue <template>
-<div class="explorer">
+<div class="explorer"
+ v-on:drag.prevent ="stopPropagation"
+ v-on:dragstart.prevent ="stopPropagation"
+ v-on:dragover.prevent ="setDragState"
+ v-on:dragenter.prevent ="setDragState"
+ v-on:dragleave.prevent ="unSetDragState"
+ v-on:dragend.prevent ="unSetDragState"
+ v-on:drop.prevent ="onDropFile">
<!--
<template v-for="segment in pathSegments">
<admin-components-action
<script>
export default {
props: ['model'],
+ data(){
+ return{
+ isDragging: false,
+ uploadProgress: 0
+ }
+ },
computed: {
path: function() {
var dataFrom = this.model.dataFrom
}
},
methods: {
+ /* file upload */
+ setDragState(ev){
+ ev.stopPropagation()
+ this.isDragging = true
+ },
+ unSetDragState(ev){
+ ev.stopPropagation()
+ this.isDragging = false
+ },
+ stopPropagation(ev){
+ ev.stopPropagation()
+ },
+ uploadFile(files) {
+ $perAdminApp.stateAction('uploadFiles', {
+ path: $perAdminApp.getView().state.tools.assets,
+ files: files,
+ cb: this.setUploadProgress
+ })
+ },
+ setUploadProgress(percentCompleted){
+ this.uploadProgress = percentCompleted
+ if(percentCompleted === 100){
+ $perAdminApp.notifyUser(
+ 'Success',
+ 'File uploaded successfully.',
+ () => { this.uploadProgress = 0 }
+ )
+ }
+ },
+ onDropFile(ev){
+ console.log('onDropFile')
+ ev.stopPropagation()
+ this.isDragging = false
+ this.uploadFile(ev.dataTransfer.files)
+ },
+
isSelected: function(child) {
if(this.model.selectionFrom && child) {
| 11 |
diff --git a/src/lib/API.js b/src/lib/API.js @@ -76,7 +76,7 @@ function createLogin(login, password) {
}
Ion.merge(IONKEYS.CREDENTIALS, {login, password});
})
- .catch(err => Ion.merge(IONKEYS.SESSION, {error: err}));
+ .catch(err => Ion.merge(IONKEYS.SESSION, {error: err.message}));
}
/**
| 12 |
diff --git a/articles/compliance/gdpr/features-aiding-compliance/user-consent/index.md b/articles/compliance/gdpr/features-aiding-compliance/user-consent/index.md ---
-title: "GDPR Compliance: Conditions for Consent"
+title: "GDPR: Conditions for Consent"
description: This article discusses which Auth0 features can help customers comply with the Conditions for Consent GDPR requirements
toc: true
---
-# GDPR Compliance: Conditions for Consent
+# GDPR: Conditions for Consent
According to Article 7 of GDPR, you must ask users to consent on the processing of their personal data in a clear and easily accessible form. You must also show that the user has consented, and provide an easy way to withdraw consent at any time.
| 3 |
diff --git a/README.md b/README.md # TimeOff.Management
-Web application for managing employees absence.
+Web application for managing employee absences.
[](https://waffle.io/timeoff-management/application)
@@ -9,7 +9,7 @@ Web application for managing employees absence.
## Features
-**Multiple views of staff absence**
+**Multiple views of staff absences**
Calendar view, Team view, or Just plain list.
@@ -17,25 +17,25 @@ Calendar view, Team view, or Just plain list.
Add custom absence types: Sickness, Maternity, Working from home, Birthday etc. Define if each uses vacation allowance.
-Optionally limit the amount of days employee can take for each Leave type. E.g. no more than 10 days of Sick days per year.
+Optionally limit the amount of days employees can take for each Leave type. E.g. no more than 10 Sick days per year.
Setup public holidays as well as company specific days off.
-Group employees by departments: bring your organisation structure into, set the supervisor for every department.
+Group employees by departments: bring your organisational structure, set the supervisor for every department.
Customisable working schedule for company and individuals.
**Third Party Calendar Integration**
-Broadcast employees whereabout into external calendar providers: MS Outlook, Google Calendar, and iCal.
+Broadcast employee whereabouts into external calendar providers: MS Outlook, Google Calendar, and iCal.
-Create calendar feeds for individual, departments or entire company.
+Create calendar feeds for individuals, departments or entire company.
**Three Steps Workflow**
-Employee request time off or revoke existing one.
+Employee requests time off or revokes existing one.
-Supervisor get email notification and decide about upcoming employee absence.
+Supervisor gets email notification and decides about upcoming employee absence.
Absence is accounted. Peers are informed via team view or calendar feeds.
@@ -43,15 +43,13 @@ Absence is accounted. Peers are informed via team view or calendar feeds.
There are following types of users: employees, supervisors, and administrators.
-Optional LDAP authentification: configure applicationto use your LDAP server for user authentication.
+Optional LDAP authentication: configure application to use your LDAP server for user authentication.
**Seamless data migration betweeen different installations**
-User friendly and simple work-flow for data migration between different TimeOff.Management installations.
+User friendly and simple workflow for data migration between different TimeOff.Management installations.
-Admin user can download the entire company data as a single JSON file.
-
-And then restore the account at different installation by simply uploading the JSON.
+Admin user can download the entire company data as a single JSON file and then restore the account at a different installation by simply uploading the JSON.
**Works on mobile phones**
@@ -63,16 +61,14 @@ The most used customer paths are mobile friendly:
**Lots of other little things that would make life easier**
-Manually adjust employees allowance
+Manually adjust employee allowances
e.g. employee has extra day in lieu.
-Upon creation employee receives pro rata vacation allowance, depending on start date.
-
-Users of three types: admins, supervisors, and employees.
+Upon creation employee receives pro-rated vacation allowance, depending on start date.
Email notification to all involved parties.
-Optionally allow employees to see the time off information of entire company regardless the department structure.
+Optionally allow employees to see the time off information of entire company regardless of department structure.
## Screenshots
@@ -131,4 +127,3 @@ npm start
## Feedback
Please report any issues or feedback to <a href="https://twitter.com/FreeTimeOffApp">twitter</a> or Email: pavlo at timeoff.management
\ No newline at end of file
-
| 1 |
diff --git a/test/unit/modal/modal-component.js b/test/unit/modal/modal-component.js @@ -21,13 +21,14 @@ describe('Modal Component class', () => {
it('creates a child div element to node in config if provided and sets node to child element', () => {
const div = document.createElement('div');
- const appendChildStub = sinon.stub(node, 'appendChild').returns(node);
+ const child = document.createElement('div');
+ const appendChildStub = sinon.stub(node, 'appendChild').returns(child);
const createElementStub = sinon.stub(document, 'createElement').returns(div);
modal = new Modal({node}, {});
assert.calledOnce(appendChildStub);
assert.calledWith(appendChildStub, div);
- assert.equal(modal.node, node);
+ assert.equal(modal.node, child);
appendChildStub.restore();
createElementStub.restore();
@@ -35,13 +36,14 @@ describe('Modal Component class', () => {
it('creates a new div element in the document body and sets node to the new element if a node is not provided in config', () => {
const div = document.createElement('div');
- const appendChildStub = sinon.stub(document.body, 'appendChild').returns(node);
+ const child = document.createElement('div');
+ const appendChildStub = sinon.stub(document.body, 'appendChild').returns(child);
const createElementStub = sinon.stub(document, 'createElement').returns(div);
modal = new Modal({}, {});
assert.calledOnce(appendChildStub);
assert.calledWith(appendChildStub, div);
- assert.equal(modal.node, node);
+ assert.equal(modal.node, child);
appendChildStub.restore();
createElementStub.restore();
@@ -71,26 +73,17 @@ describe('Modal Component class', () => {
describe('prototype methods', () => {
const config = {
node: document.createElement('div'),
- options: {
- product: {
- iframe: false,
- templates: {
- button: '<button id="button" class="button">Fake button</button>',
- },
- },
- },
};
let props;
let modal;
let closeModalStub;
- let testProductCopy;
+ const testProductCopy = Object.assign({}, productFixture);
beforeEach(() => {
closeModalStub = sinon.stub().resolves();
props = {
closeModal: closeModalStub,
};
- testProductCopy = Object.assign({}, productFixture);
modal = new Modal(config, props);
});
@@ -234,12 +227,13 @@ describe('Modal Component class', () => {
});
});
- describe('get productConfig', () => {
+ describe('productConfig', () => {
it('returns object that includes global config', () => {
assert.deepInclude(modal.productConfig, modal.globalConfig);
});
it('returns object with node that holds product wrapper', () => {
+ modal.productWrapper = document.createElement('div');
assert.deepInclude(modal.productConfig, {node: modal.productWrapper});
});
| 10 |
diff --git a/components/post.js b/components/post.js @@ -144,6 +144,25 @@ function Post({title, published_at, feature_image, html, backLink}) {
border-radius: 0 2px 2px 0;
}
+ .kg-gallery-row {
+ contain: content;
+ display: grid;
+ grid-gap: .5em;
+ grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
+ }
+
+ .kg-gallery-image img {
+ width: auto;
+ max-width: 100%;
+ height: auto;
+ border-radius: 8px;
+ margin: auto;
+ }
+
+ .kg-align-center {
+ text-align: center;
+ }
+
.kg-button-card a {
color: white;
background-color: ${colors.blue};
| 0 |
diff --git a/src/settings/MessageManager.js b/src/settings/MessageManager.js @@ -89,13 +89,13 @@ class MessaageManager {
* @param {boolean} deleteOriginal True to delete the original message
* @param {boolean} deleteResponse True to delete the sent message after time
*/
- embed(message, embed, deleteOriginal, deleteResponse) {
+ embed(message, embed, deleteOriginal, deleteResponse, content) {
const promises = [];
if ((message.channel.type === 'text' &&
message.channel.permissionsFor(this.client.user.id)
.has(['SEND_MESSAGES', 'EMBED_LINKS']))
|| message.channel.type === 'dm') {
- promises.push(message.channel.send('', { embed }).then((msg) => {
+ promises.push(message.channel.send(content || '', { embed }).then((msg) => {
this.deleteCallAndResponse(message, msg, deleteOriginal, deleteResponse);
}));
}
| 11 |
diff --git a/packages/ui-core/.babelrc b/packages/ui-core/.babelrc {
- "env": {
- "test": {
- "presets": ["@babel/preset-env", "@babel/preset-react"],
- "plugins": [
- "@babel/plugin-syntax-dynamic-import",
- "@babel/plugin-syntax-import-meta",
- "@babel/plugin-proposal-class-properties",
- "@babel/plugin-proposal-json-strings",
- [
- "@babel/plugin-proposal-decorators",
- {
- "legacy": true
- }
- ],
- "@babel/plugin-proposal-function-sent",
- "@babel/plugin-proposal-export-namespace-from",
- "@babel/plugin-proposal-numeric-separator",
- "@babel/plugin-proposal-throw-expressions",
- "@babel/plugin-proposal-export-default-from",
- "@babel/plugin-proposal-logical-assignment-operators",
- "@babel/plugin-proposal-optional-chaining",
- [
- "@babel/plugin-proposal-pipeline-operator",
- {
- "proposal": "minimal"
- }
- ],
- "@babel/plugin-proposal-nullish-coalescing-operator",
- "@babel/plugin-proposal-do-expressions"
- ]
- },
- "cjs": {
- "presets": [
- [
- "@babel/preset-env",
- {
- "modules": "commonjs"
- }
- ],
- "@babel/preset-react"
- ],
- "plugins": [
- "@babel/plugin-syntax-dynamic-import",
- "@babel/plugin-syntax-import-meta",
- "@babel/plugin-proposal-class-properties",
- "@babel/plugin-proposal-json-strings",
- [
- "@babel/plugin-proposal-decorators",
- {
- "legacy": true
- }
- ],
- "@babel/plugin-proposal-function-sent",
- "@babel/plugin-proposal-export-namespace-from",
- "@babel/plugin-proposal-numeric-separator",
- "@babel/plugin-proposal-throw-expressions",
- "@babel/plugin-proposal-export-default-from",
- "@babel/plugin-proposal-logical-assignment-operators",
- "@babel/plugin-proposal-optional-chaining",
- [
- "@babel/plugin-proposal-pipeline-operator",
- {
- "proposal": "minimal"
- }
- ],
- "@babel/plugin-proposal-nullish-coalescing-operator",
- "@babel/plugin-proposal-do-expressions"
- ]
- },
- "esm": {
- "presets": [
- [
- "@babel/preset-env",
- {
- "modules": false
- }
- ],
- "@babel/preset-react"
- ],
- "plugins": [
- "@babel/plugin-syntax-dynamic-import",
- "@babel/plugin-syntax-import-meta",
- "@babel/plugin-proposal-class-properties",
- "@babel/plugin-proposal-json-strings",
- [
- "@babel/plugin-proposal-decorators",
- {
- "legacy": true
- }
- ],
- "@babel/plugin-proposal-function-sent",
- "@babel/plugin-proposal-export-namespace-from",
- "@babel/plugin-proposal-numeric-separator",
- "@babel/plugin-proposal-throw-expressions",
- "@babel/plugin-proposal-export-default-from",
- "@babel/plugin-proposal-logical-assignment-operators",
- "@babel/plugin-proposal-optional-chaining",
- [
- "@babel/plugin-proposal-pipeline-operator",
- {
- "proposal": "minimal"
- }
- ],
- "@babel/plugin-proposal-nullish-coalescing-operator",
- "@babel/plugin-proposal-do-expressions"
- ]
- }
- }
+ "extends": "@hackoregon/civic-babel-presets/.babelrc"
}
\ No newline at end of file
| 4 |
diff --git a/base/windows/djinn/DjinnListWindow.js b/base/windows/djinn/DjinnListWindow.js @@ -32,6 +32,7 @@ export class DjinnListWindow {
this.data = data;
this.base_window = new Window(this.game, WIN_X, WIN_Y, WIN_WIDTH, WIN_HEIGHT);
this.group = this.game.add.group();
+ this.group.alpha = 0;
this.chars_sprites_group = this.game.add.group();
this.group.add(this.chars_sprites_group);
this.window_open = false;
@@ -47,7 +48,7 @@ export class DjinnListWindow {
this.chars_sprites = {};
this.page_number_bar_highlight = this.game.add.graphics(0, 0);
this.page_number_bar_highlight.blendMode = PIXI.blendModes.SCREEN;
- this.base_window.add_sprite_to_group(this.page_number_bar_highlight);
+ this.group.add(this.page_number_bar_highlight);
this.page_number_bar_highlight.beginFill(this.base_window.color, 1);
this.page_number_bar_highlight.drawRect(0, 0, HIGHLIGHT_WIDTH, HIGHLIGHT_HEIGHT);
this.page_number_bar_highlight.endFill();
@@ -165,11 +166,18 @@ export class DjinnListWindow {
}
}
- unset_char_sprites() {
+ unset_page() {
for (let key in this.chars_sprites) {
this.chars_sprites[key].animations.stop();
this.chars_sprites[key].alpha = 0;
}
+ this.base_window.remove_from_group();
+ for (let i = 0; i < this.djinn_names.length; ++i) {
+ const names = this.djinn_names[i];
+ for (let j = 0; j < names.length; ++j) {
+ this.base_window.remove_text(names[j]);
+ }
+ }
}
set_highlight_bar() {
@@ -214,6 +222,7 @@ export class DjinnListWindow {
this.selected_char_index = 0;
this.selected_djinn_index = 0;
this.page_index = 0;
+ this.group.alpha = 1;
this.chars_quick_info_window = chars_quick_info_window;
this.load_page();
this.update_position();
@@ -233,7 +242,8 @@ export class DjinnListWindow {
this.window_open = false;
this.window_active = false;
this.cursor_control.deactivate();
- this.unset_char_sprites();
+ this.unset_page();
+ this.group.alpha = 0;
this.base_window.close(undefined, false);
if (close_callback) {
close_callback();
| 1 |
diff --git a/lib/components/socket.react.js b/lib/components/socket.react.js @@ -107,7 +107,6 @@ class Socket extends React.PureComponent<Props> {
socket: ?WebSocket;
initialPlatformDetailsSent = false;
nextClientMessageID = 0;
- socketInitializedAndActive = false;
transitStatuses: TransitStatus[] = [];
openSocket() {
@@ -138,7 +137,6 @@ class Socket extends React.PureComponent<Props> {
}
closeSocket() {
- this.socketInitializedAndActive = false;
registerActiveWebSocket(null);
this.props.dispatchActionPayload(
updateConnectionStatusActionType,
@@ -154,15 +152,11 @@ class Socket extends React.PureComponent<Props> {
}
markSocketInitialized() {
- this.socketInitializedAndActive = true;
registerActiveWebSocket(this.socket);
this.props.dispatchActionPayload(
updateConnectionStatusActionType,
{ status: "connected" },
);
- // In case any ClientResponses have accumulated in Redux while we were
- // initializing
- this.possiblySendReduxClientResponses();
}
componentDidMount() {
@@ -193,8 +187,9 @@ class Socket extends React.PureComponent<Props> {
}
if (
- this.socketInitializedAndActive &&
- this.props.getClientResponses !== prevProps.getClientResponses
+ this.props.connection.status === "connected" &&
+ (prevProps.connection.status !== "connected" ||
+ this.props.getClientResponses !== prevProps.getClientResponses)
) {
this.possiblySendReduxClientResponses();
}
| 14 |
diff --git a/types/lib/bank-redirect.d.ts b/types/lib/bank-redirect.d.ts @@ -43,6 +43,8 @@ export interface BankRedirectInstance extends Emitter<BankRedirectEvent> {
* Load the banks.
*/
loadBanks: (data: LoadBankOptions, attachTo?: string) => void;
+
+ loadCountries: (attachTo?: string) => void;
}
export type BankRedirect = () => BankRedirectInstance;
| 11 |
diff --git a/converters/fromZigbee.js b/converters/fromZigbee.js @@ -4359,7 +4359,7 @@ const converters = {
// DP2: Smart Air Box: co2, Smart Air Housekeeper: MP25
case tuya.dataPoints.tuyaSabCO2:
if (meta.device.manufacturerName === '_TZE200_dwcarsat') {
- if (value === 0xaaac) return; // Ignore: https://github.com/Koenkk/zigbee2mqtt/issues/11033#issuecomment-1109808552
+ if (value === 0xaaac || value === 0xaaab) return; // Ignore: https://github.com/Koenkk/zigbee2mqtt/issues/11033#issuecomment-1109808552
return {pm25: calibrateAndPrecisionRoundOptions(value, options, 'pm25')};
} else if (meta.device.manufacturerName === '_TZE200_ryfmq5rl') {
return {formaldehyd: calibrateAndPrecisionRoundOptions(value, options, 'formaldehyd') / 100};
| 8 |
diff --git a/lib/assets/javascripts/builder/embed/embed-banner-view.js b/lib/assets/javascripts/builder/embed/embed-banner-view.js var CoreView = require('backbone/core-view');
var template = require('./embed-banner.tpl');
-var checkAndBuildOpts = require('builder/helpers/required-opts');
const SIGN_UP_URL = 'https://carto.com/signup';
const REMOVE_BANNER_URL = 'https://carto.com/help';
| 2 |
diff --git a/token-metadata/0x4eCB692B0fEDeCD7B486b4c99044392784877E8C/metadata.json b/token-metadata/0x4eCB692B0fEDeCD7B486b4c99044392784877E8C/metadata.json "symbol": "CHERRY",
"address": "0x4eCB692B0fEDeCD7B486b4c99044392784877E8C",
"decimals": 4,
- "dharmaVerificationStatus": {
"dharmaVerificationStatus": "VERIFIED"
}
\ No newline at end of file
-}
\ No newline at end of file
| 3 |
diff --git a/test/jasmine/tests/lib_test.js b/test/jasmine/tests/lib_test.js @@ -2257,6 +2257,14 @@ describe('Test lib.js:', function() {
expect(Lib.hovertemplateString('foo %{bar[0].baz}', {}, locale, {bar: [{baz: 'asdf'}]})).toEqual('foo asdf');
});
+ it('should work with the number *0*', function() {
+ expect(Lib.hovertemplateString('%{group}', {}, locale, {group: 0})).toEqual('0');
+ });
+
+ it('should work with the number *0* (nested case)', function() {
+ expect(Lib.hovertemplateString('%{x.y}', {}, locale, {'x': {y: 0}})).toEqual('0');
+ });
+
it('subtitutes multiple matches', function() {
expect(Lib.hovertemplateString('foo %{group} %{trace}', {}, locale, {group: 'asdf', trace: 'jkl;'})).toEqual('foo asdf jkl;');
});
| 0 |
diff --git a/guide/english/certifications/javascript-algorithms-and-data-structures/debugging/use-the-javascript-console-to-check-the-value-of-a-variable/index.md b/guide/english/certifications/javascript-algorithms-and-data-structures/debugging/use-the-javascript-console-to-check-the-value-of-a-variable/index.md @@ -3,8 +3,16 @@ title: Use the JavaScript Console to Check the Value of a Variable
---
## Use the JavaScript Console to Check the Value of a Variable
-This is a stub. <a href='https://github.com/freecodecamp/guides/tree/master/src/pages/certifications/javascript-algorithms-and-data-structures/debugging/use-the-javascript-console-to-check-the-value-of-a-variable/index.md' target='_blank' rel='nofollow'>Help our community expand it</a>.
+### Solution
-<a href='https://github.com/freecodecamp/guides/blob/master/README.md' target='_blank' rel='nofollow'>This quick style guide will help ensure your pull request gets accepted</a>.
+```js
+let a = 5;
+let b = 1;
+a++;
+// Add your code below this line
-<!-- The article goes here, in GitHub-flavored Markdown. Feel free to add YouTube videos, images, and CodePen/JSBin embeds -->
+let sumAB = a + b;
+console.log(sumAB);
+
+console.log(a);
+```
| 4 |
diff --git a/src/encoded/static/components/matrix.js b/src/encoded/static/components/matrix.js @@ -9,6 +9,7 @@ var _ = require('underscore');
var button = require('../libs/bootstrap/button');
var dropdownMenu = require('../libs/bootstrap/dropdown-menu');
var navbar = require('../libs/bootstrap/navbar');
+var { BrowserSelector } = require('./objectutils');
var BatchDownload = search.BatchDownload;
var FacetList = search.FacetList;
@@ -237,17 +238,11 @@ var Matrix = module.exports.Matrix = React.createClass({
: null}
{' '}
{visualizeKeys.length ?
- <DropdownButton disabled={visualize_disabled} title={visualize_disabled ? 'Filter to ' + visualizeLimit + ' to visualize' : 'Visualize'} label="visualize" wrapperClasses="hubs-controls-button">
- <DropdownMenu>
- {visualizeKeys.map(assembly =>
- Object.keys(context.visualize_batch[assembly]).sort().map(browser =>
- <a key={[assembly, '_', browser].join()} data-bypass="true" target="_blank" href={context.visualize_batch[assembly][browser]}>
- {assembly} {browser}
- </a>
- )
- )}
- </DropdownMenu>
- </DropdownButton>
+ <BrowserSelector
+ visualizeCfg={context.visualize_batch}
+ disabled={visualize_disabled}
+ title={visualize_disabled ? 'Filter to ' + visualizeLimit + ' to visualize' : 'Visualize'}
+ />
: null}
</div>
</div>
| 0 |
diff --git a/app/helpers/account_type_helper.rb b/app/helpers/account_type_helper.rb @@ -39,9 +39,9 @@ module AccountTypeHelper
'Enterprise Builder - Annual' => 'Enterprise',
'Enterprise Builder - On-premises - Annual' => 'Enterprise',
'Cloud Engine & Enterprise Builder - Annual' => 'Enterprise',
- 'Internal use engine - Cloud - Annual' => 'Internal',
- 'Internal use engine - On-premises - Annual' => 'Internal',
- 'Internal use engine - On-premises Lite - Annual' => 'Internal',
+ 'Internal use engine - Cloud - Annual' => 'Enterprise Engine',
+ 'Internal use engine - On-premises - Annual' => 'Enterprise Engine',
+ 'Internal use engine - On-premises Lite - Annual' => 'Enterprise Engine',
'OEM engine - Cloud - Annual' => 'Enterprise',
'OEM engine - On-premises - Annual' => 'Enterprise',
'PARTNERS' => 'Partner',
| 7 |
diff --git a/packages/node_modules/@node-red/registry/lib/localfilesystem.js b/packages/node_modules/@node-red/registry/lib/localfilesystem.js @@ -106,8 +106,8 @@ function getLocalNodeFiles(dir, skipValidNodeRedModules) {
// when loading local files, if the path is a valid node-red module
// dont include it (will be picked up in scanTreeForNodesModules)
if(skipValidNodeRedModules && files.indexOf("package.json") >= 0) {
- const package = getPackageDetails(dir)
- if(package.isNodeRedModule) {
+ const packageDetails = getPackageDetails(dir)
+ if(packageDetails.isNodeRedModule) {
return {files: [], icons: []};
}
}
@@ -135,17 +135,17 @@ function getLocalNodeFiles(dir, skipValidNodeRedModules) {
return {files: result, icons: icons}
}
-function scanDirForNodesModules(dir,moduleName,package) {
+function scanDirForNodesModules(dir,moduleName,packageDetails) {
let results = [];
let scopeName;
let files
try {
let isNodeRedModule = false
- if(package) {
- dir = path.join(package.moduleDir,'..')
- files = [path.basename(package.moduleDir)]
- moduleName = (package.package ? package.package.name : null) || moduleName
- isNodeRedModule = package.isNodeRedModule
+ if(packageDetails) {
+ dir = path.join(packageDetails.moduleDir,'..')
+ files = [path.basename(packageDetails.moduleDir)]
+ moduleName = (packageDetails.package ? packageDetails.package.name : null) || moduleName
+ isNodeRedModule = packageDetails.isNodeRedModule
} else {
files = fs.readdirSync(dir);
if (moduleName) {
@@ -159,8 +159,8 @@ function scanDirForNodesModules(dir,moduleName,package) {
// if we have found a package.json, this IS a node_module, lets see if it is a node-red node
if (!isNodeRedModule && files.indexOf('package.json') > -1) {
- package = getPackageDetails(dir) // get package details
- if(package && package.isNodeRedModule) {
+ packageDetails = getPackageDetails(dir) // get package details
+ if(packageDetails && packageDetails.isNodeRedModule) {
isNodeRedModule = true
files = ['package.json'] // shortcut the file scan
}
@@ -179,8 +179,8 @@ function scanDirForNodesModules(dir,moduleName,package) {
} else {
if ((isNodeRedModule || (!moduleName || fn == moduleName)) && (isIncluded(fn) && !isExcluded(fn))) {
try {
- const moduleDir = isNodeRedModule ? package.moduleDir : path.join(dir,fn);
- const pkg = package || getPackageDetails(moduleDir)
+ const moduleDir = isNodeRedModule ? packageDetails.moduleDir : path.join(dir,fn);
+ const pkg = packageDetails || getPackageDetails(moduleDir)
if(pkg.error) {
throw pkg.error
}
| 10 |
diff --git a/packages/swagger2openapi/validate.js b/packages/swagger2openapi/validate.js @@ -792,6 +792,7 @@ function validate(openapi, options, callback) {
common.recurse(openapi, null, function (obj, key, state) {
if ((key === '$ref') && (typeof obj[key] === 'string')) {
if (!obj[key].startsWith('#/')) {
+ options.context.push(state.path);
actions.push(common.resolveExternal(openapi, obj[key], options, function (data) {
state.parent[state.pkey] = data;
}));
@@ -802,6 +803,7 @@ function validate(openapi, options, callback) {
co(function* () {
// resolve multiple promises in parallel
var res = yield actions;
+ options.context = [];
validateSync(openapi, options, callback);
})
.catch(function (err) {
| 7 |
diff --git a/src/libs/KeyboardShortcut/index.js b/src/libs/KeyboardShortcut/index.js @@ -4,7 +4,7 @@ import Str from 'expensify-common/lib/str';
import getOperatingSystem from '../getOperatingSystem';
import CONST from '../../CONST';
-const events = {};
+const eventHandlers = {};
const keyboardShortcutMap = {};
/**
@@ -23,11 +23,11 @@ function getKeyboardShortcuts() {
function bindHandlerToKeydownEvent(event) {
const correctedKey = event.key.toLowerCase();
- if (events[correctedKey] === undefined) {
+ if (eventHandlers[correctedKey] === undefined) {
return;
}
- _.every(events[correctedKey], (callback) => {
+ _.every(eventHandlers[correctedKey], (callback) => {
const pressedModifiers = _.all(callback.modifiers, (modifier) => {
if (modifier === 'shift' && !event.shiftKey) {
return false;
@@ -94,13 +94,14 @@ document.removeEventListener('keydown', bindHandlerToKeydownEvent, {capture: tru
document.addEventListener('keydown', bindHandlerToKeydownEvent, {capture: true});
/**
- * Unsubscribes to a keyboard event.
+ * Unsubscribes a keyboard event handler.
+ *
* @param {String} key The key to stop watching
* @param {String} callbackID The specific ID given to the callback at the time it was added
* @private
*/
function unsubscribe(key, callbackID) {
- events[key] = _.filter(events[key], callback => callback.id !== callbackID);
+ eventHandlers[key] = _.filter(eventHandlers[key], callback => callback.id !== callbackID);
}
/**
@@ -142,11 +143,11 @@ function addKeyToMap(key, modifiers, descriptionKey) {
*/
function subscribe(key, callback, descriptionKey, modifiers = 'shift', captureOnInputs = false, shouldBubble = false, priority = 0) {
const correctedKey = key.toLowerCase();
- if (events[correctedKey] === undefined) {
- events[correctedKey] = [];
+ if (eventHandlers[correctedKey] === undefined) {
+ eventHandlers[correctedKey] = [];
}
const callbackID = Str.guid();
- events[correctedKey].splice(priority, 0, {
+ eventHandlers[correctedKey].splice(priority, 0, {
id: callbackID,
callback,
modifiers: _.isArray(modifiers) ? modifiers : [modifiers],
| 10 |
diff --git a/src/blockchain/failedTxMonitor.js b/src/blockchain/failedTxMonitor.js @@ -165,7 +165,7 @@ const failedTxMonitor = (app, eventWatcher) => {
async function handlePendingDonation(currentBlock, donation, receipt, topics) {
// reset the donation status if the tx has been pending for more then 2 hrs, otherwise ignore
- if (!receipt && Date(donation.updatedAt).getTime() <= Date.now() - TWO_HOURS) return;
+ if (!receipt && new Date(donation.updatedAt).getTime() <= Date.now() - TWO_HOURS) return;
// ignore if there isn't enough confirmations
if (receipt && currentBlock - receipt.blockNumber < requiredConfirmations) return;
@@ -243,7 +243,7 @@ const failedTxMonitor = (app, eventWatcher) => {
const receipt = await web3.eth.getTransactionReceipt(dac.txHash);
// reset the dac status if the tx has been pending for more then 2 hrs, otherwise ignore
- if (!receipt && Date(dac.updatedAt).getTime() <= Date.now() - TWO_HOURS) return;
+ if (!receipt && new Date(dac.updatedAt).getTime() <= Date.now() - TWO_HOURS) return;
// ignore if there isn't enough confirmations
if (receipt && currentBlock - receipt.blockNumber < requiredConfirmations) return;
@@ -290,7 +290,7 @@ const failedTxMonitor = (app, eventWatcher) => {
const receipt = await web3.eth.getTransactionReceipt(campaign.txHash);
// reset the campaign status if the tx has been pending for more then 2 hrs, otherwise ignore
- if (!receipt && Date(campaign.updatedAt).getTime() <= Date.now() - TWO_HOURS) return;
+ if (!receipt && new Date(campaign.updatedAt).getTime() <= Date.now() - TWO_HOURS) return;
// ignore if there isn't enough confirmations
if (receipt && currentBlock - receipt.blockNumber < requiredConfirmations) return;
@@ -340,7 +340,7 @@ const failedTxMonitor = (app, eventWatcher) => {
const receipt = await web3.eth.getTransactionReceipt(milestone.txHash);
// reset the milestone status if the tx has been pending for more then 2 hrs, otherwise ignore
- if (!receipt && Date(milestone.updatedAt).getTime() <= Date.now() - TWO_HOURS) return;
+ if (!receipt && new Date(milestone.updatedAt).getTime() <= Date.now() - TWO_HOURS) return;
// ignore if there isn't enough confirmations
if (receipt && currentBlock - receipt.blockNumber < requiredConfirmations) return;
| 4 |
diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml @@ -44,6 +44,7 @@ jobs:
with:
path: publish
ref: gh-pages
+ token: ${{ secrets.REPO_ACCESS_TOKEN }}
- run: npm install
working-directory: source
- run: npm run compile
| 4 |
diff --git a/assets/js/modules/pagespeed-insights/components/DashboardPageSpeed.test.js b/assets/js/modules/pagespeed-insights/components/DashboardPageSpeed.test.js @@ -26,7 +26,6 @@ import { STORE_NAME as CORE_SITE } from '../../../googlesitekit/datastore/site/c
import * as fixtures from '../datastore/__fixtures__';
import fetchMock from 'fetch-mock';
-// TODO: update the active class.
const activeClass = 'mdc-tab--active';
const url = fixtures.pagespeedMobile.loadingExperience.id;
const setupRegistry = ( { dispatch } ) => {
| 2 |
diff --git a/tests/phpunit/includes/Core/Storage/Base64_Encryption.php b/tests/phpunit/includes/Core/Storage/Base64_Encryption.php @@ -26,7 +26,7 @@ class Base64_Encryption {
* @return string
*/
public function encrypt( $value ) {
- return base64_encode( $value ); // phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.obfuscation_base64_encode
+ return base64_encode( $value );
}
/**
@@ -37,6 +37,6 @@ class Base64_Encryption {
* @return bool|string
*/
public function decrypt( $value ) {
- return base64_decode( $value ); // phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.obfuscation_base64_decode
+ return base64_decode( $value );
}
}
| 2 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.