code
stringlengths
122
4.99k
label
int64
0
14
diff --git a/src/scss/_provider.scss b/src/scss/_provider.scss margin: 0 8px 0 0; } + .uppy-ProviderBrowser-user:after { + content: '\00B7'; + position: relative; + left: 4px; + } + .uppy-ProviderBrowser-header { z-index: $zIndex-2; border-bottom: 1px solid lighten($color-asphalt-gray, 60%);
0
diff --git a/packages/css/src/types.ts b/packages/css/src/types.ts @@ -114,8 +114,8 @@ export type TCss< T extends IConfig, Props extends { [key: string]: string | number; - } -> = { + }, + CP = { [K in keyof Props]: Props[K] extends TUtility<any, any> ? ReturnType<Props[K]> : ( @@ -123,42 +123,20 @@ export type TCss< ? T["tokens"] extends object ? T["tokens"][ICssPropToToken[K]] extends object ? keyof T["tokens"][ICssPropToToken[K]] - : K extends keyof Props - ? Props[K] - : string - : K extends keyof Props - ? Props[K] - : string - : K extends keyof Props - ? Props[K] - : string, + : Props[K] + : Props[K] + : Props[K], pseudo?: string ) => string; -} & + } +> = CP & { [U in keyof T["utils"]]: T["utils"][U] extends TUtility<infer P, any> ? (...args: P) => string : never; } & { - [S in keyof T["screens"]]: { - [K in keyof AllCssProps]: ( - value: K extends keyof ICssPropToToken - ? T["tokens"] extends object - ? T["tokens"][ICssPropToToken[K]] extends object - ? keyof T["tokens"][ICssPropToToken[K]] - : K extends keyof AllCssProps - ? AllCssProps[K] - : string - : K extends keyof AllCssProps - ? AllCssProps[K] - : string - : K extends keyof AllCssProps - ? AllCssProps[K] - : string, - pseudo?: string - ) => string; - }; + [S in keyof T["screens"]]: CP; } & { compose: (...compositions: string[]) => string; getStyles: () => string;
7
diff --git a/src/parsers/linter/GmlLinter.hx b/src/parsers/linter/GmlLinter.hx @@ -579,7 +579,7 @@ class GmlLinter { } } else if (argc > maxArgs) { if (minArgs == maxArgs) { - addError('Too many arguments for $currName (expected ${doc.maxArgs}, got $argc)'); + addError('Too many arguments for $currName (expected $maxArgs, got $argc)'); } else { addError('Not enough arguments for $currName (expected $minArgs..$maxArgs, got $argc)'); }
1
diff --git a/stories/tour-tooltips.stories.js b/stories/tour-tooltips.stories.js /** - * VisuallyHidden stories. + * TourTooltip stories. * * Site Kit by Google, Copyright 2021 Google LLC * * External dependencies */ import { storiesOf } from '@storybook/react'; +import fetchMock from 'fetch-mock'; /** * Internal dependencies */ +import Data from 'googlesitekit-data'; import Link from '../assets/js/components/Link'; +import Button from '../assets/js/components/Button'; import TourTooltips from '../assets/js/components/TourTooltips'; +import { CORE_USER } from '../assets/js/googlesitekit/datastore/user/constants'; import { WithTestRegistry } from '../tests/js/utils'; +import { CORE_UI } from '../assets/js/googlesitekit/datastore/ui/constants'; +const { useDispatch } = Data; // Create Mock WP Dashboard component to decouple tests to prevent future false negative. const MockWPDashboard = () => ( @@ -329,6 +335,23 @@ const MockWPDashboard = () => ( </div> ); +const TourControls = () => { + const { receiveGetDismissedTours } = useDispatch( CORE_USER ); + const { setValue } = useDispatch( CORE_UI ); + const reset = () => { + receiveGetDismissedTours( [] ); + setValue( 'feature-step', 0 ); + }; + + return ( + <div style={ { textAlign: 'right' } }> + <Button onClick={ reset }> + Reset Dismissed Tours + </Button> + </div> + ); +}; + storiesOf( 'Global', module ) .add( 'TourTooltips', () => { const steps = [ @@ -359,11 +382,23 @@ storiesOf( 'Global', module ) ), }, ]; + fetchMock.post( + /^\/google-site-kit\/v1\/core\/user\/data\/dismiss-tour/, + { body: JSON.stringify( [ 'feature' ] ), status: 200 } + ); + const setupRegistry = ( registry ) => { + registry.dispatch( CORE_USER ).receiveGetDismissedTours( [] ); + }; return ( - <WithTestRegistry> + <WithTestRegistry callback={ setupRegistry }> + <TourControls /> <MockWPDashboard /> - <TourTooltips steps={ steps } tourID="feature" /> + <TourTooltips + steps={ steps } + tourID="feature" + gaEventCategory="storybook" + /> </WithTestRegistry> ); } );
1
diff --git a/packages/app/src/server/service/slack-command-handler/search.js b/packages/app/src/server/service/slack-command-handler/search.js @@ -132,7 +132,10 @@ module.exports = (crowi) => { const actionBlocks = { type: 'actions', - elements: [ + elements: [], + }; + // add "Dismiss" button + actionBlocks.elements.push( { type: 'button', text: { @@ -142,12 +145,11 @@ module.exports = (crowi) => { style: 'danger', action_id: 'search:dismissSearchResults', }, - ], - }; + ); // show "Prev" button if previous page exists // eslint-disable-next-line yoda if (0 < offset) { - actionBlocks.elements.unshift( + actionBlocks.elements.push( { type: 'button', text: { @@ -161,7 +163,7 @@ module.exports = (crowi) => { } // show "Next" button if next page exists if (offset + PAGINGLIMIT < resultsTotal) { - actionBlocks.elements.unshift( + actionBlocks.elements.push( { type: 'button', text: {
7
diff --git a/src/test/main.js b/src/test/main.js @@ -13,7 +13,7 @@ config.hidepassed = true; // load tests and then start -require( [ "tests" ], function() { +require( [ "tests" ], /* istanbul ignore next */ function() { if ( global._noQUnitBridge ) { return; } if ( global._setupQUnitBridge ) { // bridge injected, set it up and start QUnit
8
diff --git a/scenes/street.scn b/scenes/street.scn ] } ] + }, + { + "position": [0, 0, 0], + "quaternion": [0, 0, 0, 1], + "start_url": "../metaverse_modules/scene-preview/", + "components": [ + { + "key": "position", + "value": [0, 0, -300] + }, + { + "key": "quaternion", + "value": [0, 1, 0, 0] + }, + { + "key": "previewPosition", + "value": [0, 0, -150] + }, + { + "key": "sceneUrl", + "value": "./scenes/battalion.scn" + } + ] } ] }
0
diff --git a/app/components/Explorer/Explorer.jsx b/app/components/Explorer/Explorer.jsx import React from "react"; -import {Tabs, Tab} from "../Utility/Tabs"; import Witnesses from "./Witnesses"; import CommitteeMembers from "./CommitteeMembers"; import FeesContainer from "../Blockchain/FeesContainer"; import BlocksContainer from "./BlocksContainer"; import AssetsContainer from "./AssetsContainer"; import AccountsContainer from "./AccountsContainer"; +import counterpart from "counterpart"; import MarketsContainer from "../Exchange/MarketsContainer"; +import {Tabs} from "bitshares-ui-style-guide"; class Explorer extends React.Component { constructor(props) { @@ -61,34 +62,31 @@ class Explorer extends React.Component { } render() { - let {tab} = this.props.match.params; - let defaultActiveTab = this.state.tabs.findIndex(t => t.name === tab); - - let tabs = []; - - for (var i = 0; i < this.state.tabs.length; i++) { - let currentTab = this.state.tabs[i]; - - let TabContent = currentTab.content; - let isLinkTo = defaultActiveTab == i ? "" : currentTab.link; - - tabs.push( - <Tab key={i} title={currentTab.translate} isLinkTo={isLinkTo}> - <TabContent /> - </Tab> - ); - } + const onChange = value => { + this.props.history.push(value); + }; return ( <Tabs - defaultActiveTab={defaultActiveTab} - segmented={false} - setting="explorer-tabs" - className="account-tabs" - tabsClass="account-overview bordered-header content-block" - contentClass="tab-content explorer-tab-content padding" + activeKey={this.props.location.pathname} + animated={false} + style={{display: "table", height: "100%"}} + onChange={onChange} + > + {this.state.tabs.map(tab => { + const TabContent = tab.content; + + return ( + <Tabs.TabPane + key={tab.link} + tab={counterpart.translate(tab.translate)} > - {tabs} + <div className="padding"> + <TabContent /> + </div> + </Tabs.TabPane> + ); + })} </Tabs> ); }
14
diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb <%= csrf_meta_tag -%> </head> <body> - <%= content_for(:js) do %> - <script type="text/javascript"> - var dashboard_notifications = <%= safe_js_object @dashboard_notifications.to_json %>; - </script> - <% end %> - <% if ( ( controller_name != "visualizations" && controller_name != "tables" ) || action_name != "show" ) %> <%= render 'admin/shared/private_header' %>
2
diff --git a/src/model/Component.mjs b/src/model/Component.mjs @@ -112,6 +112,7 @@ class Component extends Base { * * @param {Object|String} key * @param {*} value + * @override overrides the config setter in core.Base */ set(key, value) { let me = this;
12
diff --git a/lib/contracts/deploy_manager.js b/lib/contracts/deploy_manager.js let async = require('async'); +// TODO: remove contractsManager dependency +// * use events +// * in the engine use the instance instead + class DeployManager { constructor(options) { const self = this; @@ -10,7 +14,6 @@ class DeployManager { this.events = options.events; this.plugins = options.plugins; this.blockchain = options.blockchain; - this.chainConfig = (options.trackContracts !== false) ? this.config.chainTracker : false; this.contractsManager = options.contractsManager; this.gasLimit = false; this.fatalErrors = false;
2
diff --git a/contracts/ERC20FeeToken.sol b/contracts/ERC20FeeToken.sol @@ -98,6 +98,7 @@ contract ERC20FeeToken is Owned, SafeFixedMath { symbol = _symbol; totalSupply = initialSupply; balanceOf[initialBeneficiary] = initialSupply; + transferFeeRate = _feeRate; feeAuthority = _feeAuthority; }
12
diff --git a/api/src/workers/rss.js b/api/src/workers/rss.js @@ -37,7 +37,6 @@ rssQueue.process((job, done) => { ParseFeed(job.data.url, function(posts, err) { // log the error if (err) { - logger.error('Problem parsing feed:'); logger.error(err); done(err); return; @@ -58,7 +57,6 @@ rssQueue.process((job, done) => { upsert: false, }, ).catch(err => { - console.log('Failed updating RSS feed isParsing and lastScraped status:'); logger.error(err); }); @@ -114,9 +112,6 @@ rssQueue.process((job, done) => { }) .catch(err => { // error: either adding to algolia, adding to Stream, or adding to OGqueue - continuing on for the time being. - logger.error( - 'Failed adding article to algolia, stream, or og queue:', - ); logger.error(err); cb(null, article); });
13
diff --git a/src/traces/isosurface/convert.js b/src/traces/isosurface/convert.js @@ -409,6 +409,20 @@ function generateIsosurfaceMesh(data) { // for planar surfaces (i.e. caps and slices) due to group shading // bug of gl-mesh3d. But don't worry this would run faster! + var isFirstPass = (min !== vMin || max !== vMax); + + var tryDrawTri = function(debug, xyzv, abc) { + if( + inRange(xyzv[0][3], vMin, vMax) && + inRange(xyzv[1][3], vMin, vMax) && + inRange(xyzv[2][3], vMin, vMax) + ) { + drawTri(debug, xyzv, abc); + } else if(isFirstPass) { + tryCreateTri(xyzv, abc, vMin, vMax, debug); + } + }; + var ok = [ inRange(xyzv[0][3], min, max), inRange(xyzv[1][3], min, max), @@ -423,7 +437,7 @@ function generateIsosurfaceMesh(data) { if(ok[0] && ok[1] && ok[2]) { if(!drawingEdge) { - drawTri(debug, xyzv, abc); + tryDrawTri(debug, xyzv, abc); } return interpolated; } @@ -441,29 +455,8 @@ function generateIsosurfaceMesh(data) { var p1 = calcIntersection(C, A, min, max); var p2 = calcIntersection(C, B, min, max); - var draw1 = true; - var draw2 = true; - var drawA = true; - var drawB = true; - if(drawingEdge) { - if(p1[3] < vMin || p1[3] > vMax) draw1 = false; - if(p2[3] < vMin || p2[3] > vMax) draw2 = false; - if(A[3] < vMin || A[3] > vMax) drawA = false; - if(B[3] < vMin || B[3] > vMax) drawB = false; - } - - if(draw1 && draw2 && drawA && drawB) { - drawTri(debug, [p2, p1, A], [-1, -1, abc[e[0]]]); - drawTri(debug, [A, B, p2], [abc[e[0]], abc[e[1]], -1]); - } else if(draw1 && draw2 && drawA) { - drawTri(debug, [p2, p1, A], [-1, -1, abc[e[0]]]); - } else if(draw1 && draw2 && drawB) { - drawTri(debug, [p1, p2, B], [-1, -1, abc[e[1]]]); - } else if(draw1 && drawA && drawB) { - drawTri(debug, [p1, A, B], [-1, abc[e[0]], abc[e[1]]]); - } else if(draw2 && drawA && drawB) { - drawTri(debug, [p2, A, B], [-1, abc[e[0]], abc[e[1]]]); - } + tryDrawTri(debug, [p2, p1, A], [-1, -1, abc[e[0]]]); + tryDrawTri(debug, [A, B, p2], [abc[e[0]], abc[e[1]], -1]); interpolated = true; } @@ -483,23 +476,12 @@ function generateIsosurfaceMesh(data) { var p1 = calcIntersection(B, A, min, max); var p2 = calcIntersection(C, A, min, max); - var draw1 = true; - var draw2 = true; - var drawA = true; - if(drawingEdge) { - if(p1[3] < vMin || p1[3] > vMax) draw1 = false; - if(p2[3] < vMin || p2[3] > vMax) draw2 = false; - if(A[3] < vMin || A[3] > vMax) drawA = false; - } - - if(draw1 && draw2 && drawA) { - drawTri(debug, [p2, p1, A], [-1, -1, abc[e[0]]]); - } + tryDrawTri(debug, [p2, p1, A], [-1, -1, abc[e[0]]]); interpolated = true; } }); - if(interpolated) return interpolated; + return interpolated; } function tryCreateTetra(abcd, min, max, debug) { @@ -611,7 +593,7 @@ function generateIsosurfaceMesh(data) { interpolated = true; } }); - if(interpolated) return interpolated; + return interpolated; } function addCube(p000, p001, p010, p011, p100, p101, p110, p111, min, max) {
7
diff --git a/articles/protocols/saml/saml-configuration/special-configuration-scenarios/signing-and-encrypting-saml-requests.md b/articles/protocols/saml/saml-configuration/special-configuration-scenarios/signing-and-encrypting-saml-requests.md @@ -60,7 +60,7 @@ Next, you'll need make sure that the SAML assertion is *not* signed (you can sig If Auth0 is the SAML **identity provider**, it can received requests signed with the service provider's private key. Auth0 will then use the service providers' public key/certificate to validate the signature. -To configure signature validation, you'll need to download the service provider's public key and store the value in the `signingCert` key. You can find the `signingCert` field in the [Management Dashboard]({$manage_url}) by going to **Clients** > **Addons** > **SAML2 WEB APP** > **Settings**. +To configure signature validation, you'll need to download the service provider's public key and store the value in the `signingCert` key. You can find the `signingCert` field in the [Management Dashboard](${manage_url}) by going to **Clients** > **Addons** > **SAML2 WEB APP** > **Settings**. ## Receive Signed SAML Authentication Responses
1
diff --git a/test/e2e/delegation.spec.js b/test/e2e/delegation.spec.js @@ -48,7 +48,7 @@ module.exports = { async () => { browser.click("#from") browser.click("#from option[value='1']") - browser.pause(500) + browser.pause(1000) browser.setValue("#amount", value) }, // expected subtotal
7
diff --git a/docs/reference.rst b/docs/reference.rst @@ -818,22 +818,18 @@ For example, the command below runs ``my_flow.tag`` without showing the web brow tagui my_flow.tag -headless -report - -deploy or -d ******************** Deploys a flow, creating a shortcut which can be double-clicked to run the flow. If the flow file is moved, a new shortcut must be created. The flow will be run with all the options used when creating the shortcut. - -headless or -h ******************** Runs the flow with an invisible Chrome web browser (does not work for visual automation). - -nobrowser or -n ******************** Runs without any web browser, for example to perform automation only with visual automation. - -report or -r ******************** Tracks flow run result in ``tagui/src/tagui_report.csv`` and saves html logs of flows execution. @@ -854,11 +850,20 @@ my_datatable.csv ******************** Uses the specified csv file as the datatable for batch automation. See :ref:`datatables <datatables>`. - input(s) ******************** Add your own parameter(s) to be used in your automation flow as variables p1 to p8. +For example, from the command prompt, below line runs ``register_class_attendence.tag`` workflow using Microsoft Edge browser and with various student names as inputs. :: + + tagui register_class_attendence.tag -edge Jenny Jason John Joanne + +Inside the workflow, the variables ``p1``, ``p2``, ``p3``, ``p4`` become available for use as part of the automation, for example filling up the student names into a web form to record their attendence. The following lines in the workflow will output the various student names given as inputs. :: + + echo `p1` + echo `p2` + echo `p3` + echo `p4` See :doc:`other deprecated options </dep_options>`.
7
diff --git a/test/github-package.test.js b/test/github-package.test.js @@ -768,19 +768,61 @@ describe('GithubPackage', function() { await githubPackage.scheduleActiveContextUpdate(); }); - it('uses an active repository', async function() { - await assert.async.isTrue(githubPackage.getActiveRepository().isPresent()); + it('uses a repository', async function() { + await assert.async.isOk(githubPackage.getActiveRepository()); }); }); }); - /*describe('when there is a change in the repository', function() { + describe('when there is a change in the repository', function() { + let atomEnv, githubPackage; + let workspace, project, commands, notificationManager; + let tooltips, deserializers, config, keymaps, styles; + let grammars, confirm, configDirPath, getLoadSettings; + let renderFn, contextPool, currentWindow; + let useLegacyPanels; + + // Build Atom Environment and create the GitHub Package + beforeEach(async function() { + atomEnv = global.buildAtomEnvironment(); + await disableFilesystemWatchers(atomEnv); + + workspace = atomEnv.workspace; + project = atomEnv.project; + commands = atomEnv.commands; + deserializers = atomEnv.deserializers; + notificationManager = atomEnv.notifications; + tooltips = atomEnv.tooltips; + config = atomEnv.config; + keymaps = atomEnv.keymaps; + confirm = atomEnv.confirm.bind(atomEnv); + styles = atomEnv.styles; + grammars = atomEnv.grammars; + getLoadSettings = atomEnv.getLoadSettings.bind(atomEnv); + currentWindow = atomEnv.getCurrentWindow(); + configDirPath = path.join(__dirname, 'fixtures', 'atomenv-config'); + renderFn = sinon.stub().callsFake((component, element, callback) => { + if (callback) { + process.nextTick(callback); + } + }); + + useLegacyPanels = !workspace.getLeftDock; + + githubPackage = new GithubPackage({ + workspace, project, commands, notificationManager, tooltips, + styles, grammars, keymaps, config, deserializers, confirm, + getLoadSettings, currentWindow, configDirPath, renderFn, + }); + + contextPool = githubPackage.getContextPool(); + }); + let workdirPath1, atomGitRepository1, repository1; let workdirPath2, atomGitRepository2, repository2; + // Setup file system. beforeEach(async function() { - this.retries(5); // FLAKE - [workdirPath1, workdirPath2] = await Promise.all([ cloneRepository('three-files'), cloneRepository('three-files'),
4
diff --git a/examples/component/index.js b/examples/component/index.js @@ -17,6 +17,7 @@ class Example extends React.Component { filter: false, customBodyRender: (value, tableMeta, updateValue) => ( <FormControlLabel + label="" value={value} control={<TextField value={value} />} onChange={event => updateValue(event.target.value)} @@ -51,6 +52,7 @@ class Example extends React.Component { filter: false, customBodyRender: (value, tableMeta, updateValue) => ( <FormControlLabel + label="" control={<TextField value={value || ''} type='number' />} onChange={event => updateValue(event.target.value)} />
0
diff --git a/packages/components/stencil.config.js b/packages/components/stencil.config.js @@ -5,7 +5,12 @@ exports.config = { namespace: 'airship', outputTargets:[ { type: 'dist' }, - { type: 'www', serviceWorker: false } + { + type: 'www', + serviceWorker: false, + empty: false, + dir: path.join(__dirname, '../../www') + } ], plugins: [ sass({
12
diff --git a/server/db/DBManager.js b/server/db/DBManager.js -var MongoClient = require('mongodb').MongoClient -var ObjectID = require('mongodb').ObjectID +var MongoClient = require('mongodb').MongoClient; +var ObjectID = require('mongodb').ObjectID; const config = require('../../config.json'); - -var mongoURL = config.MONGODB_URL; +const { getMongoUrl } = require('../utils/configHelper'); +var mongoURL = getMongoUrl(); var RECORDING_COLLECTION = 'recordings'; var TRACKER_COLLECTION = 'tracker'; @@ -11,41 +11,41 @@ var APP_COLLECTION = 'app'; class DBManager { constructor() { - this.db = null + this.db = null; } init() { return new Promise((resolve, reject) => { MongoClient.connect(mongoURL, { useNewUrlParser: true, useUnifiedTopology: true }, (err, client) => { if (err) { - reject(err) + reject(err); } else { - let db = client.db('opendatacam') - this.db = db + let db = client.db('opendatacam'); + this.db = db; // Get the collection - const recordingCollection = db.collection(RECORDING_COLLECTION) + const recordingCollection = db.collection(RECORDING_COLLECTION); // Create the index - recordingCollection.createIndex({ dateStart: -1 }) + recordingCollection.createIndex({ dateStart: -1 }); - const trackerCollection = db.collection(TRACKER_COLLECTION) + const trackerCollection = db.collection(TRACKER_COLLECTION); // Create the index - trackerCollection.createIndex({ recordingId : 1}) + trackerCollection.createIndex({ recordingId: 1 }); - resolve(db) + resolve(db); } - }) - }) + }); + }); } getDB() { return new Promise((resolve, reject) => { if (this.db) { - resolve(this.db) + resolve(this.db); } else { - resolve(this.init()) + resolve(this.init()); } - }) + }); } persistAppSettings(settings) { @@ -60,13 +60,13 @@ class DBManager { } }, { upsert: true }, (err, r) => { if (err) { - reject(err) + reject(err); } else { - resolve(r) + resolve(r); } - }) - }) - }) + }); + }); + }); } getAppSettings() { @@ -78,14 +78,14 @@ class DBManager { { id: 'settings' }, (err, doc) => { if (err) { - reject(err) + reject(err); } else { - resolve(doc) + resolve(doc); } } - ) - }) - }) + ); + }); + }); } insertRecording(recording) { @@ -93,13 +93,13 @@ class DBManager { this.getDB().then(db => { db.collection(RECORDING_COLLECTION).insertOne(recording, (err, r) => { if (err) { - reject(err) + reject(err); } else { - resolve(r) + resolve(r); } - }) - }) - }) + }); + }); + }); } deleteRecording(recordingId) { @@ -107,13 +107,13 @@ class DBManager { this.getDB().then(db => { db.collection(RECORDING_COLLECTION).remove({ _id: ObjectID(recordingId) }, (err, r) => { if (err) { - reject(err) + reject(err); } else { - resolve(r) + resolve(r); } - }) - }) - }) + }); + }); + }); } // TODO For larges array like the one we are using, we can't do that, perfs are terrible @@ -142,15 +142,15 @@ class DBManager { trackerSummary: trackerSummary } // Only add $push if we have a counted item - } + }; - let itemsToAdd = {} + let itemsToAdd = {}; // Add counterHistory when somethings counted if (counterEntry.length > 0) { itemsToAdd['counterHistory'] = { $each: counterEntry - } + }; updateRequest['$push'] = itemsToAdd; } @@ -160,16 +160,16 @@ class DBManager { updateRequest, (err, r) => { if (err) { - reject(err) + reject(err); } else { - resolve(r) + resolve(r); } } - ) + ); - db.collection(TRACKER_COLLECTION).insertOne(trackerEntry) - }) - }) + db.collection(TRACKER_COLLECTION).insertOne(trackerEntry); + }); + }); } getRecordings(limit = 30, offset = 0) { @@ -184,13 +184,13 @@ class DBManager { .skip(offset) .toArray(function (err, docs) { if (err) { - reject(err) + reject(err); } else { - resolve(docs) + resolve(docs); } - }) - }) - }) + }); + }); + }); } getRecording(recordingId) { @@ -203,14 +203,14 @@ class DBManager { { projection: { counterHistory: 0, areas: 0 } }, (err, doc) => { if (err) { - reject(err) + reject(err); } else { - resolve(doc) + resolve(doc); } } - ) - }) - }) + ); + }); + }); } getRecordingsCount() { @@ -220,13 +220,13 @@ class DBManager { .collection(RECORDING_COLLECTION) .countDocuments({}, (err, res) => { if (err) { - reject(err) + reject(err); } else { - resolve(res) + resolve(res); } }); - }) - }) + }); + }); } getTrackerHistoryOfRecording(recordingId) { @@ -239,13 +239,13 @@ class DBManager { ) .toArray(function (err, docs) { if (err) { - reject(err) + reject(err); } else { - resolve(docs) + resolve(docs); } - }) }); - }) + }); + }); } getCounterHistoryOfRecording(recordingId) { @@ -258,21 +258,21 @@ class DBManager { ) .toArray(function (err, docs) { if (err) { - reject(err) + reject(err); } else { if (docs.length === 0) { resolve({}); } else { - resolve(docs[0]) + resolve(docs[0]); } } - }) }); - }) + }); + }); } } -var DBManagerInstance = new DBManager() +var DBManagerInstance = new DBManager(); -module.exports = DBManagerInstance +module.exports = DBManagerInstance;
4
diff --git a/static/css/styles.css b/static/css/styles.css @@ -604,9 +604,11 @@ ul.bulleted li ul { padding: 6px 20px; background-color: #fff; font-size: 1.3rem; - line-height: 1.3rem; + line-height: 1.5rem; text-align: center; color: #667a7d; + white-space:normal !important; + word-wrap: break-word; } .btn:hover,
11
diff --git a/src/samples/p2p/peercall.html b/src/samples/p2p/peercall.html @@ -179,7 +179,9 @@ ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. $('#local').children('video').get(0).srcObject = ScreenStream.mediaStream; p2p.publish(getTargetId(), ScreenStream).then(publication=>{ publicationForScreen = publication; - }); + }), error => { + console.log('Failed to share screen.'); + }; }, err=>{ console.error('Failed to create MediaStream, '+ err); }); @@ -201,6 +203,8 @@ ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. if (localStream) { p2p.publish(getTargetId(), localStream).then(publication=>{ publicationForCamera = publication; + }, error => { + console.log('Failed to share video.'); }); // Publish local stream to remote client } else { const audioConstraintsForMic = new Oms.Base.AudioTrackConstraints(Oms.Base.AudioSourceInfo.MIC); @@ -212,6 +216,8 @@ ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. $('#local').children('video').get(0).srcObject = localStream.mediaStream; p2p.publish(getTargetId(), localStream).then(publication=>{ publicationForCamera = publication; + }, error => { + console.log('Failed to share video.'); }); }, err=>{ console.error('Failed to create MediaStream, '+err); @@ -229,6 +235,8 @@ ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. token: $('#uid').val() }).then(()=>{ $('#uid').prop('disabled', true); + }, error => { + console.log('Failed to connect to the signaling server.'); }); // Connect to signaling server. });
9
diff --git a/src/components/Text.test.js b/src/components/Text.test.js // @flow import React from "react"; +import { PixelRatio } from "react-native"; import { shallow } from "enzyme"; import Markdown from "react-native-easy-markdown"; -import Text from "./Text"; +import Text, { cap } from "./Text"; import { lightNavyBlueColor } from "../constants/colors"; +let getFontScaleSpy; +beforeEach(() => { + getFontScaleSpy = jest.spyOn(PixelRatio, "getFontScale"); +}); + it("renders correctly", () => { const output = shallow(<Text>Some text</Text>); expect(output).toMatchSnapshot(); @@ -29,7 +35,6 @@ it("does not render markdown images", () => { <Text markdown>![Test](https://placehold.it/320x320.png)</Text> ); const markdown = output.find(Markdown).shallow(); - console.log(markdown); expect(markdown).toMatchSnapshot(); }); @@ -46,3 +51,29 @@ it("renders text in blue when color is set", () => { expect(output.props().style).toContainEqual(style); }); + +describe("cap", () => { + it(`creates rendered font size of 6 for input (12, 14) and font scale 0.5`, () => { + getFontScaleSpy.mockReturnValue(0.5); + expect(cap(12, 14) * 0.5).toBe(6); + }); + + it(`creates rendered font size of 12 for input (12, 14) and font scale 1`, () => { + getFontScaleSpy.mockReturnValue(1); + expect(cap(12, 14) * 1).toBe(12); + }); + + it(`creates rendered font size of 13.2 for input (12, 14) and font scale 1.1`, () => { + getFontScaleSpy.mockReturnValue(1.1); + expect(cap(12, 14) * 1.1).toBeCloseTo(13.2, 5); + }); + + it(`creates rendered font size of 14 for input (12, 14) and font scale 1.5`, () => { + getFontScaleSpy.mockReturnValue(1.5); + expect(cap(12, 14) * 1.5).toBe(14); + }); +}); + +afterEach(() => { + getFontScaleSpy.mockRestore(); +});
0
diff --git a/src/drivers/listeners.js b/src/drivers/listeners.js @@ -153,9 +153,9 @@ export function addRequestListener({ name, win, domain } : { name : string, win if (existingListener) { if (win && domain) { - throw new Error(`Request listener already exists for ${name} on domain ${domain.toString()} for specified window`); + throw new Error(`Request listener already exists for ${name} on domain ${domain.toString()} for ${win === global.WINDOW_WILDCARD ? 'wildcard' : 'specified' } window`); } else if (win) { - throw new Error(`Request listener already exists for ${name} for specified window`); + throw new Error(`Request listener already exists for ${name} for ${win === global.WINDOW_WILDCARD ? 'wildcard' : 'specified' } window`); } else if (domain) { throw new Error(`Request listener already exists for ${name} on domain ${domain.toString()}`); } else {
7
diff --git a/src/transitions/Collapse.spec.js b/src/transitions/Collapse.spec.js import React from 'react'; import { assert } from 'chai'; -import { spy } from 'sinon'; +import { spy, stub } from 'sinon'; import { createShallow } from 'src/test-utils'; import Collapse, { styleSheet } from './Collapse'; @@ -145,6 +145,76 @@ describe('<Collapse />', () => { it('should set height to the 0', () => { assert.strictEqual(element.style.height, '0px', 'should have 0px height'); }); + + it('should call onExiting', () => { + const onExitingStub = spy(); + wrapper.setProps({ onExiting: onExitingStub }); + instance = wrapper.instance(); + instance.handleExiting(element); + + assert.strictEqual(onExitingStub.callCount, 1); + assert.strictEqual(onExitingStub.calledWith(element), true); + }); + + describe('transitionDuration', () => { + let styleManagerMock; + let transitionDurationMock; + + before(() => { + styleManagerMock = wrapper.context('styleManager'); + styleManagerMock.theme.transitions.getAutoHeightDuration = stub().returns('woof'); + wrapper.setContext({ styleManager: styleManagerMock }); + wrapper.setProps({ transitionDuration: 'auto' }); + instance = wrapper.instance(); + }); + + it('no wrapper', () => { + instance.wrapper = false; + instance.handleExiting(element); + assert.strictEqual( + element.style.transitionDuration, + `${styleManagerMock.theme.transitions.getAutoHeightDuration(0)}ms`, + ); + }); + + it('has wrapper', () => { + const clientHeightMock = 10; + instance.wrapper = { clientHeight: clientHeightMock }; + instance.handleExiting(element); + assert.strictEqual( + element.style.transitionDuration, + `${styleManagerMock.theme.transitions.getAutoHeightDuration(clientHeightMock)}ms`, + ); + }); + + it('number should set transitionDuration to ms', () => { + transitionDurationMock = 3; + wrapper.setProps({ transitionDuration: transitionDurationMock }); + instance = wrapper.instance(); + instance.handleExiting(element); + + assert.strictEqual(element.style.transitionDuration, `${transitionDurationMock}ms`); + }); + + it('string should set transitionDuration to string', () => { + transitionDurationMock = 'woof'; + wrapper.setProps({ transitionDuration: transitionDurationMock }); + instance = wrapper.instance(); + instance.handleExiting(element); + + assert.strictEqual(element.style.transitionDuration, transitionDurationMock); + }); + + it('nothing should not set transitionDuration', () => { + const elementBackup = element; + wrapper.setProps({ transitionDuration: undefined }); + instance = wrapper.instance(); + instance.handleExiting(element); + + assert.strictEqual( + element.style.transitionDuration, elementBackup.style.transitionDuration); + }); + }); }); }); });
0
diff --git a/skills/leon/color/nlu/en.json b/skills/leon/color/nlu/en.json "answers": [ "Where I live it is all black, but I believe I tend to have a preference for %blue_leon% and %pink_leon%. Do not ask why...", "Sometimes %blue_leon%, sometimes %pink_leon%.", - "{{ color }} is great! But I prefer that one.", + "{{ color }} is great! But I prefer blue and pink.", "I think {{ color }} is a good color, but I prefer blue and pink. Don't ask me why..." ] },
1
diff --git a/src/app.js b/src/app.js @@ -458,7 +458,7 @@ async function main(){ calculated.views = _.pick(await db .collection('profileViews') - .findOne({ uuid: hypixelPlayer.uuid, profile_id: profileId }), + .findOne({ uuid: hypixelPlayer.uuid }), 'total', 'daily', 'weekly'); res.render('stats', { items, calculated, _, constants, helper, extra: await getExtra(), page: 'stats' });
8
diff --git a/lib/transports/elasticsearch.js b/lib/transports/elasticsearch.js @@ -440,6 +440,10 @@ elasticsearch.prototype.setData = function (data, limit, offset, callback) { data.forEach(function (elem) { var actionMeta = { index: {} } // use type from base otherwise fallback to elem + + if (!self.base.index) { + actionMeta.index._index = elem._index + } actionMeta.index._type = self.base.type || elem._type actionMeta.index._id = elem._id
4
diff --git a/includes/Context.php b/includes/Context.php @@ -169,8 +169,8 @@ final class Context { * @return string|false The reference permalink URL or false if post does not exist. */ public function get_reference_permalink( $post = 0 ) { - $reference_site_url = untrailingslashit( $this->get_reference_site_url() ); - $orig_site_url = untrailingslashit( home_url() ); + $reference_site_url = $this->get_reference_site_url(); + $orig_site_url = home_url(); // Gets post object. On front area we need to use get_queried_object to get the current post object. if ( ! $post ) {
2
diff --git a/api/controllers/invites.ts b/api/controllers/invites.ts @@ -87,7 +87,8 @@ const createInvite = async (req, res) => { welcomeMessage: inviteCreated.message, contactId: contact.id, status: inviteCreated.invite_status, - inviteString: inviteCreated.pin + inviteString: inviteCreated.pin, + invoice: inviteCreated.invoice, }) let contactJson = jsonUtils.contactToJson(contact) if (invite) {
0
diff --git a/src/API.js b/src/API.js @@ -156,8 +156,22 @@ var refreshToken = function(baseURL, refreshToken) { }); } +const ERROR_NOT_COMPATIBLE = { + message: 'Not a CoopCycle server' +} + +const ERROR_INVALID_HOSTNAME = { + message: 'Hostname is not valid' +} + const resolveBaseURL = function(server) { return new Promise((resolve, reject) => { + + if (server.trim().length === 0) { + reject(ERROR_INVALID_HOSTNAME) + return + } + if (!server.startsWith('http://') && !server.startsWith('https://')) { try { return fetch('https://' + server, { timeout: 3000 }) @@ -171,10 +185,6 @@ const resolveBaseURL = function(server) { }); } -const ERROR_NOT_COMPATIBLE = { - message: 'Not a CoopCycle server' -} - const checkServer = function(server) { return new Promise((resolve, reject) => { resolveBaseURL(server) @@ -225,7 +235,8 @@ const checkServer = function(server) { }) .catch((err) => reject(err)); - }); + }) + .catch(err => reject(err)) }); }
7
diff --git a/test/integration/hook.csrf.test.js b/test/integration/hook.csrf.test.js @@ -127,7 +127,7 @@ describe('CSRF ::', function() { if (err && err.status === 403) { return done(); } - done(new Error('Expected a 403 error, instead got: ' + err || response.body)); + done(new Error('Expected a 403 error, instead got: ' + (err || response.body))); }); @@ -211,7 +211,7 @@ describe('CSRF ::', function() { if (err && err.status === 403) { return done(); } - done(new Error('Expected a 403 error, instead got: ' + err || response.body)); + done(new Error('Expected a 403 error, instead got: ' + (err || response.body))); }); }); @@ -220,7 +220,7 @@ describe('CSRF ::', function() { if (err && err.status === 403) { return done(); } - done(new Error('Expected a 403 error, instead got: ' + err || response.body)); + done(new Error('Expected a 403 error, instead got: ' + (err || response.body))); }); }); @@ -229,7 +229,7 @@ describe('CSRF ::', function() { if (err && err.status === 403) { return done(); } - done(new Error('Expected a 403 error, instead got: ' + err || response.body)); + done(new Error('Expected a 403 error, instead got: ' + (err || response.body))); }); }); @@ -265,7 +265,7 @@ describe('CSRF ::', function() { if (err && err.status === 403) { return done(); } - done(new Error('Expected a 403 error, instead got: ' + err || response.body)); + done(new Error('Expected a 403 error, instead got: ' + (err || response.body))); }); }); @@ -274,7 +274,7 @@ describe('CSRF ::', function() { if (err && err.status === 403) { return done(); } - done(new Error('Expected a 403 error, instead got: ' + err || response.body)); + done(new Error('Expected a 403 error, instead got: ' + (err || response.body))); }); }); @@ -283,7 +283,7 @@ describe('CSRF ::', function() { if (err && err.status === 403) { return done(); } - done(new Error('Expected a 403 error, instead got: ' + err || response.body)); + done(new Error('Expected a 403 error, instead got: ' + (err || response.body))); }); }); @@ -309,7 +309,7 @@ describe('CSRF ::', function() { if (err && err.status === 403) { return done(); } - done(new Error('Expected a 403 error, instead got: ' + err || response.body)); + done(new Error('Expected a 403 error, instead got: ' + (err || response.body))); }); });
1
diff --git a/articles/client-auth/current/mobile-desktop.md b/articles/client-auth/current/mobile-desktop.md @@ -125,7 +125,7 @@ Using the authorization code obtained in step 2, you can obtain the ID token by ], "postData": { "mimeType": "application/json", - "text": "{\"grant_type\":\"authorization_code\",\"client_id\": \"${account.clientId}\",\"code_verifier\": \"YOUR_GENERATED_CODE_VERIFIER\",\"code\": \"YOUR_AUTHORIZATION_CODE\",\"redirect_uri\": \"https://${account.namespace}/mobile\", }" + "text": "{\"grant_type\":\"authorization_code\",\"client_id\": \"${account.clientId}\",\"code_verifier\": \"YOUR_GENERATED_CODE_VERIFIER\",\"code\": \"YOUR_AUTHORIZATION_CODE\",\"redirect_uri\": \"https://${account.namespace}/mobile\" }" } } ```
2
diff --git a/userscript.user.js b/userscript.user.js @@ -65963,7 +65963,23 @@ var $$IMU_EXPORT$$; // https://storage.mantan-web.jp/images/2018/01/16/20180116dog00m200019000c/002_size10.jpg // https://storage.mantan-web.jp/images/2017/02/25/20170225dog00m200018000c/001_thumb2.jpg // https://storage.mantan-web.jp/images/2017/02/25/20170225dog00m200018000c/001_size10.jpg - return src.replace(/(\/[^/]*)_(?:size[0-9]*|thumb[0-9]*)(\.[^/.]*)(?:[?#].*)?$/, "$1_size10$2"); + // thanks to nimbuz on discord: + // https://mantan-web.jp/article/20210613dog00m200016000c.html + // https://storage.mantan-web.jp/images/2021/06/13/20210613dog00m200016000c/001_size6.jpg + // https://storage.mantan-web.jp/images/2021/06/13/20210613dog00m200016000c/001_size8.jpg -- size10 doesn't exist + // https://mantan-web.jp/article/20201002dog00m200077000c.html + // https://storage.mantan-web.jp/images/2021/06/11/20210611dog00m200000000c/003_size4.jpg + // https://storage.mantan-web.jp/images/2021/06/11/20210611dog00m200000000c/003_size6.jpg + regex = /(\/[^/]*)_(?:size[0-9]*|thumb[0-9]*)(\.[^/.]*)(?:[?#].*)?$/; + if (regex.test(src)) { + return replace_sizes(src, [ + src.replace(regex, "$1_size10$2"), + src.replace(regex, "$1_size9$2"), + src.replace(regex, "$1_size8$2"), + src.replace(regex, "$1_size7$2"), + src.replace(regex, "$1_size6$2") + ]); + } } if (domain_nowww === "cinra.net") {
7
diff --git a/data.js b/data.js @@ -14,6 +14,14 @@ module.exports = [{ url: "https://github.com/wisniewski94/sprites.js", source: "https://raw.githubusercontent.com/wisniewski94/sprites.js/master/sprites.js" }, + { + name: "ShadowQuery", + github: "schrotie/shadow-query", + tags: ["web-components"], + description: "Micro-library for writing vanilla web components", + url: "https://github.com/schrotie/shadow-query", + source: "https://raw.githubusercontent.com/schrotie/shadow-query/master/shadowQuery.mjs" + }, { name: "VP PubSub", github: "schubergphilis/vp-pubsub",
0
diff --git a/website/editor/src/components/ComponentGeneratorComponent.vue b/website/editor/src/components/ComponentGeneratorComponent.vue </template> <script> -import {xml2js} from "xml-js" +import {js2xml, xml2js} from "xml-js" import CorpusComponent from "@/components/CorpusComponent" import corpusMixin from "@/shared-resources/mixins/corpusMixin" @@ -331,7 +331,10 @@ export default { return elementData }, handleChildUpdate(data) { - let content = Object.assign({}, this.content) + let content = this.createDeepCopy(this.content) + if (content.elements) { + content = content.elements[0] + } if (data.isAttribute) { content.attributes = {...content.attributes, ...data.content} this.$emit("input", {content: content}) @@ -473,6 +476,10 @@ export default { return element.attributes.doctype } return element.name + }, + createDeepCopy(content) { + let xml = js2xml({elements: [content]}, this.state.xml2jsConfig) + return xml2js(xml, this.state.xml2jsConfig) } } }
1
diff --git a/src/electron.js b/src/electron.js @@ -2350,12 +2350,10 @@ function createTray() { function setTrayMenu() { if (tray === null) return false; - let willShowPausableItems = (settings.detectIdleTimeEnabled || settings.adjustmentTimes.length ? true : false) - const contextMenu = Menu.buildFromTemplate([ getTimeAdjustmentsMenuItem(), getDetectIdleMenuItem(), - { type: 'separator', visible: (willShowPausableItems) }, + getPausableSeparatorMenuItem(), { label: T.t("GENERIC_REFRESH_DISPLAYS"), type: 'normal', click: () => refreshMonitors(true, true) }, { label: T.t("GENERIC_SETTINGS"), type: 'normal', click: createSettings }, { type: 'separator' }, @@ -2365,6 +2363,13 @@ function setTrayMenu() { tray.setContextMenu(contextMenu) } +function getPausableSeparatorMenuItem() { + if(settings.detectIdleTimeEnabled || settings.adjustmentTimes.length > 0) { + return { type: 'separator' } + } + return { label: "", visible: false } +} + function getTimeAdjustmentsMenuItem() { if(settings.adjustmentTimes?.length) { return { label: T.t("GENERIC_PAUSE_TOD"), type: 'checkbox', click: (e) => tempSettings.pauseTimeAdjustments = e.checked }
1
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md @@ -123,25 +123,21 @@ If you want to run simultaneously the application and the specs generation follo The development of Builder specs is separated from regular development. This means that you can develop new specs or modify the existing ones without having the whole application running. This speeds up the development task. -Another feature of Builder specs is that we only generate the affected ones by default. That means that we check the current branch changes against `master` branch and only build those specs that are affected by those changes. This way, we pass only the needed subset of specs. - To start specs development type the next command: ```bash -grunt test:browser +grunt test:browser:builder ``` -After building the whole suite for the first time, a webpage will show up with a link to the Jasmine page with all the specs. This suite is at `http://localhost:8088/_SpecRunner-affected.html` - -Then, the process will watch changes in the codebase and will regenerate the specs as needed. Just refresh the Jasmine page to pass again the tests. - -If you prefer to generate all specs anyway, you can pass a flag to the grunt task: +You can optionally provide an argument to grunt to filter what specs will be generated, like this: ```bash -grunt test:browser --specs=all +grunt test:browser:builder --match=dropdown ``` -This will generate the whole Builder suite, not only the specs affected by the current branch. +After building the whole suite for the first time, a web server will be started on port 8088 and the spec runner webpage will show up. If you need to use a different port, change the port & URL values on the [connect task](lib/build/tasks/connect.js) + +The process will watch changes in the codebase and will regenerate the specs as needed. Just refresh the Jasmine page to pass again the tests. **Run specs and regular codebase simultaneously** @@ -149,11 +145,9 @@ If you want to run simultaneously the application and the specs generation follo 1. Open a terminal with Node v6.9.2 (use nvm) and run `grunt dev`. This will build the application assets and will watch for changes. -2. Open a second terminal and run `grunt test:browser`. - -3. You will see in the first terminal that a lot of changes build the bundle again. That's normal. The first step of the point 3 is to copy all needed files, so the `watch` of `grunt dev` triggers. Don't worry about it. +2. Open a second terminal and run `grunt test:browser:builder`. -4. That's it. When you change any Builder Javascript file `grunt dev` will build the application bundle and `grunt test:browser` will build the specs. +3. That's it. When you change any Builder Javascript file `grunt dev` will build the application bundle and `grunt test:browser` will build the specs. #### Running a particular spec
3
diff --git a/config/canonical.json b/config/canonical.json "shop": "hairdresser" } }, - "shop/hairdresser|The Barber Shop": { - "count": 193, - "tags": { - "brand": "The Barber Shop", - "name": "The Barber Shop", - "shop": "hairdresser" - } - }, "shop/hairdresser|Toni & Guy": { "count": 95, "tags": {
7
diff --git a/assets/js/components/dashboard-sharing/UserRoleSelect.js b/assets/js/components/dashboard-sharing/UserRoleSelect.js @@ -28,7 +28,7 @@ import { Chip, ChipCheckmark } from '@material/react-chips'; */ import { __ } from '@wordpress/i18n'; import { ESCAPE, ENTER } from '@wordpress/keycodes'; -import { useCallback, useRef, forwardRef } from '@wordpress/element'; +import { useCallback, useRef, forwardRef, Fragment } from '@wordpress/element'; /** * Internal dependencies @@ -166,24 +166,16 @@ const UserRoleSelect = forwardRef( 'googlesitekit-user-role-select--open': editMode, } ) } > + { ! editMode && ( <Button - aria-label={ - editMode - ? __( 'Close', 'google-site-kit' ) - : __( 'Edit roles', 'google-site-kit' ) - } + aria-label={ __( 'Edit roles', 'google-site-kit' ) } className="googlesitekit-user-role-select__button" onClick={ toggleEditMode } - icon={ - editMode ? ( - <CloseIcon width={ 18 } height={ 18 } /> - ) : ( - <ShareIcon width={ 23 } height={ 23 } /> - ) - } + icon={ <ShareIcon width={ 23 } height={ 23 } /> } tabIndex={ isLocked ? -1 : undefined } ref={ roleSelectButtonRef } /> + ) } { ! editMode && sharedRoles?.length > 0 && ( <span className="googlesitekit-user-role-select__current-roles"> @@ -210,6 +202,7 @@ const UserRoleSelect = forwardRef( ) } { editMode && ( + <Fragment> <div className="googlesitekit-user-role-select__chipset"> <Chip chipCheckmark={ <ChipCheckmark /> } @@ -219,7 +212,8 @@ const UserRoleSelect = forwardRef( onClick={ toggleChip } onKeyUp={ toggleChip } selected={ - sharedRoles?.length === shareableRoles?.length + sharedRoles?.length === + shareableRoles?.length } className="googlesitekit-user-role-select__chip googlesitekit-user-role-select__chip--all" /> @@ -240,6 +234,15 @@ const UserRoleSelect = forwardRef( ) ) } </div> + <Button + aria-label={ __( 'Close', 'google-site-kit' ) } + className="googlesitekit-user-role-select__button" + onClick={ toggleEditMode } + icon={ <CloseIcon width={ 18 } height={ 18 } /> } + tabIndex={ isLocked ? -1 : undefined } + ref={ roleSelectButtonRef } + /> + </Fragment> ) } </div> );
5
diff --git a/magda-web-client/src/Components/RecordHandler.js b/magda-web-client/src/Components/RecordHandler.js @@ -90,8 +90,7 @@ class RecordHandler extends React.Component { const datasetTabs = [ {id: 'details', name: 'Details', isActive: true}, {id: 'discussion', name: 'Discussion', isActive: !config.disableAuthenticationFeatures}, - {id: 'publisher', name: 'About ' + publisherName, isActive: publisherId}, - {id: 'visualisation', name: 'Visualization', isActive: true} + {id: 'publisher', name: 'About ' + publisherName, isActive: publisherId} ]; return ( <div>
13
diff --git a/packages/app/src/components/Me/ApiSettings.tsx b/packages/app/src/components/Me/ApiSettings.tsx @@ -10,13 +10,13 @@ import { usePersonalSettingsInfo } from '~/stores/personal-settings'; const ApiSettings = (): JSX.Element => { const { t } = useTranslation(); - const { data: personalSettingsInfoData, mutate } = usePersonalSettingsInfo(); + const { data: personalSettingsInfoData, mutate: mutatePersonalSettingsInfo } = usePersonalSettingsInfo(); const submitHandler = async() => { try { const result = await apiv3Put('/personal-setting/api-token'); - mutate(result.data.userData); + mutatePersonalSettingsInfo(result.data.userData); toastSuccess(t('toaster.update_successed', { target: t('page_me_apitoken.api_token') })); }
10
diff --git a/OurUmbraco/Project/ProjectExtensions.cs b/OurUmbraco/Project/ProjectExtensions.cs @@ -42,6 +42,7 @@ namespace OurUmbraco.Project if (uVersion != null) { version = uVersion.Name.Replace(".x", ""); + version = version.Replace("Version", ""); } else {
2
diff --git a/token-metadata/0x38c4102D11893351cED7eF187fCF43D33eb1aBE6/metadata.json b/token-metadata/0x38c4102D11893351cED7eF187fCF43D33eb1aBE6/metadata.json "symbol": "SHRIMP", "address": "0x38c4102D11893351cED7eF187fCF43D33eb1aBE6", "decimals": 18, - "dharmaVerificationStatus": { "dharmaVerificationStatus": "VERIFIED" } \ No newline at end of file -} \ No newline at end of file
3
diff --git a/static/scss/partials/_wallets.scss b/static/scss/partials/_wallets.scss &-white { background: transparent; - @at-root .wallets { - &--icon { - margin-right: 0; - padding-left: rem(20px); - } - } - &::before { @extend %wallet-icon--before; &-white { background: transparent; - @at-root .wallets { - &--icon { - margin-right: 0; - padding-left: rem(20px); - } - } - &::before { @extend %wallet-icon--before; &-white { background: transparent; - @at-root .wallets { - &--icon { - margin-right: 0; - padding-left: rem(20px); - } - } - &::before { @extend %wallet-icon--before; &-white { background: transparent; - @at-root .wallets { - &--icon { - margin-right: 0; - padding-left: rem(20px); - } - } - &::before { @extend %wallet-icon--before;
7
diff --git a/src/main/groovy/streama/ResultHelper.groovy b/src/main/groovy/streama/ResultHelper.groovy package streama import org.apache.commons.logging.LogFactory +import static javax.servlet.http.HttpServletResponse.SC_OK class ResultHelper { @@ -16,7 +17,7 @@ class ResultHelper { ] } - public static Map generateOkResult(statusCode, data){ + public static Map generateOkResult(statusCode = SC_OK, data = [:]){ return [ statusCode: statusCode, data: data
7
diff --git a/src/CrudTrait.php b/src/CrudTrait.php @@ -207,13 +207,12 @@ trait CrudTrait public function uploadMultipleFilesToDisk($value, $attribute_name, $disk, $destination_path) { $request = \Request::instance(); - $attribute_value = (array) $this->{$attribute_name}; + $attribute_value = json_decode($this->{$attribute_name}, true) ?? []; $files_to_clear = $request->get('clear_'.$attribute_name); // if a file has been marked for removal, // delete it from the disk and from the db if ($files_to_clear) { - $attribute_value = (array) $this->{$attribute_name}; foreach ($files_to_clear as $key => $filename) { \Storage::disk($disk)->delete($filename); $attribute_value = array_where($attribute_value, function ($value, $key) use ($filename) {
3
diff --git a/articles/quickstart/spa/react/_includes/_centralized_login.md b/articles/quickstart/spa/react/_includes/_centralized_login.md -<%= include('../../_includes/_login_preamble', { library: 'React', embeddedLoginLink: 'https://github.com/auth0-samples/auth0-react-samples/tree/embedded-login/01-Embedded-Login' }) %> +<!-- markdownlint-disable MD002 MD041 --> + +<%= include('../../_includes/_login_preamble', { library: 'React' }) %> ### Create an Authentication Service
2
diff --git a/lib/manage-prototype-handlers.js b/lib/manage-prototype-handlers.js @@ -521,14 +521,15 @@ async function getPluginsModeHandler (req, res) { const startTimestamp = Date.now() async function postPluginsStatusHandler (req, res) { + const { mode } = req.params let status = 'processing' try { const chosenPlugin = await getPluginForRequest(req) - if (!chosenPlugin) { + if (!chosenPlugin && mode !== 'uninstall') { status = 'error' } } catch (e) { - if (req.params.mode !== 'uninstall') { + if (mode !== 'uninstall') { console.log(e) } }
11
diff --git a/src/article/editor/TOCProvider.js b/src/article/editor/TOCProvider.js @@ -62,10 +62,20 @@ export default class TOCProvider extends EventEmitter { const config = this.config let entries = [] + // Title is always there + entries.push({ + id: 'title', + name: 'Title', + level: 1, + node: doc.get('title') + }) + // Note: For abstract we need to find first text node // inside container to set selection there - const abstract = doc.find('abstract p') - if (abstract && abstract.textContent !== '') { + const abstract = doc.find('abstract') + if (abstract.getChildCount() > 0) { + let first = abstract.find('p') + if (first.getText()) { entries.push({ id: abstract.id, name: 'Abstract', @@ -73,6 +83,7 @@ export default class TOCProvider extends EventEmitter { node: abstract }) } + } const contentNodes = doc.get(config.containerId).getChildren() contentNodes.forEach(node => { @@ -86,19 +97,19 @@ export default class TOCProvider extends EventEmitter { } }) - const fnNumber = doc.get('footnotes').getChildCount() - if (fnNumber > 0) { + const footnotes = doc.get('footnotes') + if (footnotes.getChildCount() > 0) { entries.push({ - id: 'fn-group', + id: 'footnotes', name: 'Footnotes', level: 1 }) } - const refNumber = doc.get('references').getChildCount() - if (refNumber > 0) { + const references = doc.get('references') + if (references.getChildCount() > 0) { entries.push({ - id: 'ref-list', + id: 'references', name: 'References', level: 1 })
7
diff --git a/src/components/Framed.js b/src/components/Framed.js @@ -58,7 +58,7 @@ const BorderRight = BorderBase.extend` right: 0; width: 5vw; height: 100%; - min-width: ${({ theme }) => theme.space[4]}px; + min-width: ${({ theme }) => theme.space[3]}px; transform-origin: right center; ` @@ -75,6 +75,7 @@ const BorderLeft = BorderBase.extend` left: 0; width: 5vw; height: 100%; + min-width: ${({ theme }) => theme.space[3]}px; transform-origin: left center; `
1
diff --git a/includes/Modules/Subscribe_With_Google.php b/includes/Modules/Subscribe_With_Google.php namespace Google\Site_Kit\Modules; -use Google\Site_Kit\Context; use Google\Site_Kit\Core\Assets\Asset; use Google\Site_Kit\Core\Assets\Script; use Google\Site_Kit\Core\Modules\Module; @@ -21,8 +20,6 @@ use Google\Site_Kit\Core\Modules\Module_With_Settings; use Google\Site_Kit\Core\Modules\Module_With_Settings_Trait; use Google\Site_Kit\Core\Util\Method_Proxy_Trait; use Google\Site_Kit\Modules\Subscribe_With_Google\Settings; -use WP_Error; -use Exception; /** * Class representing the Subscribe with Google module.
2
diff --git a/runtime/opensbp/parser.js b/runtime/opensbp/parser.js @@ -2,6 +2,7 @@ sbp_parser = require('./sbp_parser') var log = require('../../log').logger('sbp'); var CMD_SPACE_RE = /(\w\w)([ \t]+)([^\s\t,].*)/i var CMD_RE = /^\s*(\w\w)(((\s*,\s*)([+-]?[0-9]+(\.[0-9]+)?)?)+)\s*$/i +var STUPID_STRING_RE = /(\&[A-Za-z]\w*)\s*=([^\n]*)/i fastParse = function(statement) { var match = statement.match(CMD_SPACE_RE); @@ -34,6 +35,7 @@ fastParse = function(statement) { }); return retval; } + return null; } @@ -44,9 +46,18 @@ parseLine = function(line) { comment = parts.slice(1,parts.length) + try { // Use parse optimization var obj = fastParse(statement) || sbp_parser.parse(statement); + console.log(obj) //var obj = sbp_parser.parse(statement); + } catch(e) { + var match = statement.match(STUPID_STRING_RE) + if(match) { + log.debug("Got a stupid string: " + match[2]); + obj = {type:"assign",var:match[1], expr:match[2]} + } + } if(Array.isArray(obj)) { obj = {"type":"comment", "comment":comment};
0
diff --git a/tasks/gulp/compile-assets.mjs b/tasks/gulp/compile-assets.mjs @@ -145,6 +145,20 @@ compileJavaScripts.displayName = 'compile:js' */ function compileJavaScript (stream, moduleName) { return stream + .pipe(plumber(function (cause) { + const error = new PluginError('compile:js', cause) + console.error(error.toString()) + + // Gulp continue (watch) + if (isDev) { + return this.emit('end') + } + + // Gulp exit with error + return stream.emit('error', error) + })) + + // Compile JavaScript ESM to CommonJS .pipe(rollup({ // Used to set the `window` global and UMD/AMD export name // Component JavaScript is given a unique name to aid individual imports, e.g GOVUKFrontend.Accordion @@ -160,6 +174,8 @@ function compileJavaScript (stream, moduleName) { ie8: true }))) + .pipe(plumber.stop()) + // Rename .pipe(gulpif(isDist, rename({
11
diff --git a/sirepo/package_data/static/js/sirepo-components.js b/sirepo/package_data/static/js/sirepo-components.js @@ -2004,7 +2004,7 @@ SIREPO.app.directive('settingsMenu', function(appDataService, appState, fileMana $scope.copyItem = function() { if(! $('#sr-jit-copy-confirmation')[0]) { - $('body').append(copyConfModal); + $('div[data-ng-view]').append(copyConfModal); } if(! $scope.doneLoadingSimList) { loadList(); @@ -2066,10 +2066,6 @@ SIREPO.app.directive('settingsMenu', function(appDataService, appState, fileMana }), '_blank'); }; - $scope.$on('$destroy', function() { - $('#sr-jit-copy-confirmation').remove(); - }); - function loadList() { appState.listSimulations( $location.search(),
1
diff --git a/token-metadata/0x50D1c9771902476076eCFc8B2A83Ad6b9355a4c9/metadata.json b/token-metadata/0x50D1c9771902476076eCFc8B2A83Ad6b9355a4c9/metadata.json "symbol": "FTT", "address": "0x50D1c9771902476076eCFc8B2A83Ad6b9355a4c9", "decimals": 18, - "dharmaVerificationStatus": { "dharmaVerificationStatus": "VERIFIED" } \ No newline at end of file -} \ No newline at end of file
3
diff --git a/packages/docs/templates/blocks/propertiesFormTransformer.js b/packages/docs/templates/blocks/propertiesFormTransformer.js @@ -278,6 +278,7 @@ function makeBlockDefinition({ '#bfbfbf', '#d9d9d9', ]; + block.properties.showValue = true; return block; case 'date': block.type = 'DateSelector';
1
diff --git a/src/encoded/schemas/mixins.json b/src/encoded/schemas/mixins.json "title": "Term ID", "description": "Ontology identifier describing a component in the treatment.", "type": "string", - "pattern": "^(CHEBI:[0-9]{1,7})|(UniprotKB:P[0-9]{5})|(Taxon:[0-9]{2,7})|(NTR:[0-9]{2,8})$" + "pattern": "^(CHEBI:[0-9]{1,7})|(UniprotKB:P[0-9]{5})|(Taxon:[0-9]{2,7})|(NTR:[0-9]{2,8})|((UBERON|EFO|CL|FBbt|WBbt):[0-9]{2,8})$" }, "treatment_term_name": { "title": "Term name",
0
diff --git a/docs/source/intro/platform.md b/docs/source/intro/platform.md @@ -109,7 +109,7 @@ graph TB ### Apollo Federation architecture -With Apollo Federation, a **gateway** sits in front of one or more **implementing services**: +With Apollo Federation, a **gateway** sits in front of one or more **subgraphs**: ```mermaid graph TB; @@ -117,9 +117,9 @@ graph TB; userdb[(Users database)]; productdb[(Products database)]; gateway([GraphQL gateway]); - serviceA[Users service]; - serviceB[Products service]; - serviceC[Inventory service]; + serviceA[Users subgraph]; + serviceB[Products subgraph]; + serviceC[Inventory subgraph]; end webapp(Web app); iosapp(iOS app); @@ -130,8 +130,8 @@ graph TB; class webapp,iosapp secondary; ``` -The gateway is a GraphQL server, _and so is each implementing service_. Each implementing service defines its own schema and connects to whichever data stores it needs to populate that schema's fields. The gateway then aggregates these schemas and combines them into a _single_ schema. +The gateway is a GraphQL server, _and so is each subgraph_. Each subgraph defines its own schema and connects to whichever data stores it needs to populate that schema's fields. The gateway then aggregates these schemas and combines them into a _single_ schema. -When a client request comes in, the gateway knows which requested fields are owned by which service. It intelligently executes operations across whichever combination of services is needed to fully complete the operation. +When a client request comes in, the gateway knows which requested fields are owned by which subgraph. It intelligently executes operations across whichever combination of subgraphs is needed to fully complete the operation. -Apollo Server includes extension libraries that enable it to act as either a gateway or an implementing service. And Apollo Studio provides free [managed federation](https://www.apollographql.com/docs/studio/managed-federation/overview/) features that help you maximize your graph's uptime. +Apollo Server includes extension libraries that enable it to act as either a gateway or a subgraph. And Apollo Studio provides free [managed federation](https://www.apollographql.com/docs/studio/managed-federation/overview/) features that help you maximize your graph's uptime.
14
diff --git a/src/lime/_internal/backend/html5/HTML5Window.hx b/src/lime/_internal/backend/html5/HTML5Window.hx @@ -75,6 +75,8 @@ class HTML5Window private var textInputEnabled:Bool; private var unusedTouchesPool = new List<Touch>(); + private var __focusPending:Bool; + public function new(parent:Window) { this.parent = parent; @@ -339,9 +341,14 @@ class HTML5Window public function focus():Void {} - public function focusTextInputWithDelay():Void { + private function focusTextInput():Void + { + if (__focusPending) return; + __focusPending = true; + Timer.delay(function() { + __focusPending = false; if (textInputEnabled) textInput.focus(); }, 20); } @@ -464,7 +471,7 @@ class HTML5Window { if (event.relatedTarget == null || isDescendent(cast event.relatedTarget)) { - focusTextInputWithDelay(); + focusTextInput(); } } } @@ -929,7 +936,10 @@ class HTML5Window { Browser.document.execCommand("copy"); } - focusTextInputWithDelay(); + if (textInputEnabled) + { + focusTextInput(); + } } public function setCursor(value:MouseCursor):MouseCursor
10
diff --git a/docs/01-introduction.md b/docs/01-introduction.md @@ -18,7 +18,7 @@ Snowpack leverages JavaScript's native module system (<a href="https://developer <div class="company-logos"> {% for user in usersList %} - <a href="{{ user.url }}" target="_blank" rel="noopener noreferrer"> + <a href="{{ user.url }}" target="_blank" rel="noopener noreferrer nofollow"> {% if user.img %}<img class="company-logo" src="{{ user.img }}" alt="{{ user.name }}" /> {% else %}<span>{{ user.name }}</span> {% endif %}
0
diff --git a/modules/featureforwardBidAdapter.js b/modules/featureforwardBidAdapter.js @@ -14,8 +14,8 @@ function FeatureForwardAdapter() { }; function _callBids(bidderRequest) { - var i = 0; bidderRequest.bids.forEach(bidRequest => { + var i = 0; try { while (bidRequest.sizes[i] !== undefined) { var params = Object.assign({}, environment(), bidRequest.params, {'size': bidRequest.sizes[i]});
11
diff --git a/src/apps.json b/src/apps.json "cats": [ 32 ], - "html": "<script[^>]*>[^>]+\\.src\\s*=\\s*['\"](?:https?:)?//tag\\.bounceexchange\\.com/", + "script": "//tag\\.bounceexchange\\.com/", "icon": "Bounce Exchange.svg", "js": { "bouncex": "" "cats": [ 36 ], - "html": "<script[^>]*>[^<]+?bsa\\.src\\s*=\\s*['\"](?:https?:)?\\/{2}\\w\\d\\.buysellads\\.com\\/[\\w\\d\\/]+?bsa\\.js['\"]", + "script": "\\.buysellads\\.com/", "icon": "BuySellAds.png", "js": { "_bsa": "", "cats": [ 36 ], - "html": "<script[^>]+>var titan", "icon": "Titan.png", "js": { "titan": "",
5
diff --git a/README.md b/README.md @@ -13,6 +13,12 @@ React Router keeps your UI in sync with the URL. Make the URL your first thought API docs are [here](https://reacttraining.com/react-router/api). +## Installation + +`npm install --save react-router@next` or `yarn add react-router@next` + +You can also install specific router package via `react-router-[package]@next`, all posible packages are avaliable [here](https://github.com/ReactTraining/react-router/tree/v4/packages) + ## v4 FAQ ### Why a major version bump?
0
diff --git a/src/core/operations/ParseIPv6Address.mjs b/src/core/operations/ParseIPv6Address.mjs @@ -165,6 +165,89 @@ class ParseIPv6Address extends Operation { // Multicast output += "\nThis is a reserved multicast address."; output += "\nMulticast addresses range: ff00::/8"; + + switch (ipv6[0]) { + case 0xff01: + output += "\n\nReserved Multicast Block for Interface Local Scope"; + break; + case 0xff02: + output += "\n\nReserved Multicast Block for Link Local Scope"; + break; + case 0xff03: + output += "\n\nReserved Multicast Block for Realm Local Scope"; + break; + case 0xff04: + output += "\n\nReserved Multicast Block for Admin Local Scope"; + break; + case 0xff05: + output += "\n\nReserved Multicast Block for Site Local Scope"; + break; + case 0xff08: + output += "\n\nReserved Multicast Block for Organisation Local Scope"; + break; + case 0xff0e: + output += "\n\nReserved Multicast Block for Global Scope"; + break; + } + + if (ipv6[6] === 1) { + if (ipv6[7] === 2) { + output += "\nReserved Multicast Address for 'All DHCP Servers and Relay Agents (defined in RFC3315)'"; + } else if (ipv6[7] === 3) { + output += "\nReserved Multicast Address for 'All LLMNR Hosts (defined in RFC4795)'"; + } + } else { + switch (ipv6[7]) { + case 1: + output += "\nReserved Multicast Address for 'All nodes'"; + break; + case 2: + output += "\nReserved Multicast Address for 'All routers'"; + break; + case 5: + output += "\nReserved Multicast Address for 'OSPFv3 - All OSPF routers'"; + break; + case 6: + output += "\nReserved Multicast Address for 'OSPFv3 - All Designated Routers'"; + break; + case 8: + output += "\nReserved Multicast Address for 'IS-IS for IPv6 Routers'"; + break; + case 9: + output += "\nReserved Multicast Address for 'RIP Routers'"; + break; + case 0xa: + output += "\nReserved Multicast Address for 'EIGRP Routers'"; + break; + case 0xc: + output += "\nReserved Multicast Address for 'Simple Service Discovery Protocol'"; + break; + case 0xd: + output += "\nReserved Multicast Address for 'PIM Routers'"; + break; + case 0x16: + output += "\nReserved Multicast Address for 'MLDv2 Reports (defined in RFC3810)'"; + break; + case 0x6b: + output += "\nReserved Multicast Address for 'Precision Time Protocol v2 Peer Delay Measurement Messages'"; + break; + case 0xfb: + output += "\nReserved Multicast Address for 'Multicast DNS'"; + break; + case 0x101: + output += "\nReserved Multicast Address for 'Network Time Protocol'"; + break; + case 0x108: + output += "\nReserved Multicast Address for 'Network Information Service'"; + break; + case 0x114: + output += "\nReserved Multicast Address for 'Experiments'"; + break; + case 0x181: + output += "\nReserved Multicast Address for 'Precision Time Protocol v2 Messages (exc. Peer Delay)'"; + break; + } + } }
0
diff --git a/CommentFlagsHelper.user.js b/CommentFlagsHelper.user.js // @description Always expand comments (with deleted) and highlight expanded flagged comments, Highlight common chatty and rude keywords // @homepage https://github.com/samliew/SO-mod-userscripts // @author @samliew -// @version 3.2.7 +// @version 3.3 // // @include https://*stackoverflow.com/admin/dashboard?flag*=comment* // @include https://*serverfault.com/admin/dashboard?flag*=comment* // Special characters must be escaped with \\ const chattyKeywords = [ - 'thanks?', 'welcome', 'up-?voted?', 'updated', 'edited', 'added', '(in)?correct(ed)?', 'done', 'worked', 'works', 'glad', + 'thanks?', 'thx', 'welcome', 'up-?voted?', 'updated', 'edited', 'added', '(in)?correct(ed)?', 'done', 'worked', 'works', 'glad', 'appreciated?', 'my email', 'email me', 'contact', 'good', 'great', 'sorry', '\\+1', 'love', 'wow', 'pointless', 'no\\s?(body|one)', 'homework', 'no idea', 'your mind', 'try it', 'typo', 'wrong', 'unclear', 'regret', 'every\\s?(body|one)', 'exactly', 'check', 'lol', 'ha(ha)+', 'women', 'girl', 'effort', 'understand', 'want', 'need', 'little', }) .appendTo(actionBtns); - // Delete all comments left on page if(superusers.includes(StackExchange.options.user.userId)) { + + // Delete chatty comments on page + $('<button class="btn-warning">Delete Chatty</button>') + .click(function() { + $(this).remove(); + const chattyComments = $('.cmmt-chatty, .cmmt-rude').filter(':visible').parents('.comment').prev().find('.delete-comment'); + $('body').showAjaxProgress(chattyComments.length, { position: 'fixed' }); + chattyComments.click(); + }) + .appendTo(actionBtns); + + // Delete all comments left on page $('<button class="btn-warning">Delete ALL</button>') .click(function() { if(!confirm('Confirm Delete ALL?')) return false;
2
diff --git a/configs/bootstrap-v4.json b/configs/bootstrap-v4.json ], "stop_urls": [], "selectors": { - "lvl1": ".bd-content h1", - "lvl2": ".bd-content h2", - "lvl3": ".bd-content h3", + "lvl0": ".bd-content h1", + "lvl1": ".bd-content h2", + "lvl2": ".bd-content h3", "text": ".bd-content p, .bd-content li" }, "min_indexed_level": 1,
7
diff --git a/main/actions.js b/main/actions.js const { Ooniprobe } = require('./utils/ooni/ooniprobe') - const log = require('electron-log') -const debug = require('debug')('ooniprobe-desktop.main.actions') const Sentry = require('@sentry/electron') const hardReset = () => { @@ -31,7 +29,7 @@ const listMeasurements = (resultID) => { summary = data.fields break default: - debug('extra fields', data.fields) + log.debug('extra fields', data.fields) } }) @@ -39,7 +37,7 @@ const listMeasurements = (resultID) => { ooni .call(['list', resultID]) .then(() => { - debug('returning list', resultID, rows, summary) + log.debug('returning list', resultID, rows, summary) resolve({ rows, summary, @@ -78,7 +76,7 @@ const listResults = () => { summary = data.fields break default: - debug('extra data.fields', data.fields) + log.debug('extra data.fields', data.fields) } }) @@ -105,7 +103,7 @@ const showMeasurement = (msmtID) => { return new Promise((resolve, reject) => { ooni.on('data', (data) => { if (data.level === 'error') { - debug('error: ', data.message) + log.debug('error: ', data.message) Sentry.addBreadcrumb({ category: 'actions', message: data.message, @@ -121,14 +119,14 @@ const showMeasurement = (msmtID) => { break default: log.error('showMeasurement: extra data.fields', data.fields) - debug('extra data.fields', data.fields) + log.debug('extra data.fields', data.fields) } }) ooni .call(['show', msmtID]) .then(() => { - debug(`showing measurement: ${msmtID}`) + log.debug(`showing measurement: ${msmtID}`) resolve(measurement) }) .catch(err => reject(err))
14
diff --git a/generators/ci-cd/templates/travis.yml.ejs b/generators/ci-cd/templates/travis.yml.ejs @@ -44,15 +44,15 @@ env: - NG_CLI_ANALYTICS="false" before_install: - - if [[ $JHI_JDK = '11' ]]; then - echo '*** Using OpenJDK 11' + if [[ $JHI_JDK = '8' ]]; then + echo '*** Using OpenJDK 8' + else + echo '*** Using OpenJDK 11 by default' sudo add-apt-repository ppa:openjdk-r/ppa sudo apt-get update sudo apt-get install -y openjdk-11-jdk sudo update-java-alternatives -s java-1.11.0-openjdk-amd64 java -version - else - echo '*** Using OpenJDK 8 by default' fi - java -version - sudo /etc/init.d/mysql stop
12
diff --git a/test/jasmine/tests/transition_test.js b/test/jasmine/tests/transition_test.js @@ -1189,7 +1189,7 @@ describe('Plotly.react transitions:', function() { .then(done); }); - it('should update ranges of date and category axes', function(done) { + it('@flaky should update ranges of date and category axes', function(done) { Plotly.plot(gd, [ {x: ['2018-01-01', '2019-01-01', '2020-01-01'], y: [1, 2, 3]}, {x: ['a', 'b', 'c'], y: [1, 2, 3], xaxis: 'x2', yaxis: 'y2'}
0
diff --git a/src/UserConfig.js b/src/UserConfig.js @@ -52,7 +52,6 @@ class UserConfig { this.dynamicPermalinks = true; this.useGitIgnore = true; this.dataDeepMerge = false; - this.experiments = new Set(); this.extensionMap = new Set(); this.watchJavaScriptDependencies = true; this.additionalWatchTargets = []; @@ -576,10 +575,6 @@ class UserConfig { ); } - addExperiment(key) { - this.experiments.add(key); - } - setDataDeepMerge(deepMerge) { this.dataDeepMerge = !!deepMerge; } @@ -659,7 +654,6 @@ class UserConfig { dynamicPermalinks: this.dynamicPermalinks, useGitIgnore: this.useGitIgnore, dataDeepMerge: this.dataDeepMerge, - experiments: this.experiments, watchJavaScriptDependencies: this.watchJavaScriptDependencies, additionalWatchTargets: this.additionalWatchTargets, browserSyncConfig: this.browserSyncConfig,
2
diff --git a/services/acceptance/services/errortelemetry.test.js b/services/acceptance/services/errortelemetry.test.js @@ -56,6 +56,35 @@ describe('Error Telemetry service acceptance tests', () => { }); }); + it('should reject invalid json', () => { + return request({ + url: h.getUrl('/telemetry/error'), + method: 'POST', + headers: { 'Authorization': this.token }, + json: true, + body: 'invalid json' + }) + .then(res => assert.fail(res)) + .catch(err => { + h.assertStatus(err, 400); + }); + }); + + it('should reject large payloads', () => { + let largeLog = new Array(1000001).join('a'); + return request({ + url: h.getUrl('/telemetry/error'), + method: 'POST', + headers: { 'Authorization': this.token }, + json: true, + body: largeLog + }) + .then(res => assert.fail(res)) + .catch(err => { + h.assertStatus(err, 413); + }); + }); + it('should accept correctly formatted logs', () => { let emptyLog = { uuid: this.reg.uuid,
0
diff --git a/.github/workflows/integration-local.yml b/.github/workflows/integration-local.yml @@ -39,7 +39,7 @@ jobs: working-directory: cadence/tests - name: Build & Run - run: npm run start:dev + run: npm run dev:emulator - name: Deploy Contracts run: flow project deploy --network=emulator
3
diff --git a/src/libs/hasHoverSupport/index.js b/src/libs/hasHoverSupport/index.js @@ -8,7 +8,7 @@ import * as Browser from '../Browser'; function hasHoverSupport() { if (Browser.isInternetExplorer()) { - return true; + return !Browser.isMobile(); } return !window.matchMedia('(hover: none)').matches; }
9
diff --git a/app/features/search.js b/app/features/search.js import $ from 'blingblingjs' import hotkeys from 'hotkeys-js' import { querySelectorAllDeep } from 'query-selector-shadow-dom' +import { notList } from '../utilities' import { PluginRegistry, PluginHints } from '../plugins/_registry' let SelectorEngine @@ -84,7 +85,7 @@ export function queryPage(query, fn) { if (query == '.' || query == '#' || query.trim().endsWith(',')) return try { - let matches = querySelectorAllDeep(query + ':not(vis-bug):not(script):not(hotkey-map):not(.visbug-metatip):not(visbug-label):not(visbug-handles)') + let matches = querySelectorAllDeep(query + notList) if (!matches.length) matches = querySelectorAllDeep(query) if (!fn) SelectorEngine.unselect_all() if (matches.length)
4
diff --git a/site/css/rabbit.css b/site/css/rabbit.css @@ -644,7 +644,9 @@ td.desc, th.desc { padding: 20px 0 0; } -ol.feed { +ul.feed { + list-style-type: none; + margin: 0px; padding: 0px; clear: both; @@ -653,7 +655,7 @@ ol.feed { .feed li { line-height: 17px; padding: 0px; - margin-bottom: 16px; + margin-bottom: 2em; } .feed li hr {
7
diff --git a/bin/definition-validators/path.js b/bin/definition-validators/path.js * limitations under the License. **/ 'use strict'; +const PathEnforcer = require('../enforcers/path'); module.exports = PathObject; @@ -25,6 +26,7 @@ function PathObject(data) { const { major } = data; Object.assign(this, { + component: PathEnforcer, type: 'object', properties: { summary: {
12
diff --git a/edit.js b/edit.js @@ -7,7 +7,7 @@ import {TransformControls} from './TransformControls.js'; // import abi from 'https://contracts.webaverse.com/abi.js'; import {XRPackage, pe, renderer, scene, camera, parcelMaterial, floorMesh, proxySession, getRealSession, loginManager} from './run.js'; import {downloadFile, readFile, bindUploadFileButton} from 'https://static.xrpackage.org/xrpackage/util.js'; -import {wireframeMaterial, getWireframeMesh, meshIdToArray, decorateRaycastMesh, VolumeRaycaster} from './volume.js'; +// import {wireframeMaterial, getWireframeMesh, meshIdToArray, decorateRaycastMesh, VolumeRaycaster} from './volume.js'; import './gif.js'; // import {makeTextMesh, makeWristMenu, makeHighlightMesh, makeRayMesh} from './vr-ui.js'; import {makeTextMesh} from './vr-ui.js'; @@ -422,7 +422,7 @@ function animate(timestamp, frame) { const timeDiff = Math.min((timestamp - lastTimestamp) / 1000, 0.05); lastTimestamp = timestamp; - loadMeshMaterial.uniforms.uTime.value = (Date.now() % timeFactor) / timeFactor; + // loadMeshMaterial.uniforms.uTime.value = (Date.now() % timeFactor) / timeFactor; const session = renderer.xr.getSession(); if (session) { @@ -694,7 +694,7 @@ function animate(timestamp, frame) { p.volumeMesh.visible = isVolume; } } - if (hoverTarget) { + /* if (hoverTarget) { wireframeMaterial.uniforms.uHoverId.value.fromArray(meshIdToArray(hoverTarget.meshId).map(n => n / 255)); wireframeMaterial.uniforms.uHoverColor.value.fromArray(new THREE.Color(0x5c6bc0).toArray()); } else { @@ -705,7 +705,7 @@ function animate(timestamp, frame) { wireframeMaterial.uniforms.uSelectColor.value.fromArray(new THREE.Color(0x66bb6a).toArray()); } else { wireframeMaterial.uniforms.uSelectId.value.set(0, 0, 0); - } + } */ lastTeleport = currentTeleport; @@ -715,7 +715,7 @@ function animate(timestamp, frame) { renderer.setAnimationLoop(animate); renderer.xr.setSession(proxySession); -const volumeRaycaster = new VolumeRaycaster(); +// const volumeRaycaster = new VolumeRaycaster(); bindUploadFileButton(document.getElementById('import-scene-input'), async file => { const uint8Array = await readFile(file); @@ -1297,7 +1297,7 @@ const _updateRaycasterFromMouseEvent = (raycaster, e) => { const candidateMeshes = pe.children .map(p => p.volumeMesh) .filter(o => !!o); - hoverTarget = volumeRaycaster.raycastMeshes(candidateMeshes, raycaster.ray.origin, raycaster.ray.direction); + // hoverTarget = volumeRaycaster.raycastMeshes(candidateMeshes, raycaster.ray.origin, raycaster.ray.direction); const intersects = raycaster.intersectObject(planetMesh); if (intersects.length > 0) { const [intersect] = intersects;
2
diff --git a/character-controller.js b/character-controller.js @@ -643,6 +643,7 @@ class InterpolatedPlayer extends StatePlayer { crouch: new BiActionInterpolant(() => this.actionBinaryInterpolants.crouch.get(), 0, crouchMaxTime), activate: new UniActionInterpolant(() => this.actionBinaryInterpolants.activate.get(), 0, activateMaxTime), use: new InfiniteActionInterpolant(() => this.actionBinaryInterpolants.use.get(), 0), + unuse: new InfiniteActionInterpolant(() => !this.actionBinaryInterpolants.use.get(), 0), aim: new InfiniteActionInterpolant(() => this.actionBinaryInterpolants.aim.get(), 0), narutoRun: new InfiniteActionInterpolant(() => this.actionBinaryInterpolants.narutoRun.get(), 0), fly: new InfiniteActionInterpolant(() => this.actionBinaryInterpolants.fly.get(), 0), @@ -691,6 +692,7 @@ class UninterpolatedPlayer extends StatePlayer { crouch: new BiActionInterpolant(() => this.hasAction('crouch'), 0, crouchMaxTime), activate: new UniActionInterpolant(() => this.hasAction('activate'), 0, activateMaxTime), use: new InfiniteActionInterpolant(() => this.hasAction('use'), 0), + unuse: new InfiniteActionInterpolant(() => !this.hasAction('use'), 0), aim: new InfiniteActionInterpolant(() => this.hasAction('aim'), 0), narutoRun: new InfiniteActionInterpolant(() => this.hasAction('narutoRun'), 0), fly: new InfiniteActionInterpolant(() => this.hasAction('fly'), 0),
0
diff --git a/tasks/sync_packages.js b/tasks/sync_packages.js @@ -116,7 +116,7 @@ function syncPartialBundlePkg(d) { '', 'Contains trace modules ' + common.formatEnumeration(d.traceList) + '.', '', - 'For more info on plotly.js, go to https://github.com/plotly/plotly.js', + 'For more info on plotly.js, go to https://github.com/plotly/plotly.js#readme', '', '## Installation', '', @@ -127,13 +127,14 @@ function syncPartialBundlePkg(d) { '', '```js', '// ES6 module', - 'import Plotly from \'' + d.name + '\';', + 'import Plotly from \'' + d.name + '\'', '', '// CommonJS', - 'var Plotly = require(\'' + d.name + '\');', + 'var Plotly = require(\'' + d.name + '\')', '```', '', - copyrightAndLicense + copyrightAndLicense, + 'Please visit [complete list of dependencies](https://www.npmjs.com/package/plotly.js/v/' + pkg.version + '?activeTab=dependencies).' ]; fs.writeFile( @@ -209,7 +210,7 @@ function syncLocalesPkg(d) { '', d.desc, '', - 'For more info on plotly.js, go to https://github.com/plotly/plotly.js', + 'For more info on plotly.js, go to https://github.com/plotly/plotly.js#readme', '', '## Installation', '', @@ -222,15 +223,15 @@ function syncLocalesPkg(d) { '', '```js', '// ES6 module', - 'import Plotly from \'plotly.js\';', - 'import locale from \'' + d.name + '/fr' + '\';', + 'import Plotly from \'plotly.js\'', + 'import locale from \'' + d.name + '/fr' + '\'', '', '// CommonJS', - 'var Plotly = require(\'plotly.js\');', - 'var locale = require(\'' + d.name + '/fr\');', + 'var Plotly = require(\'plotly.js\')', + 'var locale = require(\'' + d.name + '/fr\')', '', '// then', - 'Plotly.register(locale);', + 'Plotly.register(locale)', 'Plotly.setPlotConfig({locale: \'fr\'})', '```', '', @@ -248,7 +249,7 @@ function syncLocalesPkg(d) { var cnt = [constants.licenseDist, '']; localeFiles.forEach(function(f) { var n = path.basename(f, '.js'); - cnt.push('exports[\'' + n + '\'] = require(\'./' + n + '.js\');'); + cnt.push('exports[\'' + n + '\'] = require(\'./' + n + '.js\')'); }); cnt.push('');
7
diff --git a/www/tablet/js/widget_pagetab.js b/www/tablet/js/widget_pagetab.js @@ -33,7 +33,6 @@ var Modul_pagetab = function () { } function loadPage(goUrl, doPush) { - return; // set return timer localStorage.setItem('pagetab_lastUrl', goUrl); startReturnTimer();
1
diff --git a/Source/Scene/WebMapTileServiceImageryProvider.js b/Source/Scene/WebMapTileServiceImageryProvider.js @@ -328,19 +328,18 @@ function requestImage(imageryProvider, col, row, level, request, interval) { var staticDimensions = imageryProvider._dimensions; var dynamicIntervalData = defined(interval) ? interval.data : undefined; - var resource; + var resource = imageryProvider._resource.getDerivedResource({ + request: request, + }); if (!imageryProvider._useKvp) { - var templateValues = { + var templateValuesKvpFalse = { TileMatrix: tileMatrix, TileRow: row.toString(), TileCol: col.toString(), s: subdomains[(col + row + level) % subdomains.length], }; - resource = imageryProvider._resource.getDerivedResource({ - request: request, - }); - resource.setTemplateValues(templateValues); + resource.setTemplateValues(templateValuesKvpFalse); if (defined(staticDimensions)) { resource.setTemplateValues(staticDimensions); @@ -352,6 +351,9 @@ function requestImage(imageryProvider, col, row, level, request, interval) { } else { // build KVP request var query = {}; + var templateValuesKvpTrue = { + s: subdomains[(col + row + level) % subdomains.length], + }; query.tilematrix = tileMatrix; query.layer = imageryProvider._layer; query.style = imageryProvider._style; @@ -367,12 +369,13 @@ function requestImage(imageryProvider, col, row, level, request, interval) { if (defined(dynamicIntervalData)) { query = combine(query, dynamicIntervalData); } + + resource.setTemplateValues(templateValuesKvpTrue); + resource = imageryProvider._resource.getDerivedResource({ queryParameters: query, request: request, }); - - resource.url = resource.url.replace("{s}", ""); } return ImageryProvider.loadImage(imageryProvider, resource);
3
diff --git a/source/git-api.js b/source/git-api.js @@ -292,9 +292,10 @@ exports.registerApi = (env) => { const task = gitPromise({ commands: credentialsOption(req.body.socketId, req.body.remote).concat([ 'fetch', + config.autoPruneOnFetch ? '--prune' : '', + '--', req.body.remote, req.body.ref ? req.body.ref : '', - config.autoPruneOnFetch ? '--prune' : '', ]), repoPath: req.body.path, timeout: tenMinTimeoutMs,
1
diff --git a/character-sfx.js b/character-sfx.js import * as THREE from 'three'; import Avatar from './avatars/avatars.js'; +import * as sounds from './sounds.js'; import { idleFactorSpeed, walkFactorSpeed, @@ -11,43 +12,12 @@ import { } from './constants.js'; import { mod, - loadJson, - loadAudioBuffer, + // loadJson, + // loadAudioBuffer, } from './util.js'; const localVector = new THREE.Vector3(); -let walkSoundFiles; -let runSoundFiles; -let jumpSoundFiles; -let landSoundFiles; -let narutoRunSoundFiles; -let soundFileAudioBuffer; -const loadPromise = (async () => { - await Avatar.waitForLoad(); - - const audioContext = Avatar.getAudioContext(); - const [ - soundFileSpecs, - _soundFileAudioBuffer, - ] = await Promise.all([ - loadJson(`/sounds/sound-files.json`), - loadAudioBuffer(audioContext, '/sounds/sounds.mp3'), - ]); - - // console.log('got specs', soundFileSpecs); - - walkSoundFiles = soundFileSpecs.filter(f => /^walk\//.test(f.name)); - runSoundFiles = soundFileSpecs.filter(f => /^run\//.test(f.name)); - jumpSoundFiles = soundFileSpecs.filter(f => /^jump\//.test(f.name)); - landSoundFiles = soundFileSpecs.filter(f => /^land\//.test(f.name)); - narutoRunSoundFiles = soundFileSpecs.filter(f => /^narutoRun\//.test(f.name)); - soundFileAudioBuffer = _soundFileAudioBuffer; - - // console.log('loaded audio', soundFileSpecs, soundFileAudioBuffer); -})(); -const waitForLoad = () => loadPromise; - // HACK: this is used to dynamically control the step offset for a particular animation // it is useful during development to adjust sync between animations and sound // the key listener part of this is in io-manager.js @@ -90,6 +60,9 @@ class CharacterSfx { const walkRunFactor = Math.min(Math.max((currentSpeed - walkFactorSpeed) / (runFactorSpeed - walkFactorSpeed), 0), 1); const crouchFactor = Math.min(Math.max(1 - (this.player.avatar.crouchTime / crouchMaxTime), 0), 1); + const soundFiles = sounds.getSoundFiles(); + const soundFileAudioBuffer = sounds.getSoundFileAudioBuffer(); + // jump const _playSound = audioSpec => { const {offset, duration} = audioSpec; @@ -102,10 +75,10 @@ class CharacterSfx { }; { if (this.player.avatar.jumpState && !this.lastJumpState) { - const audioSpec = jumpSoundFiles[Math.floor(Math.random() * jumpSoundFiles.length)]; + const audioSpec = soundFiles.jump[Math.floor(Math.random() * soundFiles.jump.length)]; _playSound(audioSpec); } else if (this.lastJumpState && !this.player.avatar.jumpState) { - const audioSpec = landSoundFiles[Math.floor(Math.random() * landSoundFiles.length)]; + const audioSpec = soundFiles.land[Math.floor(Math.random() * soundFiles.land.length)]; _playSound(audioSpec); } this.lastJumpState = this.player.avatar.jumpState; @@ -131,15 +104,15 @@ class CharacterSfx { return animationAngles[0].name; } })(); - const soundFiles = (() => { + const localSoundFiles = (() => { if (isNarutoRun) { - return narutoRunSoundFiles; + return soundFiles.narutoRun; } else if (isCrouching) { - return walkSoundFiles; + return soundFiles.walk; } else if (isRunning) { - return runSoundFiles; + return soundFiles.run; } else { - return walkSoundFiles; + return soundFiles.walk; } })(); const animations = Avatar.getAnimations(); @@ -163,7 +136,7 @@ class CharacterSfx { i = i % leftStepIndices.length; if (i !== endIndex) { if (leftStepIndices[i] && !this.lastStepped[0]) { - const candidateAudios = soundFiles//.filter(a => a.paused); + const candidateAudios = localSoundFiles//.filter(a => a.paused); if (candidateAudios.length > 0) { /* for (const a of candidateAudios) { !a.paused && a.pause(); @@ -176,7 +149,7 @@ class CharacterSfx { this.lastStepped[0] = leftStepIndices[i]; if (rightStepIndices[i] && !this.lastStepped[1]) { - const candidateAudios = soundFiles// .filter(a => a.paused); + const candidateAudios = localSoundFiles// .filter(a => a.paused); if (candidateAudios.length > 0) { /* for (const a of candidateAudios) { !a.paused && a.pause(); @@ -201,6 +174,5 @@ class CharacterSfx { } export { - waitForLoad, CharacterSfx, }; \ No newline at end of file
4
diff --git a/edit.js b/edit.js @@ -9,7 +9,7 @@ import {tryLogin, loginManager} from './login.js'; import runtime from './runtime.js'; import {parseQuery, downloadFile} from './util.js'; import {rigManager} from './rig.js'; -import {makeRayMesh, makeTextMesh} from './vr-ui.js'; +import {makeRayMesh, makeTextMesh, makeHighlightMesh} from './vr-ui.js'; import { THING_SHADER, makeDrawMaterial, @@ -337,6 +337,10 @@ class MultiSimplex { return result; } } +const highlightMesh = makeHighlightMesh(); +highlightMesh.visible = false; +scene.add(highlightMesh); +const anchors = []; (async () => { await geometryManager.waitForLoad();
0
diff --git a/packages/bpk-component-calendar/src/__snapshots__/BpkCalendarGridTransition-test.js.snap b/packages/bpk-component-calendar/src/__snapshots__/BpkCalendarGridTransition-test.js.snap @@ -17,13 +17,13 @@ exports[`BpkCalendar should render correctly 1`] = ` } > <div> - {"minDate":"2009-02-01T00:00:00.000Z","maxDate":"2011-02-01T00:00:00.000Z","month":"2010-01-01T00:00:00.000Z","preventKeyboardFocus":true,"isKeyboardFocusable":false,"focusedDate":"2010-01-01T01:00:00.000Z","aria-hidden":true,"className":"bpk-calendar-grid-transition__grid"} + {"minDate":"2009-02-01T00:00:00.000Z","maxDate":"2011-02-01T00:00:00.000Z","month":"2010-01-01T00:00:00.000Z","preventKeyboardFocus":true,"isKeyboardFocusable":false,"focusedDate":"2010-01-01T00:00:00.000Z","aria-hidden":true,"className":"bpk-calendar-grid-transition__grid"} </div> <div> {"minDate":"2009-02-01T00:00:00.000Z","maxDate":"2011-02-01T00:00:00.000Z","month":"2010-02-01T00:00:00.000Z","isKeyboardFocusable":true,"focusedDate":null,"aria-hidden":false,"className":"bpk-calendar-grid-transition__grid"} </div> <div> - {"minDate":"2009-02-01T00:00:00.000Z","maxDate":"2011-02-01T00:00:00.000Z","month":"2010-03-01T00:00:00.000Z","preventKeyboardFocus":true,"isKeyboardFocusable":false,"focusedDate":"2010-03-01T01:00:00.000Z","aria-hidden":true,"className":"bpk-calendar-grid-transition__grid"} + {"minDate":"2009-02-01T00:00:00.000Z","maxDate":"2011-02-01T00:00:00.000Z","month":"2010-03-01T00:00:00.000Z","preventKeyboardFocus":true,"isKeyboardFocusable":false,"focusedDate":"2010-03-01T00:00:00.000Z","aria-hidden":true,"className":"bpk-calendar-grid-transition__grid"} </div> </div> </div>
13
diff --git a/site/rabbit.ent b/site/rabbit.ent @@ -15,7 +15,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> -<!ENTITY version-java-client "5.7.0"> +<!ENTITY version-java-client "5.7.1"> <!ENTITY version-dotnet-client "5.1.0"> <!ENTITY version-server "3.7.15"> <!ENTITY version-server-series "v3.7.x">
12
diff --git a/routes/serve-routes.js b/routes/serve-routes.js @@ -2,7 +2,7 @@ const logger = require('winston'); const { getClaimId, getChannelViewData, getLocalFileRecord } = require('../controllers/serveController.js'); const serveHelpers = require('../helpers/serveHelpers.js'); const { handleRequestError } = require('../helpers/errorHandlers.js'); -const { postToStats } = require('../controllers/statsController.js'); +const { postToStats } = require('../helpers/statsHelpers.js'); const db = require('../models'); const lbryUri = require('../helpers/lbryUri.js');
1
diff --git a/types/expressions.d.ts b/types/expressions.d.ts @@ -1034,7 +1034,7 @@ declare module 'mongoose' { * * @see https://docs.mongodb.com/manual/reference/operator/aggregation/ne/#mongodb-expression-exp.-ne */ - $ne: Expression | [Expression, Expression] | null; + $ne: Expression | [Expression, Expression | NullExpression] | null; } export interface Cond {
11
diff --git a/network.js b/network.js @@ -2457,6 +2457,11 @@ function startAcceptingConnections(){ wss = new WebSocketServer({ port: conf.port }); wss.on('connection', function(ws) { var ip = ws.upgradeReq.connection.remoteAddress; + if (!ip){ + console.log("no ip in accepted connection"); + ws.terminate(); + return; + } if (ws.upgradeReq.headers['x-real-ip'] && (ip === '127.0.0.1' || ip.match(/^192\.168\./))) // we are behind a proxy ip = ws.upgradeReq.headers['x-real-ip']; ws.peer = ip + ":" + ws.upgradeReq.connection.remotePort;
9
diff --git a/src/reducers/transactions/index.js b/src/reducers/transactions/index.js @@ -5,6 +5,8 @@ import { getTransactionStatus } from '../../actions/transactions' +import { selectAccount } from '../../actions/account' + const initialState = {} const transactions = handleActions({ @@ -48,7 +50,10 @@ const transactions = handleActions({ } : t )) - }) + }), + [selectAccount]: () => { + return initialState + } }, initialState) export default transactions
9
diff --git a/.gitignore b/.gitignore @@ -67,3 +67,103 @@ yarn-error.log .pnp.js # Yarn Integrity file .yarn-integrity + +### Intellij+all ### +# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm + +# File-based project format +*.iws + +# IntelliJ +out/ + +.idea/ +*.iml +modules.xml +.idea/misc.xml +*.ipr + +### VisualStudioCode ### +.vscode/* + +# Ignore all local history of files +.history + +### Eclipse ### +.metadata +bin/ +tmp/ +*.tmp +*.bak +*.swp +*~.nib +local.properties +.settings/ +.loadpath +.recommenders + +# External tool builders +.externalToolBuilders/ + +# Locally stored "Eclipse launch configurations" +*.launch + +# Code Recommenders +.recommenders/ + +# Annotation Processing +.apt_generated/ + +# Eclipse Core +.project + +.sts4-cache/ + +### SublimeText ### +# Cache files for Sublime Text +*.tmlanguage.cache +*.tmPreferences.cache +*.stTheme.cache + +# Workspace files are user-specific +*.sublime-workspace + +*.sublime-project + +# SFTP configuration file +sftp-config.json + +# Package control specific files +Package Control.last-run +Package Control.ca-list +Package Control.ca-bundle +Package Control.system-ca-bundle +Package Control.cache/ +Package Control.ca-certs/ +Package Control.merged-ca-bundle +Package Control.user-ca-bundle +oscrypto-ca-bundle.crt +bh_unicode_properties.cache + +# Sublime-github package stores a github token in this file +GitHub.sublime-settings + +### Vim ### +# Swap +[._]*.s[a-v][a-z] +[._]*.sw[a-p] +[._]s[a-rt-v][a-z] +[._]ss[a-gi-z] +[._]sw[a-p] + +# Session +Session.vim +Sessionx.vim + +# Temporary +.netrwhist +*~ +# Auto-generated tag files +tags +# Persistent undo +[._]*.un~ \ No newline at end of file
0
diff --git a/priv/public/ui/app/mn_wizard/mn_terms_and_conditions/mn_terms_and_conditions_controller.js b/priv/public/ui/app/mn_wizard/mn_terms_and_conditions/mn_terms_and_conditions_controller.js mnServersService .setupServices({services: 'kv,index,fts,n1ql'}).then(function () { var newClusterState = mnWizardService.getNewClusterState(); + var data = mnClusterConfigurationService.getNewClusterConfig(); + mnSettingsClusterService + .postPoolsDefault(data, false, newClusterState.clusterName).then(function () { mnClusterConfigurationService .postAuth(newClusterState.user).then(function () { return mnAuthService return $state.go('app.admin.overview'); }) }); + }) }); }); });
12
diff --git a/website_code/php/management/upload.php b/website_code/php/management/upload.php @@ -34,12 +34,16 @@ if($_FILES["fileToUpload"]["name"]) { { $description = $_POST["templateDescription"]; } + else + { + die("Description can't be empty!"); + } $source = $_FILES["fileToUpload"]["tmp_name"]; $temp_loc = dirname($source); $type = $_FILES["fileToUpload"]["type"]; - $template_location = "C:/Users/Akshay/Desktop/test/"; + $template_location = $xerte_toolkits_site->basic_template_path. 'xerte' . DIRECTORY_SEPARATOR . 'templates'. DIRECTORY_SEPARATOR; $path = $template_location . $filename; $isZip = strtolower($name[1]) == 'zip' ? true : false; @@ -75,6 +79,17 @@ if($_FILES["fileToUpload"]["name"]) { { $mediaFound = true; } + else + { + if($templateFound === false) + { + die("No template.xml found!"); + } + if($mediaFound === false) + { + die("No media folder found!"); + } + } } if($templateFound === true && $mediaFound === true) @@ -87,7 +102,7 @@ if($_FILES["fileToUpload"]["name"]) { $zip->close(); - copy($temp_loc . DIRECTORY_SEPARATOR . "template.xml", $template_location . $name[0] . DIRECTORY_SEPARATOR . "template.xml"); + copy($temp_loc . DIRECTORY_SEPARATOR . "template.xml", $template_location . $name[0] . DIRECTORY_SEPARATOR . "data.xml"); $xml = new XerteXMLInspector(); //Is false als hij niet correct is, NULL is wel correct @@ -122,7 +137,11 @@ if($_FILES["fileToUpload"]["name"]) { $lastId = db_query($query, $param); $infoContents = returnInfoFile($row['template_framework'], $row['template_name']); - editInfoFile($infoContents, $name[0], $description); + $contents = editInfoFile($infoContents, $name[0], $description); + var_dump($contents); + + createInfoFile($template_location, $name[0], $contents); + deleteZip($template_location, $name[0]); } } @@ -199,6 +218,30 @@ function editInfoFile($infoContents, $displayName, $description) return $list; } +function createInfoFile($dir, $templateName, $content) +{ + $file = fopen($dir . $templateName . DIRECTORY_SEPARATOR . $templateName . ".info" , 'w'); + fwrite($file, $content); + fclose($file); +} + +function deleteZip($dir, $templateName) +{ + $files = glob($dir . '*'); + + foreach($files as $file) + { + if(strpos($file, $templateName . ".zip") !== false) + { + var_dump("Hier kom ook!"); + unlink($file); + } + } + +} + + + ?>
10
diff --git a/src/pages/guides/Backpacks.jsx b/src/pages/guides/Backpacks.jsx @@ -110,6 +110,14 @@ const centerCell = ({ value }) => { </div>; }; +const centerNowrapCell = ({ value }) => { + return <div + className = 'center-content nowrap-content' + > + { value } + </div>; +}; + const priceCell = ({ value }) => { return <div className = 'center-content' @@ -188,9 +196,9 @@ function Backpacks(props) { Cell: centerCell, }, { - Header: 'Speed penalty', - accessor: 'speedPenalty', - Cell: centerCell, + Header: 'Weight', + accessor: 'weight', + Cell: centerNowrapCell, }, { Header: 'Slot ratio', @@ -234,7 +242,7 @@ function Backpacks(props) { ratio: (item.itemProperties.grid?.totalSize / item.slots).toFixed(2), size: item.itemProperties.grid?.totalSize, slots: item.slots, - speedPenalty: `${item.itemProperties.speedPenaltyPercent || 0}%`, + weight: `${item.itemProperties.Weight} kg`, wikiLink: item.wikiLink, }; })
14
diff --git a/src/containers/sound-tab.jsx b/src/containers/sound-tab.jsx @@ -52,20 +52,18 @@ class SoundTab extends React.Component { render () { const { - editingTarget, - sprites, - stage, + vm, onNewSoundFromLibraryClick, onNewSoundFromRecordingClick } = this.props; - const target = editingTarget && sprites[editingTarget] ? sprites[editingTarget] : stage; + const sprite = vm.editingTarget.sprite; - if (!target) { + if (!sprite) { return null; } - const sounds = target.sounds ? target.sounds.map(sound => ( + const sounds = sprite.sounds ? sprite.sounds.map(sound => ( { url: soundIcon, name: sound.name @@ -106,7 +104,7 @@ class SoundTab extends React.Component { onDeleteClick={this.handleDeleteSound} onItemClick={this.handleSelectSound} > - {editingTarget && target.sounds && target.sounds.length > 0 ? ( + {sprite.sounds && sprite.sounds.length > 0 ? ( <SoundEditor soundIndex={this.state.selectedSoundIndex} /> ) : null} {this.props.soundRecorderVisible ? (
4
diff --git a/resource/js/components/PageEditor/Editor.js b/resource/js/components/PageEditor/Editor.js @@ -4,6 +4,7 @@ import PropTypes from 'prop-types'; import { UnControlled as CodeMirror } from 'react-codemirror2'; require('codemirror/lib/codemirror.css'); require('codemirror/addon/display/autorefresh'); +require('codemirror/addon/edit/matchbrackets'); require('codemirror/addon/edit/matchtags'); require('codemirror/addon/edit/closetag'); require('codemirror/addon/edit/continuelist'); @@ -35,6 +36,7 @@ export default class Editor extends React.Component { indentUnit: 4, autoRefresh: true, autoCloseTags: true, + matchBrackets: true, matchTags: {bothTags: true}, lineWrapping: true, // markdown mode options
4
diff --git a/server/game/gamesteps/killcharacters.js b/server/game/gamesteps/killcharacters.js @@ -10,7 +10,7 @@ class KillCharacters extends BaseStep { continue() { let cardsInPlay = this.cards.filter(card => card.location === 'play area'); - this.game.applyGameAction('killed', cardsInPlay, killable => { + this.game.applyGameAction('kill', cardsInPlay, killable => { for(let card of killable) { card.markAsInDanger(); }
10
diff --git a/token-metadata/0xe3818504c1B32bF1557b16C238B2E01Fd3149C17/metadata.json b/token-metadata/0xe3818504c1B32bF1557b16C238B2E01Fd3149C17/metadata.json "symbol": "PLR", "address": "0xe3818504c1B32bF1557b16C238B2E01Fd3149C17", "decimals": 18, - "dharmaVerificationStatus": { "dharmaVerificationStatus": "VERIFIED" } \ No newline at end of file -} \ No newline at end of file
3