code
stringlengths
122
4.99k
label
int64
0
14
diff --git a/ui/src/components/scroll-area/QScrollArea.js b/ui/src/components/scroll-area/QScrollArea.js @@ -251,7 +251,7 @@ export default Vue.extend({ render (h) { if (this.$q.platform.is.desktop !== true) { return h('div', { - staticClass: 'q-scroll-area', + staticClass: 'q-scrollarea', style: this.contentStyle }, [ h('div', {
1
diff --git a/app/views/shared/_public_dashboard_org_header.html.erb b/app/views/shared/_public_dashboard_org_header.html.erb <%= @name %> <span class="UserInfo-nameBreadcrumb"> / <% if @content_type == 'maps' %> - <%= link_to 'Maps', @maps_url, class: "DropdownLink js-breadcrumb-dropdown-target" %> + <%= link_to 'Maps', '#', class: "DropdownLink js-breadcrumb-dropdown-target" %> <% else %> - <%= link_to 'Datasets', @datasets_url, class: "DropdownLink js-breadcrumb-dropdown-target" %> + <%= link_to 'Datasets', '#', class: "DropdownLink js-breadcrumb-dropdown-target" %> <% end %> <% content_for(:js) do %> <div class="js-breadcrumb-dropdown-content Dropdown BreadcrumbsDropdown BreadcrumbsDropdown--compact" style="display: none;">
2
diff --git a/assets/js/modules/analytics/datastore/service.test.js b/assets/js/modules/analytics/datastore/service.test.js @@ -130,7 +130,7 @@ describe( 'module/analytics service store', () => { expect( reportServiceURL.startsWith( baseURI ) ).toBe( true ); // For more details about how `reportArgs` are handled, see assets/js/modules/analytics/util/report-args.test.js. expect( url.hash ).toBe( - `#/report/${ type }/a${ accountID }w${ internalWebPropertyID }p${ profileID }/foo%3Dbar/` + `#/report/${ type }/a${ accountID }w${ internalWebPropertyID }p${ profileID }/foo=bar/` ); } ); } );
1
diff --git a/src/lib/wallet/GoodWallet.js b/src/lib/wallet/GoodWallet.js @@ -4,6 +4,7 @@ import ReserveABI from '@gooddollar/goodcontracts/build/contracts/GoodDollarRese import IdentityABI from '@gooddollar/goodcontracts/build/contracts/Identity.min.json' import OneTimePaymentLinksABI from '@gooddollar/goodcontracts/build/contracts/OneTimePaymentLinks.min.json' import RedemptionABI from '@gooddollar/goodcontracts/build/contracts/RedemptionFunctional.min.json' +import ContractsAddress from '@gooddollar/goodcontracts/releases/deployment.json' import { default as filterFunc } from 'lodash/filter' import type Web3 from 'web3' import { BN, toBN } from 'web3-utils' @@ -14,6 +15,7 @@ import { generateShareLink } from '../share' import WalletFactory from './WalletFactory' import abiDecoder from 'abi-decoder' import values from 'lodash/values' +import get from 'lodash/get' const log = logger.child({ from: 'GoodWallet' }) @@ -157,36 +159,42 @@ export class GoodWallet { this.accounts = this.wallet.eth.accounts.wallet this.account = this.getAccountForType('gd') this.wallet.eth.defaultAccount = this.account - this.networkId = Config.networkId + this.networkId = ContractsAddress[Config.network].networkId + this.network = Config.network log.info(`networkId: ${this.networkId}`) this.gasPrice = wallet.utils.toWei('1', 'gwei') this.wallet.eth.defaultGasPrice = this.gasPrice this.identityContract = new this.wallet.eth.Contract( IdentityABI.abi, - IdentityABI.networks[this.networkId].address, + get(ContractsAddress, `${this.network}.Identity`, IdentityABI.networks[this.networkId].address), { from: this.account } ) this.claimContract = new this.wallet.eth.Contract( RedemptionABI.abi, - RedemptionABI.networks[this.networkId].address, + get(ContractsAddress, `${this.network}.RedemptionFunctional`, RedemptionABI.networks[this.networkId].address), + { from: this.account } ) this.tokenContract = new this.wallet.eth.Contract( GoodDollarABI.abi, - GoodDollarABI.networks[this.networkId].address, + get(ContractsAddress, `${this.network}.GoodDollar`, GoodDollarABI.networks[this.networkId].address), { from: this.account } ) abiDecoder.addABI(GoodDollarABI.abi) this.reserveContract = new this.wallet.eth.Contract( ReserveABI.abi, - ReserveABI.networks[this.networkId].address, + get(ContractsAddress, `${this.network}.GoodDollarReserve`, ReserveABI.networks[this.networkId].address), { from: this.account } ) this.oneTimePaymentLinksContract = new this.wallet.eth.Contract( OneTimePaymentLinksABI.abi, - OneTimePaymentLinksABI.networks[this.networkId].address, + get( + ContractsAddress, + `${this.network}.OneTimePaymentLinks`, + OneTimePaymentLinksABI.networks[this.networkId].address + ), { from: this.account } @@ -406,7 +414,11 @@ export class GoodWallet { const generatedString = this.wallet.utils.randomHex(10).replace('0x', '') const hashedString = this.wallet.utils.sha3(generatedString) - const otpAddress = OneTimePaymentLinksABI.networks[this.networkId].address + const otpAddress = get( + ContractsAddress, + `${this.network}.OneTimePaymentLinks`, + OneTimePaymentLinksABI.networks[this.networkId].address + ) const deposit = this.oneTimePaymentLinksContract.methods.deposit(this.account, hashedString, amount) const encodedABI = await deposit.encodeABI() @@ -568,7 +580,7 @@ export class GoodWallet { return ( new Promise((res, rej) => { - tx.send({ gas, gasPrice, chainId: Config.networkId }) + tx.send({ gas, gasPrice, chainId: this.networkId }) .on('transactionHash', onTransactionHash) .on('receipt', r => { onReceipt && onReceipt(r)
0
diff --git a/test/Air/Air.test.js b/test/Air/Air.test.js @@ -620,7 +620,7 @@ describe('#AirService', () => { const importPNR = sinon.spy((options) => { expect(options.pnr).to.be.equal('PNR'); - return Promise.resolve(params); + return Promise.resolve([params]); }); const service = () => ({ @@ -634,6 +634,7 @@ describe('#AirService', () => { const AirService = createAirService({ auth }); AirService.getPNRByTicketNumber = getPNRByTicketNumber.bind(AirService); + AirService.importPNR = importPNR.bind(AirService); return AirService.getTicket(params).then(() => { expect(getTicket.calledTwice).to.be.equal(true); @@ -950,7 +951,7 @@ describe('#AirService', () => { ); // Spies const cancelTicket = sinon.spy(() => Promise.resolve(true)); - const importPNR = sinon.spy(() => Promise.resolve(true)); + const importPNR = sinon.spy(() => Promise.resolve([{}])); const executeCommand = sinon.spy(() => Promise.resolve('RLOC 1G PNR001')); const closeSession = sinon.spy(() => Promise.resolve(true)); // Services
1
diff --git a/test/jasmine/tests/legend_test.js b/test/jasmine/tests/legend_test.js @@ -1672,28 +1672,28 @@ describe('legend interaction', function() { function run() { return Promise.resolve() - .then(click(0, 1)).then(_assert(['legendonly', true])) - .then(click(0, 1)).then(_assert([true, true])) - .then(click(0, 2)).then(_assert([true, 'legendonly'])) - .then(click(0, 2)).then(_assert([true, true])) + .then(click(0, 1)).then(_assert(['legendonly', true, true])) + .then(click(0, 1)).then(_assert([true, true, true])) + .then(click(0, 2)).then(_assert([true, 'legendonly', 'legendonly'])) + .then(click(0, 2)).then(_assert([true, true, true])) .then(function() { return Plotly.relayout(gd, { 'legend.itemclick': false, 'legend.itemdoubleclick': false }); }) - .then(click(0, 1)).then(_assert([true, true])) - .then(click(0, 2)).then(_assert([true, true])) + .then(click(0, 1)).then(_assert([true, true, true])) + .then(click(0, 2)).then(_assert([true, true, true])) .then(function() { return Plotly.relayout(gd, { 'legend.itemclick': 'focus', 'legend.itemdoubleclick': 'toggle' }); }) - .then(click(0, 1)).then(_assert([true, 'legendonly'])) - .then(click(0, 1)).then(_assert([true, true])) - .then(click(0, 2)).then(_assert(['legendonly', true])) - .then(click(0, 2)).then(_assert([true, true])); + .then(click(0, 1)).then(_assert([true, 'legendonly', 'legendonly'])) + .then(click(0, 1)).then(_assert([true, true, true])) + .then(click(0, 2)).then(_assert(['legendonly', true, true])) + .then(click(0, 2)).then(_assert([true, true, true])); } it('- regular trace case', function(done) { @@ -1701,7 +1701,8 @@ describe('legend interaction', function() { Plotly.plot(gd, [ { y: [1, 2, 1] }, - { y: [2, 1, 2] } + { y: [2, 1, 2] }, + { y: [3, 5, 0] } ]) .then(run) .catch(failTest) @@ -1709,19 +1710,20 @@ describe('legend interaction', function() { }); it('- pie case', function(done) { - _assert = function(exp) { + _assert = function(_exp) { return function() { - var actual = []; - if(exp[0] === 'legendonly') actual.push('B'); - if(exp[1] === 'legendonly') actual.push('A'); - expect(actual).toEqual(gd._fullLayout.hiddenlabels || []); + var exp = []; + if(_exp[0] === 'legendonly') exp.push('C'); + if(_exp[1] === 'legendonly') exp.push('B'); + if(_exp[2] === 'legendonly') exp.push('A'); + expect(gd._fullLayout.hiddenlabels || []).toEqual(exp); }; }; Plotly.plot(gd, [{ type: 'pie', - labels: ['A', 'B'], - values: [1, 2] + labels: ['A', 'B', 'C'], + values: [1, 2, 3] }]) .then(run) .catch(failTest)
7
diff --git a/src/content/en/updates/2020/01/twa-multi-origin.md b/src/content/en/updates/2020/01/twa-multi-origin.md @@ -3,7 +3,7 @@ book_path: /web/updates/_book.yaml description: Explains how to create one application using Trusted Web Activities that supports opening multiple origins in full-screen. {# wf_published_on: 2020-01-17 #} -{# wf_updated_on: 2020-01-17 #} +{# wf_updated_on: 2020-03-03 #} {# wf_tags: trusted-web-activity #} {# wf_featured_image: /web/updates/images/generic/devices.png #} {# wf_blink_components: N/A #} @@ -134,7 +134,7 @@ Next, add a new `meta-data` tag inside the existing activity element that refere <meta-data android:name="android.support.customtabs.trusted.ADDITIONAL_TRUSTED_ORIGINS" - android:value="@array/additional_trusted_origins" /> + android:resource="@array/additional_trusted_origins" /> ... @@ -146,8 +146,6 @@ Next, add a new `meta-data` tag inside the existing activity element that refere When using custom code to launch a TWA, adding extra origins can be achieved by calling `setAdditionalTrustedOrigins` when building the Intent to launch the TWA: - -com.example.CustomLauncherActivity ```java public void launcherWithMultipleOrigins(View view) { List<String> origins = Arrays.asList(
7
diff --git a/src/components/Main/Results/ResponsiveTooltipContent.tsx b/src/components/Main/Results/ResponsiveTooltipContent.tsx @@ -13,6 +13,7 @@ interface TooltipItem extends LineProps { interface ResponsiveTooltipContentProps extends TooltipProps { valueFormatter: (value: number | string) => string + itemsToDisplay?: string[] } export function ResponsiveTooltipContent({ @@ -21,6 +22,7 @@ export function ResponsiveTooltipContent({ label, valueFormatter, labelFormatter, + itemsToDisplay, }: ResponsiveTooltipContentProps) { const { t } = useTranslation() @@ -31,17 +33,21 @@ export function ResponsiveTooltipContent({ const formattedLabel = labelFormatter && label !== undefined ? labelFormatter(label) : '-' const tooltipItems: TooltipItem[] = [] + .concat( + translatePlots(t, observationsToPlot).map((observationToPlot) => ({ + ...observationToPlot, + displayUndefinedAs: '-', + })) as never, + ) .concat( translatePlots(t, linesToPlot).map((lineToPlot) => ({ ...lineToPlot, displayUndefinedAs: 0, })) as never, ) - .concat( - translatePlots(t, observationsToPlot).map((scatterToPlot) => ({ - ...scatterToPlot, - displayUndefinedAs: '-', - })) as never, + .filter( + (tooltipItem: TooltipItem): boolean => + !itemsToDisplay || !!itemsToDisplay.find((itemKey) => itemKey === tooltipItem.key), ) .map( (tooltipItem: TooltipItem): TooltipItem => {
11
diff --git a/AreasOfEffect/script.json b/AreasOfEffect/script.json { "name": "Areas of Effect", "script": "aoe.js", - "version": "1.5", + "version": "1.5.1", "previousversions": ["1.0", "1.1", "1.2.1", "1.3", "1.4"], "description": "# Areas of Effect\r\r_v1.5 Updates_\r* Added blast and line/cone effect buttons.\r\rGMs, your spellcasting players will love you for this script! It lets you\rcreate graphical areas of effect for various spells and other powers, and then\ryour players can create these effects by drawing lines specifying their\rrange, origin, and angle. Areas of effect can be created from any graphic that\ryou have uploaded to your library.\r\r## AoE menu\r\rWhen the script is installed, it creates a macro for all GMs of the game to\rdisplay its main menu in the chat. This macro is also visible and usable by all players\rin the game, but only GMs are allowed to save new areas of effect. Players can\ronly spawn them.\r\r## Creating Areas of effect\r\rTo create an area of effect, follow these steps:\r1. Place the graphic you want to create an effect out of onto the VTT.\r2. Draw a straight line over it from the origin of the effect to its end/edge.\r3. Select both the line and the graphic.\r4. Open the Areas of Effect menu using its macro and select ```Save Effect```.\r5. Name the effect, and you're done!\r\rThe effect will now appear in your list of saved areas of effect. Only GMs\rcan save areas of effect.\r\r## Viewing/Spawning Areas of Effect\r\rTo view the list of saved areas of effect, open the script's menu from its\rmacro and select ```Apply an Effect```. The list will show each effect with\rits name, a preview of its graphic, and GMs will also have a button they can\ruse to delete effects.\r\rTo spawn an area of effect from this list, follow these steps:\r1. Draw a straight line from the desired origin of the effect to its desired range.\r2. Select the line.\r3. Click the effect to apply to the line from the list of saved areas of effect.\r\rOR\r\r1. Select the token the effect originates from.\r2. Click the arrow button for the effect.\r3. Click the target token for the effect's endpoint.\r\rBoth GMs and players can spawn areas of effect!\r\r_Note: Currently it is not possible to create effects from graphics purchased\rfrom the market place due to certain restrictions specified here:\rhttps://wiki.roll20.net/API:Objects#imgsrc_and_avatar_property_restrictions\r\rHowever, you can download them from your Roll20 purchased assets library and\rthen upload them to your game in order to make use of them with this script ._\r\r## Help\r\rIf you experience any issues while using this script or the trap themes,\rneed help using it, or if you have a neat suggestion for a new feature,\rplease shoot me a PM:\rhttps://app.roll20.net/users/46544/stephen-l\ror create a help thread on the Roll20 API forum\r\r## Show Support\r\rIf you would like to show your appreciation and support for the work I do in writing,\rupdating, and maintaining my API scripts, consider buying one of my art packs from the Roll20 marketplace (https://marketplace.roll20.net/browse/search/?keywords=&sortby=newest&type=all&genre=all&author=Stephen%20Lindberg)\ror, simply leave a thank you note in the script's thread on the Roll20 forums.\rEither is greatly appreciated! Happy gaming!\r", "authors": "Stephen Lindberg",
1
diff --git a/README.md b/README.md @@ -48,7 +48,7 @@ You can provide an object of options as the last argument to `katex.render` and - `displayMode`: `boolean`. If `true` the math will be rendered in display mode, which will put the math in display style (so `\int` and `\sum` are large, for example), and will center the math on the page on its own line. If `false` the math will be rendered in inline mode. (default: `false`) - `throwOnError`: `boolean`. If `true`, KaTeX will throw a `ParseError` when it encounters an unsupported command. If `false`, KaTeX will render the unsupported command as text in the color given by `errorColor`. (default: `true`) - `errorColor`: `string`. A color string given in the format `"#XXX"` or `"#XXXXXX"`. This option determines the color which unsupported commands are rendered in. (default: `#cc0000`) -- `macros`: Object with `\name` (written `"\\name"` in JavaScript) style properties mapping to Strings that describe the expansion of the macro. +- `macros`: `object`. A collection of custom macros. Each macro is a property with a name like `\name` (written `"\\name"` in JavaScript) which maps to a String that describes the expansion of the macro. For example:
7
diff --git a/modules/keyboard.js b/modules/keyboard.js @@ -279,11 +279,14 @@ function handleBackspace(range, context) { if (range.index === 0 || this.quill.getLength() <= 1) return; let [line, ] = this.quill.getLine(range.index); let formats = {}; - if (context.offset === 0 && line.prev != null && line.prev.length() > 1) { + if (context.offset === 0) { + let [prev, ] = this.quill.getLine(range.index - 1); + if (prev != null && prev.length() > 1) { let curFormats = line.formats(); let prevFormats = this.quill.getFormat(range.index-1, 1); formats = DeltaOp.attributes.diff(curFormats, prevFormats) || {}; } + } // Check for astral symbols let length = /[\uD800-\uDBFF][\uDC00-\uDFFF]$/.test(context.prefix) ? 2 : 1; this.quill.deleteText(range.index-length, length, Quill.sources.USER); @@ -297,7 +300,21 @@ function handleDelete(range, context) { // Check for astral symbols let length = /^[\uD800-\uDBFF][\uDC00-\uDFFF]/.test(context.suffix) ? 2 : 1; if (range.index >= this.quill.getLength() - length) return; + let formats = {}, nextLength = 0; + let [line, ] = this.quill.getLine(range.index); + if (context.offset >= line.length() - 1) { + let [next, ] = this.quill.getLine(range.index + 1); + if (next) { + let curFormats = line.formats(); + let nextFormats = this.quill.getFormat(range.index, 1); + formats = DeltaOp.attributes.diff(curFormats, nextFormats) || {}; + nextLength = next.length(); + } + } this.quill.deleteText(range.index, length, Quill.sources.USER); + if (Object.keys(formats).length > 0) { + this.quill.formatLine(range.index + nextLength - 1, length, formats, Quill.sources.USER); + } } function handleDeleteRange(range) {
9
diff --git a/src/webroutes/dangerZone/actions.js b/src/webroutes/dangerZone/actions.js @@ -192,6 +192,30 @@ async function handleImportBansDBMS(ctx, dbType) { let invalid = 0; try { if(dbType == 'bansql'){ + const [rows, fields] = await dbConnection.execute(`SELECT * FROM banlist`); + for (let index = 1; index < rows.length; index++) { + const ban = rows[index]; + const tmpIdentifiers = [ban.identifier, ban.license, ban.liveid, ban.xblid, ban.discord]; + const identifiers = tmpIdentifiers.filter((id)=>{ + return (typeof id == 'string') && Object.values(GlobalData.validIdentifiers).some(vf => vf.test(id)); + }); + if(!identifiers.length){ + invalid++; + continue; + } + + let author = (typeof ban.sourceplayername == 'string' && ban.sourceplayername.length)? ban.sourceplayername.trim() : 'unknown'; + let reason = (typeof ban.reason == 'string' && ban.reason.length)? `[IMPORTED] ${ban.reason.trim()}` : '[IMPORTED] unknown'; + let expiration; + if((typeof ban.permanent && ban.permanent) || !ban.expiration){ + expiration = false; + }else{ + const expirationInt = parseInt(ban.expiration); + expiration = (Number.isNaN(expirationInt))? false : expirationInt; + } + await globals.playerController.registerAction(identifiers, 'ban', author, reason, expiration); + imported++; + } }else if(dbType == 'vrp'){ const [rows, fields] = await dbConnection.execute(`SELECT
0
diff --git a/packages/cx/src/widgets/nav/Menu.d.ts b/packages/cx/src/widgets/nav/Menu.d.ts @@ -18,7 +18,7 @@ interface MenuProps extends Cx.HtmlElementProps { overflow?: boolean, /** Icon to be used for the overflow menu. */ - overflowIcon?: boolean, + overflowIcon?: string, /** Base CSS class to be applied to the element. No class is applied by default. */ baseClass?: string
1
diff --git a/packages/app/src/server/views/widget/page_alerts.html b/packages/app/src/server/views/widget/page_alerts.html <p class="alert alert-primary py-3 px-4"> {% if page.grant == 2 %} - <i class="icon-fw icon-link"></i><strong>{{ consts.pageGrants[page.grant] }}</strong> ({{ t('Browsing of this page is restricted') }}) + <i class="icon-fw icon-link"></i><strong>{{ t('Anyone with the link') }}</strong> ({{ t('Browsing of this page is restricted') }}) {% elseif page.grant == 4 %} - <i class="icon-fw icon-lock"></i><strong>{{ consts.pageGrants[page.grant] }}</strong> ({{ t('Browsing of this page is restricted') }}) + <i class="icon-fw icon-lock"></i><strong>{{ t('Only me') }}</strong> ({{ t('Browsing of this page is restricted') }}) {% elseif page.grant == 5 %} <i class="icon-fw icon-organization"></i><strong>'{{ page.grantedGroup.name | preventXss }}' only</strong> ({{ t('Browsing of this page is restricted') }}) {% endif %}
14
diff --git a/src/Header.jsx b/src/Header.jsx @@ -122,12 +122,6 @@ export default function Header({ setOpen('chat'); return true; } - case 84: { // T - e.preventDefault(); - e.stopPropagation(); - world.toggleMic(); - return true; - } case 191: { // / if (!magicMenuOpen && !ioManager.inputFocused()) { e.preventDefault();
2
diff --git a/converters/toZigbee.js b/converters/toZigbee.js @@ -62,6 +62,10 @@ const converters = { const attrId = 'currentLevel'; if (type === 'set') { + if (value.includes('%')) { + value = Math.round(Number(value.replace('%', '')) * 2.55).toString(); + } + return { cid: cid, cmd: 'moveToLevelWithOnOff', @@ -90,6 +94,11 @@ const converters = { const attrId = 'colorTemperature'; if (type === 'set') { + if (value.includes('%')) { + value = Number(value.replace('%', '')) * 3.46; + value = Math.round(value + 154).toString(); + } + return { cid: cid, cmd: 'moveToColorTemp',
11
diff --git a/src/track.js b/src/track.js @@ -4,23 +4,27 @@ import React from 'react'; import assign from 'object-assign'; import classnames from 'classnames'; + +// given specifications/props for a slide, fetch all the classes that need to be applied to the slide var getSlideClasses = (spec) => { + // if spec has currentSlideIndex, we can also apply slickCurrent class according to that (https://github.com/kenwheeler/slick/blob/master/slick/slick.js#L2300-L2302) var slickActive, slickCenter, slickCloned; var centerOffset, index; - if (spec.rtl) { + if (spec.rtl) { // if we're going right to left, index is reversed index = spec.slideCount - 1 - spec.index; - } else { + } else { // index of the slide index = spec.index; } slickCloned = (index < 0) || (index >= spec.slideCount); if (spec.centerMode) { centerOffset = Math.floor(spec.slidesToShow / 2); - slickCenter = (index - spec.currentSlide) % spec.slideCount === 0; + slickCenter = (index - spec.currentSlide) % spec.slideCount === 0; // concern: not sure if this should be correct (https://github.com/kenwheeler/slick/blob/master/slick/slick.js#L2328-L2346) if ((index > spec.currentSlide - centerOffset - 1) && (index <= spec.currentSlide + centerOffset)) { slickActive = true; } } else { + // concern: following can be incorrect in case where currentSlide is lastSlide in frame and rest of the slides to show have index smaller than currentSlideIndex slickActive = (spec.currentSlide <= index) && (index < spec.currentSlide + spec.slidesToShow); } return classnames({ @@ -49,18 +53,14 @@ var getSlideStyle = function (spec) { return style; }; -var getKey = (child, fallbackKey) => { - // key could be a zero - return (child.key === null || child.key === undefined) ? fallbackKey : child.key; -}; +const getKey = (child, fallbackKey) => child.key || fallbackKey var renderSlides = function (spec) { var key; var slides = []; var preCloneSlides = []; var postCloneSlides = []; - var count = React.Children.count(spec.children); - + var childrenCount = React.Children.count(spec.children); React.Children.forEach(spec.children, (elem, index) => { let child; @@ -71,6 +71,7 @@ var renderSlides = function (spec) { currentSlide: spec.currentSlide }; + // in case of lazyLoad, whether or not we want to fetch the slide if (!spec.lazyLoad || (spec.lazyLoad && spec.lazyLoadedList.indexOf(index) >= 0)) { child = elem; } else { @@ -86,6 +87,7 @@ var renderSlides = function (spec) { } } + // push a cloned element of the desired slide slides.push(React.cloneElement(child, { key: 'original' + getKey(child, index), 'data-index': index, @@ -96,11 +98,14 @@ var renderSlides = function (spec) { })); // variableWidth doesn't wrap properly. + // if slide needs to be precloned or postcloned if (spec.infinite && spec.fade === false) { + // In the following: (spec.slidesToShow + 1) seems flawed in case of variable width var infiniteCount = spec.variableWidth ? spec.slidesToShow + 1 : spec.slidesToShow; - if (index >= (count - infiniteCount)) { - key = -(count - index); + // still not sure about this + if (index >= (childrenCount - infiniteCount)) { + key = -(childrenCount - index); preCloneSlides.push(React.cloneElement(child, { key: 'precloned' + getKey(child, key), 'data-index': key, @@ -111,7 +116,7 @@ var renderSlides = function (spec) { } if (index < infiniteCount) { - key = count + index; + key = childrenCount + index; postCloneSlides.push(React.cloneElement(child, { key: 'postcloned' + getKey(child, key), 'data-index': key, @@ -128,13 +133,12 @@ var renderSlides = function (spec) { } else { return preCloneSlides.concat(slides, postCloneSlides); } - - }; export class Track extends React.Component { render() { - var slides = renderSlides.call(this, this.props); + // var slides = renderSlides.call(this, this.props); + var slides = renderSlides(this.props) return ( <div className='slick-track' style={this.props.trackStyle}> { slides }
0
diff --git a/cgo/cgo_main_awslib.go b/cgo/cgo_main_awslib.go @@ -7,6 +7,7 @@ package cgo import "C" import ( + "bytes" "encoding/json" "fmt" "io" @@ -15,8 +16,8 @@ import ( "net/http/httptest" "net/url" "os" + "runtime/debug" "strconv" - "strings" "sync" "syscall" "time" @@ -28,6 +29,7 @@ import ( "github.com/aws/aws-sdk-go/service/cloudwatch" "github.com/mweagle/Sparta" spartaAWS "github.com/mweagle/Sparta/aws" + "github.com/zcalusic/sysinfo" ) // Lock to update CGO related config @@ -48,7 +50,7 @@ type lambdaFunctionErrResponse struct { // supplied to the LambdaHandler type cgoLambdaHTTPAdapterStruct struct { serviceName string - lambdaHTTPHandlerInstance *sparta.LambdaHTTPHandler + lambdaHTTPHandlerInstance *sparta.ServeMuxLambda logger *logrus.Logger } @@ -97,7 +99,11 @@ func makeRequest(functionName string, // Add a panic handler defer func() { if r := recover(); r != nil { - fmt.Printf("Failed to handle request in `cgo` library: %+v", r) + // Log the stack track + stackTrace := debug.Stack() + cgoLambdaHTTPAdapter.logger.WithFields(logrus.Fields{ + "Stack": string(stackTrace), + }).Error("PANIC: Failed to handle request in `cgo` library: ", r) } }() @@ -105,6 +111,9 @@ func makeRequest(functionName string, spartaResp := httptest.NewRecorder() spartaReq := &http.Request{ Method: "POST", + Header: map[string][]string{ + "Content-Type": []string{"application/json"}, + }, URL: &url.URL{ Scheme: "http", Path: fmt.Sprintf("/%s", functionName), @@ -117,6 +126,7 @@ func makeRequest(functionName string, TransferEncoding: make([]string, 0), Host: "localhost", } + cgoLambdaHTTPAdapter.lambdaHTTPHandlerInstance.ServeHTTP(spartaResp, spartaReq) // If there was an HTTP error, transform that into a stable @@ -193,11 +203,13 @@ func postMetrics(awsCredentials *credentials.Credentials, // CGO compliant userinput. Users should not need to call this function // directly func LambdaHandler(functionName string, + logLevel string, eventJSON string, awsCredentials *credentials.Credentials) ([]byte, http.Header, error) { startTime := time.Now() - readableBody := ioutil.NopCloser(strings.NewReader(eventJSON)) + readableBody := bytes.NewReader([]byte(eventJSON)) + readbleBodyCloser := ioutil.NopCloser(readableBody) // Update the credentials muCredentials.Lock() value, valueErr := awsCredentials.Get() @@ -211,16 +223,33 @@ func LambdaHandler(functionName string, pythonCredentialsValue.ProviderName = "PythonCGO" muCredentials.Unlock() + // Unpack the JSON request, turn it into a proto here and pass it + // into the handler... + // Update the credentials in the HTTP handler // in case we're ultimately forwarding to a custom // resource provider cgoLambdaHTTPAdapter.lambdaHTTPHandlerInstance.Credentials(pythonCredentialsValue) + logrusLevel, logrusLevelErr := logrus.ParseLevel(logLevel) + if logrusLevelErr == nil { + cgoLambdaHTTPAdapter.logger.SetLevel(logrusLevel) + } + cgoLambdaHTTPAdapter.logger.WithFields(logrus.Fields{ + "Resource": functionName, + "Request": eventJSON, + }).Debug("Making request") // Make the request... - response, header, err := makeRequest(functionName, readableBody, int64(len(eventJSON))) + response, header, err := makeRequest(functionName, readbleBodyCloser, int64(len(eventJSON))) // TODO: Consider go routine postMetrics(awsCredentials, functionName, len(response), time.Since(startTime)) + + cgoLambdaHTTPAdapter.logger.WithFields(logrus.Fields{ + "Header": header, + "Error": err, + }).Debug("Request response") + return response, header, err }
9
diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/common/toggleButton.js b/packages/node_modules/@node-red/editor-client/src/js/ui/common/toggleButton.js invertState = this.options.invertState; } var baseClass = this.options.baseClass || "red-ui-button"; - var enabledIcon = this.options.enabledIcon || "fa-check-square-o"; - var disabledIcon = this.options.disabledIcon || "fa-square-o"; + var enabledIcon = this.options.hasOwnProperty('enabledIcon')?this.options.enabledIcon : "fa-check-square-o"; + var disabledIcon = this.options.hasOwnProperty('disabledIcon')?this.options.disabledIcon : "fa-square-o"; var enabledLabel = this.options.hasOwnProperty('enabledLabel') ? this.options.enabledLabel : RED._("editor:workspace.enabled"); var disabledLabel = this.options.hasOwnProperty('disabledLabel') ? this.options.disabledLabel : RED._("editor:workspace.disabled"); this.element.on("focus", function() { that.button.focus(); }); - this.button = $('<button type="button" class="red-ui-toggleButton '+baseClass+' toggle single"><i class="fa"></i> <span></span></button>'); + this.button = $('<button type="button" class="red-ui-toggleButton '+baseClass+' toggle single"><span></span></button>'); + this.buttonLabel = $("<span>").appendTo(this.button); + if (this.options.class) { this.button.addClass(this.options.class) } this.element.after(this.button); - this.buttonIcon = this.button.find("i"); - this.buttonLabel = this.button.find("span"); + + if (enabledIcon && disabledIcon) { + this.buttonIcon = $('<i class="fa"></i>').prependTo(this.button); + } // Quick hack to find the maximum width of the button this.button.addClass("selected"); + if (this.buttonIcon) { this.buttonIcon.addClass(enabledIcon); + } this.buttonLabel.text(enabledLabel); var width = this.button.width(); this.button.removeClass("selected"); + if (this.buttonIcon) { this.buttonIcon.removeClass(enabledIcon); that.buttonIcon.addClass(disabledIcon); + } that.buttonLabel.text(disabledLabel); width = Math.max(width,this.button.width()); + if (this.buttonIcon) { this.buttonIcon.removeClass(disabledIcon); + } // Fix the width of the button so it doesn't jump around when toggled if (width > 0) { this.button.on("click",function(e) { e.stopPropagation(); - if (that.buttonIcon.hasClass(disabledIcon)) { + if (!that.state) { that.element.prop("checked",!invertState); } else { that.element.prop("checked",invertState); this.element.on("change", function(e) { if ($(this).prop("checked") !== invertState) { that.button.addClass("selected"); + that.state = true; + if (that.buttonIcon) { that.buttonIcon.addClass(enabledIcon); that.buttonIcon.removeClass(disabledIcon); + } that.buttonLabel.text(enabledLabel); } else { that.button.removeClass("selected"); + that.state = false; + if (that.buttonIcon) { that.buttonIcon.addClass(disabledIcon); that.buttonIcon.removeClass(enabledIcon); + } that.buttonLabel.text(disabledLabel); } })
11
diff --git a/js/modules/dicommodule.js b/js/modules/dicommodule.js @@ -280,12 +280,12 @@ class DicomModule extends BaseModule { console.log('.... all done (no bids), returning output path = ' + outdir); }).catch((e) => { console.log('An error occured during the dicom conversion process', e); - }).finally( () => { + }); + console.log('....\n.... removing temporary directory = ' + tmpdir); bis_genericio.deleteDirectory(tmpdir).then(() => { resolve(); }); - }); } }); }
2
diff --git a/cypress/integration/ui/scenario1.js b/cypress/integration/ui/scenario1.js @@ -49,7 +49,7 @@ describe('use all parts of svg-edit', function () { .trigger('mouseup', { force: true }); cy.get('#svgcontent').toMatchSnapshot(); }); - it('check mode_connect', function () { + /* it('check mode_connect', function () { cy.get('#tool_rect').click({ force: true }); cy.get('#svgcontent') .trigger('mousedown', 100, -60, { force: true }) @@ -69,7 +69,7 @@ describe('use all parts of svg-edit', function () { .trigger('mouseup', { force: true }); cy.get('#svgcontent').toMatchSnapshot(); }); - /* it('check tool_image', function () { + it('check tool_image', function () { cy.get('#tool_image').click({ force: true }); cy.get('#svgcontent')
13
diff --git a/test/v1/tck/steps/erroreportingsteps.js b/test/v1/tck/steps/erroreportingsteps.js @@ -65,16 +65,15 @@ module.exports = function () { this.When(/^I set up a driver to an incorrect port$/, function (callback) { var self = this; var driver = neo4j.driver("bolt://localhost:7777", neo4j.auth.basic(sharedNeo4j.username, sharedNeo4j.password)); - driver.onSuccess = function () { - driver.close(); - }; - driver.onError = function (error) { - driver.close(); + var session = driver.session(); + session.run('RETURN 1') + .catch(error => { self.error = error; + }) + .then(() => { + driver.close(); callback(); - }; - driver.session().beginTransaction(); - setTimeout(callback, 1000); + }); }); this.When(/^I set up a driver with wrong scheme$/, function (callback) {
7
diff --git a/src/io_frida.c b/src/io_frida.c @@ -263,6 +263,7 @@ static RIODesc *__open(RIO *io, const char *pathname, int rw, int mode) { const char *autocompletions[] = { "!!!\\eval", "!!!\\e", + "!!!\\env", "!!!\\i", "!!!\\ii", "!!!\\il", @@ -287,8 +288,10 @@ static RIODesc *__open(RIO *io, const char *pathname, int rw, int mode) { "!!!\\/v8 $flag", "!!!\\dt $flag", "!!!\\dt- $flag", + "!!!\\dth", "!!!\\dtr", "!!!\\dtS", + "!!!\\dtSf $flag", "!!!\\dc", "!!!\\di", "!!!\\dl", @@ -309,6 +312,8 @@ static RIODesc *__open(RIO *io, const char *pathname, int rw, int mode) { "!!!\\dpt", "!!!\\dr", "!!!\\drj", + "!!!\\dk", + "!!!\\dkr", "!!!\\. $file", NULL }; @@ -451,6 +456,8 @@ static char *__system(RIO *io, RIODesc *fd, const char *command) { "db- (<addr>|<sym>)|* Remove breakpoint(s)\n" "dc Continue breakpoints or resume a spawned process\n" "dd[j-][fd] ([newfd]) List, dup2 or close filedescriptors (ddj for JSON)\n" + "dk ([pid]) [sig] Send signal to pid (kill -<sig> <pid>)\n" + "dkr Print the crash report (if the app has crashed)\n" "dm[.|j|*] Show memory regions\n" "dma <size> Allocate <size> bytes on the heap, address is returned\n" "dmas <string> Allocate a string inited with <string> on the heap\n" @@ -472,7 +479,9 @@ static char *__system(RIO *io, RIODesc *fd, const char *command) { "dkr Print the crash report (if the app has crashed)\n" "dl libname Dlopen a library\n" "dl2 libname [main] Inject library using Frida's >= 8.2 new API\n" - "dt <addr> .. Trace list of addresses\n" + "dt (<addr>|<sym>) .. Trace list of addresses or symbols\n" + "dt. Trace at current offset\n" + "dth (addr|sym)(x:0 y:1 ..) Define function header (z=str,i=int,v=hex barray,s=barray)\n" "dt- Clear all tracing\n" "dtr <addr> (<regs>...) Trace register values\n" "dtf <addr> [fmt] Trace address with format (^ixzO) (see dtf?)\n"
7
diff --git a/package.json b/package.json "name": "find-and-replace", "main": "./lib/find", "description": "Find and replace within buffers and across the project.", - "version": "0.205.1", + "version": "0.206.0", "license": "MIT", "activationCommands": { "atom-workspace": [ "projectSearchResultsPaneSplitDirection": { "type": "string", "default": "none", - "enum": ["none", "right", "down"], + "enum": [ + "none", + "right", + "down" + ], "title": "Direction to open results pane", "description": "Direction to split the active pane when showing project search results. If 'none', the results will be shown in the active pane." },
6
diff --git a/token-metadata/0x6dddF4111ad997A8C7Be9B2e502aa476Bf1F4251/metadata.json b/token-metadata/0x6dddF4111ad997A8C7Be9B2e502aa476Bf1F4251/metadata.json "symbol": "UNT", "address": "0x6dddF4111ad997A8C7Be9B2e502aa476Bf1F4251", "decimals": 18, - "dharmaVerificationStatus": { "dharmaVerificationStatus": "VERIFIED" } \ No newline at end of file -} \ No newline at end of file
3
diff --git a/app/controllers/admin/visualizations_controller.rb b/app/controllers/admin/visualizations_controller.rb @@ -96,8 +96,6 @@ class Admin::VisualizationsController < Admin::AdminController def public_table return(render_pretty_404) if @visualization.private? - get_viewed_user - if @visualization.derived? if current_user.nil? || current_user.username != request.params[:user_domain] destination_user = ::User.where(username: request.params[:user_domain]).first @@ -373,8 +371,6 @@ class Admin::VisualizationsController < Admin::AdminController return(embed_protected) end - get_viewed_user - response.headers['Cache-Control'] = "no-cache, private" @protected_map_tokens = @visualization.get_auth_tokens
2
diff --git a/source/views/controls/RichTextView.js b/source/views/controls/RichTextView.js @@ -56,8 +56,9 @@ const popOver = new PopOverView(); const equalTo = Transform.isEqualToValue; const TOOLBAR_HIDDEN = 0; -const TOOLBAR_AT_SELECTION = 1; -const TOOLBAR_AT_TOP = 2; +const TOOLBAR_INLINE = 1; +const TOOLBAR_AT_SELECTION = 2; +const TOOLBAR_AT_TOP = 3; const hiddenFloatingToolbarLayout = { top: 0, @@ -510,13 +511,15 @@ const RichTextView = Class({ return new ToolbarView({ className: 'v-Toolbar v-RichText-toolbar', positioning: 'absolute', - layout: showToolbar === TOOLBAR_AT_TOP ? { + layout: showToolbar === TOOLBAR_AT_SELECTION ? + bind( this, 'floatingToolbarLayout' ) : + { overflow: 'hidden', zIndex: 1, top: 0, left: 0, right: 0, - } : bind( this, 'floatingToolbarLayout' ), + }, preventOverlap: showToolbar === TOOLBAR_AT_TOP, }).registerViews({ bold: new ButtonView({ @@ -1255,6 +1258,7 @@ RichTextView.isSupported = ( ); RichTextView.TOOLBAR_HIDDEN = TOOLBAR_HIDDEN; +RichTextView.TOOLBAR_INLINE = TOOLBAR_INLINE; RichTextView.TOOLBAR_AT_SELECTION = TOOLBAR_AT_SELECTION; RichTextView.TOOLBAR_AT_TOP = TOOLBAR_AT_TOP;
0
diff --git a/assets/js/modules/thank-with-google/datastore/settings.test.js b/assets/js/modules/thank-with-google/datastore/settings.test.js @@ -49,8 +49,8 @@ describe( 'modules/thank-with-google settings', () => { const validSettings = { publicationID: 'publisher.com', - colorTheme: 'light', - buttonPlacement: 'bottom-right', + colorTheme: 'blue', + buttonPlacement: 'dynamic_low', buttonPostTypes: [ 'post' ], };
1
diff --git a/src/Services/Air/templates/AIR_TICKET_REQUEST.handlebars.js b/src/Services/Air/templates/AIR_TICKET_REQUEST.handlebars.js @@ -16,6 +16,9 @@ module.exports = ` <air:AirPricingInfoRef Key="{{key}}"/> {{/refs}} <air:AirTicketingModifiers> + {{#refs}} + <air:AirPricingInfoRef Key="{{key}}"/> + {{/refs}} {{#if commission}} <com:Commission Level="Fare" {{#if commission.percent}}
0
diff --git a/test/HTTP2_server.js b/test/HTTP2_server.js @@ -3,23 +3,19 @@ const fs = require('fs'); const CERT_PATH = 'test/HTTP2_cert.pem'; const PRIV_PATH = 'test/HTTP2_private.pem'; -let count = 0; const server = http2.createSecureServer({ cert: fs.readFileSync(CERT_PATH), key: fs.readFileSync(PRIV_PATH), }); + server.on('error', (err) => console.error(err)); server.on('stream', (stream, headers) => { - - // respond with stream if request accepts stream in headers + // respond with SSE stream if request accepts stream in headers if (headers.accept && headers.accept.includes('stream')) { - stream.respond({ - 'content-type': 'text/event-stream; charset=utf-8', - ':status': 200 - }); - return go(stream); + sendStreamToClient(stream); + return; } // else send a single event @@ -30,15 +26,39 @@ server.on('stream', (stream, headers) => { stream.end(JSON.stringify({data: 'hello and goodbye'})); }); -const go = (stream) => { - if (++count > 10) { - stream.end(`id: ${count}\nevent: testMessage\ndata: goodbye\n\n`); +const sendStreamToClient = (stream) => { + const STREAM_INTERVAL = 500; + let count = 0; + let streamIsOpen = true; + + stream.on('close', () => { + streamIsOpen = false; + console.log('stream closed'); + }); + + stream.respond({ + 'content-type': 'text/event-stream; charset=utf-8', + ':status': 200 + }); + + const sendEvent = (stream) => { + if (!streamIsOpen){ count = 0; return; } - + count += 1; + if (count < 50) { stream.write(`id: ${count}\nevent: testMessage\ndata: hello\n\n`); - setTimeout(() => go(stream), 500); + setTimeout(() => sendEvent(stream), STREAM_INTERVAL); + } else { + stream.end(`id: ${count}\nevent: testMessage\ndata: goodbye\n\n`); + streamIsOpen = false; + count = 0; } + }; + + sendEvent(stream); +} + server.listen(8443, () => console.log('server up on 8443')); \ No newline at end of file
7
diff --git a/drop-manager.js b/drop-manager.js @@ -12,6 +12,7 @@ const gltfLoader = new GLTFLoader(); const cubicBezier = easing(0, 1, 0, 1); const cubicBezier2 = easing(0, 1, 1, 1); const simplex = new Simplex('lol'); +const gravity = new THREE.Vector3(0, -9.8, 0); const tickers = []; const loadPromise = (async () => { @@ -73,7 +74,10 @@ const loadPromise = (async () => { // polygonOffsetUnits: 1, }); - const addSilk = p => { + const addSilk = (p, v) => { + const velocity = v.clone(); + let grounded = false; + const sphere = new THREE.Mesh(new THREE.BoxGeometry(0.1, 0.05, 0.1, 10, 10, 10), new THREE.MeshNormalMaterial()); sphere.position.copy(p); const defaultScale = new THREE.Vector3(1, 0.3, 1).multiplyScalar(0.5); @@ -81,9 +85,23 @@ const loadPromise = (async () => { scene.add(sphere); const o = sphere; + let lastTimestamp = Date.now(); let animation = null; o.update = () => { const now = Date.now(); + const timeDiff = (now - lastTimestamp) / 1000; + lastTimestamp = now; + + if (!grounded) { + o.position.add(localVector.copy(velocity).multiplyScalar(timeDiff)); + if (o.position.y < 0) { + o.position.y = 0; + grounded = true; + } else { + velocity.add(localVector.copy(gravity).multiplyScalar(timeDiff)); + } + } + if (!animation) { rigManager.localRig.modelBoneOutputs.Head.getWorldPosition(localVector); localVector.y = 0; @@ -144,9 +162,12 @@ const loadPromise = (async () => { tickers.push(o); }; - const addDrop = p => { + const addDrop = (p, v) => { const o = new THREE.Mesh(cardModel.geometry, cardModel.material); + const velocity = v.clone(); + let grounded = false; + o.position.copy(p); o.rotation.order = 'YXZ'; const s = 0.6; @@ -160,9 +181,23 @@ const loadPromise = (async () => { ); o.add(glowMesh); + let lastTimestamp = Date.now(); let animation = null; o.update = () => { const now = Date.now(); + const timeDiff = (now - lastTimestamp) / 1000; + lastTimestamp = now; + + if (!grounded) { + o.position.add(localVector.copy(velocity).multiplyScalar(timeDiff)); + if (o.position.y < 0) { + o.position.y = 0; + grounded = true; + } else { + velocity.add(localVector.copy(gravity).multiplyScalar(timeDiff)); + } + } + if (!animation) { rigManager.localRig.modelBoneOutputs.Head.getWorldPosition(localVector); localVector.y = 0; @@ -224,11 +259,14 @@ const loadPromise = (async () => { }; })().catch(err => console.warn(err)); +const dropExplosionSpeed = 5; const drop = async o => { const {addSilk, addDrop} = await loadPromise; - console.log('drop', o); - addDrop(new THREE.Vector3(-1, 0.4, 0.5)); - addSilk(new THREE.Vector3(1.5, 0.4, 0.5)); + for (let i = 0; i < 10; i++) { + const v = new THREE.Vector3(-1 + Math.random() * 2, 0, -1 + Math.random() * 2).normalize().add(new THREE.Vector3(0, (0.5 + Math.random() * 0.5) * 2, 0)).multiplyScalar((0.3 + Math.random() * 0.7) * dropExplosionSpeed); + const fn = Math.random() < 0.5 ? addSilk : addDrop; + fn(o.position.clone().add(new THREE.Vector3(0, 0.5, 0)), v); + } }; const update = () => { const localTickers = tickers.slice();
0
diff --git a/readme.md b/readme.md @@ -28,7 +28,7 @@ Here are the links to the current version: ## Dev -``` +```sh git clone https://github.com/th-ch/youtube-music cd youtube-music npm install @@ -48,7 +48,7 @@ Create a folder in `plugins/YOUR-PLUGIN-NAME`: - if you need to manipulate the BrowserWindow, create a file `back.js` with the following template: -``` +```node module.exports = win => { // win is the BrowserWindow object }; @@ -56,7 +56,7 @@ module.exports = win => { - if you need to change the front, create a file `front.js` with the following template: -``` +```node module.exports = () => { // This function will be called as a preload script // So you can use front features like `document.querySelector` @@ -67,7 +67,10 @@ module.exports = () => { - injecting custom CSS: create a `style.css` file in the same folder then: -``` +```node +const path = require("path"); +const { injectCSS } = require("../utils"); + // back.js module.exports = win => { injectCSS(win.webContents, path.join(__dirname, "style.css")); @@ -76,7 +79,7 @@ module.exports = win => { - changing the HTML: -``` +```node // front.js module.exports = () => { // Remove the login button @@ -88,7 +91,7 @@ module.exports = () => { ## Build -``` +```sh npm run build ```
7
diff --git a/src/app.js b/src/app.js @@ -71,7 +71,7 @@ module.exports = app; // Mongo Connection + Server Start (async () => { try { - const client = await MongoClient.connect(url); + const client = await MongoClient.connect(url, { poolSize: 100 }); global.db = client.db('spacex-api');
12
diff --git a/source/views/panels/PopOverView.js b/source/views/panels/PopOverView.js @@ -216,11 +216,21 @@ const PopOverView = Class({ adjustPosition ( deltaLeft, deltaTop ) { let parent = this.get( 'parentView' ); const layer = this.get( 'layer' ); - const positionToThe = this.get( 'options' ).positionToThe || 'bottom'; + const options = this.get( 'options' ); + const positionToThe = options.positionToThe || 'bottom'; const callout = this._callout; const calloutIsAtTopOrBottom = ( positionToThe === 'top' || positionToThe === 'bottom' ); const parentMargin = this.get( 'parentMargin' ); + let keepInVerticalBounds = options.keepInVerticalBounds; + let keepInHorizontalBounds = options.keepInHorizontalBounds; + + if ( keepInHorizontalBounds === undefined ) { + keepInHorizontalBounds = calloutIsAtTopOrBottom; + } + if ( keepInVerticalBounds === undefined ) { + keepInVerticalBounds = !calloutIsAtTopOrBottom; + } if ( !deltaLeft ) { deltaLeft = 0; @@ -240,7 +250,7 @@ const PopOverView = Class({ let gap; let calloutDelta = 0; - if ( positionToThe === 'bottom' || positionToThe === 'top' ) { + if ( keepInHorizontalBounds ) { // Check right edge if ( !parent.get( 'showScrollbarX' ) ) { gap = parent.get( 'pxWidth' ) - position.left - deltaLeft - @@ -266,7 +276,8 @@ const PopOverView = Class({ calloutDelta += parentMargin.left; } } - } else { + } + if ( keepInVerticalBounds ) { // Check bottom edge if ( !parent.get( 'showScrollbarY' ) ) { gap = parent.get( 'pxHeight' ) - position.top - deltaTop -
0
diff --git a/docs/api/intent-button.md b/docs/api/intent-button.md @@ -55,7 +55,7 @@ DOM.render(<CountPresenter repo={ repo } />, document.getElementById('container' ``` When clicked, the IntentButton will invoke an intent, passing in the -provided `params` prop. +provided `value` prop. ## Props
14
diff --git a/mobile/components/Lists/style.js b/mobile/components/Lists/style.js @@ -6,6 +6,9 @@ import styled from 'styled-components/native'; export const ListItemView = styled.View` display: flex; flex: 1; + flex-grow: 1; + flex-shrink: 0; + flex-basis: auto; flex-direction: column; border-bottom-color: ${props => props.theme.bg.hairline}; border-bottom-width: ${StyleSheet.hairlineWidth};
1
diff --git a/README.md b/README.md @@ -27,13 +27,13 @@ npm install https://github.com/LLK/scratch-render.git ```js var canvas = document.getElementById('myStage'); -var debug = document.getElementById('myDebugElement'); +var debug = document.getElementById('myDebug'); // Instantiate the renderer var renderer = new require('scratch-render')(canvas); // Connect to debug canvas -renderer.setDebugCanvas(document.getElementById('debug-canvas')); +renderer.setDebugCanvas(debug); // Start drawing function drawStep() {
1
diff --git a/OpenRobertaServer/staticResources/js/app/roberta/controller/menu.controller.js b/OpenRobertaServer/staticResources/js/app/roberta/controller/menu.controller.js @@ -99,7 +99,9 @@ define([ 'exports', 'log', 'util', 'message', 'comm', 'robot.controller', 'socke clone.find('span:eq( 0 )').addClass('typcn-' + robotName); clone.find('span:eq( 1 )').text(GUISTATE_C.getMenuRobotRealName(robotName)); addInfoLink(clone, robotName); - clone.find('img').css('visibility', 'hidden'); + if (!GUISTATE_C.getIsRobotBeta(robotName)) { + clone.find('img.img-beta').css('visibility', 'hidden'); + } $("#popup-robot-container").append(clone); } else { // till the next for loop we create groups for robots
1
diff --git a/scss/layout/_navbar.scss b/scss/layout/_navbar.scss @@ -29,7 +29,7 @@ $siimple-navbar-height: 34px; &-title { display: inline-block; height: $siimple-navbar-height; - //line-height: $siimple-navbar-title-line-height; + line-height: $siimple-navbar-height; text-decoration: none; font-weight: bold; font-size: 21px;
1
diff --git a/assets/js/components/legacy-notifications/notification.js b/assets/js/components/legacy-notifications/notification.js @@ -132,10 +132,8 @@ class Notification extends Component { title, description, blockData, - winImage, WinImageSVG, SmallImageSVG, - smallImage, format, learnMoreURL, learnMoreDescription, @@ -302,12 +300,11 @@ class Notification extends Component { </div> } - { ( smallImage || SmallImageSVG ) && + { SmallImageSVG && <div className=" mdc-layout-grid__cell mdc-layout-grid__cell--span-1 "> - { smallImage && <img className="googlesitekit-publisher-win__small-image" alt="" src={ smallImage } /> } { SmallImageSVG && <SmallImageSVG /> } </div> } @@ -352,7 +349,7 @@ class Notification extends Component { </div> - { ( winImage || WinImageSVG ) && + { WinImageSVG && <div className=" mdc-layout-grid__cell mdc-layout-grid__cell--order-1-phone @@ -361,7 +358,6 @@ class Notification extends Component { mdc-layout-grid__cell--span-4-desktop "> <div className="googlesitekit-publisher-win__image-large"> - { winImage && <img alt="" src={ winImage } /> } { WinImageSVG && <WinImageSVG /> } </div> </div> @@ -394,9 +390,7 @@ Notification.propTypes = { learnMoreDescription: PropTypes.string, learnMoreLabel: PropTypes.string, blockData: PropTypes.array, - winImage: PropTypes.string, WinImageSVG: PropTypes.elementType, - smallImage: PropTypes.string, SmallImageSVG: PropTypes.elementType, format: PropTypes.string, ctaLink: PropTypes.string,
2
diff --git a/app/controllers/ApplicationController.scala b/app/controllers/ApplicationController.scala @@ -37,6 +37,7 @@ class ApplicationController @Inject() (implicit val env: Environment[User, Sessi def index = UserAwareAction.async { implicit request => val timestamp: Timestamp = new Timestamp(Instant.now.toEpochMilli) val ipAddress: String = request.remoteAddress + val isMobile: Boolean = ControllerUtils.isMobile(request) val qString = request.queryString.map { case (k, v) => k.mkString -> v.mkString } val referrer: Option[String] = qString.get("referrer") match { @@ -45,7 +46,7 @@ class ApplicationController @Inject() (implicit val env: Environment[User, Sessi } referrer match { - // If someone is coming to the site from a custom URL, log it, and send them to the correct location + // If someone is coming to the site from a custom URL, log it, and send them to the correct location. case Some(ref) => ref match { case "mturk" => @@ -116,7 +117,12 @@ class ApplicationController @Inject() (implicit val env: Environment[User, Sessi val activityLogText: String = "/?"+qString.keys.map(i => i.toString +"="+ qString(i).toString).mkString("&") request.identity match { case Some(user) => - if(qString.isEmpty){ + if(qString.nonEmpty) { + WebpageActivityTable.save(WebpageActivity(0, user.userId.toString, ipAddress, activityLogText, timestamp)) + Future.successful(Redirect("/")) + } else if (isMobile) { + Future.successful(Redirect("/mobile")) + } else { WebpageActivityTable.save(WebpageActivity(0, user.userId.toString, ipAddress, "Visit_Index", timestamp)) // Get city configs. val cityStr: String = Play.configuration.getString("city-id").get @@ -131,9 +137,6 @@ class ApplicationController @Inject() (implicit val env: Environment[User, Sessi if (Messages("measurement.system") == "metric") StreetEdgePriorityTable.auditedStreetDistanceUsingPriority * 1.60934.toFloat else StreetEdgePriorityTable.auditedStreetDistanceUsingPriority Future.successful(Ok(views.html.index("Project Sidewalk", Some(user), cityName, stateAbbreviation, cityShortName, mapathonLink, cityStr, otherCityUrls, auditedDistance))) - } else{ - WebpageActivityTable.save(WebpageActivity(0, user.userId.toString, ipAddress, activityLogText, timestamp)) - Future.successful(Redirect("/")) } case None => if(qString.isEmpty){
7
diff --git a/app/services/carto/user_metadata_export_service.rb b/app/services/carto/user_metadata_export_service.rb @@ -19,10 +19,11 @@ require_dependency 'carto/export/connector_configuration_exporter' # 1.0.6: client_applications & friends and sql_copy rate_limits # 1.0.7: export password_reset_token and password_reset_sent_at user fields # 1.0.8: user_multifactor_auths +# 1.0.9: oauth_apps, oauth_app_users and friends module Carto module UserMetadataExportServiceConfiguration - CURRENT_VERSION = '1.0.8'.freeze + CURRENT_VERSION = '1.0.9'.freeze EXPORTED_USER_ATTRIBUTES = [ :email, :crypted_password, :salt, :database_name, :username, :admin, :enabled, :invite_token, :invite_token_date, :map_enabled, :quota_in_bytes, :table_quota, :account_type, :private_tables_enabled, :period_end_date,
3
diff --git a/go.sum b/go.sum @@ -317,7 +317,7 @@ github.com/shirou/gopsutil v3.20.11+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMT github.com/shirou/gopsutil v3.20.12+incompatible h1:6VEGkOXP/eP4o2Ilk8cSsX0PhOEfX6leqAnD+urrp9M= github.com/shirou/gopsutil v3.20.12+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= -github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= +github.com/rs/zerolog v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM=
2
diff --git a/articles/security/store-tokens.md b/articles/security/store-tokens.md @@ -57,5 +57,4 @@ This video will show you how to handle session data when building a web app. It ::: next-steps * [Understanding Sessions & Cookies Video](/videos/session-and-cookies) * [Auth0 Blog: 10 Things You Should Know about Tokens](https://auth0.com/blog/ten-things-you-should-know-about-tokens-and-cookies/) -* [Auth0 Blog: Cookies vs Tokens: The Definitive Guide](https://auth0.com/blog/cookies-vs-tokens-definitive-guide/) :::
2
diff --git a/src/js/services/correspondentListService.js b/src/js/services/correspondentListService.js @@ -943,7 +943,6 @@ angular.module('copayApp.services').factory('correspondentListService', function if (unit === $rootScope.sentUnit) return; if (!$rootScope.newPaymentsCount[unit]) { - $rootScope.newPaymentsCount[unit] = 1; function ifFound(objJoint) { $timeout(function(){ @@ -971,6 +970,7 @@ angular.module('copayApp.services').factory('correspondentListService', function walletId: row.wallet, asset: getAssetByAddress(row.address), }; + $rootScope.newPaymentsCount[unit] = 1; return $rootScope.$emit('Local/BadgeUpdated'); } // else received payment to a shared address @@ -993,6 +993,7 @@ angular.module('copayApp.services').factory('correspondentListService', function walletId: row.wallet, asset: getAssetByAddress(row.shared_address), }; + $rootScope.newPaymentsCount[unit] = 1; $rootScope.$emit('Local/BadgeUpdated'); } );
12
diff --git a/assets/js/components/setup/compatibility-checks.js b/assets/js/components/setup/compatibility-checks.js @@ -63,7 +63,6 @@ export default class CompatibilityChecks extends Component { return; } try { - this.onStart(); for ( const testCallback of checks ) { await testCallback(); } @@ -72,23 +71,7 @@ export default class CompatibilityChecks extends Component { this.setState( { error, helperPlugin } ); } - this.setState( { complete: true }, this.onComplete ); - } - - onStart() { - const { onStart } = this.props; - - if ( typeof onStart === 'function' ) { - onStart(); - } - } - - onComplete() { - const { onComplete } = this.props; - - if ( typeof onComplete === 'function' ) { - onComplete(); - } + this.setState( { complete: true } ); } helperCTA() { @@ -185,6 +168,4 @@ export default class CompatibilityChecks extends Component { CompatibilityChecks.propTypes = { children: PropTypes.func.isRequired, - onStart: PropTypes.func, - onComplete: PropTypes.func, };
2
diff --git a/.github/workflows/perf-check.yml b/.github/workflows/perf-check.yml @@ -28,7 +28,7 @@ jobs: originSha=$(git rev-parse HEAD^2) echo $originSha > tmp/sha-for-commit.txt git show --format=short --no-patch $originSha - - uses: tracerbench/tracerbench-compare-action@runspired/add-config-option + - uses: tracerbench/tracerbench-compare-action@master with: experiment-build-command: yarn workspace relationship-performance-test-app ember build -e production --output-path dist-experiment experiment-serve-command: yarn workspace relationship-performance-test-app ember s --path dist-experiment --port 4201
4
diff --git a/doc/README.md b/doc/README.md @@ -344,7 +344,7 @@ or ## API -There are times when you may need to open or close a tooltip manually. To make this possible PowerTip exposes a couple of API methods on the `$.powerTip` object. +There are some scenarios where you may want to manually open/close or update/remove tooltips via JavaScript. To make this possible, PowerTip exposes several API methods on the `$.powerTip` object. | Method | Description | | ----- | ----- |
7
diff --git a/src/util.js b/src/util.js @@ -377,22 +377,39 @@ util.split = (str, ...splitAt) => { current = ''; for(let i = 0; i < str.length; i++){ - let char = str.charAt(i); - if(char === '"' && !quote){ - dQuote = !dQuote; + const char = str.charAt(i), + next = str.charAt(i+1); + if (i === 0 && char === "'") { + quote = true; continue; } - if(char === "'" && !dQuote){ - quote = !quote; + if (i === 0 && char === '"') { + dQuote = true; continue; } - if(!quote && !dQuote && splitAt.includes(char)){ + if (splitAt.includes(char) && !quote && !dQuote){ + if (next === "'") { + quote = true; + i++; + } + if (next === '"') { + dQuote = true; + i++; + } if(current.length){ parts.push(current); } current = ''; continue; } + if (quote && char === "'" && (next === "" || splitAt.includes(next))) { + quote = false; + continue; + } + if (dQuote && char === '"' && (next === "" || splitAt.includes(next))) { + dQuote = false; + continue; + } current += char; }
4
diff --git a/src/component/component.js b/src/component/component.js @@ -310,7 +310,8 @@ export class Component<P> { throw new Error(`Expected element to be passed to render iframe`); } - getDefaultContext(context : ?$Values<typeof CONTEXT>, props : PropsInputType<P>) : $Values<typeof CONTEXT> { + getDefaultContext(context : ?$Values<typeof CONTEXT>, props : PropsInputType<P>) : ZalgoPromise<$Values<typeof CONTEXT>> { + return ZalgoPromise.try(() => { if (props.window) { return toProxyWindow(props.window).getType(); } @@ -324,6 +325,7 @@ export class Component<P> { } return this.defaultContext; + }); } init(props : PropsInputType<P>) : ZoidComponentInstance<P> { @@ -333,15 +335,19 @@ export class Component<P> { const parent = new ParentComponent(this, props); - const render = (target, container, context) => ZalgoPromise.try(() => { + const render = (target, container, context) => { + return ZalgoPromise.try(() => { if (!isWindow(target)) { throw new Error(`Must pass window to renderTo`); } - context = this.getDefaultContext(context, props); - container = this.getDefaultContainer(context, container); - return parent.render(target, container, context); + return this.getDefaultContext(context, props); + + }).then(finalContext => { + container = this.getDefaultContainer(finalContext, container); + return parent.render(target, container, finalContext); }); + }; return { ...parent.getHelpers(),
11
diff --git a/token-metadata/0x3678d8CC9Eb08875A3720f34c1C8d1e1B31F5A11/metadata.json b/token-metadata/0x3678d8CC9Eb08875A3720f34c1C8d1e1B31F5A11/metadata.json "symbol": "OBEE", "address": "0x3678d8CC9Eb08875A3720f34c1C8d1e1B31F5A11", "decimals": 18, - "dharmaVerificationStatus": { "dharmaVerificationStatus": "VERIFIED" } \ No newline at end of file -} \ No newline at end of file
3
diff --git a/src/extension/utils/currency.js b/src/extension/utils/currency.js @@ -3,6 +3,7 @@ export function formatCurrency(value) { const userCurrency = currencyFormatter.getCurrency(); let formattedCurrency = currencyFormatter.format(value).toString(); + if (userCurrency.display_symbol) { if (userCurrency.symbol_first) { if (formattedCurrency.charAt(0) === '-') { formattedCurrency = `-${userCurrency.currency_symbol}${formattedCurrency.slice(1)}`; @@ -12,6 +13,7 @@ export function formatCurrency(value) { } else { formattedCurrency = `${formattedCurrency}${userCurrency.currency_symbol}`; } + } return formattedCurrency; }
1
diff --git a/src/scss/grommet-core/_objects.meter.scss b/src/scss/grommet-core/_objects.meter.scss @@ -77,12 +77,10 @@ $meter-active-offset: round($inuit-base-spacing-unit * 1.5); stroke-width: double($meter-slice-width); } - .#{$grommet-namespace}meter__values .#{$grommet-namespace}meter__slice { - &:hover { + .#{$grommet-namespace}meter__values .#{$grommet-namespace}meter__slice.#{$grommet-namespace}meter__slice--active { stroke-width: double($meter-slice-active-width); } } -} .#{$grommet-namespace}meter--active { .#{$grommet-namespace}meter__values .#{$grommet-namespace}meter__slice {
1
diff --git a/packages/react-hot-loader/src/reconciler/hotReplacementRender.js b/packages/react-hot-loader/src/reconciler/hotReplacementRender.js @@ -108,7 +108,7 @@ const mergeInject = (a, b) => { return mergeInject(a, [b]) } - if (a.length !== b.length) { + if (!a || !b || a.length !== b.length) { return {children: []} } return {
9
diff --git a/src-input/duk_bi_global.c b/src-input/duk_bi_global.c @@ -427,6 +427,7 @@ DUK_INTERNAL duk_ret_t duk_bi_global_object_eval(duk_context *ctx) { duk_bool_t this_to_global = 1; duk_small_uint_t comp_flags; duk_int_t level = -2; + duk_small_uint_t call_flags; DUK_ASSERT(duk_get_top(ctx) == 1 || duk_get_top(ctx) == 2); /* 2 when called by debugger */ DUK_ASSERT(thr->callstack_top >= 1); /* at least this function exists */ @@ -579,7 +580,19 @@ DUK_INTERNAL duk_ret_t duk_bi_global_object_eval(duk_context *ctx) { /* [ env? source template closure this ] */ - duk_call_method(ctx, 0); + call_flags = 0; + if (act_eval->flags & DUK_ACT_FLAG_DIRECT_EVAL) { + /* Set DIRECT_EVAL flag for the call; it's not strictly + * needed for the 'inner' eval call (the eval body) but + * current new.target implementation expects to find it + * so it can traverse direct eval chains up to the real + * calling function. + */ + call_flags |= DUK_CALL_FLAG_DIRECT_EVAL; + } + duk_handle_call_unprotected(thr, /* thread */ + 0, /* num_stack_args */ + call_flags); /* call_flags */ /* [ env? source template result ] */
12
diff --git a/src/components/CartPopover/CartPopover.js b/src/components/CartPopover/CartPopover.js @@ -20,7 +20,7 @@ import Link from "components/Link"; const styles = (theme) => ({ container: { alignItems: "center", - boxShadow: `-5px 10px 20px ${theme.palette.reaction.black50}`, + boxShadow: `0 0 1em ${theme.palette.reaction.black30}`, display: "flex", marginLeft: "auto", marginRight: "auto",
3
diff --git a/src/App/components/ChatInput/index.js b/src/App/components/ChatInput/index.js @@ -17,6 +17,8 @@ import { EmojiToggle, } from './style'; +const NEWLINES = /(\r\n|\n|\r)/gm; + class ChatInput extends Component { constructor() { super(); @@ -37,7 +39,8 @@ class ChatInput extends Component { updateMessageState = e => { this.setState({ - message: e.target.value, + // Don't let newlines be entered into messages + message: e.target.value.replace(NEWLINES, ''), }); };
1
diff --git a/includes/Modules/Thank_With_Google.php b/includes/Modules/Thank_With_Google.php @@ -28,7 +28,6 @@ use Google\Site_Kit\Core\REST_API\Exception\Invalid_Datapoint_Exception; use Google\Site_Kit\Core\Tags\Guards\Tag_Environment_Type_Guard; use Google\Site_Kit\Core\Tags\Guards\Tag_Verify_Guard; use Google\Site_Kit\Core\Util\Method_Proxy_Trait; -use Google\Site_Kit\Core\Util\Google_URL_Normalizer; use Google\Site_Kit\Core\REST_API\Data_Request; use Google\Site_Kit\Modules\Thank_With_Google\Settings; use Google\Site_Kit\Modules\Thank_With_Google\Supporter_Wall_Widget; @@ -249,13 +248,10 @@ final class Thank_With_Google extends Module $sc_settings = $this->options->get( Search_Console_Settings::OPTION ); $sc_property_id = $sc_settings['propertyID']; - $url_normalizer = new Google_URL_Normalizer(); - $raw_url = $url_normalizer->normalize_url( - str_replace( + $raw_url = str_replace( array( 'sc-domain:', 'https://', 'http://', 'www.' ), '', $sc_property_id - ) ); if ( 0 === strpos( $sc_property_id, 'sc-domain:' ) ) { // Domain property.
2
diff --git a/src/component/utils/__tests__/isHTMLBRElement-test.js b/src/component/utils/__tests__/isHTMLBRElement-test.js * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @emails oncall+draft-js + * @emails oncall+draft_js * @flow strict-local * @format */
14
diff --git a/workshops/reinvent2018/readme.md b/workshops/reinvent2018/readme.md @@ -996,7 +996,7 @@ Delete manually created resources throughout the laUbs: * Use your AWS Cloud9 IDE's terminal to remove the sample web site ``` -cd aws-ai-qna-bot/workshops/reinvent2018/bin +cd aws-ai-qna-bot/workshops/reinvent2018/scripts ./removewebsite.sh ``` * Use the AWS Cloud9 Dashboard to Delete your development environment
3
diff --git a/src/components/Match/Draft/Draft.jsx b/src/components/Match/Draft/Draft.jsx @@ -187,7 +187,15 @@ const Draft = ({ let orderOne = []; let orderTwo = []; let picks = []; - if (startTime > 1584403200) { // post 7.25 + if (startTime > 1629255201) { // post 7.30 + orderOne = [1, 3, 5, 8, 9, 11, 13, 16, 17, 19, 21, 23]; + orderTwo = [2, 4, 6, 7, 10, 12, 14, 15, 18, 20, 22, 24]; + picks = [5, 6, 7, 8, 15, 16, 17, 18, 23, 24]; + } else if (startTime > 1593388800) { // post 7.27 + orderOne = [1, 3, 5, 7, 9, 11, 13, 16, 18, 19, 21, 23]; + orderTwo = [2, 4, 6, 8, 10, 12, 14, 15, 17, 20, 22, 24]; + picks = [5, 6, 7, 8, 15, 16, 17, 18, 23, 24]; + } else if (startTime > 1584403200) { // post 7.25 orderOne = [1, 3, 5, 7, 9, 12, 14, 16, 18, 20, 21]; orderTwo = [2, 4, 6, 8, 10, 11, 13, 15, 17, 19, 22]; picks = [7, 8, 9, 10, 15, 16, 17, 18, 21, 22];
1
diff --git a/addon/components/polaris-popover/content.js b/addon/components/polaris-popover/content.js @@ -2,7 +2,7 @@ import Ember from 'ember'; import layout from '../../templates/components/polaris-popover/content'; const { - $, + $: Ember$, Component, isNone, } = Ember; @@ -67,8 +67,8 @@ export default Component.extend({ return; } - const trigger = $(`div.ember-basic-dropdown-trigger[data-ebd-id="${ uniqueId }-trigger"]`)[0]; - const content = $(`div#ember-basic-dropdown-content-${ uniqueId }`)[0]; + const trigger = Ember$(`div.ember-basic-dropdown-trigger[data-ebd-id="${ uniqueId }-trigger"]`)[0]; + const content = Ember$(`div#ember-basic-dropdown-content-${ uniqueId }`)[0]; if (isNone(trigger) || isNone(content)) { return; @@ -76,6 +76,15 @@ export default Component.extend({ const triggerRect = trigger.getBoundingClientRect(); const left = (triggerRect.width / 2) + (triggerRect.left - content.getBoundingClientRect().left); - $('div.Polaris-Popover__Tip', content).css({ left }); + Ember$('div.Polaris-Popover__Tip', content).css({ left }); + + // Set the height explicitly so the popover displays on Safari. + const pane = Ember$('div.Polaris-Popover__Pane', content)[0]; + if (isNone(pane)) { + return; + } + const paneContent = pane.firstElementChild; + const paneContentRect = paneContent.getBoundingClientRect(); + Ember$('div.Polaris-Popover__Content', content).css({ height: paneContentRect.height }); }, });
12
diff --git a/accessibility-checker-extension/src/ts/devtools/DevToolsPanelApp.tsx b/accessibility-checker-extension/src/ts/devtools/DevToolsPanelApp.tsx @@ -48,7 +48,8 @@ interface IPanelState { learnMore : boolean, learnItem : IReportItem | null, showIssueTypeFilter: boolean[], - scanning: boolean // true when scan taking place + scanning: boolean, // true when scan taking place + error: string | null } export default class DevToolsPanelApp extends React.Component<IPanelProps, IPanelState> { @@ -64,7 +65,8 @@ export default class DevToolsPanelApp extends React.Component<IPanelProps, IPane learnMore: false, learnItem: null, showIssueTypeFilter: [true, false, false, false], - scanning: false + scanning: false, + error: null } ignoreNext = false; @@ -136,6 +138,11 @@ export default class DevToolsPanelApp extends React.Component<IPanelProps, IPane if (tab.id && tab.url && tab.id && tab.title) { let rulesets = await PanelMessaging.sendToBackground("DAP_Rulesets", { tabId: tab.id }) + if(rulesets.error){ + self.setError(rulesets); + return; + } + if (!self.state.listenerRegistered) { PanelMessaging.addListener("TAB_UPDATED", async message => { if (message.tabId === self.state.tabId && message.status === "loading") { @@ -149,9 +156,37 @@ export default class DevToolsPanelApp extends React.Component<IPanelProps, IPane PanelMessaging.sendToBackground("DAP_CACHED", { tabId: tab.id }) } self.setState({ rulesets: rulesets, listenerRegistered: true, tabURL: tab.url, - tabId: tab.id, tabTitle: tab.title, showIssueTypeFilter: [true, false, false, false] }); + tabId: tab.id, tabTitle: tab.title, showIssueTypeFilter: [true, false, false, false], error: null }); + + } + } + + setError = (data:any) => { + + if(data.error){ + this.setState({error: data.error}); + } + }; + errorHandler = (error: string | null) => { + + if(error && error.indexOf('Cannot access contents of url "file://') != -1){ + + let sub_s = error.substring(error.indexOf("\"") + 1); + let sub_e = sub_s.substring(0, sub_s.indexOf("\"")); + + return ( + <React.Fragment> + <p>Can not scan local file: <span style={{fontWeight: "bold"}}>{sub_e}</span></p> + <br/> + <p>Follow the {" "} + <a href={chrome.runtime.getURL("usingAC.html")} target="_blank" rel="noopener noreferred">User Guide</a> + {" "}to allow scanning of local .html or .htm files in your browser</p> + </React.Fragment> + ) } + + return; } async startScan() { @@ -366,7 +401,12 @@ export default class DevToolsPanelApp extends React.Component<IPanelProps, IPane } render() { - if (this.props.layout === "main") { + let error = this.state.error; + + if(error) { + return this.errorHandler(error); + } + else if (this.props.layout === "main") { return <React.Fragment> <div style={{display: "flex", height: "100%", maxWidth: "50%"}} className="mainPanel"> <div ref={this.leftPanelRef} style={{flex: "1 1 50%", backgroundColor: "#f4f4f4", overflowY: this.state.report && this.state.selectedItem ? "scroll": undefined}}>
12
diff --git a/kamu/urls.py b/kamu/urls.py @@ -6,6 +6,7 @@ from django.views.generic import TemplateView, RedirectView from rest_framework import routers from django.contrib.auth.decorators import login_required from books import views +import os router = routers.DefaultRouter() @@ -15,9 +16,6 @@ router.register(r'copies', views.BookCopyViewSet) urlpatterns = [ url(r'^$', login_required(TemplateView.as_view(template_name='home.html'))), url(r'^libraries/(?P<slug>.+)/', login_required(TemplateView.as_view(template_name='libraries.html'))), - url(r'^accounts/login', django_saml2_auth.views.signin), - url(r'^okta-login/', include('django_saml2_auth.urls')), - url(r'^admin/login/$', django_saml2_auth.views.signin), url(r'^admin/', admin.site.urls), url(r'^api/', include(router.urls)), url(r'^api/profile', views.UserView.as_view()), @@ -25,3 +23,10 @@ urlpatterns = [ url(r'^api/copies/(?P<id>.+)/return', views.BookCopyReturnView.as_view()), url(r'^favicon\.ico$', RedirectView.as_view(url=settings.STATIC_URL + 'images/favicon.ico')) ] + +if os.environ.get("DISABLE_SAML2"): + urlpatterns.append(url(r'^accounts/login', admin.site.login)) +else: + urlpatterns.append(url(r'^accounts/login', django_saml2_auth.views.signin)) + urlpatterns.append(url(r'^admin/login/$', django_saml2_auth.views.signin)) + urlpatterns.append(url(r'^okta-login/', include('django_saml2_auth.urls'))) \ No newline at end of file
0
diff --git a/types/index.d.ts b/types/index.d.ts @@ -50,6 +50,14 @@ export interface ProducerConfig { maxInFlightRequests?: number } +export interface Message { + key?: Buffer | string | null + value: Buffer | string | null + partition?: number + headers?: IHeaders + timestamp?: string +} + export interface PartitionerArgs { topic: string partitionMetadata: PartitionMetadata[] @@ -65,14 +73,6 @@ export const Partitioners: { JavaCompatiblePartitioner: JavaCompatiblePartitioner } -export interface Message { - key?: Buffer | null - value: Buffer | null - partition?: number - headers?: IHeaders - timestamp?: string -} - export type PartitionMetadata = { partitionErrorCode: number partitionId: number @@ -293,7 +293,7 @@ export type Admin = { timeout?: number topics: ITopicConfig[] }): Promise<boolean> - deleteTopics(options: { topics: string[]; timeout: number }): Promise<void> + deleteTopics(options: { topics: string[]; timeout?: number }): Promise<void> fetchTopicMetadata(options: { topics: string[] }): Promise<{ topics: Array<ITopicMetadata> }> fetchOffsets(options: { groupId: string @@ -593,6 +593,18 @@ export interface EachBatchPayload { isStale(): boolean } +/** + * Type alias to keep compatibility with @types/kafkajs + * @see https://github.com/DefinitelyTyped/DefinitelyTyped/blob/712ad9d59ccca6a3cc92f347fea0d1c7b02f5eeb/types/kafkajs/index.d.ts#L321-L325 + */ +export type ConsumerEachMessagePayload = EachMessagePayload + +/** + * Type alias to keep compatibility with @types/kafkajs + * @see https://github.com/DefinitelyTyped/DefinitelyTyped/blob/712ad9d59ccca6a3cc92f347fea0d1c7b02f5eeb/types/kafkajs/index.d.ts#L327-L336 + */ +export type ConsumerEachBatchPayload = EachBatchPayload + export type Consumer = { connect(): Promise<void> disconnect(): Promise<void>
7
diff --git a/tools/builder.js b/tools/builder.js @@ -14,7 +14,7 @@ var // START var - rootPath = './app/', + rootPath = '../app/', buildPath = path.join(rootPath, 'build'), inputFilePath = path.join(rootPath, 'index.html'), html = fs.readFileSync(inputFilePath, 'utf8'), @@ -205,7 +205,7 @@ minifiedCss = uglifycss.processString(combinedCss); // inlined -combinedCss = inliner.inlineImages(combinedCss, './app/css/'); +combinedCss = inliner.inlineImages(combinedCss, '../app/css/'); minifiedCss = uglifycss.processString(combinedCss); // write out
3
diff --git a/packages/spotlight/SpotlightRootDecorator/SpotlightRootDecorator.js b/packages/spotlight/SpotlightRootDecorator/SpotlightRootDecorator.js @@ -40,12 +40,18 @@ const SpotlightRootDecorator = hoc((config, Wrapped) => { componentWillMount () { if (typeof window === 'object') { + const palmSystem = window.PalmSystem; + Spotlight.initialize(); Spotlight.add(spotlightRootContainerName, { selector: '.' + spottableClass, navigableFilter: this.navigableFilter, restrict: 'none' }); + + if (palmSystem && palmSystem.cursor) { + Spotlight.setPointerMode(palmSystem.cursor.visibility); + } } }
12
diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/common/searchBox.js b/packages/node_modules/@node-red/editor-client/src/js/ui/common/searchBox.js } }); this.element.on("keydown",function(e) { - if (!menuShown && e.keyCode === 40) { - //DOWN + if (!menuShown && e.keyCode === 40 && $(this).val() === '') { + //DOWN (only show menu if search field is emty) showMenu(); } });
1
diff --git a/.github/workflows/deployRelease.yml b/.github/workflows/deployRelease.yml @@ -96,5 +96,3 @@ jobs: with: token: ${{ secrets.GITHUB_TOKEN }} version: ${{ github.event.inputs.version }} - referencePrefixes: "PDCL-,CORE-,AN-" - referenceTargetUrlPrefix: "https://jira.corp.adobe.com/browse/"
2
diff --git a/app/models/delayed_job.rb b/app/models/delayed_job.rb @@ -25,7 +25,7 @@ class Delayed::Backend::ActiveRecord::Job def self.pending Delayed::Job. where("run_at > ? OR attempts = 0", Time.now). - where("failed_at IS NOT NULL"). + where("failed_at IS NULL"). order(run_at: :asc) end
1
diff --git a/includes/Core/Util/Tracking.php b/includes/Core/Util/Tracking.php @@ -82,29 +82,6 @@ final class Tracking { * @since 1.0.0 */ public function register() { - // Enqueue gtag script for Site Kit admin screens. - add_action( - 'googlesitekit_enqueue_screen_assets', - function () { - $this->print_gtag_script(); - } - ); - - // Enqueue gtag script for additional areas. - add_action( - 'admin_enqueue_scripts', - function () { - $current_screen = get_current_screen(); - if ( ! in_array( $current_screen->id, array( 'dashboard', 'plugins' ), true ) ) { - return; - } - $this->print_gtag_script(); - if ( ! $this->authentication->is_authenticated() ) { - $this->print_standalone_event_tracking_script(); - } - } - ); - add_filter( 'googlesitekit_inline_base_data', function ( $data ) { @@ -138,57 +115,6 @@ final class Tracking { return (bool) $this->user_options->get( self::TRACKING_OPTIN_KEY ); } - /** - * Output Tag Manager gtag.js if tracking is enabled. - * - * @since 1.0.0 - */ - private function print_gtag_script() { - // Only load if tracking is active. - $tracking_active = $this->is_active(); - - if ( ! $tracking_active ) { - return; - } - ?> - <!-- Global site tag (gtag.js) - Google Analytics --> - <script async src="<?php echo esc_url( 'https://www.googletagmanager.com/gtag/js?id=' . self::TRACKING_ID ); ?>"></script><?php // phpcs:ignore WordPress.WP.EnqueuedResources.NonEnqueuedScript ?> - <script> - window.dataLayer = window.dataLayer || []; - function gtag(){dataLayer.push(arguments);} - gtag('js', new Date()); - gtag('config', '<?php echo esc_attr( self::TRACKING_ID ); ?>'); - window.googlesitekitTrackingEnabled = true; - </script> - <?php - } - - /** - * Prints standalone tracking event function. - * - * This is used for when not on a screen owned by Site Kit. - * - * @since 1.0.0 - */ - private function print_standalone_event_tracking_script() { - ?> - <script type="text/javascript"> - var sendAnalyticsTrackingEvent = function( eventCategory, eventName, eventLabel, eventValue ) { - if ( 'undefined' === typeof gtag ) { - return; - } - - if ( window.googlesitekitTrackingEnabled ) { - gtag( 'event', eventName, { - send_to: '<?php echo esc_attr( self::TRACKING_ID ); ?>', /*eslint camelcase: 0*/ - event_category: eventCategory, /*eslint camelcase: 0*/ - } ); - } - }; - </script> - <?php - } - /** * Modifies the admin data to pass to JS. *
2
diff --git a/services/analytics-service/app/api/controllers/mongo.js b/services/analytics-service/app/api/controllers/mongo.js @@ -460,9 +460,7 @@ const getAllComponentsData = async ( // eslint-disable-line try { if (config.timeWindows[timeFrame] > 1440 && 'day' in config.timeWindows) { // Group day buckets - // @todo: config.timeWindows[timeFrame] "number of days" const collectionKey = 'components_day'; - resolve(await modelCreator.models[collectionKey].aggregate([ { '$match': qry }, { @@ -470,6 +468,9 @@ const getAllComponentsData = async ( // eslint-disable-line _id: { year: { $year: '$bucketStartAt' }, month: { $month: '$bucketStartAt' }, + timeFrame: { + '$dateTrunc': { date: '$bucketStartAt', unit: 'minute', binSize: config.timeWindows[timeFrame] }, + }, }, errorData: { $push: '$errorData',
9
diff --git a/new-client/src/components/FeatureInfo/FeaturePropsParsing.js b/new-client/src/components/FeatureInfo/FeaturePropsParsing.js @@ -38,14 +38,13 @@ export default class FeaturePropsParsing { // console.log("root: ", a, b, c); // return a.children; // }, - // text: (text) => { - // let c = null; - // if (text.value.match(/{.+@@.+}/gim)) { - // c = text.children.replace(/{.+@@.+}/gim, <Link>Hej!</Link>); - // console.log(text); - // } - // return c || text.children; - // }, + text: (text) => { + // If our textnode includes @@, we want to fetch an external Component + if (text.value.match(/{.+@@.+}/gim)) { + console.log("Text node that includes '@@'", text); + return <Typography variant="button">Some @@ component</Typography>; + } else return text.children; + }, thematicBreak: () => <Divider />, link: (a) => { return <Link href={a.href}>{a.children}</Link>;
6
diff --git a/sirepo/package_data/static/json/srw-schema.json b/sirepo/package_data/static/json/srw-schema.json }, "multipole": { "title": "Dipole", - "basic": [ + "basic": [], + "advanced": [ "field", "length", "distribution" - ], - "advanced": [] + ] }, "multiElectronAnimation": { "title": "Partially Coherent Intensity Report",
5
diff --git a/dc-worker-manager.js b/dc-worker-manager.js @@ -300,18 +300,28 @@ export class DcWorkerManager { chunkPosition.z * this.chunkSize * this.chunkSize }`; return await navigator.locks.request(chunkId, async (lock) => { - console.log('Lock : ' + lock.name); const worker = this.getNextWorker(); const result = await worker.request('drawSphereDamage', { instance: this.instance, position: position.toArray(), radius, }); - console.log('UnLock : ' + lock.name); return result; }); } async eraseSphereDamage(position, radius) { + const chunkPosition = chunkMinForPosition( + position.x, + position.y, + position.z, + this.chunkSize + ); + const chunkId = `chunk:${ + chunkPosition.x + + chunkPosition.y * this.chunkSize + + chunkPosition.z * this.chunkSize * this.chunkSize + }`; + return await navigator.locks.request(chunkId, async (lock) => { const worker = this.getNextWorker(); const result = await worker.request('eraseSphereDamage', { instance: this.instance, @@ -319,5 +329,5 @@ export class DcWorkerManager { radius, }); return result; - } + });} }
0
diff --git a/components/bases-locales/charte/partners.js b/components/bases-locales/charte/partners.js @@ -11,7 +11,7 @@ function Partners({epci, companies, shuffledPartners}) { return ( <> <div className='partners-container'> - {partners.map(partner => <Partner key={partner.name} partnerInfos={partner} />)} + {partners.map(partner => <Partner key={partner.name} partnerInfos={partner} isCommune={partner.echelon === 0} />)} </div> {companiesPartners && (
0
diff --git a/src/App.js b/src/App.js @@ -67,8 +67,8 @@ const styles = StyleSheet.create({ const HomeStack = StackNavigator( { [HOME]: { screen: withShadow(HomeScreen) }, - [EVENT_DETAILS]: { screen: withShadow(EventDetailsScreen) }, - [FEATURED_EVENT_LIST]: { screen: withShadow(FeaturedEventListScreen) } + [EVENT_DETAILS]: { screen: EventDetailsScreen }, + [FEATURED_EVENT_LIST]: { screen: FeaturedEventListScreen } }, { initialRouteName: HOME, @@ -86,7 +86,7 @@ const HomeStack = StackNavigator( const EventsStack = StackNavigator( { [EVENT_LIST]: { screen: withShadow(EventsScreen) }, - [EVENT_DETAILS]: { screen: withShadow(EventDetailsScreen) }, + [EVENT_DETAILS]: { screen: EventDetailsScreen }, [EVENT_CATEGORIES_FILTER]: { screen: CategoriesFilterScreen } }, {
2
diff --git a/token-metadata/0xdfe691F37b6264a90Ff507EB359C45d55037951C/metadata.json b/token-metadata/0xdfe691F37b6264a90Ff507EB359C45d55037951C/metadata.json "symbol": "KARMA", "address": "0xdfe691F37b6264a90Ff507EB359C45d55037951C", "decimals": 4, - "dharmaVerificationStatus": { "dharmaVerificationStatus": "VERIFIED" } \ No newline at end of file -} \ No newline at end of file
3
diff --git a/js/cryptopia.js b/js/cryptopia.js @@ -533,10 +533,7 @@ module.exports = class cryptopia extends Exchange { }, params)); if (id in this.orders) this.orders[id]['status'] = 'canceled'; - return { - 'status': 'canceled', - 'info': response, - }; + return response; } parseOrder (order, market = undefined) {
13
diff --git a/package.json b/package.json "debug": "~2.2.0", "dot": "~1.0.2", "grainstore": "~1.6.0", - "mapnik": "cartodb/node-mapnik#query-variables", + "mapnik": "cartodb/node-mapnik#3.5.x-grid-variables", "queue-async": "~1.0.7", "redis-mpool": "0.4.1", "request": "~2.79.0",
4
diff --git a/test/outer-scroller.html b/test/outer-scroller.html outerScroller.scrollLeft = 100; }); + // Outer scroller never needs to be synced on iOS since it's always the one that gets scrolled. + if (!ios) { it('should scroll the outer scroller', () => { wheel(grid, 100, 0); expect(outerScroller.scrollLeft).to.equal(100); grid._scrollHandler(); expect(spy.called).to.be.true; }); + } it('should not invoke afterScroll on scroll event while outer scrolling', () => { const spy = sinon.spy(grid, '_afterScroll');
8
diff --git a/metaversefile-api.js b/metaversefile-api.js @@ -128,6 +128,12 @@ class App extends THREE.Object3D { set instanceId(instanceId) { this.setComponent('instanceId', instanceId); } + get paused() { + return this.getComponent('paused'); + } + set paused(paused) { + this.setComponent('paused', paused); + } addModule(m) { throw new Error('method not bound'); }
0
diff --git a/src/stores/TierStore.js b/src/stores/TierStore.js @@ -182,8 +182,7 @@ class TierStore { if (storedIndex > -1) { whitelist[storedIndex].duplicated = true newItem.duplicated = true - - } else if (isAdded) return + } } else if (isAdded) return
2
diff --git a/lib/grammars.coffee b/lib/grammars.coffee @@ -156,6 +156,26 @@ module.exports = command: "bash" args: (context) -> ["-c", "g++ -std=c++14 -Wall -include stdio.h -include iostream '/mnt/" + path.posix.join.apply(path.posix, [].concat([context.filepath.split(path.win32.sep)[0].toLowerCase()], context.filepath.split(path.win32.sep).slice(1))).replace(":", "") + "' -o /tmp/cpp.out && /tmp/cpp.out"] + 'C++14': + if GrammarUtils.OperatingSystem.isDarwin() + "File Based": + command: "bash" + args: (context) -> ['-c', "xcrun clang++ -fcolor-diagnostics -std=c++14 -Wall -include stdio.h -include iostream '" + context.filepath + "' -o /tmp/cpp.out && /tmp/cpp.out"] + else if GrammarUtils.OperatingSystem.isLinux() + "Selection Based": + command: "bash" + args: (context) -> + code = context.getCode(true) + tmpFile = GrammarUtils.createTempFileWithCode(code, ".cpp") + ["-c", "g++ -std=c++14 -Wall -include stdio.h -include iostream '" + tmpFile + "' -o /tmp/cpp.out && /tmp/cpp.out"] + "File Based": + command: "bash" + args: (context) -> ["-c", "g++ -std=c++14 -Wall -include stdio.h -include iostream '" + context.filepath + "' -o /tmp/cpp.out && /tmp/cpp.out"] + else if GrammarUtils.OperatingSystem.isWindows() and GrammarUtils.OperatingSystem.release().split(".").slice -1 >= '14399' + "File Based": + command: "bash" + args: (context) -> ["-c", "g++ -std=c++14 -Wall -include stdio.h -include iostream '/mnt/" + path.posix.join.apply(path.posix, [].concat([context.filepath.split(path.win32.sep)[0].toLowerCase()], context.filepath.split(path.win32.sep).slice(1))).replace(":", "") + "' -o /tmp/cpp.out && /tmp/cpp.out"] + Clojure: "Selection Based": command: "lein"
0
diff --git a/_includes/content/github-buttons.html b/_includes/content/github-buttons.html <div class="ui mini horizontal divided link list"> <!-- Display last edited date of the page --> <div class=" disabled item"> - Last edit: {% last_modified_at %} + Last edit: {% page.last_modified_at %} </div> <!-- Link to the page in the Github Repository -->
0
diff --git a/lib/optimize/DedupePlugin.js b/lib/optimize/DedupePlugin.js class DedupePlugin { apply(compiler) { compiler.plugin("compilation", (compilation) => { - compilation.warnings.push(new Error("DedupePlugin: This plugin was removed from webpack. remove it from configuration.")); + compilation.warnings.push(new Error("DedupePlugin: This plugin was removed from webpack. Remove it from your configuration.")); }); } }
7
diff --git a/physics-manager.js b/physics-manager.js @@ -4,6 +4,7 @@ it contains code for character capsules and world simulation. */ import * as THREE from 'three'; +import {CapsuleGeometry} from './CapsuleGeometry.js'; import uiManager from './ui-manager.js'; import {getRenderer, camera, dolly} from './renderer.js'; import physx from './physx.js'; @@ -193,6 +194,30 @@ const _extractPhysicsGeometryForId = physicsId => { return geometry; }; +physicsManager.addCapsuleGeometry = (position, quaternion, radius, halfHeight, ccdEnabled) => { + const physicsId = getNextPhysicsId(); + physx.physxWorker.addCapsuleGeometryPhysics(physx.physics, position, quaternion, radius, halfHeight, ccdEnabled); + + const physicsObject = _makePhysicsObject(physicsId, position, quaternion, size); + const physicsMesh = new THREE.Mesh( + new THREE.CapsuleGeometry(radius, radius, halfHeight*2) + ); + physicsMesh.visible = false; + // physicsMesh.position.copy(position); + // physicsMesh.quaternion.copy(quaternion); + // physicsMesh.scale.copy(size); + physicsObject.add(physicsMesh); + physicsObject.physicsMesh = physicsMesh; + physicsObjects[physicsId] = physicsObject; + /* physicsManager.dispatchEvent(new MessageEvent('physicsobjectadd', { + data: { + physicsId, + // physicsObject + }, + })); */ + return physicsObject; +}; + physicsManager.addBoxGeometry = (position, quaternion, size, dynamic) => { const physicsId = getNextPhysicsId(); physx.physxWorker.addBoxGeometryPhysics(physx.physics, position, quaternion, size, physicsId, dynamic);
0
diff --git a/src/schemas/json/ocelot.json b/src/schemas/json/ocelot.json "RouteIsCaseSensitive": { "$id": "#/properties/Routes/items/properties/RouteIsCaseSensitive", "type": "boolean", - "title": "The Rerouteiscasesensitive Schema" + "title": "The Routeiscasesensitive Schema" }, "ServiceName": { "$id": "#/properties/Routes/items/properties/ServiceName",
10
diff --git a/articles/api-auth/intro.md b/articles/api-auth/intro.md @@ -172,10 +172,6 @@ Given that [ID tokens should no longer be used as API tokens](/api-auth/tutorial At the moment there is no OIDC-compliant mechanism to obtain third-party API tokens. In order to facilitate a gradual migration to the new authentication pipeline, delegation can still be used to obtain third-party API tokens. This will be deprecated in future releases. -::: note - For more information, refer to <a href="/api-auth/tutorials/adoption/delegation">Delegation</a>. -::: - ### Passwordless Our new implementation does not support passwordless authentication. We are currently evaluating this feature and our approach. We plan on supporting this in future releases.
2
diff --git a/src/libs/Pusher/pusher.js b/src/libs/Pusher/pusher.js +import Onyx from 'react-native-onyx'; import _ from 'underscore'; +import ONYXKEYS from '../../ONYXKEYS'; import Pusher from './library'; import TYPE from './EventType'; import Log from '../Log'; +let shouldForceOffline = false; +Onyx.connect({ + key: ONYXKEYS.NETWORK, + callback: (network) => { + if (!network) { + return; + } + shouldForceOffline = Boolean(network.shouldForceOffline); + }, +}); + let socket; const socketEventCallbacks = []; let customAuthorizer; @@ -112,6 +125,11 @@ function bindEventToChannel(channel, eventName, eventCallback = () => {}) { const chunkedDataEvents = {}; const callback = (eventData) => { + if (shouldForceOffline) { + Log.info('[Pusher] Ignoring a Push event because shouldForceOffline = true'); + return; + } + let data; try { data = _.isObject(eventData) ? eventData : JSON.parse(eventData);
8
diff --git a/docs/RuntimeConfig/index.md b/docs/RuntimeConfig/index.md @@ -38,10 +38,11 @@ const App = new MyApp(options); | `memoryPressure` | Number | 24e6 | Maximum GPU memory usage in pixels (see details below) | | `clearColor` | Float[] | [0,0,0,0] | Background color in ARGB values (0 to 1) | | `defaultFontFace` | String | sans-serif | Font face for text rendering | +| `fontSharp` | Object, Boolean | { precision:0.6666666667, fontSize: 39 } | Determine when to apply gl.NEAREST to TEXTURE_MAG_FILTER | | `fixedDt` | Number | 0 (auto) | Fixed time step per frame (in ms) | | `useImageWorker` | Boolean | true | By default, use a Web Worker that parses images off-thread (web only) | | `autostart` | Boolean | true | If set to *false*, no automatic binding to `requestAnimationFrame` | -| `Canvas2D` | Boolean | false | If set tot *true*, the Render Engine uses Canvas2D instead of WebGL (limitations apply, see details below) | +| `canvas2d` | Boolean | false | If set tot *true*, the Render Engine uses canvas2d instead of WebGL (limitations apply, see details below) | @@ -63,6 +64,29 @@ As a result, the text and off-screen textures are rendered at a *lower resolutio Downscaling with the `precision` option generally works well. But keep in mind that WebGL rasterizes as *pixel boundaries*, so when it uses a line width of 2 in 1080p quality, it may render at either 2px or 3px in 720p (depending on the rendered pixel offset). If you encounter such problems, you have to set the sizing at a multiple of 3. + +## FontSharp + +By default we apply `gl.LINEAR` to texture `TEXTURE_MAG_FILTER` parameter. This can lead to a more blurry font +when we try to render smaller fonts on lower precisions. By changing the `fontSharp` stage setting you can adjust the behaviour: + +```js +fontSharp: { + precision:0.6666666667, + fontSize: 39 +} +``` + +means: set texture magnification filter (gl.TEXTURE_MAG_FILTER) to `gl.NEAREST` when the font-size of our current text texture is +lower or equal to 39 and our render precision is lower or equal to 0.6666666667. + +```js +fontSharp: false +``` + +Will disable it completely and will use `gl.LINEAR` as texture magnification filter. + + ## GPU Memory Tweak
3
diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md ### Summary -Provide a general description of the code changes in your pull +_Remove this paragraph and provide a general description of the code changes in your pull request... were there any bugs you had fixed? If so, mention them. If these bugs have open GitHub issues, be sure to tag them here as well, -to keep the conversation linked together. +to keep the conversation linked together._ ### Other Information -If there's anything else that's important and relevant to your pull -request, mention that information here. This could include -benchmarks, or other information. +_Remove this parapraph and mention any other important and relevant information such as benchmarks._ -If you are updating any of the CHANGELOG files or are asked to update the -CHANGELOG files by reviewers, please add the CHANGELOG entry at the top of the file. +### Pull Request checklist +_Remove this line after checking all the items here. If the item is not applicable to the PR, both check it out and wrap it by `~`._ -Thanks for contributing! +- [ ] Add/update test to cover these changes +- [ ] Update documentation +- [ ] Update CHANGELOG file + _Add the CHANGELOG entry at the top of the file._
7
diff --git a/src/encoded/static/components/genome_browser.js b/src/encoded/static/components/genome_browser.js @@ -129,14 +129,14 @@ const getDefaultCoordinates = (defaultLocation, assembly, annotation, ignoreCach }, { file_format: 'bigBed', - href: '/files/ENCFF088UEJ/@@download/ENCFF088UEJ.bigBed', - dataset: '/annotations/ENCSR169HLH/', + href: '/files/ENCFF998GAH/@@download/ENCFF998GAH.bigBed', + dataset: '/annotations/ENCSR890YQQ/', title: 'representative DNase hypersensitivity sites', }, { file_format: 'bigBed', - href: '/files/ENCFF389ZVZ/@@download/ENCFF389ZVZ.bigBed', - dataset: '/annotations/ENCSR439EAZ/', + href: '/files/ENCFF081NFZ/@@download/ENCFF081NFZ.bigBed', + dataset: '/annotations/ENCSR487PRC/', title: 'cCRE, all', }, ]; @@ -158,14 +158,14 @@ const getDefaultCoordinates = (defaultLocation, assembly, annotation, ignoreCach }, { file_format: 'bigBed', - href: '/files/ENCFF088UEJ/@@download/ENCFF088UEJ.bigBed', - dataset: '/annotations/ENCSR169HLH/', + href: '/files/ENCFF998GAH/@@download/ENCFF998GAH.bigBed', + dataset: '/annotations/ENCSR890YQQ/', title: 'representative DNase hypersensitivity sites', }, { file_format: 'bigBed', - href: '/files/ENCFF389ZVZ/@@download/ENCFF389ZVZ.bigBed', - dataset: '/annotations/ENCSR439EAZ/', + href: '/files/ENCFF081NFZ/@@download/ENCFF081NFZ.bigBed', + dataset: '/annotations/ENCSR487PRC/', title: 'cCRE, all', }, ]; @@ -216,14 +216,14 @@ const getDefaultCoordinates = (defaultLocation, assembly, annotation, ignoreCach }, { file_format: 'bigBed', - href: '/files/ENCFF278QAH/@@download/ENCFF278QAH.bigBed', - dataset: '/annotations/ENCSR672RVL/', + href: '/files/ENCFF846RAN/@@download/ENCFF846RAN.bigBed', + dataset: '/annotations/ENCSR127YRL/', title: 'representative DNase hypersensitivity sites', }, { file_format: 'bigBed', - href: '/files/ENCFF228JRO/@@download/ENCFF228JRO.bigBed', - dataset: '/annotations/ENCSR394RWS/', + href: '/files/ENCFF074AWA/@@download/ENCFF074AWA.bigBed', + dataset: '/annotations/ENCSR906ZUZ/', title: 'cCRE, all', }, ];
3
diff --git a/src/lib/core.d.ts b/src/lib/core.d.ts @@ -706,6 +706,20 @@ export default class SunEditor { */ audioUploadHandler: (xmlHttp: XMLHttpRequest, info: audioInputInformation, core: Core) => void; + /** + * @description An event when toggling between code view and wysiwyg view. + * @param isCodeView: Whether the current code view mode + * @paran core: Core object + */ + toggleCodeView: (isCodeView: boolean, core: Core) => void; + + /** + * @description An event when toggling full screen. + * @param isFullScreen: Whether the current full screen mode + * @param core: Core object + */ + toggleFullScreen: (isFullScreen: boolean, core: Core) => void; + /** * @description Called before the image is uploaded * If true is returned, the internal upload process runs normally.
3
diff --git a/README.md b/README.md @@ -53,7 +53,7 @@ See the integrated Swagger UI instance on [/api](https://demo.grocy.info/api). ### Barcode readers & camera scanning Some fields also allow to select a value by scanning a barcode. It works best when your barcode reader prefixes every barcode with a letter which is normally not part of a item name (I use a `$`) and sends a `TAB` after a scan. -Additionally it's also possible to use your device camera to scan a barcode by using the camera button on the right side of the corresponding field (powered by [QuaggaJS](https://github.com/serratus/quaggaJS), totally offline / client-side camera stream processing). Quick video demo: https://www.youtube.com/watch?v=Y5YH6IJFnfc +Additionally it's also possible to use your device camera to scan a barcode by using the camera button on the right side of the corresponding field (powered by [QuaggaJS](https://github.com/serratus/quaggaJS), totally offline / client-side camera stream processing, please note due to browser security restrictions, this only works when serving grocy via a secure connection (`https://`)). Quick video demo: https://www.youtube.com/watch?v=Y5YH6IJFnfc ### Input shorthands for date fields For (productivity) reasons all date (and time) input fields use the ISO-8601 format regardless of localization.
0
diff --git a/character-controller.js b/character-controller.js @@ -70,6 +70,12 @@ class Player extends THREE.Object3D { hasAction(type) { return this.actions.some(action => action.type === type); } + addAction(action) { + this.actions.push(action); + } + removeAction(type) { + this.actions = this.actions.filter(action => action.type !== type); + } } class LocalPlayer extends Player { constructor() {
0
diff --git a/src/video/video.js b/src/video/video.js // add our canvas if (typeof settings.wrapper !== "undefined") { settings.wrapper = document.getElementById(settings.wrapper); - } else { + } + + // fallback, if invalid target or non HTMLElement object + if (!settings.wrapper) { // if wrapper is not defined, add the canvas to document.body settings.wrapper = document.body; } + settings.wrapper.appendChild(this.renderer.getScreenCanvas()); // adjust CSS style for High-DPI devices
1
diff --git a/desktop/core/library/f.js b/desktop/core/library/f.js @@ -13,8 +13,8 @@ function OperatorF (orca, x, y, passive) { this.ports.output = { x: 0, y: 1 } this.run = function () { - const a = this.listen(this.ports.input.a, true) - const b = this.listen(this.ports.input.b, true) + const a = this.listen(this.ports.input.a) + const b = this.listen(this.ports.input.b) const res = a === b ? '*' : '.' this.output(`${res}`) }
11
diff --git a/src/sdk/p2p/peerconnection-channel.js b/src/sdk/p2p/peerconnection-channel.js @@ -19,21 +19,6 @@ export class P2PPeerConnectionChannelEvent extends Event { } } -const ChannelState = { - READY: 1, // Ready to chat. - OFFERED: 2, // Sent invitation to remote user. - PENDING: 3, // Received an invitation. - MATCHED: 4, // Both sides agreed to establish a WebRTC connection. - CONNECTING: 5, // Exchange SDP and prepare for video chat. - CONNECTED: 6, // Chat. -}; - -const NegotiationState = { - READY: 1, - REQUESTED: 2, - ACCEPTED: 3, - NEGOTIATING: 4 -}; const DataChannelLabel = { MESSAGE: 'message', FILE: 'file' @@ -80,7 +65,6 @@ class P2PPeerConnectionChannel extends EventDispatcher { this._publishingStreamTracks = new Map(); // Key is MediaStream's ID, value is an array of the ID of its MediaStreamTracks that haven't been acked. this._publishedStreamTracks = new Map(); // Key is MediaStream's ID, value is an array of the ID of its MediaStreamTracks that haven't been removed. this._remoteStreamTracks = new Map(); // Key is MediaStream's ID, value is an array of the ID of its MediaStreamTracks. - this._negotiationState = NegotiationState.READY; this._isNegotiationNeeded = false; this._remoteSideSupportsRemoveStream = true; this._remoteSideSupportsPlanB = true; @@ -91,7 +75,7 @@ class P2PPeerConnectionChannel extends EventDispatcher { this._dataSeq = 1; // Sequence number for data channel messages. this._sendDataPromises = new Map(); // Key is data sequence number, value is an object has |resolve| and |reject|. this._addedTrackIds = []; // Tracks that have been added after receiving remote SDP but before connection is established. Draining these messages when ICE connection state is connected. - + this._isCaller = true; this._createPeerConnection(); } @@ -213,6 +197,9 @@ class P2PPeerConnectionChannel extends EventDispatcher { case SignalingType.CLOSED: this._chatClosedHandler(); break; + case SignalingType.NEGOTIATION_NEEDED: + this._doNegotiate(); + break; default: Logger.error('Invalid signaling message received. Type: ' + message.type); } @@ -446,12 +433,11 @@ class P2PPeerConnectionChannel extends EventDispatcher { } _onNegotiationneeded() { - // TODO: send NEGOTIATION-NEEDED message. Logger.debug('On negotiation needed.'); - if (this._pc.signalingState === 'stable' && this._negotiationState === - NegotiationState.READY) { + if (this._pc.signalingState === 'stable') { this._doNegotiate(); + this._isNegotiationNeeded = false; } else { this._isNegotiationNeeded = true; } @@ -479,9 +465,8 @@ class P2PPeerConnectionChannel extends EventDispatcher { if (this._pc.signalingState === 'closed') { //stopChatLocally(peer, peer.id); } else if (this._pc.signalingState === 'stable') { - this._negotiationState = NegotiationState.READY; if (this._isNegotiationNeeded) { - this._doNegotiate(); + this._onNegotiationneeded(); } else { this._drainPendingStreams(); this._drainPendingMessages(); @@ -684,8 +669,11 @@ class P2PPeerConnectionChannel extends EventDispatcher { } _doNegotiate() { - this._negotiationState = NegotiationState.NEGOTIATING; + if (this._isCaller) { this._createAndSendOffer(); + } else { + this._sendSignalingMessage(SignalingType.NEGOTIATION_NEEDED); + } }; _setCodecOrder(sdp) { @@ -716,15 +704,11 @@ class P2PPeerConnectionChannel extends EventDispatcher { Logger.error('Peer connection have not been created.'); return; } - if (this._pc.signalingState !== 'stable') { - this._negotiationState = NegotiationState.NEGOTIATING; - return; - } this._isNegotiationNeeded = false; + this._isCaller = true; let localDesc; this._pc.createOffer(offerOptions).then(desc => { desc.sdp = this._setRtpReceiverOptions(desc.sdp); - this._negotiationState = NegotiationState.READY; localDesc = desc; return this._pc.setLocalDescription(desc); }).then(() => { @@ -740,6 +724,7 @@ class P2PPeerConnectionChannel extends EventDispatcher { _createAndSendAnswer() { this._drainPendingStreams(); this._isNegotiationNeeded = false; + this._isCaller = false; let localDesc; this._pc.createAnswer().then(desc => { desc.sdp = this._setRtpReceiverOptions(desc.sdp);
1
diff --git a/src/server/node_services/nodes_monitor.js b/src/server/node_services/nodes_monitor.js @@ -746,8 +746,8 @@ class NodesMonitor extends EventEmitter { dbg.log0('_get_agent_info: set node name', item.node.name, 'to', updates.name); - let agent_config = system_store.data.get_by_id(item.node.agent_config); - let { use_s3 = false, use_storage = true, exclude_drive = [] } = agent_config || {}; + let agent_config = system_store.data.get_by_id(item.node.agent_config) || {}; + let { use_s3 = false, use_storage = true, exclude_drive = [] } = agent_config; // on first call to get_agent_info enable\disable the node according to the configuration let should_start_service = (info.s3_agent_info && use_s3) || (!info.s3_agent_info && use_storage && exclude_drive.indexOf(info.drives[0].mount) === -1);
12