code
stringlengths
122
4.99k
label
int64
0
14
diff --git a/src/components/appNavigation/TabsView.js b/src/components/appNavigation/TabsView.js @@ -9,6 +9,7 @@ import Icon from '../../components/common/view/Icon' import useOnPress from '../../lib/hooks/useOnPress' import useSideMenu from '../../lib/hooks/useSideMenu' +import { isMobileNative } from '../../lib/utils/platform' const { isEToro, enableInvites, showRewards } = config @@ -44,12 +45,19 @@ const styles = { iconWidth: { width: 37, }, + iconView: { + justifyContent: 'center', + alignItems: 'flex-end', + width: 50, + height: 50, + }, appBar: { overflow: 'hidden' }, } const showRewardsFlag = showRewards || isEToro const showInviteFlag = enableInvites || isEToro -const defaultLeftButtonStyles = [styles.marginLeft10, styles.iconWidth] +const iconStyle = isMobileNative ? styles.iconView : styles.iconWidth +const defaultLeftButtonStyles = [styles.marginLeft10, iconStyle] // const defaultRightButtonStyles = [styles.marginRight10, styles.iconWidth] @@ -168,7 +176,7 @@ const TabsView = ({ navigation }) => { {showInviteFlag && <InviteButton onPress={goToRewards} style={inviteButtonStyles} />} {/*{!showSupportFirst && <SupportButton onPress={goToSupport} style={supportButtonStyles} />}*/} {/*!market && */ !showInviteFlag && !showRewardsFlag && <EmptySpaceComponent style={styles.iconWidth} />} - <TouchableOpacity onPress={_slideToggle} style={styles.iconWidth}> + <TouchableOpacity onPress={_slideToggle} style={iconStyle}> <Icon name="settings" size={20} color="white" style={styles.marginRight10} testID="burger_button" /> </TouchableOpacity> </Appbar.Header>
3
diff --git a/token-metadata/0x4Ba6dDd7b89ed838FEd25d208D4f644106E34279/metadata.json b/token-metadata/0x4Ba6dDd7b89ed838FEd25d208D4f644106E34279/metadata.json "symbol": "VETH", "address": "0x4Ba6dDd7b89ed838FEd25d208D4f644106E34279", "decimals": 18, - "dharmaVerificationStatus": { "dharmaVerificationStatus": "VERIFIED" } \ No newline at end of file -} \ No newline at end of file
3
diff --git a/app/components/DepositWithdraw/blocktrades/BlockTradesBridgeDepositRequest.jsx b/app/components/DepositWithdraw/blocktrades/BlockTradesBridgeDepositRequest.jsx +import counterpart from "counterpart"; import React from "react"; import Translate from "react-translate-component"; import ChainTypes from "components/Utility/ChainTypes"; import BindToChainState from "components/Utility/BindToChainState"; -import BaseModal from "../../Modal/BaseModal"; -import ZfApi from "react-foundation-apps/src/utils/foundation-api"; import AccountBalance from "../../Account/AccountBalance"; import WithdrawModalBlocktrades from "./WithdrawModalBlocktrades"; import BlockTradesDepositAddressCache from "common/BlockTradesDepositAddressCache"; @@ -16,6 +15,7 @@ import {checkFeeStatusAsync, checkBalance} from "common/trxHelper"; import {Asset} from "common/MarketClasses"; import {getConversionJson} from "common/gatewayMethods"; import PropTypes from "prop-types"; +import {Modal} from "bitshares-ui-style-guide"; class ButtonConversion extends React.Component { static propTypes = { @@ -322,12 +322,10 @@ class ButtonWithdraw extends React.Component { } onWithdraw() { - ZfApi.publish(this.getWithdrawModalId(), "open"); + this.props.showModal(); } render() { - let withdraw_modal_id = this.getWithdrawModalId(); - let button_class = "button disabled"; if ( Object.keys(this.props.account.get("balances").toJS()).includes( @@ -360,10 +358,19 @@ class ButtonWithdraw extends React.Component { <Translate content="gateway.withdraw_now" />{" "} </button> </span> - <BaseModal id={withdraw_modal_id} overlay={true}> - <br /> - <div className="grid-block vertical"> + <Modal + closable={false} + onCancel={this.props.hideModal} + title={counterpart.translate("gateway.withdraw_coin", { + coin: this.props.output_coin_name, + symbol: this.props.output_coin_symbol + })} + footer={null} + visible={this.props.visible} + overlay={true} + > <WithdrawModalBlocktrades + hideModal={this.props.hideModal} key={`${this.props.key}`} account={this.props.account.get("name")} issuer={this.props.issuer} @@ -371,11 +378,8 @@ class ButtonWithdraw extends React.Component { output_coin_name={this.props.output_coin_name} output_coin_symbol={this.props.output_coin_symbol} output_coin_type={this.props.output_coin_type} - output_supports_memos={ - this.props.output_supports_memos - } + output_supports_memos={this.props.output_supports_memos} amount_to_withdraw={this.props.amount_to_withdraw} - modal_id={withdraw_modal_id} url={this.props.url} output_wallet_type={this.props.output_wallet_type} balance={ @@ -384,8 +388,7 @@ class ButtonWithdraw extends React.Component { ] } /> - </div> - </BaseModal> + </Modal> </span> ); } @@ -404,6 +407,9 @@ class ButtonWithdrawContainer extends React.Component { render() { let withdraw_button = ( <ButtonWithdraw + visible={this.props.visible} + hideModal={this.props.hideModal} + showModal={this.props.showModal} key={this.props.key} account={this.props.account} issuer={this.props.issuer} @@ -465,6 +471,7 @@ class BlockTradesBridgeDepositRequest extends React.Component { }; this.state = { + isModalVisible: false, coin_symbol: "btc", key_for_withdrawal_dialog: "btc", supports_output_memos: "", @@ -525,6 +532,21 @@ class BlockTradesBridgeDepositRequest extends React.Component { // announcements data announcements: [] }; + + this.showModal = this.showModal.bind(this); + this.hideModal = this.hideModal.bind(this); + } + + showModal() { + this.setState({ + isModalVisible: true + }); + } + + hideModal() { + this.setState({ + isModalVisible: false + }); } urlConnection(checkUrl, state_coin_info) { @@ -1551,10 +1573,6 @@ class BlockTradesBridgeDepositRequest extends React.Component { return "withdraw_asset_" + this.props.gateway + "_bridge"; } - onWithdraw() { - ZfApi.publish(this.getWithdrawModalId(), "open"); - } - onInputCoinTypeChanged(deposit_withdraw_or_convert, event) { let estimated_input_output_amount = null; let estimated_input_output_amount_state = "_estimated_output_amount"; @@ -1727,7 +1745,6 @@ class BlockTradesBridgeDepositRequest extends React.Component { withdraw_header, conversion_body, conversion_header, - withdraw_modal_id, conversion_modal_id; if ( @@ -1998,7 +2015,6 @@ class BlockTradesBridgeDepositRequest extends React.Component { this.state.allowed_mappings_for_withdraw ).length > 0 ) { - withdraw_modal_id = this.getWithdrawModalId(); let withdraw_asset_symbol = this.state.coins_by_type[ this.state.withdraw_input_coin_type ].symbol; @@ -2109,6 +2125,9 @@ class BlockTradesBridgeDepositRequest extends React.Component { let withdraw_button = ( <ButtonWithdrawContainer + visible={this.state.isModalVisible} + hideModal={this.hideModal} + showModal={this.showModal} key={this.state.key_for_withdrawal_dialog} account={this.props.account.get("name")} issuer={this.props.issuer_account.get("name")}
14
diff --git a/src/components/inspectors/TimerExpression.vue b/src/components/inspectors/TimerExpression.vue </div> <label>Repeat every</label> <div> - <input type="number" min="1" class="form-control control repeat"> + <input type="number" min="1" class="form-control control repeat" v-model="repeat"> <select v-model="periodicity" class="form-control control periodicity"> <option value="day">day</option> <option value="week">week</option> @@ -80,6 +80,8 @@ export default { today: moment().format('YYYY-MM-DD'), hours, weekdays: [ + // ISO week date weekday number, from 1 through 7, + // beginning with Monday and ending with Sunday. { day: 7, initial: 'S', @@ -127,6 +129,10 @@ export default { }, computed: { expression() { + this.startDate;this.startTime; + this.repeat;this.periodicity; + this.selectedWeekdays;this.ends; + this.endDate;this.times; return this.makeTimerConfig(); }, selectedWeekdays() { @@ -145,16 +151,28 @@ export default { const expression = []; if (this.periodicity === 'week' && this.selectedWeekdays.length > 0) { expression.push(this.getDateTime(this.startDate, this.startTime)); + this.selectedWeekdays.forEach(day => { + expression.push(this.getCycle(this.getWeekDayDate(this.startDate, day))); + }); } else { - expression.push(this.makeCycle( - (this.ends === 'times' ? this.times : ''), - this.getDateTime(this.startDate, this.startTime), - this.getPeriod(), - (this.ends === 'ondate' ? this.getDateTime(this.endDate, this.startTime) : '') - )); + expression.push(this.getCycle(this.startDate)); } return expression.join('|'); }, + getCycle(startDate) { + return this.makeCycle( + (this.ends === 'after' ? this.times : ''), + this.getDateTime(startDate, this.startTime), + this.getPeriod(), + (this.ends === 'ondate' ? this.getDateTime(this.endDate, this.startTime) : '') + ); + }, + getWeekDayDate(date, isoWeekDay) { + const day = isoWeekDay % 7; + const mdate = moment(date); + const current = mdate.get('day'); + return mdate.add((7 + day - current) % 7,'day'); + }, getDateTime(date, time) { const [hour, minutes] = time.split(":"); return moment(date).set('hour', hour).set('minutes', minutes).format("YYYY-MM-DDTHH:mmZ"); @@ -182,7 +200,8 @@ export default { font-size: 1em; } .repeat { - width: 4em; + width: 6em!important; + text-align: right; } .periodicity { width: 6em;
6
diff --git a/token-metadata/0xdB25f211AB05b1c97D595516F45794528a807ad8/metadata.json b/token-metadata/0xdB25f211AB05b1c97D595516F45794528a807ad8/metadata.json "symbol": "EURS", "address": "0xdB25f211AB05b1c97D595516F45794528a807ad8", "decimals": 2, - "dharmaVerificationStatus": { "dharmaVerificationStatus": "VERIFIED" } \ No newline at end of file -} \ No newline at end of file
3
diff --git a/src/core/operations/VBE.js b/src/core/operations/VBE.js @@ -219,24 +219,25 @@ const VBE = { * @returns {string} */ decode: function (data) { - let result = ""; + let result = []; let index = -1; - data = data.replace("@&", String.fromCharCode(10)); - data = data.replace("@#", String.fromCharCode(13)); - data = data.replace("@*", ">"); - data = data.replace("@!", "<"); - data = data.replace("@$", "@"); + data = data.split("@&").join(String.fromCharCode(10)); + data = data.split("@#").join(String.fromCharCode(13)); + data = data.split("@*").join(">"); + data = data.split("@!").join("<"); + data = data.split("@$").join("@"); for (let i = 0; i < data.length; i++) { let byte = data.charCodeAt(i); + let char = data.charAt(i); if (byte < 128) { index++; } - if ((9 === byte || 31 < byte && 128 > byte) && 60 !== byte && 62 !== byte && 64 !== byte) { - let char = VBE.D_DECODE[byte].charAt([VBE.D_COMBINATION[index % 64]]); - result = result.concat(char); + if ((byte === 9 || byte > 31 && byte < 128) && byte !== 60 && byte !== 62 && byte !== 64) { + char = VBE.D_DECODE[byte].charAt([VBE.D_COMBINATION[index % 64]]); } + result.push(char); } - return result; + return result.join(""); }, /** @@ -245,13 +246,10 @@ const VBE = { * @returns {string} */ runDecodeVBE: function (data, args) { - let matcher = /#@~\^......==(.+)......==\^#~@/, - result = "", - encodedData; - while ((encodedData = matcher.exec(data))) { - result = result.concat(VBE.decode(encodedData[1])); - } - return result; + let matcher = /#@~\^......==(.+)......==\^#~@/; + let encodedData = matcher.exec(data); + console.log(encodedData[1]); + return VBE.decode(encodedData[1]); }, };
1
diff --git a/src/components/annotations/draw.js b/src/components/annotations/draw.js @@ -207,11 +207,11 @@ function drawRaw(gd, options, index, xa, ya) { function drawGraphicalElements() { // if the text has *only* a link, make the whole box into a link - var anchor = annText.selectAll('a'); - if(anchor.size() === 1 && anchor.text() === annText.text()) { + var anchor3 = annText.selectAll('a'); + if(anchor3.size() === 1 && anchor3.text() === annText.text()) { var wholeLink = annTextGroupInner.insert('a', ':first-child').attr({ - 'xlink:xlink:href': anchor.attr('xlink:href'), - 'xlink:xlink:show': anchor.attr('xlink:show') + 'xlink:xlink:href': anchor3.attr('xlink:href'), + 'xlink:xlink:show': anchor3.attr('xlink:show') }) .style({cursor: 'pointer'});
10
diff --git a/articles/multifactor-authentication/custom/custom-landing.md b/articles/multifactor-authentication/custom/custom-landing.md @@ -74,7 +74,6 @@ By using the redirect protocol, you interrupt the authentication transaction and Some MFA options you can implement using the redirect protocol include: * A one-time code sent via SMS -* A personally identifying question (such as about the user's parents, childhood friends, and so on) * Integration with specialized providers, such as those that require hardware tokens To use the redirect protocol, edit the `URL` field:
2
diff --git a/vr-ui.js b/vr-ui.js @@ -664,7 +664,7 @@ const makeUiMesh = getHtmlString => { mesh.frustumCulled = false; const highlightMesh = (() => { - const geometry = new THREE.BoxBufferGeometry(1, 1, 0.01); + const geometry = new THREE.BoxBufferGeometry(1, 1, 0.001); const material = new THREE.MeshBasicMaterial({ color: 0x42a5f5, transparent: true, @@ -679,6 +679,7 @@ const makeUiMesh = getHtmlString => { highlightMesh.position.y = uiWorldSize - (60 + 150/2)/uiSize*uiWorldSize; highlightMesh.scale.x = highlightMesh.scale.y = 150/uiSize*uiWorldSize; */ mesh.add(highlightMesh); + mesh.highlightMesh = highlightMesh; let anchors = []; mesh.update = () => { @@ -694,50 +695,7 @@ const makeUiMesh = getHtmlString => { // console.log(anchors); }); }; - let hoveredAnchor = null; - mesh.intersect = uv => { - hoveredAnchor = null; - highlightMesh.visible = false; - - if (uv) { - uv.y = 1 - uv.y; - uv.multiplyScalar(uiSize); - - for (let i = 0; i < anchors.length; i++) { - const anchor = anchors[i]; - const {top, bottom, left, right, width, height} = anchor; - if (uv.x >= left && uv.x < right && uv.y >= top && uv.y < bottom) { - hoveredAnchor = anchor; - - highlightMesh.position.x = -uiWorldSize/2 + (left + width/2)/uiSize*uiWorldSize; - highlightMesh.position.y = uiWorldSize - (top + height/2)/uiSize*uiWorldSize; - highlightMesh.scale.x = width/uiSize*uiWorldSize; - highlightMesh.scale.y = height/uiSize*uiWorldSize; - highlightMesh.visible = true; - break; - } - } - } - }; - mesh.click = () => { - console.log('got click', hoveredAnchor); - /* if (hoveredAnchor) { - const {id} = hoveredAnchor; - if (/^(?:tool-|color-)/.test(id)) { - interfaceDocument.getElementById(id).click(); - } else { - switch (id) { - default: { - console.warn('unknown anchor click', id); - break; - } - } - } - return true; - } else { - return false; - } */ - }; + mesh.getAnchors = () => anchors; mesh.update(); return mesh; @@ -801,18 +759,20 @@ const makeUiFullMesh = () => { wrap.update = () => { animation && animation.update(); }; + const cubeMesh = new THREE.Mesh(new THREE.BoxBufferGeometry(0.01, 0.01, 0.01), new THREE.MeshBasicMaterial({ color: 0x0000FF, })); cubeMesh.visible = false; scene.add(cubeMesh); + const intersects = []; wrap.intersect = raycaster => { const localIntersections = []; - for (const child of object.children) { - child.matrixWorld.decompose(localVector, localQuaternion, localVector2); + for (const mesh of object.children) { + mesh.matrixWorld.decompose(localVector, localQuaternion, localVector2); // localPlane.setFromNormalAndCoplanarPoint(localVector2.set(0, 0, 1).applyQuaternion(localQuaternion), localVector); - raycaster.intersectObject(child, false, intersects); + raycaster.intersectObject(mesh, false, intersects); if (intersects.length > 0) { const [{distance, point, uv}] = intersects; intersects.length = 0; @@ -821,15 +781,35 @@ const makeUiFullMesh = () => { distance, point, uv, + mesh, }); } } } if (localIntersections.length > 0) { localIntersections.sort((a, b) => a.distance - b.distance); - const [{point}] = localIntersections; + const [{point, uv, mesh}] = localIntersections; cubeMesh.position.copy(point); cubeMesh.visible = true; + + if (uv) { + uv.y = 1 - uv.y; + uv.multiplyScalar(uiSize); + + const anchors = mesh.getAnchors(); + for (let i = 0; i < anchors.length; i++) { + const anchor = anchors[i]; + const {top, bottom, left, right, width, height} = anchor; + if (uv.x >= left && uv.x < right && uv.y >= top && uv.y < bottom) { + mesh.highlightMesh.position.x = -uiWorldSize/2 + (left + width/2)/uiSize*uiWorldSize; + mesh.highlightMesh.position.y = uiWorldSize - (top + height/2)/uiSize*uiWorldSize; + mesh.highlightMesh.scale.x = width/uiSize*uiWorldSize; + mesh.highlightMesh.scale.y = height/uiSize*uiWorldSize; + mesh.highlightMesh.visible = true; + break; + } + } + } } else { cubeMesh.visible = false; }
0
diff --git a/token-metadata/0x12B19D3e2ccc14Da04FAe33e63652ce469b3F2FD/metadata.json b/token-metadata/0x12B19D3e2ccc14Da04FAe33e63652ce469b3F2FD/metadata.json "symbol": "GRID", "address": "0x12B19D3e2ccc14Da04FAe33e63652ce469b3F2FD", "decimals": 12, - "dharmaVerificationStatus": { "dharmaVerificationStatus": "VERIFIED" } \ No newline at end of file -} \ No newline at end of file
3
diff --git a/devices/camera.js b/devices/camera.js @@ -791,7 +791,7 @@ class Camera extends RingPolledDevice { this.debug(`New ${this.data.event_select.state} event detected, updating the recording URL`) } recordingUrl = await this.device.getRecordingUrl(this.data.event_select.eventId, { transcoded: false }) - } else if (this.data.event_select.eventId && Math.floor(Date.now()/1000) - this.data.event_select.recordingUrlExpire > 0) { + } else if (this.data.event_select.eventId && (Math.floor(Date.now()/1000) - this.data.event_select.recordingUrlExpire > 0)) { this.debug(`Previous ${this.data.event_select.state} URL has expired, updating the recording URL`) recordingUrl = await this.device.getRecordingUrl(this.data.event_select.eventId, { transcoded: false }) } @@ -803,10 +803,11 @@ class Camera extends RingPolledDevice { if (recordingUrl) { this.data.event_select.recordingUrl = recordingUrl const urlSearch = new URLSearchParams(recordingUrl) - const amzExpires = urlSearch.get('X-Amz-Expires') + const amzExpires = Number(urlSearch.get('X-Amz-Expires')) const amzDate = urlSearch.get('X-Amz-Date') - if (amzDate && amzExpires) { - this.data.event_select.recordingUrlExpire = Math.floor(Date(amzDate)/1000)+(amzExpires-60) + if (amzDate && amzExpires && amzExpires !== 'NaN') { + const [_, year, month, day, hour, min, sec] = amzDate.match(/(\d{4})(\d{2})(\d{2})T(\d{2})(\d{2})(\d{2})/) + this.data.event_select.recordingUrlExpire = Math.floor(Date.UTC(year, month-1, day, hour, min, sec)/1000)+amzExpires-75 } else { this.data.event_select.recordingUrlExpire = Math.floor(Date.now()/1000) + 600 }
7
diff --git a/src/utils/command.js b/src/utils/command.js @@ -19,8 +19,6 @@ const { NETLIFY_AUTH_TOKEN, NETLIFY_API_URL } = process.env // Todo setup client for multiple environments const CLIENT_ID = 'd6f37de6614df7ae58664cfca524744d73807a377f5ee71f1a254f78412e3750' -const MESSAGE_CONFIG_NOT_FOUND = 'No netlify configuration file was found' - class BaseCommand extends Command { constructor(...args) { super(...args) @@ -36,20 +34,10 @@ class BaseCommand extends Command { // Read new netlify.toml/yml/json const configPath = await getConfigPath(argv.config, cwd) - if (!configPath) { - throw new Error(MESSAGE_CONFIG_NOT_FOUND) - } - let config = {} - try { - config = await resolveConfig(configPath, { + const config = await resolveConfig(configPath, { cwd: cwd, context: argv.context }) - } catch (err) { - if (err.message.indexOf(MESSAGE_CONFIG_NOT_FOUND) === -1) { - throw err - } - } // Get site id & build state const state = new StateConfig(projectRoot)
2
diff --git a/assets/js/components/GoogleChartV2.js b/assets/js/components/GoogleChartV2.js @@ -25,7 +25,7 @@ import { Chart } from 'react-google-charts'; /** * WordPress dependencies */ -import { Fragment, useLayoutEffect, useRef } from '@wordpress/element'; +import { Fragment, useEffect, useLayoutEffect, useRef } from '@wordpress/element'; /** * Internal dependencies @@ -69,6 +69,14 @@ export default function GoogleChartV2( props ) { const chartWrapperRef = useRef(); const googleRef = useRef(); + useEffect( () => { + // Remove all event listeners after the component has unmounted. + return () => { + // eslint-disable-next-line no-unused-expressions + googleRef.current?.visualization.events.removeAllListeners( chartWrapperRef.current.getChart() ); + }; + } ); + // These event listeners are added manually to the current chart because // `react-google-charts` doesn't support `mouseOver` or `mouseOut` events // in its `chartEvents` prop.
2
diff --git a/curriculum/challenges/english/01-responsive-web-design/basic-css/cascading-css-variables.english.md b/curriculum/challenges/english/01-responsive-web-design/basic-css/cascading-css-variables.english.md @@ -7,7 +7,7 @@ videoUrl: 'https://scrimba.com/c/cyLZZhZ' ## Description <section id='description'> -When you create a variable, it becomes available for you to use inside the element in which you create it. It also becomes available within any elements nested within it. This effect is known as <dfn>cascading</dfn>. +When you create a variable, it is available for you to use inside the element in which you create it. It also is available for any elements nested within it. This effect is known as <dfn>cascading</dfn>. Because of cascading, CSS variables are often defined in the <dfn>:root</dfn> element. <code>:root</code> is a <dfn>pseudo-class</dfn> selector that matches the root element of the document, usually the <code><html></code> element. By creating your variables in <code>:root</code>, they will be available globally and can be accessed from any other selector later in the style sheet. </section>
7
diff --git a/lib/shared/addon/components/cluster-driver/driver-azureaks/component.js b/lib/shared/addon/components/cluster-driver/driver-azureaks/component.js @@ -78,12 +78,12 @@ export default Component.extend(ClusterDriver, { count: 3, enableHttpApplicationRouting: false, enableMonitoring: true, - loadBalancerSku: 'basic', location: 'eastus', type: 'azureKubernetesServiceConfig', }); set(this, 'cluster.azureKubernetesServiceConfig', config); + set(this, 'loadBalancerSku', 'basic'); } else { const tags = get(config, 'tags') || [] const map = {}
12
diff --git a/ReduceClutter.user.js b/ReduceClutter.user.js // @description Revert updates that makes the page more cluttered or less accessible // @homepage https://github.com/samliew/SO-mod-userscripts // @author @samliew -// @version 1.24.1 +// @version 1.24.2 // // @include https://*stackoverflow.com/* // @include https://*serverfault.com/* @@ -204,14 +204,11 @@ ul.comments-list .comment-up-on { } .s-prose blockquote { margin-left: 0px; + line-height: 1.4em; } .s-prose > * { margin-bottom: 1em !important; } -.s-prose ol li, -.s-prose ul li { - margin-bottom: 0.5em; -} /* @@ -224,7 +221,6 @@ ul.comments-list .comment-up-on { margin-right: 0; padding: 1em; padding-left: 1.2em; - line-height: 1.5; background-color: var(--yellow-050) !important; color: inherit; }
2
diff --git a/articles/api/authorization-extension/_introduction.md b/articles/api/authorization-extension/_introduction.md @@ -15,6 +15,35 @@ For each endpoint in this explorer, you will find sample snippets you can use, i - Curl command - JavaScript: depending on the endpoint each snippet may use Node.js or simple JavaScript +## Find your extension URL + +All endpoints in this explorer, start with `https://{extension_url}`. This is the URL of your Authorization Dashboard. It differs based on you tenant's region: + +<% + var urlUS = 'https://' + account.tenant + '.us.webtask.io/auth0-authentication-api-debugger'; + var urlEU = 'https://' + account.tenant + '.eu.webtask.io/auth0-authentication-api-debugger'; + var urlAU = 'https://' + account.tenant + '.au.webtask.io/auth0-authentication-api-debugger'; +%> + +| Region | Extension URL | +|--------|---------------| +| US West | `${urlUS}` | +| Europe | `${urlEU}` | +| Australia | `${urlAU}` | + ## Get an Access Token -## Find your extension URL \ No newline at end of file +When you [enabled API access for your tenant](/extensions/authorization-extension/v2#enable-api-access), an API was created at your [dashboard](${manage_url}), which you can use to access the Authorization Extension API. + +To do so you will have to configure a non interactive client which will have access to this API and which you will use to get an [access token](/tokens/access-token). + +Follow these steps to setup your client (you will have to do this only once): + +1. Go to [Dashboard > Clients](${manage_url}/#/clients) and create a new client of type `Non Interactive`. +2. Go to the [Dashboard > APIs](${manage_url}/#/apis) and select the `auth0-authorization-extension-api`. +3. Go to the `Non Interactive Clients` tab, find the client you created at the first step, and toggle the `Unauthorized` to `Authorized`. +4. Select the [scopes](/scopes#api-scopes) that should be granted to your client, based on the endpoints you want to access. For example, `read:users` to [get all users](#get-all-users). + +In order to get an `access_token` you need to `POST` to the `/oauth/token` endpoint. You can find detailed instructions [here](/api-auth/tutorials/client-credentials#ask-for-a-token). + +Use this `access_token` to access the Authorization Extension API. \ No newline at end of file
0
diff --git a/lib/openers/evince-opener.js b/lib/openers/evince-opener.js @@ -27,8 +27,8 @@ export default class EvinceOpener extends Opener { constructor (name = 'Evince', dbusNames = DBUS_NAMES) { super(() => { - for (const texPath of Array.from(this.windows.keys())) { - this.disposeWindow(texPath) + for (const filePath of Array.from(this.windows.keys())) { + this.disposeWindow(filePath) } }) this.name = name @@ -59,7 +59,7 @@ export default class EvinceOpener extends Opener { const windowNames = await this.getWindowList(evinceApplication) // Get the window interface of the of the first (only) window - const onClosed = () => this.disposeWindow(texPath) + const onClosed = () => this.disposeWindow(filePath) const windowInstance = { evinceWindow: await this.getInterface(documentName, windowNames[0], this.dbusNames.windowInterface), onClosed @@ -80,12 +80,12 @@ export default class EvinceOpener extends Opener { return windowInstance } - disposeWindow (texPath) { - const windowInstance = this.windows.get(texPath) + disposeWindow (filePath) { + const windowInstance = this.windows.get(filePath) if (windowInstance) { windowInstance.evinceWindow.removeListener('SyncSource', syncSource) windowInstance.evinceWindow.removeListener('Closed', windowInstance.onClosed) - this.windows.delete(texPath) + this.windows.delete(filePath) } }
14
diff --git a/assets/js/modules/tagmanager/hooks/useGAPropertyIDEffect.test.js b/assets/js/modules/tagmanager/hooks/useGAPropertyIDEffect.test.js * Internal dependencies */ import { renderHook, actHook as act } from '../../../../../tests/js/test-utils'; -import { createTestRegistry, provideModules } from '../../../../../tests/js/utils'; +import { createTestRegistry } from '../../../../../tests/js/utils'; import { STORE_NAME } from '../datastore/constants'; import { createBuildAndReceivers, @@ -35,12 +35,6 @@ describe( 'useGAPropertyIDEffect', () => { registry.dispatch( STORE_NAME ).receiveGetSettings( {} ); // Set set no existing tag. registry.dispatch( STORE_NAME ).receiveGetExistingTag( null ); - - // Provide an activated Analytics module. - provideModules( registry, [ { - slug: 'analytics', - active: true, - } ] ); } ); it( 'sets the gaPropertyID when property ID exists and Analytics is active', async () => {
2
diff --git a/package.json b/package.json "analyze": "ANALYZE=true next build", "sg:link": "./scripts/sg_link.sh", "sg:unlink": "./scripts/sg_unlink.sh", - "yaproxy": "PORT=5000 TARGET=https://api.republik.ch CORS_ORIGIN=http://localhost:3010 yaproxy" + "yaproxy": "PORT=5000 TARGET=https://api.republik.ch CORS_ORIGIN=http://localhost:3010,http://localhost:3005 yaproxy" }, "cacheDirectories": [ "node_modules",
11
diff --git a/packages/bitcore-client/README.md b/packages/bitcore-client/README.md # Purpose + This repo should allow you to create a wallet using the bitcore-v8 infrastructure. Currently we have the following features -* Wallet Creation -* Importing Addresses to the Wallet - * View Only - * Send Enabled by including the privKey -* Instant balance checking -* Transaction Creation -* Transaction Signing -* Transaction Broadcasting -* Multi-Sig address derive/importing + +- Wallet Creation +- Importing Addresses to the Wallet +- View Only +- Send Enabled by including the privKey +- Instant balance checking +- Transaction Creation +- Transaction Signing +- Transaction Broadcasting +- Multi-Sig address derive/importing # Commands ### Wallet Create + ``` -> No baseURL flag will automatically create a wallet that points to https://api.bitcore.io/api. +> No baseUrl flag will automatically create a wallet that points to https://api.bitcore.io/api. ./wallet-create --name TestWalletBTC --chain BTC --network mainnet > To create a wallet to point to local bitcore-node. -./wallet-create --chain BCH --network regtest --baseUrl http://localhost:3000/api --name myregtestwallet +./wallet-create --name myregtestwallet --chain BCH --network regtest --baseUrl http://localhost:3000/api ``` + ### Register an Existing Wallet + Register an existing wallet to point to custom Bitcore API url. + ``` -./wallet-register --name myregtestwallet --baseURL https://api.bitcore.io/api +./wallet-register --name myregtestwallet --baseUrl https://api.bitcore.io/api ``` Or a local Bitcore-node + ``` -./wallet-register --name myregtestwallet --baseURL http://localhost:3000 +./wallet-register --name myregtestwallet --baseUrl http://localhost:3000/api ``` ### Wallet Address Import + You can import a jsonl file. privKey and pubKey are optional. If you provide privKey, pubKey must be provided as well. + ``` //~/Desktop/export.jsonl {"address": "mXy1234", privKey: "xxxxxxx", pubKey: "yyyyyyyy"} {"address": "mXy1234", privKey: "xxxxxxx", pubKey: "yyyyyyyy"} {"address": "mXy1234", privKey: "xxxxxxx", pubKey: "yyyyyyyy"} ``` + ``` ./wallet-import --name TestWalletBTC --file ~/Desktop/export.jsonl ``` You can also import an address in json format in the command line. + ``` ./wallet-import --name myregtestwallet --parse '[{"address":"mXy1234"}]' ``` ### Balance Checking + ``` ./wallet-balance --name TestWalletBTC ``` ### Balance Checking at Specific Date or Time + ``` ./wallet-balance --name TestWalletBTC --time 01-15-2019 ``` Valid types of time (no slash marks allowed): + ``` 1-14-2019 "Wed Jan 16 2019 13:34:20 GMT-0500 (Eastern Standard Time)" @@ -71,21 +85,25 @@ Valid types of time (no slash marks allowed): ``` ### Wallet UTXOS + ``` ./bin/wallet-utxos --name TestWalletBTC ``` ### Transaction Creation + ``` ./bin/wallet-tx --addresses '[{"address": "moVf5Rf1r4Dn3URQHumEzvq3vtrFbaRvNr", "satoshis": 2500000000}]' --fee 100 --utxos '[{"txid":"28321f501ce47db1fd40d9ad461624bf9fe6cb581ac0177d17304ff128b86d61","vout":0,"address":"mhwfzHhBdpUKLTzGkUEUpJWa3ipTYZHjF8","script":"21033a3c1aa3fb35e07fe7ff44423c8d378c2d4610ffac8b08c4e6747d7573566937ac","value":5000000000}]' --change "mz21R16FYXfA6G4EJdCrTsduvX9BHHecvv" --name TestWalletBTC --amount 2500000000 ``` ### Transaction Signing + ``` ./bin/wallet-sign --name TestWalletBTC --tx 0100000001616db828f14f30177d17c01a58cbe69fbf241646add940fdb17de41c501f32280000000000ffffffff0200f90295000000001976a914578237b9848cc709ced0e098417e0494415add1488ac9cf80295000000001976a914caf0ee682de3daa9b3640da1f6d47cc04ce2c99e88ac00000000 ``` ### Transaction Broadcast + ``` ./bin/wallet-broadcast --name TestWalletBTC --tx 0100000001616db828f14f30177d17c01a58cbe69fbf241646add940fdb17de41c501f32280000000048473044022052cf595274c422c37d140989c8cc31c95b39d326b5eac8d4feb8bcceebdebc3f02205635c798c24ae1d44d0871e6938dbfd76293e695131d890838654816f28b942401ffffffff0200f90295000000001976a914578237b9848cc709ced0e098417e0494415add1488ac9cf80295000000001976a914caf0ee682de3daa9b3640da1f6d47cc04ce2c99e88ac00000000 ```
14
diff --git a/docker-run.sh b/docker-run.sh @@ -36,7 +36,7 @@ if [ "$OAUTH_ADDITIONAL_PARAMS" != "**None**" ]; then fi if [[ -f $SWAGGER_JSON ]]; then - cp $SWAGGER_JSON $NGINX_ROOT + cp -s $SWAGGER_JSON $NGINX_ROOT REL_PATH="./$(basename $SWAGGER_JSON)" sed -i "s|http://petstore.swagger.io/v2/swagger.json|$REL_PATH|g" $INDEX_FILE sed -i "s|http://example.com/api|$REL_PATH|g" $INDEX_FILE
7
diff --git a/snowpack/src/commands/dev.ts b/snowpack/src/commands/dev.ts @@ -612,6 +612,7 @@ export async function startServer( let attemptedFileLoc = fileToUrlMapping.key(reqPath); if (!attemptedFileLoc) { resourcePath = reqPath.replace(/\.map$/, '').replace(/\.proxy\.js$/, ''); + resourceType = path.extname(resourcePath); } attemptedFileLoc = fileToUrlMapping.key(resourcePath); if (!attemptedFileLoc) {
4
diff --git a/src/core/pure-js/deck-js.js b/src/core/pure-js/deck-js.js @@ -212,6 +212,7 @@ export default class DeckGLJS { // TODO - these should be set by default starting from next major release if (this.props.initWebGLParameters) { setParameters(gl, { + blendFuncSeparate: [GL.SRC_ALPHA, GL.ONE_MINUS_SRC_ALPHA, GL.ONE, GL.ONE_MINUS_SRC_ALPHA], depthTest: true, depthFunc: GL.LEQUAL });
0
diff --git a/lib/helper/WebDriverIO.js b/lib/helper/WebDriverIO.js @@ -327,12 +327,16 @@ class WebDriverIO extends Helper { if (this.options.keepBrowserState) return; if (this.options.keepCookies) { return Promise.all( - [this.browser.execute('localStorage.clear();'), this.closeOtherTabs()]); + [this.browser.execute('localStorage.clear();').catch((err) => { + if (!(err.message.indexOf("Storage is disabled inside 'data:' URLs.") > -1)) throw err; + }), this.closeOtherTabs()]); } if (this.options.desiredCapabilities.browserName) { this.debugSection('Session', 'cleaning cookies and localStorage'); return Promise.all( - [this.browser.deleteCookie(), this.browser.execute('localStorage.clear();'), this.closeOtherTabs()]); + [this.browser.deleteCookie(), this.browser.execute('localStorage.clear();').catch((err) => { + if (!(err.message.indexOf("Storage is disabled inside 'data:' URLs.") > -1)) throw err; + }), this.closeOtherTabs()]); } }
8
diff --git a/src/worker/Manager.mjs b/src/worker/Manager.mjs @@ -128,13 +128,15 @@ class Manager extends Base { * @param {Object} opts * @returns {Worker} */ - createWorker(opts) { + createWorker(opts) {console.log(opts); const me = this, - filePath = (opts.basePath || me.basePath) + opts.fileName, + fileName = opts.fileName, + filePath = (opts.basePath || me.basePath) + fileName, + name = `neomjs-${fileName.substring(0, fileName.indexOf('.')).toLowerCase()}-worker`, s = me.sharedWorkersEnabled && Neo.config.useSharedWorkers, worker = Neo.config.environment !== 'development' // todo: switch to the new syntax to create a worker from a JS module once browsers are ready - ? new (s ? SharedWorker : Worker)(filePath) - : new (s ? SharedWorker : Worker)(filePath, {type: 'module'}); + ? new (s ? SharedWorker : Worker)(filePath, {name: name}) + : new (s ? SharedWorker : Worker)(filePath, {name: name, type: 'module'}); (s ? worker.port : worker).onmessage = me.onWorkerMessage.bind(me); (s ? worker.port : worker).onerror = me.onWorkerError.bind(me);
12
diff --git a/src/encoded/tests/test_types_biosample.py b/src/encoded/tests/test_types_biosample.py @@ -82,10 +82,10 @@ def test_undefined_age_units_mouse_with_model_organism_age_field(testapp, biosam def test_defined_life_stage_human(testapp, biosample, human, human_donor): testapp.patch_json(biosample['@id'], {'organism': human['@id']}) - testapp.patch_json(human_donor['@id'], {'life_stage': 'fetal'}) + testapp.patch_json(human_donor['@id'], {'life_stage': 'embryonic'}) testapp.patch_json(biosample['@id'], {'donor': human_donor['@id']}) res = testapp.get(biosample['@id'] + '@@index-data') - assert res.json['object']['life_stage'] == 'fetal' + assert res.json['object']['life_stage'] == 'embryonic' def test_undefined_life_stage_human(testapp, biosample, human, human_donor):
1
diff --git a/src/components/CheckoutActions/CheckoutActions.js b/src/components/CheckoutActions/CheckoutActions.js @@ -72,8 +72,8 @@ export default class CheckoutActions extends Component { cartStore.setStripeToken(stripeToken); } - placeOrder = async () => { - const { authStore, cart, cartStore, placeOrderWithStripeCard } = this.props; + buildOrder = () => { + const { cart, cartStore } = this.props; const cartId = cartStore.hasAccountCart ? cartStore.accountCartId : cartStore.anonymousCartId; const { checkout, email, shop } = cart; const fulfillmentGroups = checkout.fulfillmentGroups.map((group) => { @@ -105,8 +105,14 @@ export default class CheckoutActions extends Component { shopId: shop._id }; - this.setState({ placingOrder: true }); + this.setState({ placingOrder: true }, () => { + this.placeOrder(order) + }); + + } + placeOrder = async (order) => { + const { authStore, cartStore, placeOrderWithStripeCard } = this.props; const { data, error } = await placeOrderWithStripeCard(order); // If success @@ -204,7 +210,7 @@ export default class CheckoutActions extends Component { label: "Review and place order", status: "incomplete", component: FinalReviewCheckoutAction, - onSubmit: this.placeOrder, + onSubmit: this.buildOrder, props: { checkoutSummary }
1
diff --git a/publish/deployed/kovan/owner-actions.json b/publish/deployed/kovan/owner-actions.json -{ - "Synthetix.addSynth(SynthsCEX)": { - "target": "0x64903DDaEC496b4dd4d7F0E4C07Cad5658bDA915", - "action": "addSynth(0xf39f983F7a0b92b93041D8413F4d16384c51B19d)", - "complete": false, - "link": "https://kovan.etherscan.io/address/0x64903DDaEC496b4dd4d7F0E4C07Cad5658bDA915#writeContract" - }, - "ExchangeRates.setInversePricing(iBTC, 10600, 15900, 5300)": { - "target": "0x309f082d89Bd68c31dD879622E4B13aF4CAF584c", - "action": "setInversePricing(iBTC, 10600000000000000000000, 15900000000000000000000, 5300000000000000000000)", - "complete": false, - "link": "https://kovan.etherscan.io/address/0x309f082d89Bd68c31dD879622E4B13aF4CAF584c#writeContract" - }, - "ExchangeRates.setInversePricing(iETH, 220, 330, 110)": { - "target": "0x309f082d89Bd68c31dD879622E4B13aF4CAF584c", - "action": "setInversePricing(iETH, 220000000000000000000, 330000000000000000000, 110000000000000000000)", - "complete": false, - "link": "https://kovan.etherscan.io/address/0x309f082d89Bd68c31dD879622E4B13aF4CAF584c#writeContract" - }, - "ExchangeRates.setInversePricing(iBNB, 29, 44, 14.5)": { - "target": "0x309f082d89Bd68c31dD879622E4B13aF4CAF584c", - "action": "setInversePricing(iBNB, 29000000000000000000, 44000000000000000000, 14500000000000000000)", - "complete": false, - "link": "https://kovan.etherscan.io/address/0x309f082d89Bd68c31dD879622E4B13aF4CAF584c#writeContract" - }, - "ExchangeRates.setInversePricing(iMKR, 550, 825, 275)": { - "target": "0x309f082d89Bd68c31dD879622E4B13aF4CAF584c", - "action": "setInversePricing(iMKR, 550000000000000000000, 825000000000000000000, 275000000000000000000)", - "complete": false, - "link": "https://kovan.etherscan.io/address/0x309f082d89Bd68c31dD879622E4B13aF4CAF584c#writeContract" - }, - "ExchangeRates.setInversePricing(iTRX, 0.025, 0.0375, 0.0125)": { - "target": "0x309f082d89Bd68c31dD879622E4B13aF4CAF584c", - "action": "setInversePricing(iTRX, 25000000000000000, 37500000000000000, 12500000000000000)", - "complete": false, - "link": "https://kovan.etherscan.io/address/0x309f082d89Bd68c31dD879622E4B13aF4CAF584c#writeContract" - }, - "ExchangeRates.setInversePricing(iXTZ, 0.98, 1.47, 0.49)": { - "target": "0x309f082d89Bd68c31dD879622E4B13aF4CAF584c", - "action": "setInversePricing(iXTZ, 980000000000000000, 1470000000000000000, 490000000000000000)", - "complete": false, - "link": "https://kovan.etherscan.io/address/0x309f082d89Bd68c31dD879622E4B13aF4CAF584c#writeContract" - } -} +{}
2
diff --git a/server/game/gamesteps/selectcardprompt.js b/server/game/gamesteps/selectcardprompt.js @@ -49,6 +49,9 @@ class SelectCardPrompt extends UiPrompt { super(game); this.choosingPlayer = choosingPlayer; + if(_.isString(properties.source)) { + properties.source = { name: properties.source }; + } if(properties.source && !properties.waitingPromptTitle) { properties.waitingPromptTitle = 'Waiting for opponent to use ' + properties.source.name; }
11
diff --git a/lib/assets/javascripts/unpoly/fragment.coffee.erb b/lib/assets/javascripts/unpoly/fragment.coffee.erb @@ -676,10 +676,8 @@ up.fragment = do -> up.legacy.warn("up.visit(url) has been deprecated. Use up.change({ url }) instead.") up.change(u.merge(options, { url })) - BODY_TARGET_PATTERN = /(^|\s|,)(body|html)(,|\s|$)/i - targetsBody = (selector) -> - BODY_TARGET_PATTERN.test(selector) + /(^|,)\s*(body|html)\s*(\,|$)/i.test(selector) up.on 'up:app:boot', -> body = document.body
7
diff --git a/app/src/renderer/components/staking/TableValidators.vue b/app/src/renderer/components/staking/TableValidators.vue @@ -198,10 +198,10 @@ table tr td:first-child::before content counter(rowNumber) position absolute font-size sm - width 100% + width 2rem text-align right color var(--dim) - right 105% + left -3rem table th min-width 130px
7
diff --git a/assets/sass/vendor/_mdc-tab.scss b/assets/sass/vendor/_mdc-tab.scss // Overrides for .mdc-tab .googlesitekit-plugin .mdc-tab { - @include mdc-tab-text-label-color($c-primary); @include mdc-tab-active-text-label-color($c-brand); - @include mdc-tab-ink-color($c-brand); @include mdc-tab-states-color($c-brand); &:hover { color: $c-brand; outline: none; } - - .mdc-tab__text-label { - color: $c-primary; - } }
2
diff --git a/layouts/partials/helpers/container.html b/layouts/partials/helpers/container.html {{ (printf "<!-- %s -->" (humanize .Params.fragment)) | safeHTML }} {{- end }} {{- if .start }} -<section id="{{ .Name }}" class="{{- printf "fragment %s" .section_class -}}"> +<section id="{{ .Name }}" class="{{- printf "fragment %s" (.section_class | default "") -}}"> {{- if ne .in_slot true }} - <div class="{{- printf "container-fluid bg-%s %s" .bg .container_class -}}"> + <div class="{{- printf "container-fluid bg-%s %s" .bg (.container_class | default "") -}}"> {{- end }} - <div class="container {{ print (.Params.padding | default (cond (eq .in_slot true) "p-0" "py-5")) -}} {{- printf " %s" .container_class -}}"> + <div class="container {{ print (.Params.padding | default (cond (eq .in_slot true) "p-0" "py-5")) -}} {{- printf " %s" (.container_class | default "") -}}"> {{- end -}} {{- if .end }} </div>{{/* .container */}}
0
diff --git a/lib/plugins/aws/package/compile/events/apiGateway/lib/restApi.js b/lib/plugins/aws/package/compile/events/apiGateway/lib/restApi.js @@ -5,7 +5,7 @@ const BbPromise = require('bluebird'); module.exports = { compileRestApi() { - const apiGateway = this.serverless.service.provider.apiGateway; + const apiGateway = this.serverless.service.provider.apiGateway || {}; // immediately return if we're using an external REST API id if (apiGateway && apiGateway.restApiId) {
12
diff --git a/src/vgl-renderer.js b/src/vgl-renderer.js @@ -2,7 +2,7 @@ import VglAssets from "./vgl-assets.js"; import {WebGLRenderer} from "./three.js"; function resizeCamera(camera, domElement) { - if (camera) { + if (camera.isPerspectiveCamera) { camera.aspect = domElement.clientWidth / domElement.clientHeight; camera.updateProjectionMatrix(); } @@ -68,8 +68,10 @@ export default { methods: { resize() { resizeRenderer(this.inst, this.$el); + if (this.cmr) { resizeCamera(this.cmr, this.$el); - this.render(); + if (this.scn) this.render(); + } }, render() { if (this.req) { @@ -92,21 +94,15 @@ export default { this.resize(); }); }, - scn() { - this.render(); + scn(scn) { + if (scn) this.render(); }, cmr(cmr) { + if (cmr) { resizeCamera(cmr, this.$el); this.render(); } - }, - mounted() { - if (this.$refs.frm.contentWindow) { - this.$refs.frm.contentWindow.addEventListener("resize", () => { - this.resize(); - }); } - this.resize(); }, render(h) { return h("div", [ @@ -120,6 +116,12 @@ export default { visibility: "hidden", width: "100%", height: "100%" + }, + on: { + load: (evt) => { + evt.target.contentWindow.addEventListener("resize", this.resize); + this.$nextTick(this.resize); + } } }) ]);
1
diff --git a/node-red-contrib-botbuilder/README.md b/node-red-contrib-botbuilder/README.md @@ -35,7 +35,124 @@ The absolute path to this file must be defined in ENV var `BOTBUILDER_CFG`. Here is a sample configuration to start you server. Switch will route to the convenient SendCard according to business logic. ![Kickstart Nodes](https://github.com/NGRP/node-red-contrib-viseo/blob/master/node-red-contrib-botbuilder/doc/node_start.jpg?raw=true) - +``` +[ + { + "id": "c7121754.6ec158", + "type": "send-card", + "z": "bd95e24.b107d2", + "name": "", + "prompt": false, + "delay": 0, + "sendType": "text", + "text": "Hey buddy", + "random": false, + "media": "", + "title": "", + "subtitle": "", + "subtext": "", + "attach": "", + "carousel": false, + "buttons": [], + "quicktext": "", + "quickreplies": [], + "bt1action": "postBack", + "bt2action": "postBack", + "bt3action": "postBack", + "quickbt1action": "postBack", + "quickbt2action": "postBack", + "quickbt3action": "postBack", + "quickbt4action": "postBack", + "quickbt5action": "postBack", + "quickbt6action": "postBack", + "quickbt7action": "postBack", + "quickbt8action": "postBack", + "quickbt9action": "postBack", + "quickbt10action": "postBack", + "quickbt11action": "postBack", + "x": 470, + "y": 240, + "wires": [ + [] + ] + }, + { + "id": "2e5843e7.e7af2c", + "type": "bot", + "z": "bd95e24.b107d2", + "name": "", + "port": "", + "appId": "", + "appPassword": "", + "fmsg": "markdown", + "x": 120, + "y": 100, + "wires": [ + [], + [ + "bc3c4420.419ee8" + ] + ] + }, + { + "id": "3a3d6ec9.d221a2", + "type": "profile", + "z": "bd95e24.b107d2", + "name": "", + "x": 303, + "y": 163, + "wires": [ + [ + "533957d5.fc5c68" + ] + ] + }, + { + "id": "a6d205d0.d17178", + "type": "nedb", + "z": "bd95e24.b107d2", + "name": "Save User", + "key": "user.id", + "value": "user", + "operation": "set", + "x": 283, + "y": 243, + "wires": [ + [ + "c7121754.6ec158" + ] + ] + }, + { + "id": "533957d5.fc5c68", + "type": "fb-profile", + "z": "bd95e24.b107d2", + "x": 293, + "y": 203, + "wires": [ + [ + "a6d205d0.d17178" + ] + ] + }, + { + "id": "bc3c4420.419ee8", + "type": "nedb", + "z": "bd95e24.b107d2", + "name": "Fetch User", + "key": "user.id", + "value": "user", + "operation": "get", + "x": 283, + "y": 123, + "wires": [ + [ + "3a3d6ec9.d221a2" + ] + ] + } +] +``` ### Tips & Tricks - The BotBuilder require an access to [Microsoft Bot Framework](https://dev.botframework.com/)
7
diff --git a/ChatImprovements.user.js b/ChatImprovements.user.js // @description Show users in room as a list with usernames, more timestamps // @homepage https://github.com/samliew/SO-mod-userscripts // @author @samliew -// @version 0.7.4 +// @version 0.7.5 // // @include https://chat.stackoverflow.com/* // @include https://chat.stackexchange.com/* const fkey = document.getElementById('fkey') ? document.getElementById('fkey').value : ''; const newuserlist = $(`<div id="present-users-list"></div>`); const tzOffset = new Date().getTimezoneOffset(); + const now = new Date(); const dayAgo = Date.now() - 86400000; const weekAgo = Date.now() - 7 * 86400000; let messageEvents = []; function processMessageTimestamps(events) { if(typeof events === 'undefined') return; + // Remove existing "yst" timestamps in favour of ours for consistency + $('.timestamp').filter((i, el) => el.innerText.includes('yst')).remove(); + /* event: { content if(d < weekAgo) { prefix = new Intl.DateTimeFormat('en-US', { month: 'short', day: 'numeric' }).format(d) + ', '; } - else if(d < dayAgo) { + else if(d.getDate() != now.getDate()) { prefix = new Intl.DateTimeFormat('en-US', { weekday: 'short' }).format(d) + ' '; } msgs.prepend(`<div class="timestamp">${prefix}${time}</div>`); @@ -497,7 +501,7 @@ ul#my-rooms > li > a span { opacity: 1 !important; } #present-users-list li.inactive { - opacity: 0.4 !important; + opacity: 0.5 !important; } #present-users-list li .avatar { position: relative;
14
diff --git a/src/iconlib.js b/src/iconlib.js @@ -8,7 +8,7 @@ export class AbstractIconLib { } getIconClass (key) { - return this.mapping[key] ? this.icon_prefix + this.mapping[key] : null + return this.mapping[key] ? this.icon_prefix + this.mapping[key] : this.icon_prefix + key } getIcon (key) {
11
diff --git a/packages/webpack-plugin/lib/content-loader.js b/packages/webpack-plugin/lib/content-loader.js module.exports = function () { + if (!this.__mpx__) { + throw new Error('Content loader need __mpx__ property in loader context!') + } + this.__mpx__.fileDependencies.forEach(file => { + this.addDependency(file) + }) + this.__mpx__.contextDependencies.forEach(context => { + this.addContextDependency(context) + }) return this.__mpx__.content }
1
diff --git a/CHANGELOG.md b/CHANGELOG.md @@ -6,6 +6,16 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ## Unreleased +### Added + +### Changed + +### Removed + +- proj4 string from proj extension + +### Fixed + ## [v0.9.0] - 2020-02-26 ### Added
3
diff --git a/components/Frame/index.js b/components/Frame/index.js @@ -7,6 +7,7 @@ import { RawHtml, fontFamilies, mediaQueries, + ColorHtmlBodyColors, ColorContextProvider, useColorContext } from '@project-r/styleguide' @@ -80,18 +81,6 @@ export const Content = ({ children, style }) => ( </div> ) -const OverrideRootDefaultColors = () => { - const [colorScheme] = useColorContext() - - return ( - <style - dangerouslySetInnerHTML={{ - __html: `html, body { background-color: ${colorScheme.default} !important; color: ${colorScheme.text} !important; }` - }} - /> - ) -} - const Frame = ({ t, me, @@ -140,6 +129,7 @@ const Frame = ({ }, [hasSecondaryNav]) return ( <ColorContextProvider root colorSchemeKey={rootColorSchemeKey}> + <ColorHtmlBodyColors colorSchemeKey={contentColorSchemeKey} /> {rootColorSchemeKey === 'auto' && <ColorSchemeSync />} <div {...(footer || inNativeApp ? styles.bodyGrowerContainer : undefined)} @@ -162,9 +152,6 @@ const Frame = ({ stickySecondaryNav={stickySecondaryNav} > <ColorContextProvider colorSchemeKey={contentColorSchemeKey}> - {contentColorSchemeKey !== rootColorSchemeKey && ( - <OverrideRootDefaultColors /> - )} <noscript> <Box style={{ padding: 30 }}> <RawHtml
4
diff --git a/packages/mjml-validator/src/rules/validTag.js b/packages/mjml-validator/src/rules/validTag.js +import { includes } from 'lodash' import ruleError from './ruleError' +// Tags that have no associated components but are allowed even so +const componentLessTags = [ + 'mj-all' +] + export default function validateTag(element, { components }) { const { tagName } = element + if (includes(componentLessTags, tagName)) return null + const Component = components[tagName] if (!Component) {
11
diff --git a/imports/config/EMailTemplates.js b/imports/config/EMailTemplates.js import { Accounts } from 'meteor/accounts-base'; import { GlobalSettings } from './GlobalSettings'; +function setupEmailTemplatesForAccounts() { Accounts.emailTemplates.siteName = GlobalSettings.getSiteName(); Accounts.emailTemplates.from = Accounts.emailTemplates.siteName + '<' + GlobalSettings.getDefaultEmailSenderAddress() + '>'; @@ -35,3 +36,9 @@ Accounts.emailTemplates.resetPassword = { return emailBody; } }; + +} + +if (GlobalSettings.isEMailDeliveryEnabled()) { + setupEmailTemplatesForAccounts(); +} \ No newline at end of file
12
diff --git a/token-metadata/0xd42debE4eDc92Bd5a3FBb4243e1ecCf6d63A4A5d/metadata.json b/token-metadata/0xd42debE4eDc92Bd5a3FBb4243e1ecCf6d63A4A5d/metadata.json "symbol": "C8", "address": "0xd42debE4eDc92Bd5a3FBb4243e1ecCf6d63A4A5d", "decimals": 18, - "dharmaVerificationStatus": { "dharmaVerificationStatus": "VERIFIED" } \ No newline at end of file -} \ No newline at end of file
3
diff --git a/desktop/sources/scripts/programs/x.js b/desktop/sources/scripts/programs/x.js @@ -7,12 +7,14 @@ function program_X(x,y) this.operation = function() { + this.ports = [{x:-1,y:0},{x:0,y:1,output:true},{x:1,y:0,output:true}]; + if(this.left("0")){ - pico.program.remove(this.x-1,this.y); + // pico.program.remove(this.x-1,this.y); this.fire(1,0) } if(this.left("1")){ - pico.program.remove(this.x-1,this.y); + // pico.program.remove(this.x-1,this.y); this.fire(0,1) } }
7
diff --git a/player/js/animation/AnimationItem.js b/player/js/animation/AnimationItem.js @@ -33,9 +33,6 @@ var AnimationItem = function () { extendPrototype([BaseEvent], AnimationItem); AnimationItem.prototype.setParams = function(params) { - if(params.context){ - this.context = params.context; - } if(params.wrapper || params.container){ this.wrapper = params.wrapper || params.container; }
2
diff --git a/karma.conf.js b/karma.conf.js @@ -22,7 +22,7 @@ module.exports = function (config) { dir: 'test/coverage/', includeAllSources: true }, - browserNoActivityTimeout: 30000, + browserNoActivityTimeout: 60000, karmaTypescriptConfig: { tsconfig: './tsconfig.json', bundlerOptions: {
3
diff --git a/src/viewer.js b/src/viewer.js @@ -275,8 +275,13 @@ class gltfViewer getFittingZoom(axisLength) { - // TODO: this is very naive and will probably fail in many cases - return axisLength * 2; + const yfov = this.defaultCamera.yfov; + const xfov = this.defaultCamera.yfov * this.defaultCamera.aspectRatio; + + const yZoom = axisLength / 2 / Math.tan(yfov / 2); + const xZoom = axisLength / 2 / Math.tan(xfov / 2); + + return Math.max(xZoom, yZoom); } getExtendsFromAccessor(accessor, worldTransform, outMin, outMax)
7
diff --git a/books/templates/index.html b/books/templates/index.html <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Open+Sans"> + <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet"> <link rel="shortcut icon" href="/favicon.ico"> <title>Kamu</title> </head>
0
diff --git a/src/components/TileCatalogNew/TilePagination/TilePagination.jsx b/src/components/TileCatalogNew/TilePagination/TilePagination.jsx @@ -93,6 +93,7 @@ const TilePagination = ({ page, numPages, onChange, i18n }) => { className="bx--pagination-nav__page bx--pagination-nav__page--select" data-page-select aria-label="select page number" + onChange={evt => onChange(evt.target.value)} > <option value="" hidden data-page="" /> {Array.from({ length: pageNumber }, (v, i) => (
1
diff --git a/projects/ngx-extended-pdf-viewer/src/lib/options/service-worker-options.ts b/projects/ngx-extended-pdf-viewer/src/lib/options/service-worker-options.ts -export const ServiceWorkerOptions = { - showUnverifiedSignatures: false -}; - -if (typeof window !== 'undefined') { - (window as any).ServiceWorkerOptions = ServiceWorkerOptions; +export interface ServiceWorkerOptionsType { + showUnverifiedSignatures: boolean; } + +export declare const ServiceWorkerOptions: ServiceWorkerOptionsType;
5
diff --git a/ui/js/main.js b/ui/js/main.js @@ -18,7 +18,7 @@ const env = ENV; const { remote, ipcRenderer, shell } = require("electron"); const contextMenu = remote.require("./menu/context-menu"); const app = require("./app"); -app.i18n.resLang = require("./langs").default; +app.i18n.resLang = require("./utils").resLang; lbry.showMenuIfNeeded();
5
diff --git a/renderer/components/__tests__/Sidebar.test.js b/renderer/components/__tests__/Sidebar.test.js @@ -33,46 +33,28 @@ const renderComponent = (component, locale = 'en', messages = English) => { } describe('Tests for Sidebar component', () => { - afterEach(() => { - cleanup() - }) - test('Displays the correct version', async () => { + beforeEach(() => { renderComponent( <Sidebar> <></> </Sidebar> ) - const versionNumber = screen.getByTestId('sidebar-version-number') - expect(versionNumber.innerHTML).toMatch(version) - }) - - test('Displays child elements', async () => { - renderComponent( - <Sidebar> - <p data-testid="test-paragraph">Test paragraph</p> - </Sidebar> - ) - expect(screen.getByTestId('test-paragraph').innerHTML).toBe( - 'Test paragraph' - ) }) + afterEach(() => { + cleanup() + jest.clearAllMocks() }) - -describe('Sidebar NavItems push the router to correct path', () => { - beforeEach(() => { + test('Displays the correct version', async () => { renderComponent( <Sidebar> <></> </Sidebar> ) - }) - - afterEach(() => { - cleanup() - jest.clearAllMocks() + const versionNumber = screen.getByTestId('sidebar-version-number') + expect(versionNumber.innerHTML).toMatch(version) }) test('Clicking on Dashboard NavItem calls pushes router to /dashboard', async () => {
2
diff --git a/src/components/general/character/Character.jsx b/src/components/general/character/Character.jsx @@ -86,7 +86,10 @@ const Stat = ({ <div className={styles.stat}> <img className={styles.icon} src={statSpec.imgSrc} /> <div className={styles.wrap}> + <div className={styles.row}> <div className={styles.statName}>{statSpec.name}</div> + <div className={styles.statValue}>{statSpec.value}</div> + </div> {statSpec.progress ? ( <progress className={styles.progress} value={statSpec.progress} /> ) : null}
0
diff --git a/src/patterns/components/toggle/angular/info/base.hbs b/src/patterns/components/toggle/angular/info/base.hbs </td> </tr> + <tr> + <td class="sprk-u-FontWeight--bold"> + iconCssClass + </td> + <td>string</td> + <td> + The value supplied will be + assigned as a CSS class on the icon used + in the toggle. + </td> + </tr> + <tr> <td class="sprk-u-FontWeight--bold"> additionalClasses
3
diff --git a/app/classifier/tasks/index.spec.js b/app/classifier/tasks/index.spec.js @@ -14,10 +14,7 @@ for (const key in tasks) { it('should update on annotation change', function() { wrapper = shallow(<TaskComponent />); - let annotation = { - task: 'T0', - value: TaskComponent.getDefaultAnnotation() - } + let annotation = TaskComponent.getDefaultAnnotation() wrapper.setProps({annotation}); }); });
1
diff --git a/app/services/stream_copy.js b/app/services/stream_copy.js @@ -8,7 +8,10 @@ const ACTION_FROM = 'from'; module.exports = class StreamCopy { constructor(sql, userDbParams) { - this.pg = new PSQL(userDbParams); + const dbParams = Object.assign({}, userDbParams, { + port: global.settings.db_batch_port || userDbParams.port + }); + this.pg = new PSQL(dbParams); this.sql = sql; this.stream = null; }
4
diff --git a/src/charts/tooltip.js b/src/charts/tooltip.js @@ -245,7 +245,7 @@ define(function(require){ if (!value) { return 0; } - if (valueFormat) { + if (valueFormat !== null) { valueFormatter = d3Format.format(valueFormat); } else if (isInteger(value)) { valueFormatter = formatIntegerValue;
11
diff --git a/StackExchangeDarkMode.user.js b/StackExchangeDarkMode.user.js // @description Dark theme for sites and chat on the Stack Exchange Network // @homepage https://github.com/samliew/SO-mod-userscripts // @author @samliew -// @version 2.5.2 +// @version 2.5.3 // // @include https://*stackexchange.com/* // @include https://*stackoverflow.com/* const orange = '#f48024'; - let bodyopacity = '1'; let textcolor = '#bbb'; let linkcolor = '#fff'; let highlightcolor = '#eee'; const hour = new Date().getHours(); const isLateNight = hour >= 22 || hour <= 6; if(isLateNight) { - bodyopacity = '0.9'; textcolor = '#999'; linkcolor = '#ccc'; highlightcolor = '#ddd'; /* Apply to all */ body { background-image: none; - opacity: ${bodyopacity}; } *, *:before, @@ -440,12 +437,10 @@ div.meter div { .supernovabg { color: white; background-color: #F48024; - opacity: ${bodyopacity-0.1}; } .hotbg { color: white; background-color: #CF7721; - opacity: ${bodyopacity-0.1}; } .coolbg { color: white;
2
diff --git a/userscript.user.js b/userscript.user.js @@ -12094,7 +12094,8 @@ var $$IMU_EXPORT$$; "<li><code>ext</code> - Extension (with <code>.</code> prefixed)</li>", "<li><code>caption</code> - Popup caption</li>", "<li><code>author_username</code> - Author's username</li>", - "<li><code>created_iso_utc</code> - Created date in ISO format, in UTC/GMT timezone (e.g. <code>2020-01-30T11-30-56</code>). Note that <code>:</code> is replaced with <code>-</code> to avoid issues with paths under NTFS.</li>", + "<li><code>created_...</code> - Created date (see note on Date objects below)</li>", + "<li><code>download_...</code> - Download date (see note on Date objects below)</li>", "</ul><br />", "<p>You can truncate the value of a variable by adding <code>:(number)</code> before the end bracket (<code>}</code>). For example:</p>", "<code>{caption:10}</code> - Truncates the caption to be at most 10 characters long", @@ -12102,6 +12103,18 @@ var $$IMU_EXPORT$$; "<ul><br />", "<li><code>{ext?}</code> - Will be replaced with nothing if <code>ext</code> doesn't exist</li>", "<li><code>{caption?no caption}</code> - Will be replaced with <code>no caption</code> if <code>caption</code> doesn't exist</li>", + "</ul><br />", + "<p>Date objects are accessible through a number of properties. Each property can be suffixed with <code>_utc</code> to get the UTC/GMT equivalent.</p>", + "<ul><br />", + "<li><code>..._iso</code> - Returns the date in ISO format (e.g. <code>2019-12-31T23-30-56</code>). Note that <code>:</code> is replaced with <code>-</code> to avoid issues with paths under NTFS.</li>", + "<li><code>..._yyyymmdd</code> - Returns the date in YYYYMMDD format (e.g. <code>20191230</code>)</li>", + "<li><code>..._hhmmss</code> - Returns the date's time in HHMMSS format (e.g. <code>233056</code>)</li>", + "<li><code>..._year</code> - Returns the full year (e.g. <code>2019</code>)</li>", + "<li><code>..._month</code> - Returns the (zero-padded) month (e.g. <code>12</code>)</li>", + "<li><code>..._day</code> - Returns the zero-padded day (e.g. <code>31</code>)</li>", + "<li><code>..._hours</code> - Returns zero-padded hours in military/24-hour format (e.g. <code>23</code>)</li>", + "<li><code>..._minute</code> - Returns zero-padded minutes (e.g. <code>30</code>)</li>", + "<li><code>..._seconds</code> - Returns zero-padded seconds (e.g. <code>56</code>)</li>", "</ul>" ].join("\n") } @@ -95103,21 +95116,51 @@ var $$IMU_EXPORT$$; if (ext_split[1]) format_vars.ext = "." + ext_split[1]; + var create_date = function(name, date) { + var map = { + "year": "FullYear", + "month": "Month", + "day": "Date", + "hours": "Hours", + "minutes": "Minutes", + "seconds": "Seconds" + }; + + var values = []; + + for (var x in map) { + var local_value = date["get" + map[x]](); + var utc_value = date["getUTC" + map[x]](); + + if (x === "month") { + local_value++; + utc_value++; + } + + local_value = zpadnum(local_value, 2); + utc_value = zpadnum(utc_value, 2); + + values[x] = local_value; + values[x + "_utc"] = utc_value; + format_vars[name + "_" + x] = local_value; + format_vars[name + "_" + x + "_utc"] = utc_value; + } + + format_vars[name + "_iso"] = values.year + "-" + values.month + "-" + values.day + "T" + values.hours + "-" + values.minutes + "-" + values.seconds; + format_vars[name + "_iso_utc"] = values.year_utc + "-" + values.month_utc + "-" + values.day_utc + "T" + values.hours_utc + "-" + values.minutes_utc + "-" + values.seconds_utc; + + format_vars[name + "_yyyymmdd"] = values.year + values.month + values.day; + format_vars[name + "_yyyymmdd_utc"] = values.year_utc + values.month_utc + values.day_utc; + format_vars[name + "_hhmmss"] = values.hours + values.minutes + values.seconds; + format_vars[name + "_hhmmss_utc"] = values.hours_utc + values.minutes_utc + values.seconds_utc; + }; + if (newobj.extra.created_date) { - var created_date = new Date(newobj.extra.created_date); - format_vars.created_iso_utc = created_date.toISOString() - .replace(/Z$/, "") - .replace(/:/g, "-") // to avoid problems with windows paths - .replace(/\.[0-9]+$/, ""); - - format_vars.created_year = created_date.getFullYear(); - format_vars.created_month = zpadnum(created_date.getMonth() + 1, 2); - format_vars.created_day = zpadnum(created_date.getDate(), 2); - format_vars.created_hours = zpadnum(created_date.getHours(), 2); - format_vars.created_minutes = zpadnum(created_date.getMinutes(), 2); - format_vars.created_seconds = zpadnum(created_date.getSeconds(), 2); + create_date("created", new Date(newobj.extra.created_date)); } + create_date("download", new Date()); + var formatted = format_string(settings.filename_format, format_vars); if (formatted) { newobj.filename = formatted;
7
diff --git a/package.json b/package.json "ncp": "~2.0.0", "react": "~15.5.0", "react-addons-css-transition-group": "~15.5.0", - "react-addons-test-utils": "^15.5.1", + "react-addons-test-utils": "~15.5.1", "react-dom": "~15.5.0", "react-highlight": "~0.9.0", "react-router": "~2.8.0", - "react-test-renderer": "^15.5.4", + "react-test-renderer": "~15.5.4", "underscore.string": "~3.3.4", "xhr-mock": "[email protected]:resin-io-modules/xhr-mock.git#improvements" }, "lodash": "~4.15.0", "marked": "~0.3.6", "moment": "~2.15.1", - "prop-types": "^15.5.8", + "prop-types": "~15.5.8", "react-date-picker": "~5.3.28", "superagent": "~2.2.0" }
14
diff --git a/index.html b/index.html $('.account-selector').click(function () { - $('.account-selector[data-account-id="' + account_id + '"').removeClass('hidden'); + $('.account-selector[data-account-id="' + account_id + '"]').removeClass('hidden'); account_id = $(this).data('account-id'); wallet.select_account(account_id); refresh_account();
1
diff --git a/generators/entity/templates/server/src/test/java/package/web/rest/_EntityResourceIntTest.java b/generators/entity/templates/server/src/test/java/package/web/rest/_EntityResourceIntTest.java @@ -397,7 +397,7 @@ _%> .content(TestUtil.convertObjectToJsonBytes(<%= entityInstance %><% if (dto === 'mapstruct') { %>DTO<% } %>))) .andExpect(status().isBadRequest()); - // Validate the Alice in the database + // Validate the <%= entityClass %> in the database List<<%= entityClass %>> <%= entityInstance %>List = <%= entityInstance %>Repository.findAll(); assertThat(<%= entityInstance %>List).hasSize(databaseSizeBeforeCreate); }
1
diff --git a/index.d.ts b/index.d.ts @@ -436,8 +436,8 @@ declare namespace Moleculer { type AfterConnectHandler = (wasReconnect: boolean) => Promise<void>; class BaseTransporter { - constructor(opts?: object); - public init(transit: object, messageHandler: MessageHandler, afterConnect?: AfterConnectHandler): void; + constructor(opts?: GenericObject); + public init(transit: GenericObject, messageHandler: MessageHandler, afterConnect?: AfterConnectHandler): void; public connect(): Promise<any>; public onConnected(wasReconnect: boolean): Promise<void>; public disconnect(): Promise<void>;
14
diff --git a/lib/basedriver/helpers.js b/lib/basedriver/helpers.js @@ -94,13 +94,20 @@ async function configureApp (app, supportedAppExtensions) { APPLICATIONS_CACHE.del(app); } let fileName = `appium-app${_.first(supportedAppExtensions)}`; + + // to determine if we need to unzip the app, we have a number of places + // to look: content type, content disposition, or the file extension + const downloadZipName = 'appium-app.zip'; if (headers['content-type']) { logger.debug(`Content-Type: ${headers['content-type']}`); // the filetype may not be obvious for certain urls, so check the mime type too if (ZIP_MIME_TYPES.includes(headers['content-type'])) { - fileName = 'appium-app.zip'; + fileName = downloadZipName; shouldUnzipApp = true; } + } else if (ZIP_EXTS.includes(path.extname(newApp))) { + fileName = downloadZipName; + shouldUnzipApp = true; } if (headers['content-disposition'] && /^attachment/i.test(headers['content-disposition'])) { const match = /filename="([^"]+)/i.exec(headers['content-disposition']);
11
diff --git a/src/components/Barter.jsx b/src/components/Barter.jsx @@ -172,7 +172,7 @@ function Barter() { setFilteredItems(sortedItems); }, [setFilteredItems, includeFlea, filters, includeMarked, minPrice]); - let itemChunks = arrayChunk(filteredItems.slice(0, Math.min(filteredItems.length, numberFilter)), Math.min(filteredItems.length, numberFilter) / 7); + let itemChunks = arrayChunk(filteredItems.slice(0, Math.min(filteredItems.length, numberFilter)), Math.ceil(Math.min(filteredItems.length, numberFilter) / 7)); let groupNames = defaultGroupNames; if(groupByType){ @@ -199,7 +199,7 @@ function Barter() { } for(let i = 0; i < itemChunks.length; i = i + 1){ - itemChunks[i] = itemChunks[i].sort((itemA, itemB) => { + itemChunks[i] = itemChunks[i]?.sort((itemA, itemB) => { if(itemA.slots > itemB.slots){ return -1; }
1
diff --git a/lib/assets/core/javascripts/cartodb3/components/form-components/editors/fill/input-color/assets-picker/assets-view.js b/lib/assets/core/javascripts/cartodb3/components/form-components/editors/fill/input-color/assets-picker/assets-view.js @@ -86,11 +86,6 @@ module.exports = CoreView.extend({ this.add_related_model(this._stateModel); - this._uploadAssetCollection = new AssetsCollection(null, { - configModel: this._configModel, - userModel: this._userModel - }); - this._assetCollections = []; this._userAssetCollection = new AssetsCollection(null, { @@ -130,7 +125,7 @@ module.exports = CoreView.extend({ }, _upload: function (data) { - this._uploadAssetCollection.create(data, { + this._userAssetCollection.create(data, { beforeSend: this._beforeAssetUpload.bind(this), success: this._onAssetUploaded.bind(this), error: this._onAssetUploadError.bind(this),
2
diff --git a/dashboard/static/js/libs/fabmoui.js b/dashboard/static/js/libs/fabmoui.js "use strict" var MAX_INPUTS = 16; +var MAX_OUTPUTS = 16; var currentUnits = null; var mouseX; var mouseY; @@ -329,6 +330,8 @@ FabMoUI.prototype.updateStatusContent = function(status){ this.progress = 0; } + + ///update inputs for(var i=1; i<MAX_INPUTS+1; i++) { var iname = 'in' + i; if(iname in status) { @@ -345,6 +348,23 @@ FabMoUI.prototype.updateStatusContent = function(status){ } } + ///update outputs + for(var i=1; i<MAX_OUTPUTS+1; i++) { + var outname = 'out' + i; + if(outname in status) { + var selector = that.status_div_selector + ' .out' + i; + if(status[outname] == 1) { + $(selector).removeClass('off').addClass('on'); + } else if(status[outname] == 0) { + $(selector).removeClass('on').addClass('off'); + } else { + $(selector).removeClass('on off').addClass('disabled'); + } + } else { + break; + } + } + $(that.status_div_selector).trigger('statechange',status.state);
0
diff --git a/components/CheckoutActions/CheckoutActions.js b/components/CheckoutActions/CheckoutActions.js @@ -69,6 +69,10 @@ class CheckoutActions extends Component { } } + componentDidMount() { + this._isMounted = true; + } + componentWillUnmount() { this._isMounted = false; }
12
diff --git a/src/utils/wallet.js b/src/utils/wallet.js @@ -708,7 +708,10 @@ class Wallet { } for (let { receiverId, nonce, blockHash, actions } of transactions) { const [, signedTransaction] = await nearApiJs.transactions.signTransaction(receiverId, nonce, actions, blockHash, this.connection.signer, accountId, NETWORK_ID) - await this.connection.provider.sendTransaction(signedTransaction) + let { status } = await this.connection.provider.sendTransaction(signedTransaction) + if (status.Failure !== undefined) { + throw new Error('Transaction failure') + } } } }
9
diff --git a/layouts/partials/head.html b/layouts/partials/head.html {{- end -}} <head> <meta name="theme" content="Syna"> - <meta name="theme-version" content="v0.15"> + <meta name="theme-version" content="v0.16"> <meta name="theme-url" content="https://syna.okkur.org"> <meta name="theme-description" content="Highly customizable open source theme for Hugo based static websites"> <meta name="theme-author" content="Okkur Labs">
3
diff --git a/assets/js/modules/analytics/common/timzezone-select.js b/assets/js/modules/analytics/common/timzezone-select.js @@ -38,8 +38,8 @@ const TimezoneSelect = ( { timezone, setTimezone, hasError } ) => { const [ selectedCountry, setSelectedCountry ] = useState( timezone ); const [ selectedTimezoneID, setSelectedTimezoneID ] = useState( '' ); let multiTimezone, - selectedTimezoneDisplay = selectedTimezoneID; - + selectedTimezoneDisplay = selectedTimezoneID, + foundTimezone = false; const getTimezoneSelector = () => { const response = ( <div > @@ -55,6 +55,7 @@ const TimezoneSelect = ( { timezone, setTimezone, hasError } ) => { onEnhancedChange={ ( i, item ) => { setTimezone( item.dataset.value ); setSelectedCountry( item.dataset.value ); + setSelectedTimezoneID( item.dataset.value ); } } label={ __( 'Country', 'google-site-kit' ) } outlined @@ -66,6 +67,7 @@ const TimezoneSelect = ( { timezone, setTimezone, hasError } ) => { let value = aCountry.defaultTimeZoneId; const timezoneMatch = aCountry.timeZone.find( ( tz ) => tz.timeZoneId === timezone ); if ( timezoneMatch ) { + foundTimezone = true; value = timezoneMatch.timeZoneId; if ( aCountry.timeZone.length > 1 ) { multiTimezone = aCountry.timeZone; @@ -104,6 +106,9 @@ const TimezoneSelect = ( { timezone, setTimezone, hasError } ) => { { multiTimezone .map( ( aTimezone ) => { + if ( aTimezone.timeZoneId === timezone ) { + foundTimezone = true; + } return ( <Option key={ aTimezone.displayName } @@ -120,7 +125,9 @@ const TimezoneSelect = ( { timezone, setTimezone, hasError } ) => { </span> </div> ); - if ( '' === selectedTimezoneID ) { + // Fallback to the browser timezone if the WordPress timezone was not found. + if ( ! foundTimezone ) { + setSelectedTimezoneID( Intl.DateTimeFormat().resolvedOptions().timeZone ); setTimezone( Intl.DateTimeFormat().resolvedOptions().timeZone ); } return response;
7
diff --git a/website/ops.js b/website/ops.js @@ -158,6 +158,7 @@ module.exports={ }); var afterwards=function(){ if(configID=="ident" || configID=="users"){ + db.dictConfigs=null; module.exports.attachDict(db, dictID, function(){ callnext(json, false); });
1
diff --git a/token-metadata/0xc770EEfAd204B5180dF6a14Ee197D99d808ee52d/metadata.json b/token-metadata/0xc770EEfAd204B5180dF6a14Ee197D99d808ee52d/metadata.json "symbol": "FOX", "address": "0xc770EEfAd204B5180dF6a14Ee197D99d808ee52d", "decimals": 18, - "dharmaVerificationStatus": { "dharmaVerificationStatus": "VERIFIED" } \ No newline at end of file -} \ No newline at end of file
3
diff --git a/app/shared/components/Global/Form/Field/MultiToken.js b/app/shared/components/Global/Form/Field/MultiToken.js @@ -14,13 +14,8 @@ export default class GlobalFormFieldMultiToken extends Component<Props> { }; } onChange = debounce((e, { name, value }) => { - let { valid } = this.state; - if (name !== 'asset') { - valid = !!(value.match(/^\d+(\.\d{1,4})?$/g)); - } this.setState({ [name]: value, - valid }, () => { const { asset, quantity } = this.state; const { balances } = this.props; @@ -28,7 +23,7 @@ export default class GlobalFormFieldMultiToken extends Component<Props> { const parsed = (quantity > 0) ? `${parseFloat(quantity).toFixed(precision[asset])} ${asset}` : `${parseFloat(0).toFixed(precision[asset])} ${asset}`; - this.props.onChange(e, { name: this.props.name, value: parsed, valid }); + this.props.onChange(e, { name: this.props.name, value: parsed }); }); }, 300) render() {
13
diff --git a/src/server/models/password-reset-order.js b/src/server/models/password-reset-order.js @@ -8,9 +8,9 @@ const ObjectId = mongoose.Schema.Types.ObjectId; */ const schema = new mongoose.Schema({ token: { type: String, required: true, unique: true }, - email: String, + email: { type: String, required: true }, relatedUser: { type: ObjectId, ref: 'User' }, - isExpired: Boolean, + isExpired: { type: Boolean, default: false }, }); schema.plugin(uniqueValidator);
7
diff --git a/articles/api/authentication/_passwordless.md b/articles/api/authentication/_passwordless.md @@ -11,6 +11,7 @@ POST https://${account.namespace}/passwordless/start Content-Type: application/json { "client_id": "${account.clientId}", + "client_secret": "YOUR_CLIENT_SECRET", // for web applications "connection": "email|sms", "email": "EMAIL", //set for connection=email "phone_number": "PHONE_NUMBER", //set for connection=sms @@ -89,6 +90,7 @@ You have three options for [passwordless authentication](/connections/passwordle | Parameter | Description | |:-----------------|:------------| | `client_id` <br/><span class="label label-danger">Required</span> | The `client_id` of your application. | +| `client_secret` <br/><span class="label label-danger">Required</span> | The `client_secret` of your application, required for Regular Web Applications. | | `connection` <br/><span class="label label-danger">Required</span> | How to send the code/link to the user. Use `email` to send the code/link using email, or `sms` to use SMS. | | `email` | Set this to the user's email address, when `connection=email`. | | `phone_number` | Set this to the user's phone number, when `connection=sms`. | @@ -112,7 +114,6 @@ For the complete error code reference for this endpoint refer to [Errors > POST ### More Information - [Passwordless Authentication](/connections/passwordless) -- [Authenticate Users with Passwordless Authentication](/connections/passwordless/guides/implement-passwordless) - [Passwordless Troubleshooting](/connections/passwordless/reference/troubleshoot) ## Authenticate User @@ -182,10 +183,55 @@ curl --request POST \ <%= include('../../_includes/_http-method', { "http_badge": "badge-success", "http_method": "POST", - "path": "/passwordless/verify", + "path": "/oauth/token", "link": "#authenticate-user" }) %> + +Once you have a verification code, use this endpoint to login the user with their phone number/email and verification code. + +### Request Parameters + +| Parameter |Description | +|:-----------------|:------------| +| `grant_type` <br/><span class="label label-danger">Required</span> | It should be `http://auth0.com/oauth/grant-type/passwordless/otp`. | +| `client_id` <br/><span class="label label-danger">Required</span> | The `client_id` of your application. | +| `client_secret` <br/><span class="label label-danger">Required</span> | The `client_secret` of your application. Only required for Regular Web Applications| +| `username` <br/><span class="label label-danger">Required</span> | The user's phone number if `realm=sms`, or the user's email if `realm=email`. | +| `realm` <br/><span class="label label-danger">Required</span> | Use `sms` or `email` (should be the same as [POST /passwordless/start](#get-code-or-link)) | +| `otp` <br/><span class="label label-danger">Required</span> | The user's verification code. | +| <dfn data-key="audience">`audience`</dfn> | The API identifier you want to get an Access Token for. | +| <dfn data-key="scope">`scope`</dfn> | Use `openid` to get an ID Token, or `openid profile email` to include also user profile information in the ID Token. | + +### Test with Postman + +<%= include('../../_includes/_test-with-postman') %> + +### Test with Authentication API Debugger + +<%= include('../../_includes/_test-this-endpoint') %> + +1. At the *Configuration* tab, set the fields **Application** (select the application you want to use for the test) and **Connection** (use `sms` or `email`). + +1. Copy the <dfn data-key="callback">**Callback URL**</dfn> and set it as part of the **Allowed Callback URLs** of your [Application Settings](${manage_url}/#/applications). + +1. At the *OAuth2 / OIDC* tab, set **Username** to the user's phone number if `connection=sms`, or the user's email if `connection=email`, and **Password** to the user's verification code. Click **Resource Owner Endpoint**. + +### Error Codes + +For the complete error code reference for this endpoint refer to [Errors > POST /oauth-token](#post-oauth-token). + +### More Information + +- [Passwordless Authentication](/connections/passwordless) + +<%= include('../../_includes/_http-method', { + "http_badge": "badge-success", + "http_method": "POST", + "path": "/passwordless/verify", + "link": "#authenticate-user-legacy" +}) %> + ::: warning This feature is disabled by default for new tenants as of 8 June 2017. Please see [Application Grant Types](/applications/concepts/application-grant-types) for more information. ::: @@ -230,5 +276,3 @@ For the complete error code reference for this endpoint refer to [Errors > POST ### More Information - [Passwordless Authentication](/connections/passwordless) -- [Authenticate Users with Passwordless Authentication](/connections/passwordless/guides/implement-passwordless) -- [Passwordless Troubleshooting](/connections/passwordless/reference/troubleshoot)
3
diff --git a/src/example.js b/src/example.js @@ -74,7 +74,8 @@ class DemoComponent extends Component { defaultCountry="auto" value={this.state.phone1} geoIpLookup={lookup} - css={['intl-tel-input', 'form-control']} + containerClassName="intl-tel-input" + inputClassName="form-control" format /> <div> @@ -88,7 +89,8 @@ class DemoComponent extends Component { onSelectFlag={this.selectFlagHandler2} defaultCountry="jp" value={this.state.phone2} - css={['intl-tel-input', 'form-control']} + containerClassName="intl-tel-input" + inputClassName="form-control" /> <div> Phone Number:
1
diff --git a/webpack/v4/webpack.prod.config.js b/webpack/v4/webpack.prod.config.js @@ -96,7 +96,7 @@ module.exports = env => { optimization: { minimizer: [ new UglifyJsPlugin({ - cache: true, + cache: false, parallel: true, uglifyOptions: { sourceMap: true, @@ -205,6 +205,7 @@ module.exports = env => { rootDir('node_modules/tangram-cartocss'), rootDir('node_modules/tangram.cartodb'), rootDir('lib/assets/javascripts/carto-node'), + rootDir('lib/assets/javascripts/builder'), rootDir('lib/assets/javascripts/dashboard') ], options: {
11
diff --git a/articles/multifactor-authentication/custom.md b/articles/multifactor-authentication/custom.md @@ -119,36 +119,6 @@ function (user, context, callback) { } ``` -## Use a custom MFA service - -If you are using an MFA provider that does not have Auth0 built-in support or if you are using a service you have created, you can use the [redirect](/rules/redirect) protocol for the integration. - -By using the redirect protocol, you interrupt the authentication transaction and redirect the user to a specified URL where they are asked for MFA. If authentication is successful, Auth0 will continue processing the request. - -Some MFA options you can implement using the redirect protocol include: - -* A one-time code sent via SMS -* Integration with specialized providers, such as those that require hardware tokens - -To use the redirect protocol, edit the `URL` field: - -```JS -function (user, context, callback) { - - if (condition() && context.protocol !== 'redirect-callback'){ - context.redirect = { - url: 'https://your_custom_mfa' - }; - } - - if (context.protocol === 'redirect-callback'){ - //TODO: handle the result of the MFA step - } - - callback(null, user, context); -} -``` - ## Additional Notes * A tutorial is available on using MFA with the [Resource Owner](/api-auth/tutorials/multifactor-resource-owner-password) endpoint.
2
diff --git a/ItsATrap_theme_PathfinderSimple/script.json b/ItsATrap_theme_PathfinderSimple/script.json { "name": "It's a Trap! - Pathfinder (Simple) theme", "script": "theme.js", - "version": "3.1.2", + "version": "3.1.1", "previousversions": ["1.0", "3.0", "3.1"], "description": "# It's A Trap! - Pathfinder (Simple) theme (Deprecated)\r\rThis script is deprecated. Please use the generic Pathfinder trap theme instead.\r", "authors": "Stephen Lindberg",
1
diff --git a/spec/vast_trackers.spec.js b/spec/vast_trackers.spec.js @@ -230,9 +230,11 @@ describe('VASTTracker', function() { beforeEach(() => { spyTrack = jest.spyOn(vastTracker, 'track'); vastTracker.assetDuration = 10; - // vastTracker.lastDuration = 40; vastTracker.setProgress(5); }); + it('should be defined', () => { + expect(vastTracker.setProgress).toBeDefined(); + }); it('call track with progress-5', () => { expect(spyTrack).toHaveBeenCalledWith('progress-5', expect.anything()); }); @@ -246,6 +248,10 @@ describe('VASTTracker', function() { it('should have a lastPercentage variable', () => { expect(vastTracker.lastPercentage).toBeDefined(); }); + it('should make the lastPercentage variable at the value -1', () => { + vastTracker.lastPercentage = 1; + expect(spyTrack).toHaveBeenCalledWith('progress-4%', expect.anything()); + }); }); }); });
0
diff --git a/data.js b/data.js @@ -1621,6 +1621,14 @@ module.exports = [ url: "http://mustache.github.io/", source: "https://raw.githubusercontent.com/janl/mustache.js/master/mustache.js" }, + { + name: "tiny-mustache", + github: "aishikaty/tiny-mustache", + tags: ["templating", "template", "tiny"], + description: "The smallest implementation of Mustache logic-less template engine.", + url: "https://github.com/aishikaty/tiny-mustache", + source: "https://raw.githubusercontent.com/aishikaty/tiny-mustache/master/mustache.js" + }, { name: "LABjs", tags: ["loader"],
0
diff --git a/scripts/build-js.js b/scripts/build-js.js @@ -44,7 +44,7 @@ function es(components, cb) { }) .pipe(source('swiper.js', './src')) .pipe(buffer()) - .pipe(rename('swiper.module.js')) + .pipe(rename('swiper.esm.bundle.js')) .pipe(gulp.dest(`./${env === 'development' ? 'build' : 'dist'}/js/`)) .on('end', () => { if (cb) cb(); @@ -74,7 +74,7 @@ function es(components, cb) { }) .pipe(source('swiper.js', './src')) .pipe(buffer()) - .pipe(rename('swiper.modular.js')) + .pipe(rename('swiper.esm.js')) .pipe(gulp.dest(`./${env === 'development' ? 'build' : 'dist'}/js/`)) .on('end', () => { if (cb) cb();
10
diff --git a/src/components/profile/hardware_devices/HardwareDevices.js b/src/components/profile/hardware_devices/HardwareDevices.js @@ -83,8 +83,7 @@ const HardwareDevices = () => { const recoveryMethods = useRecoveryMethods(account.accountId); const keys = account.fullAccessKeys || []; - const ledgerKey = keys.find(key => key.meta.type === 'ledger'); - const hasLedger = !!ledgerKey + const { hasLedger, ledgerKey } = account.ledger const recoveryKeys = recoveryMethods.map(key => key.publicKey) const publicKeys = keys.map(key => key.public_key)
4
diff --git a/Source/Scene/SceneTransitioner.js b/Source/Scene/SceneTransitioner.js @@ -418,33 +418,6 @@ define([ var complete = complete3DCallback(camera3D); createMorphHandler(transitioner, complete); - var startPos = Cartesian3.clone(camera.position, scratch3DToCVStartPos); - var startDir = Cartesian3.clone(camera.direction, scratch3DToCVStartDir); - var startUp = Cartesian3.clone(camera.up, scratch3DToCVStartUp); - - var endPos = Cartesian3.fromElements(0.0, 0.0, 5.0 * ellipsoid.maximumRadius, scratch3DToCVEndPos); - var endDir = Cartesian3.negate(Cartesian3.UNIT_Z, scratch3DToCVEndDir); - var endUp = Cartesian3.clone(Cartesian3.UNIT_Y, scratch3DToCVEndUp); - - var startRight = camera.frustum.right; - var endRight = endPos.z * 0.5; - - function update(value) { - columbusViewMorph(startPos, endPos, value.time, camera.position); - columbusViewMorph(startDir, endDir, value.time, camera.direction); - columbusViewMorph(startUp, endUp, value.time, camera.up); - Cartesian3.cross(camera.direction, camera.up, camera.right); - Cartesian3.normalize(camera.right, camera.right); - - var frustum = camera.frustum; - frustum.right = CesiumMath.lerp(startRight, endRight, value.time); - frustum.left = -frustum.right; - frustum.top = frustum.right * (scene.drawingBufferHeight / scene.drawingBufferWidth); - frustum.bottom = -frustum.top; - - camera.position.z = 2.0 * scene.mapProjection.ellipsoid.maximumRadius; - } - var morph; if (transitioner._morphToOrthographic) { morph = function() { @@ -459,22 +432,15 @@ define([ } if (duration > 0.0) { - var tween = scene.tweens.add({ + scene._mode = SceneMode.SCENE2D; + camera.flyTo({ duration : duration, - easingFunction : EasingFunction.QUARTIC_OUT, - startObject : { - time : 0.0 - }, - stopObject : { - time : 1.0 - }, - update : update, + destination : Cartesian3.fromDegrees(0.0, 0.0, 5.0 * ellipsoid.maximumRadius, ellipsoid, scratch3DToCVEndPos), complete : function() { scene._mode = SceneMode.MORPHING; morph(); } }); - transitioner._currentTweens.push(tween); } else { morph(); }
1
diff --git a/views/stats.ejs b/views/stats.ejs element.addEventListener('mousemove', e => { let maxTop = window.innerHeight - statsContent.offsetHeight - 20; + let rect = statsContent.parentNode.getBoundingClientRect(); + + if(rect.x) + statsContent.style.left = rect.x - statsContent.offsetWidth - 10 + "px"; + let top = Math.max(70, Math.min(maxTop, e.clientY - statsContent.offsetHeight / 2)); statsContent.style.top = top + "px";
5
diff --git a/README.md b/README.md @@ -48,7 +48,7 @@ yarn install ``` **For setup local with authenticate with Okta Preview:** -Use the "OKTA_METADATA_URL='url-of-okta-saml'" concatenating with the commands the Python: +Use the "OKTA_METADATA_URL='url-of-okta-saml'" concatenating with the python's commands: ```shell Examples: @@ -56,15 +56,14 @@ Use the "OKTA_METADATA_URL='url-of-okta-saml'" concatenating with the commands t OKTA_METADATA_URL='url-of-okta-saml' python manage.py migrate ``` -Other form the going is export this parameter before the execute os commands do Python: +Another way is to export the var and then execute the commands: ```shell - OKTA_METADATA_URL='url-of-okta-saml' + export OKTA_METADATA_URL='url-of-okta-saml' yarn start python manage.py migrate ``` - -Case necessity execute application without authenticate by Okta Preview again, enough execute the command: +In case of need authenticate without Okta preview again, execute: ```shell unset OKTA_METADATA_URL
1
diff --git a/logger.js b/logger.js @@ -103,8 +103,7 @@ logger.load_log_ini = function () { logger.colorize = function (color, str) { if (!util.inspect.colors[color]) { return str; } // unknown color - return '\u001b[' + util.inspect.colors[color][0] + 'm' + str + - '\u001b[' + util.inspect.colors[color][1] + 'm'; + return `\u001b[${util.inspect.colors[color][0]}m${str}\u001b[${util.inspect.colors[color][1]}m`; }; logger.dump_logs = function (cb) {
14
diff --git a/lib/config-generator.js b/lib/config-generator.js @@ -92,7 +92,7 @@ class ConfigGenerator { config.resolve = { extensions: ['.js', '.jsx', '.vue', '.ts', '.tsx'], - alias: this.webpackConfig.aliases + alias: Object.assign({}, this.webpackConfig.aliases) }; if (this.webpackConfig.useVueLoader) { @@ -104,7 +104,7 @@ class ConfigGenerator { config.resolve.alias['react-dom'] = 'preact-compat'; } - config.externals = this.webpackConfig.externals; + config.externals = Object.assign({}, this.webpackConfig.externals); return config; }
4
diff --git a/sirepo/pkcli/job_cmd.py b/sirepo/pkcli/job_cmd.py @@ -203,7 +203,9 @@ def _on_do_compute_exit(success_exit, is_parallel, template, run_dir): # TODO(e-carlin): impl pass - def _post_processing(): return template.post_execution_processing(**kwargs) + def _post_processing(): + if hasattr(template, 'post_execution_processing'): + return template.post_execution_processing(**kwargs) def _success_exit(): # is_parallel is necessary because jspec we only want to calculate the rate calculation /time step error in parallel case @@ -212,6 +214,7 @@ def _on_do_compute_exit(success_exit, is_parallel, template, run_dir): state=job.COMPLETED, alerts=_post_processing(), ) + if success_exit: return _success_exit() return _failure_exit()
11
diff --git a/test/grbl.js b/test/grbl.js @@ -331,11 +331,11 @@ test('GrblLineParserResultSettings', (t) => { ]; const grbl = new Grbl(); let i = 0; - grbl.on('settings', ({ raw, setting, value, message }) => { + grbl.on('settings', ({ raw, name, value, message }) => { if (i < lines.length) { const r = raw.match(/^(\$[^=]+)=([^ ]*)\s*(.*)/); t.equal(raw, lines[i]); - t.equal(setting, r[1]); + t.equal(name, r[1]); t.equal(value, r[2]); t.equal(message, trim(r[3], '()')); }
1
diff --git a/docs/docs/developer.md b/docs/docs/developer.md @@ -56,3 +56,8 @@ API and Data Retrieval * `ServerIO::getInitiatives()` * Returns array representation of all initiatives that can be queried * Keys include: 'id', 'title', 'description' + + +Suma Client Developer Documentation +-------------- +See developer documentation for the Suma Client [here](https://github.com/suma-project/Suma/blob/master/web-sourcecode/README.md)
3
diff --git a/src/lib/explorerUtil.js b/src/lib/explorerUtil.js @@ -11,7 +11,7 @@ export const PICK_SOURCE = 1; export const ADVANCED = 2; export const STARRED = 3; - +// we use the media bucket to grab updated and deleted media from two different operations. hence, we need to check that value first export function generateQueryParamString(queries) { const queriesForUrl = queries.map(query => ({ label: encodeURIComponent(query.label), @@ -19,8 +19,8 @@ export function generateQueryParamString(queries) { color: encodeURIComponent(query.color), startDate: query.startDate, endDate: query.endDate, - sources: query.sources.map(s => s.id), - collections: query.collections.map(s => s.id), + sources: query.media ? query.media.filter(m => m.type === 'source' || m.media_id).map(s => s.id) : query.sources.map(s => s.id), // de-aggregate media bucket into sources and collections + collections: query.media ? query.media.filter(m => m.type === 'collection' || m.tags_id).map(s => s.id) : query.collections.map(s => s.id), })); return JSON.stringify(queriesForUrl); }
9
diff --git a/assets/js/components/FeatureTours.js b/assets/js/components/FeatureTours.js */ import { useContext } from '@wordpress/element'; -/** - * External dependencies - */ -import PropTypes from 'prop-types'; - /** * Internal dependencies */ @@ -59,7 +54,3 @@ export default function FeatureTours() { /> ); } - -FeatureTours.propTypes = { - viewContext: PropTypes.string, -};
2
diff --git a/README.md b/README.md @@ -1098,11 +1098,6 @@ you should handle or suppress if you don't want unhandled exceptions: // Handle errors // logger.on('error', function (err) { /* Do Something */ }); - -// -// Or just suppress them. -// -logger.emitErrs = false; ``` ### Working with multiple Loggers in winston
2
diff --git a/src/core/db/licensemanager.py b/src/core/db/licensemanager.py @@ -75,81 +75,9 @@ class LicenseManager: result = conn.create_license_link_table() return result - # managing users - # @staticmethod - # def add_user_to_license_table(username): - # """ - # grant a user permission to select, insert, and update their own rows - # in the Row Level Security policy table. - - # These rows are now owned by the superuser, so only the superuser can - # remove them. - # """ - # username = username.lower() - # policy = ('grantor = \'%s\'' % username) - # grantee = username - # grantor = settings.DATABASES['default']['USER'] - # repo_base = settings.LICENSE_DB - # repo = settings.LICENSE_SCHEMA - # table = settings.LICENSE_TABLE - - # # licenses = LicenseManager.find_security_policies( - # # repo_base, repo=repo, table=table, - # # policy=policy, policy_type=None, - # # grantee=grantee, grantor=grantor, safe=False) - - # # Skip if the user already has policies granted by the superuser. - # if len(licenses) > 0: - # return - - # with _superuser_connection(repo_base=settings.POLICY_DB) as conn: - # # allow select - # conn.create_security_policy( - # policy=policy, - # policy_type="select", - # grantee=grantee, - # grantor=grantor, - # repo_base=repo_base, - # repo=repo, - # table=table) - - # conn.create_security_policy( - # policy=policy, - # policy_type="insert", - # grantee=grantee, - # grantor=grantor, - # repo_base=repo_base, - # repo=repo, - # table=table) - - # conn.create_security_policy( - # policy=policy, - # policy_type="update", - # grantee=grantee, - # grantor=grantor, - # repo_base=repo_base, - # repo=repo, - # table=table) - - - # @staticmethod - # def find_all_security_policies(username): - # ''' - # Find all security policies that are either granted to or granted by - # the passed username - # ''' - # username = username.lower() - # with _superuser_connection(settings.POLICY_DB) as conn: - # result = conn.find_all_security_policies(username) - # return result - @staticmethod def find_licenses(): - ''' - Looks for security policies matching what the user specified in - the input. - ''' - + # Returns all licenses with _superuser_connection(settings.LICENSE_DB) as conn: res = conn.find_licenses() @@ -169,10 +97,9 @@ class LicenseManager: @staticmethod def find_license_by_id(license_id): ''' - Looks for a security policy matching the specified policy_id. + Looks for a license matching the specified license_id. ''' license_id = int(license_id) - print "in license manager with license id: ", license_id with _superuser_connection(settings.LICENSE_DB) as conn: res = conn.find_license_by_id(license_id=license_id) @@ -182,17 +109,13 @@ class LicenseManager: 'License', ['license_id', 'license_name', 'pii_def', 'pii_anonymized', 'pii_removed']) tuple_license = License(*res) - print "tuple license: ", tuple_license return tuple_license @staticmethod def find_licenses_by_repo(repo_base, repo): ''' - Looks for security policies matching what the user specified in - the input. + Find Licenses based on a given repo_base and repo ''' - - license_links = LicenseManager.find_license_links_by_repo(repo_base, repo) licenses = [] @@ -233,7 +156,6 @@ class LicenseManager: ''' Creates a new license in the license table. ''' - with _superuser_connection(settings.LICENSE_DB) as conn: return conn.create_license_link( repo_base=repo_base, @@ -244,8 +166,7 @@ class LicenseManager: @staticmethod def find_license_links(license_id): ''' - Looks for security policies matching what the user specified in - the input. + Returns all licenses links for a specified license id ''' with _superuser_connection(settings.LICENSE_DB) as conn: res = conn.find_license_links(license_id) @@ -266,8 +187,7 @@ class LicenseManager: @staticmethod def find_license_links_by_repo(repo_base, repo): ''' - Looks for security policies matching what the user specified in - the input. + Finds LicenseLinks for a particular repo_base and repo ''' with _superuser_connection(settings.LICENSE_DB) as conn: res = conn.find_license_links_by_repo(repo_base, repo)
1
diff --git a/packages/cx/src/widgets/grid/Grid.d.ts b/packages/cx/src/widgets/grid/Grid.d.ts @@ -344,6 +344,7 @@ interface GridProps extends StyledContainerProps { /** Options for data sorting. See: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Collator */ sortOptions?: CollatorOptions; + /** Callback to create a function that can be used to check whether a record is selectable. */ onCreateIsRecordSelectable?: ( params: any, instance: Instance @@ -379,6 +380,9 @@ interface GridProps extends StyledContainerProps { * If onCreateFilter callback is defined, filtered records can be retrieved using this callback. */ onTrackMappedRecords?: (records: Record[], instance: Instance) => void; + + /** Callback to create a function that can be used to check whether a record is draggable. */ + onCreateIsRecordDraggable?: (params: any, instance: Instance) => (record: Record) => boolean; } interface GridCellInfo {
0
diff --git a/sources-dist-stable.json b/sources-dist-stable.json "meta": "https://raw.githubusercontent.com/BenAhrdt/ioBroker.janitza-gridvis/main/io-package.json", "icon": "https://raw.githubusercontent.com/BenAhrdt/ioBroker.janitza-gridvis/main/admin/janitza-gridvis.png", "type": "energy", - "version": "2.1.22" + "version": "2.1.25" }, "jarvis": { "meta": "https://raw.githubusercontent.com/Zefau/ioBroker.jarvis/master/io-package.json",
12