code
stringlengths 122
4.99k
| label
int64 0
14
|
---|---|
diff --git a/test/unit/test-helper-specs.js b/test/unit/test-helper-specs.js @@ -15,31 +15,31 @@ describe('test helpers', () => {
it('should get the correct path for Windows', async function () {
mocks.system.expects('isWindows').once().returns(true);
- let cdPath = await getChromedriver220Asset();
- cdPath.should.eql(`${basePath}/test/assets/chromedriver-2.20/windows/chromedriver.exe`);
+ let cdPath = path.normalize(await getChromedriver220Asset());
+ cdPath.should.eql(path.normalize(`${basePath}/test/assets/chromedriver-2.20/windows/chromedriver.exe`));
mocks.system.verify();
});
it('should get the correct path for Mac', async function () {
mocks.system.expects('isWindows').once().returns(false);
mocks.system.expects('isMac').once().returns(true);
- let cdPath = await getChromedriver220Asset();
- cdPath.should.eql(`${basePath}/test/assets/chromedriver-2.20/mac/chromedriver`);
+ let cdPath = path.normalize(await getChromedriver220Asset());
+ cdPath.should.eql(path.normalize(`${basePath}/test/assets/chromedriver-2.20/mac/chromedriver`));
mocks.system.verify();
});
it('should get the correct path for Unix 32-bit', async function () {
mocks.system.expects('isWindows').once().returns(false);
mocks.system.expects('isMac').once().returns(false);
mocks.system.expects('arch').once().returns('32');
- let cdPath = await getChromedriver220Asset();
- cdPath.should.eql(`${basePath}/test/assets/chromedriver-2.20/linux-32/chromedriver`);
+ let cdPath = path.normalize(await getChromedriver220Asset());
+ cdPath.should.eql(path.normalize(`${basePath}/test/assets/chromedriver-2.20/linux-32/chromedriver`));
mocks.system.verify();
});
it('should get the correct path for Unix 64-bit', async function () {
mocks.system.expects('isWindows').once().returns(false);
mocks.system.expects('isMac').once().returns(false);
mocks.system.expects('arch').once().returns('64');
- let cdPath = await getChromedriver220Asset();
- cdPath.should.eql(`${basePath}/test/assets/chromedriver-2.20/linux-64/chromedriver`);
+ let cdPath = path.normalize(await getChromedriver220Asset());
+ cdPath.should.eql(path.normalize(`${basePath}/test/assets/chromedriver-2.20/linux-64/chromedriver`));
mocks.system.verify();
});
}));
| 1 |
diff --git a/data/brands/amenity/recycling.json b/data/brands/amenity/recycling.json "short_name": "SVdP"
}
},
- {
- "displayName": "Sympany",
- "id": "sympany-dfbbb3",
- "locationSet": {"include": ["nl"]},
- "tags": {
- "amenity": "recycling",
- "brand": "Sympany",
- "brand:wikidata": "Q2646891",
- "name": "Sympany",
- "operator": "Sympany",
- "operator:wikidata": "Q2646891",
- "recycling_type": "container",
- "recycling:clothes": "yes",
- "recycling:shoes": "yes"
- }
- },
{
"displayName": "The Salvation Army",
"id": "thesalvationarmy-a9e339",
| 5 |
diff --git a/iris/mutations/community/sendEmailInvites.js b/iris/mutations/community/sendEmailInvites.js @@ -38,7 +38,7 @@ export default async (
currentUser.id
);
- if (!permissions.isOwner) {
+ if (!permissions.isOwner && !permissions.isModerator) {
return new UserError(
"You don't have permission to invite people to this community."
);
| 11 |
diff --git a/graphic.py b/graphic.py @@ -76,7 +76,6 @@ def _graphics_child(slug):
graphic_path = alt_path
else:
graphic_path = '%s/%s' % (app_config.GRAPHICS_PATH, slug)
- print graphic_path
# Fallback for legacy projects w/o child templates
if not os.path.exists('%s/child_template.html' % graphic_path):
| 2 |
diff --git a/Source/Renderer/ShaderSource.js b/Source/Renderer/ShaderSource.js @@ -324,7 +324,7 @@ define([
/**
* Create a single string containing the full, combined vertex shader with all dependencies and defines.
*
- * @param {Object} [context] The current rendering context
+ * @param {Context} context The current rendering context
*
* @returns {String} The combined shader string.
*/
@@ -335,7 +335,7 @@ define([
/**
* Create a single string containing the full, combined fragment shader with all dependencies and defines.
*
- * @param {Object} [context] The current rendering context
+ * @param {Context} context The current rendering context
*
* @returns {String} The combined shader string.
*/
| 1 |
diff --git a/token-metadata/0x42d6622deCe394b54999Fbd73D108123806f6a18/metadata.json b/token-metadata/0x42d6622deCe394b54999Fbd73D108123806f6a18/metadata.json "symbol": "SPANK",
"address": "0x42d6622deCe394b54999Fbd73D108123806f6a18",
"decimals": 18,
- "dharmaVerificationStatus": {
"dharmaVerificationStatus": "VERIFIED"
}
\ No newline at end of file
-}
\ No newline at end of file
| 3 |
diff --git a/includes/Core/Authentication/Clients/OAuth_Client.php b/includes/Core/Authentication/Clients/OAuth_Client.php @@ -209,7 +209,7 @@ final class OAuth_Client {
$this->google_client->setScopes( $this->get_required_scopes() );
$this->google_client->prepareScopes();
- $profile = ( new Profile( $this->user_options ) )->get();
+ $profile = $this->profile->get();
if ( ! empty( $profile['email'] ) ) {
$this->google_client->setLoginHint( $profile['email'] );
}
| 14 |
diff --git a/index.js b/index.js @@ -61,7 +61,7 @@ exports.errors = {
* @param {string} uri
* @param {Object<string, any>} options
*/
-exports.ensureDatabaseConnection = async (uri, options) => {
+exports.setupModels = async (uri, options) => {
const connection = await connectDb(uri, options)
await initialize.setupModels(connection)
}
| 10 |
diff --git a/packages/stockflux-launcher/public/searchResultsWindow.css b/packages/stockflux-launcher/public/searchResultsWindow.css body {
margin: 0;
- border: 1px solid #1a212a;
- background-color: #28313d;
- font-family: "Roboto", sans-serif;
+ border: 1px solid #1A212A;
+ background-color: #28313D;
+ font-family: 'Roboto', sans-serif;
overflow: hidden;
}
@@ -17,25 +17,25 @@ body {
}
::-webkit-scrollbar-track {
- -webkit-box-shadow: inset 0 0 6px #464e58;
+ -webkit-box-shadow: inset 0 0 6px #464E58;
}
::-webkit-scrollbar-thumb {
- background-color: #464e58;
- outline: 1px solid #1a212a;
+ background-color: #464E58;
+ outline: 1px solid #1A212A;
border-radius: 5px;
}
.searchResult {
- border-bottom: 1px solid #1a212a;
- color: #aeb1b5;
+ border-bottom: 1px solid #1A212A;
+ color: #AEB1B5;
margin-right: 0;
padding: 5px 0 5px 5px;
user-select: none;
}
.searchResult:hover {
- background-color: #464e58;
+ background-color: #464E58;
}
.searchResult:last-child {
@@ -47,13 +47,13 @@ body {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
- color: #95989c;
+ color: #95989C;
}
.subtitle {
font-size: 20px;
font-weight: 500;
- color: #aeb1b5;
+ color: #AEB1B5;
}
.containerActions {
@@ -64,13 +64,13 @@ body {
border: none;
background-color: transparent;
cursor: pointer;
+ outline: none;
+ color: #37d8bc;
border: solid 1px #37d8bc;
border-radius: 50%;
width: 40px;
height: 40px;
margin: 0 5px;
- outline: none;
- color: #37d8bc;
}
.buttonIcon {
@@ -79,7 +79,7 @@ body {
}
.buttonAction:hover {
- color: #7b7e82;
+ color: #7B7E82;
}
.left .free-text-search,
@@ -89,7 +89,7 @@ body {
}
input {
- background: #1a212a;
+ background: #1A212A;
color: #aeb1b5;
border: none;
border-radius: 20px;
@@ -110,7 +110,7 @@ div#container {
}
div#searchbar-container {
- border-bottom: 1px solid #1a212a;
+ border-bottom: 1px solid #1A212A;
}
div#results-container {
| 13 |
diff --git a/src/css/docs/components/docs-search.css b/src/css/docs/components/docs-search.css border-radius: 0 0 .5em .5em;
padding-top: var(--docs-header-height);
width: var(--docs-body-width);
+
+ --suggestion-item-vertical-padding: .5em;
}
[theme="dark"] .DocsSearch .ds-dropdown-menu {
.DocsSearch .ds-suggestion {
display: block;
- padding: .5em 1em;
- margin: 0 -1em;
+ --horizontal-padding: 1em;
+ padding: var(--suggestion-item-vertical-padding) var(--horizontal-padding);
+ margin: 0 calc(-1 * var(--horizontal-padding));
border-radius: .25em;
}
--highlight-opacity: .4;
}
+.DocsSearch .algolia-docsearch-suggestion--no-results {
+ padding-top: var(--suggestion-item-vertical-padding);
+ margin-bottom: 1em;
+}
+
+.DocsSearch .algolia-docsearch-suggestion--no-results .algolia-docsearch-suggestion--text {
+ font-size: 1em;
+}
+
.DocsSearch .algolia-docsearch-footer {
margin-top: .5rem;
font-size: .7em;
| 7 |
diff --git a/src/pixi/IgePixi.js b/src/pixi/IgePixi.js @@ -331,8 +331,11 @@ var IgeInitPixi = IgeClass.extend({
if (body && unit._debugEntity) {
var scale = ige.physics.scaleRatio(),
position = unit.body.m_xf && unit.body.m_xf.position,
- x = scale * position.x - unit._debugEntity.width / 2,
- y = scale * position.y - unit._debugEntity.height / 2;
+ x = scale * position.x,
+ y = scale * position.y;
+ if (!isNaN(unit.width())) {
+ unit._debugEntity.pivot.set(unit.width() / 2, unit.height() / 2);
+ }
unit._debugEntity.position.set(x, y);
}
},
| 1 |
diff --git a/lib/hexo/load_plugins.js b/lib/hexo/load_plugins.js @@ -34,6 +34,9 @@ function loadModuleList(ctx) {
// Ignore plugins whose name is not started with "hexo-"
if (!/^hexo-|^@[^/]+\/hexo-/.test(name)) return false;
+ // Ignore typescript definition file that is started with "@types/"
+ if (/^@types\//.test(name)) return false;
+
// Make sure the plugin exists
const path = ctx.resolvePlugin(name);
return fs.exists(path);
| 8 |
diff --git a/GETTING_STARTED.md b/GETTING_STARTED.md **Thank you for volunteering to translate Node.js content to your language!**
-By translating Node.js content (website, api, tutorials), you are directly impacting developers around the world. Your efforts
-will help developers in more countries to learn Node.js! Thank you so much for volunteering your time!
+By translating Node.js content (website, api, tutorials), you are directly impacting developers around the world. Your efforts will help developers in more countries to learn Node.js! Thank you so much for volunteering your time!
The following is a set of guidelines for contributing to Node.js localization effort.
@@ -15,7 +14,7 @@ Here are some guidelines to keep in mind as a translator:
- Do not translate JavaScript keywords like `String`, `Event`, `Array`, `Class`, etc.
- Do not translate Node.js module names, method names, event names, etc.
- If you find an error in the source English docs, open a pull request on the [nodejs/node](https://github.com/nodejs/node/tree/master/doc) repository.
-- If you've been working as a translator and want to have more influence over the approved translations in your language, let know managers on the Crowdin platform and they wll make you a proofreader.
+- If you've been working as a translator and want to have more influence over the approved translations in your language, let know managers on the Crowdin platform and they will make you a proofreader.
Node.js localization effort uses [Crowdin](https://crowdin.com/), an awesome platform for
collaborative translation. The work in Crowdin generate automated PRs & updates to [Node.js i18n](https://github.com/nodejs/i18n) repo.
@@ -34,14 +33,13 @@ The final translation that appears in Node.js content is selected as follows:
## Proofreading
-If you would like to be promoted to proofreader status on the Node.js project, please translate 1,000 words or
-more before applying. When contacting managers on the Crowdin, please include a link to your existing translations on the project.
+If you would like to be promoted to proofreader status on the Node.js project, please translate 1,000 words or more before applying. When contacting managers on Crowdin, please include a link to your existing translations on the project.
## The role of the l10n group
-The l10n group for specific language aims to gather people interested in taking part in the translation process in one place, so
+The l10n group for specific languages aims to gather people interested in taking part in the translation process in one place, so
that it can be used as a source of help when problems/doubts arise during the translation process.
-To contact specific l10n group, all you need is an account at Github. You do not have to be a member of this group to start the
+To contact a specific l10n group, all you need is an account on Github. You do not have to be a member of this group to start the
translation process.
If you are unable to find help on the l10n group for your specific language, you can always ask for help on the
@@ -63,7 +61,7 @@ their technical experience or familiarity with the Node.js project.
- A Crowdin project seamlessly integrates with an existing Github repo, automating PRs & updates from its internationalization projects.
-Please take o look at the [video]( https://www.youtube.com/watch?v=bxdC7MfrO7A&t=105s) prepared by Andriy Poznakhovskyy member of the Node.js i18n WG where Andriy show how to work on translations in Crowdin.
+Please take o look at the [video]( https://www.youtube.com/watch?v=bxdC7MfrO7A&t=105s) prepared by Andriy Poznakhovskyy member of the Node.js i18n WG that show how to work on translations in Crowdin.
## Related links
- [Node.js i18n](https://github.com/nodejs/i18n) repo
| 1 |
diff --git a/config/redirects.js b/config/redirects.js @@ -1204,5 +1204,9 @@ module.exports = [
{
from: '/quickstart/native/ionic/09-customizing-lock',
to: '/quickstart/native/ionic'
+ },
+ {
+ from: '/quickstart/backend/nodejs/00-getting-started',
+ to: '/quickstart/backend/nodejs'
}
];
| 0 |
diff --git a/generators/client/templates/angular/src/main/webapp/app/admin/user-management/user-management.route.ts.ejs b/generators/client/templates/angular/src/main/webapp/app/admin/user-management/user-management.route.ts.ejs @@ -20,7 +20,6 @@ import { Injectable } from '@angular/core';
import { Resolve, ActivatedRouteSnapshot, RouterStateSnapshot, Routes } from '@angular/router';
import { JhiResolvePagingParams } from 'ng-jhipster';
-import { UserRouteAccessService } from 'app/core/auth/user-route-access-service';
import { User } from 'app/core/user/user.model';
import { UserService } from 'app/core/user/user.service';
import { UserManagementComponent } from './user-management.component';
@@ -52,8 +51,7 @@ export const userManagementRoute: Routes = [
data: {
pageTitle: 'userManagement.home.title',
defaultSort: 'id,asc'
- },
- canActivate: [UserRouteAccessService]
+ }
},
{
path: ':login/view',
@@ -63,23 +61,20 @@ export const userManagementRoute: Routes = [
},
data: {
pageTitle: 'userManagement.home.title'
- },
- canActivate: [UserRouteAccessService]
+ }
},
{
path: 'new',
component: UserManagementUpdateComponent,
resolve: {
user: UserManagementResolve
- },
- canActivate: [UserRouteAccessService]
+ }
},
{
path: ':login/edit',
component: UserManagementUpdateComponent,
resolve: {
user: UserManagementResolve
- },
- canActivate: [UserRouteAccessService]
+ }
}
];
| 2 |
diff --git a/.travis.yml b/.travis.yml @@ -6,8 +6,7 @@ addons:
install: npm install
before_script:
- npm install -g grunt
- - npm install -g increase-memory-limit
- - increase-memory-limit
+ - export NODE_OPTIONS=--max_old_space_size=1024
script:
- grunt lint
- grunt test
| 2 |
diff --git a/src/App.js b/src/App.js @@ -22,12 +22,8 @@ const App = () => {
setUseDesktop(true)
}
- const Splash =
- !isMobile && !useDesktop ? (
- <SplashDesktop onContinue={continueWithDesktop} />
- ) : (
- <RouterSelector usingDesktop={useDesktop} />
- )
+ const Splash = !isMobile && !useDesktop ? <SplashDesktop onContinue={continueWithDesktop} /> : <RouterSelector />
+
return (
<PaperProvider theme={theme}>
<SafeAreaView style={styles.safeAreaView}>
| 2 |
diff --git a/app/components/user/TwoFactor/index.js b/app/components/user/TwoFactor/index.js @@ -198,6 +198,7 @@ class TwoFactor extends React.PureComponent<Props, State> {
>
<TwoFactorDelete
viewer={this.props.viewer}
+ onDeactivationComplete={this.handleDeactivateDialogClose}
/>
</Dialog>
</React.Fragment>
| 9 |
diff --git a/src/primitive.js b/src/primitive.js @@ -595,7 +595,7 @@ var _ = Mavo.Primitive = class Primitive extends Mavo.Node {
* Get value from the DOM
*/
getValue (o) {
- if (this.editing && this.editor !== this.element) {
+ if (this.editing && this.editor && this.editor !== this.element) {
return this.editorValue;
}
| 1 |
diff --git a/contracts/Synth.sol b/contracts/Synth.sol @@ -106,7 +106,6 @@ contract Synth is ExternStateToken {
optionalProxy
returns (bool)
{
- _notFeeAddress(messageSender);
bytes memory empty;
return super._internalTransfer(messageSender, to, value, empty);
}
@@ -119,7 +118,6 @@ contract Synth is ExternStateToken {
optionalProxy
returns (bool)
{
- _notFeeAddress(messageSender);
// And send their result off to the destination address
return super._internalTransfer(messageSender, to, value, data);
}
@@ -132,8 +130,7 @@ contract Synth is ExternStateToken {
optionalProxy
returns (bool)
{
- _notFeeAddress(from);
-
+ require(account != 0xfeefeefeefeefeefeefeefeefeefeefeefeefeef, "The fee address is not allowed");
// Skip allowance update in case of infinite allowance
if (tokenState.allowance(from, messageSender) != uint(-1)) {
// Reduce the allowance by the amount we're transferring.
@@ -153,7 +150,7 @@ contract Synth is ExternStateToken {
optionalProxy
returns (bool)
{
- _notFeeAddress(from);
+ require(account != 0xfeefeefeefeefeefeefeefeefeefeefeefeefeef, "The fee address is not allowed");
// Skip allowance update in case of infinite allowance
if (tokenState.allowance(from, messageSender) != uint(-1)) {
@@ -205,14 +202,6 @@ contract Synth is ExternStateToken {
callTokenFallbackIfNeeded(sender, recipient, amount, empty);
}
-
- function _notFeeAddress(address account)
- internal
- view
- {
- require(account != IFeePool(feePoolProxy).FEE_ADDRESS(), "The fee address is not allowed");
- }
-
/* ========== MODIFIERS ========== */
modifier onlySynthetixOrFeePool() {
| 2 |
diff --git a/package.json b/package.json "build-server": "node ./config/build-server.js",
"zip-server":
"zip -r thorium-macos.zip thorium-macos && zip -r thorium-win.exe.zip thorium-win.exe && zip -r thorium-linux.zip thorium-linux",
- "build":
- "npm run build-client && npm run build-server && npm run zip-server",
+ "build": "npm run build-client && npm run build-server",
"lint": "eslint .",
"cloc":
"cloc . --exclude-dir=node_modules,config,scripts,build-server,snapshots,coverage,build --exclude-ext=css,json",
| 2 |
diff --git a/io-manager.js b/io-manager.js @@ -767,6 +767,9 @@ ioManager.click = e => {
}
raycastManager.setLastMouseEvent(e);
};
+ioManager.dblclick = e => {
+ // nothing
+};
// let mouseDown = false;
let lastMouseButtons = 0;
ioManager.mousedown = e => {
| 0 |
diff --git a/includes/Core/Authentication/Authentication.php b/includes/Core/Authentication/Authentication.php @@ -1026,6 +1026,9 @@ final class Authentication {
},
'type' => Notice::TYPE_SUCCESS,
'active_callback' => function() {
+ if ( ! empty( $this->user_options->get( OAuth_Client::OPTION_ERROR_CODE ) ) ) {
+ return false;
+ }
return $this->get_oauth_client()->needs_reauthentication();
},
)
@@ -1061,11 +1064,11 @@ final class Authentication {
$message = $auth_client->get_error_message( $error_code );
$access_code = $this->user_options->get( OAuth_Client::OPTION_PROXY_ACCESS_CODE );
- if ( $this->credentials->using_proxy() && $access_code ) {
+ if ( $this->credentials->using_proxy() ) {
$message .= ' ' . sprintf(
/* translators: %s: URL to re-authenticate */
__( 'To fix this, <a href="%s">redo the plugin setup</a>.', 'google-site-kit' ),
- esc_url( $auth_client->get_proxy_setup_url( $access_code, $error_code ) )
+ esc_url( $auth_client->get_proxy_setup_url( $access_code ) )
);
$this->user_options->delete( OAuth_Client::OPTION_PROXY_ACCESS_CODE );
} else {
| 7 |
diff --git a/python/ccxt/async_support/base/exchange.py b/python/ccxt/async_support/base/exchange.py @@ -171,7 +171,7 @@ class Exchange(BaseExchange):
self.reloading_markets = True
coroutine = self.load_markets_helper(reload, params)
# coroutines can only be awaited once so we wrap it in a task
- self.markets_loading = asyncio.create_task(coroutine)
+ self.markets_loading = asyncio.ensure_future(coroutine)
try:
result = await self.markets_loading
except Exception as e:
| 1 |
diff --git a/runtime.js b/runtime.js @@ -25,7 +25,7 @@ const importMap = {
const _clone = o => JSON.parse(JSON.stringify(o));
// const thingFiles = {};
-const _loadGltf = async file => {
+const _loadGltf = async (file, {optimize = true} = {}) => {
// const u = `${storageHost}/${hash}`;
const u = URL.createObjectURL(file);
let o;
@@ -40,6 +40,8 @@ const _loadGltf = async file => {
}
o = o.scene;
+ console.log('optimize', optimize, new Error().stack);
+ if (optimize) {
const specs = [];
o.traverse(o => {
if (o.isMesh) {
@@ -72,6 +74,9 @@ const _loadGltf = async file => {
// EXT_hash: hash,
};
return mesh;
+ } else {
+ return o;
+ }
/* const u = URL.createObjectURL(file);
let o;
@@ -497,32 +502,32 @@ const _loadLink = async file => {
return portalMesh;
};
-runtime.loadFile = async file => {
+runtime.loadFile = async (file, opts) => {
switch (getExt(file.name)) {
case 'gltf':
case 'glb': {
- return await _loadGltf(file);
+ return await _loadGltf(file, opts);
}
case 'vrm': {
- return await _loadVrm(file);
+ return await _loadVrm(file, opts);
}
case 'vox': {
- return await _loadVox(file);
+ return await _loadVox(file, opts);
}
case 'png':
case 'gif':
case 'jpg': {
- return await _loadImg(file);
+ return await _loadImg(file, opts);
}
case 'js': {
- return await _loadScript(file);
+ return await _loadScript(file, opts);
break;
}
case 'wbn': {
- return await _loadWebBundle(file);
+ return await _loadWebBundle(file, opts);
}
case 'url': {
- return await _loadLink(file);
+ return await _loadLink(file, opts);
}
}
};
| 0 |
diff --git a/packages/@uppy/url/src/index.js b/packages/@uppy/url/src/index.js @@ -141,8 +141,12 @@ module.exports = class Url extends Plugin {
}
})
.then(() => {
- const dashboard = this.uppy.getPlugin('Dashboard')
- if (dashboard) dashboard.hideAllPanels()
+ // Close the Dashboard panel if plugin is installed
+ // into Dashboard (could be other parent UI plugin)
+ // const parent = this.uppy.getPlugin(this.parent)
+ // if (parent && parent.hideAllPanels) {
+ // parent.hideAllPanels()
+ // }
})
.catch((err) => {
this.uppy.log(err)
@@ -206,23 +210,29 @@ module.exports = class Url extends Plugin {
addFile={this.addFile} />
}
+ onMount () {
+ if (this.el) {
+ this.el.addEventListener('drop', this.handleDrop)
+ this.el.addEventListener('dragover', this.handleDragOver)
+ this.el.addEventListener('dragleave', this.handleDragLeave)
+ this.el.addEventListener('paste', this.handlePaste)
+ }
+ }
+
install () {
const target = this.opts.target
if (target) {
this.mount(target, this)
}
-
- this.el.addEventListener('drop', this.handleDrop)
- this.el.addEventListener('dragover', this.handleDragOver)
- this.el.addEventListener('dragleave', this.handleDragLeave)
- this.el.addEventListener('paste', this.handlePaste)
}
uninstall () {
+ if (this.el) {
this.el.removeEventListener('drop', this.handleDrop)
this.el.removeEventListener('dragover', this.handleDragOver)
this.el.removeEventListener('dragleave', this.handleDragLeave)
this.el.removeEventListener('paste', this.handlePaste)
+ }
this.unmount()
}
| 5 |
diff --git a/articles/users/redirecting-users.md b/articles/users/redirecting-users.md ---
-description: How to handle returning users after authentication.
+title: Redirect Users After Login
+description: How to redirect users to URLs that have not been whitelisted
---
# Redirect Users After Login
To make your login process as easy-to-use and seamless as possible, you'll need to keep track of where you want to route users inside your application once Auth0 redirects users back to your application after authentication.
-When implementing Auth0, please note that the `redirect_uri` field is used as a callback URL. Auth0 invokes callback URLs after the authentication process and are where your application gets routed. Because callback URLs can be manipulated by unauthorized parties, Auth0 recognizes only whitelisted URLs set in the `Allowed Callback URLs` field of a [Application's Settings](${manage_url}/#/applications/${account.clientId}/settings) as valid.
+During a user's authentication, the `redirect_uri` request parameter is used as a callback URL. This is where your application will receive and process the response from Auth0, and where the users will be redirected, once the authentication is complete.
-The callback URL is not necessarily the same URL to which you want users redirected after authentication.
+Because callback URLs can be manipulated by unauthorized parties, Auth0 recognizes only whitelisted URLs set in the **Allowed Callback URLs** field of a [Application's Settings](${manage_url}/#/applications/${account.clientId}/settings) as valid.
-## Redirect Users to a Non-Callback URL
+However the callback URL is not necessarily the same URL to which you want users redirected after authentication.
-If you want to redirect authenticated users to a URL that is *not* the callback URL, you can do so using one of the following methods.
+## Redirect users to a non-callback URL
-### Store the Desired URL in Web Storage
+To redirect authenticated users to a URL that is *not* the callback URL, you can store the desired URL:
-You can store the desired URL in web storage to be used after authentication. Storing a URL using this method is similar to [storing a JWT](/security/store-tokens#where-to-store-your-jwts). You can then create the necessary logic to obtain the stored URL to redirect your users after successful authentication.
+- In web storage (for single page apps, running on the browser), or
+- In a a cookie (for regular web apps, running on the server)
-### Use Rules
-
-You can [configure redirection using Rules](/rules/redirect) so that Auth0 redirects users *before* the authentication translation completes. This option has the added benefit of allowing you to implement custom authentication flows that require the user's input.
+You can then create the necessary logic in your application to retrieve the stored URL and redirect your users where you want.
| 2 |
diff --git a/src/screens/CategoriesDrawer/index.js b/src/screens/CategoriesDrawer/index.js @@ -9,7 +9,8 @@ import {
categoriesDrawerCancelColor,
whiteColor,
darkBlueGreyTwoColor,
- eucalyptusGreenColor
+ eucalyptusGreenColor,
+ lightNavyBlueColor
} from "../../constants/colors";
import text from "../../constants/text";
@@ -24,6 +25,10 @@ class CategoriesDrawer extends PureComponent<Props> {
this.props.navigation.navigate("DrawerClose");
};
+ handleShowCategories = () => {
+ // TODO
+ };
+
render() {
return (
<SafeAreaView style={styles.container}>
@@ -40,6 +45,14 @@ class CategoriesDrawer extends PureComponent<Props> {
<View style={styles.selectedCategoriesPills}>
<Text style={styles.zeroSelected}>{text.zeroSelected}</Text>
</View>
+ <View>
+ <TouchableOpacity
+ style={styles.showEventsButton}
+ onPress={this.handleShowCategories}
+ >
+ <Text style={styles.showEventsText}>Show 213 events</Text>
+ </TouchableOpacity>
+ </View>
</ContentPadding>
</SafeAreaView>
);
@@ -66,17 +79,31 @@ const styles = StyleSheet.create({
},
selectedCategoriesPills: {
backgroundColor: darkBlueGreyTwoColor,
- paddingTop: 10,
- paddingBottom: 10,
+ paddingTop: 11,
+ paddingBottom: 9,
paddingLeft: 16,
paddingRight: 16,
- borderRadius: 4,
- marginBottom: 16
+ borderRadius: 4
},
zeroSelected: {
fontFamily: "Poppins-SemiBold",
color: eucalyptusGreenColor,
fontSize: 18
+ },
+ showEventsButton: {
+ backgroundColor: eucalyptusGreenColor,
+ width: "100%",
+ paddingTop: 13,
+ paddingBottom: 11,
+ borderRadius: 4,
+ marginTop: 16,
+ marginBottom: 16
+ },
+ showEventsText: {
+ fontFamily: "Poppins-SemiBold",
+ color: lightNavyBlueColor,
+ fontSize: 18,
+ textAlign: "center"
}
});
| 0 |
diff --git a/config.php b/config.php @@ -126,6 +126,8 @@ foreach ($row as $key => $value) {
// awkward ones.
$xerte_toolkits_site->mimetypes = explode(",", $row['mimetypes']);
+$xerte_toolkits_site->enable_file_ext_check = true_or_false($row['enable_file_ext_check']);
+$xerte_toolkits_site->file_extensions = explode(",", $row['file_extensions']);
$xerte_toolkits_site->name = $row['site_name'];
$xerte_toolkits_site->demonstration_page = $xerte_toolkits_site->site_url . $row['demonstration_page'];
$xerte_toolkits_site->news_text = base64_decode($row['news_text']);
| 9 |
diff --git a/lib/assets/core/test/spec/cartodb3/dataset/dataset-header-view.spec.js b/lib/assets/core/test/spec/cartodb3/dataset/dataset-header-view.spec.js -var $ = require('jquery');
var _ = require('underscore');
var ConfigModel = require('../../../../javascripts/cartodb3/data/config-model');
var HeaderView = require('../../../../javascripts/cartodb3/dataset/dataset-header/dataset-header-view');
| 2 |
diff --git a/src/client/components/containers/CollectionsContainer.jsx b/src/client/components/containers/CollectionsContainer.jsx @@ -3,7 +3,6 @@ import { connect } from "react-redux";
import * as actions from "../../actions/actions";
import Collection from "../display/Collection.jsx";
import collectionsController from "../../controllers/collectionsController";
-import { HashRouter, Route, Switch, Link } from 'react-router-dom';
const mapStateToProps = (store) => ({
collections: store.business.collections,
@@ -44,10 +43,10 @@ const CollectionsContainer = (props) => {
return (
<div className="collections-container">
- <h1 className="collection-heading">Collections</h1>
+ <h1 className="collection-heading">Saved Workspaces</h1>
<div className="collection-import-container">
<button className="import-collections" onClick={handleClick}>
- Import Collection
+ Import Workspace
</button>
</div>
<div className="collections">
| 10 |
diff --git a/physics-manager.js b/physics-manager.js @@ -31,6 +31,8 @@ const jump = () => {
};
physicsManager.jump = jump;
+physicsManager.raycast = (position, quaternion) => geometryManager.geometryWorker.raycastPhysics(geometryManager.physics, position, quaternion);
+
/* const makeAnimal = null;
const animals = [];
physicsManager.animals = animals; */
| 0 |
diff --git a/index.d.ts b/index.d.ts @@ -58,16 +58,36 @@ declare namespace Moleculer {
static createFromPayload(broker: ServiceBroker, payload: object): Context;
}
+ interface ServiceActionSchema {
+ cache?: boolean;
+ params?: object;
+ handler: (ctx: Context) => Promise<any>;
+ }
+
+ interface ServiceSettingSchema {
+ port?: number | string;
+ routes?: Route[];
+ [name: string]: any;
+ }
+
+ interface RouteSchema {
+ path?: string;
+ mappingPolicy?: string;
+ whitelist?: string[];
+ bodyParsers?: any;
+ aliases?: { [alias: string]: string };
+ }
+
interface ServiceSchema {
name: string;
version?: string | Number;
- settings: object;
+ settings: ServiceSettingSchema;
metadata?: object;
dependencies?: string | object | Array<string> | Array<object>;
schema?: object;
broker?: ServiceBroker;
logger?: LoggerInstance;
- actions?: object;
+ actions?: { [name: string]: ServiceActionSchema };
}
class Service {
| 7 |
diff --git a/src/resources/api_nw_newwin.js b/src/resources/api_nw_newwin.js @@ -700,13 +700,20 @@ apiBridge.registerCustomHook(function(bindingsAPI) {
//if (params.id)
// options.tabId = params.id;
}
+ if (callback && !(params.new_instance === true))
+ options.block_parser = true;
try_hidden(window).chrome.windows.create(options, function(cWin) {
+ try {
if (callback) {
if (cWin)
callback(new NWWindow(cWin));
else
callback();
}
+ } finally {
+ if (options.block_parser)
+ appWindowNatives.ResumeParser(cWin.tabs[0].mainFrameId);
+ }
});
});
| 1 |
diff --git a/lib/worker.js b/lib/worker.js @@ -10,26 +10,9 @@ const metavm = require('metavm');
const { notLoaded } = require('./dependencies.js');
const application = require('./application.js');
-(async () => {
- const configPath = path.join(application.path, 'config');
- const context = metavm.createContext({ process });
- const options = { mode: process.env.MODE, context };
- const config = await new Config(configPath, options);
- const logPath = path.join(application.root, 'log');
- const home = application.root;
- const logger = await new Logger({
- path: logPath,
- workerId: threadId,
- ...config.log,
- home,
- });
-
const logError = (type) => async (err) => {
- const console = logger.active ? logger.console : global.console;
- console.error(
- `${type} error detected: ${err && err.message}`,
- err ? err.stack : 'No exception stack available'
- );
+ const msg = err.stack || err.message || 'no stack trace';
+ console.error(`${type} error: ${msg}`);
if (application.finalization) return;
if (application.initialization) {
console.info(`Can not start Application in worker ${threadId}`);
@@ -38,8 +21,20 @@ const application = require('./application.js');
}
};
- logger.on('error', logError('metalog failed'));
- const { console } = logger;
+process.on('uncaughtException', logError('uncaughtException'));
+process.on('warning', logError('warning'));
+process.on('unhandledRejection', logError('unhandledRejection'));
+
+(async () => {
+ const cfgPath = path.join(application.path, 'config');
+ const context = metavm.createContext({ process });
+ const config = await new Config(cfgPath, { mode: process.env.MODE, context });
+ const logPath = path.join(application.root, 'log');
+ const home = application.root;
+ const logOptions = { path: logPath, workerId: threadId, ...config.log, home };
+ const logger = await new Logger(logOptions);
+ logger.on('error', logError('logger error'));
+ if (logger.active) global.console = logger.console;
Object.assign(application, { config, logger, console });
if (notLoaded.size > 0) {
@@ -50,10 +45,6 @@ const application = require('./application.js');
process.exit(0);
}
- process.on('uncaughtException', logError('uncaughtException'));
- process.on('warning', logError('warning'));
- process.on('unhandledRejection', logError('unhandledRejection'));
-
if (config.server.protocol === 'https') {
const certPath = path.join(application.path, 'cert');
try {
| 7 |
diff --git a/admin-base/ui.apps/src/main/content/jcr_root/apps/admin/components/createtenantwizard/template.vue b/admin-base/ui.apps/src/main/content/jcr_root/apps/admin/components/createtenantwizard/template.vue </template>
<script>
+ const nameAvailableDebouncer = (function() {
+ let timeout
+ let oldReject
+ return {
+ call: (func, wait) => new Promise((resolve, reject) => {
+ let context = this, args = arguments
+ let later = function() {
+ resolve(func.apply(context, args))
+ }
+
+ if (timeout) {
+ clearTimeout(timeout)
+ oldReject()
+ }
+
+ oldReject = reject
+ timeout = setTimeout(later, wait)
+ })
+ }
+ })()
+
export default {
props: ['model'],
data:
}
}
- return axios.get('/perapi/admin/sites/name/available?name=' + value)
+ return nameAvailableDebouncer.call(() => axios.get('/perapi/admin/sites/name/available?name=' + value), 375)
.then(res => res.data)
.then(res => res.result ? [] : ['name already in use'])
.catch(e => [])
| 4 |
diff --git a/components/Article/Progress/index.js b/components/Article/Progress/index.js @@ -120,7 +120,7 @@ class Progress extends Component {
return Math.abs(progressElements[index].getBoundingClientRect().top - headerHeight)
}
- let closestIndex = this.lastClosestIndex || 0
+ let closestIndex = (progressElements[this.lastClosestIndex] && this.lastClosestIndex) || 0
let closestDistance = getDistanceForIndex(closestIndex)
const length = progressElements.length
| 9 |
diff --git a/articles/metadata/management-api.md b/articles/metadata/management-api.md @@ -34,7 +34,7 @@ To create a user with the following profile details:
}
```
-you would make the following `POST` call to the [Create User endpoint of the Management API](/api/management/v2#!/Users/post_users), to create the user and set the property values:
+You would make the following `POST` call to the [Create User endpoint of the Management API](/api/management/v2#!/Users/post_users), to create the user and set the property values:
```har
{
@@ -236,3 +236,21 @@ Therefore, the corresponding `PATCH` call to the API would be:
"comment": ""
}
```
+
+### Deleting
+
+Patching the metadata with an empty object removes the metadata completely. For example, sending this body removes everything in `app_metadata`:
+
+```json
+{
+ "app_metadata": {}
+}
+```
+
+Similarly, this clears out `user_metadata`:
+
+```json
+{
+ "user_metadata": {}
+}
+```
\ No newline at end of file
| 0 |
diff --git a/assets/js/googlesitekit-module.js b/assets/js/googlesitekit-module.js @@ -26,17 +26,17 @@ import './modules';
*/
import domReady from '@wordpress/dom-ready';
import { applyFilters } from '@wordpress/hooks';
-import { Component, render, Suspense, lazy } from '@wordpress/element';
+import { Component, render } from '@wordpress/element';
/**
* Internal dependencies
*/
import { loadTranslations } from './util';
-import ProgressBar from './components/ProgressBar';
import './components/data';
import './components/notifications';
import Root from './components/root';
import ModuleApp from './components/module-app';
+import Setup from './components/setup/setup-wrapper';
class GoogleSitekitModule extends Component {
constructor( props ) {
@@ -62,43 +62,7 @@ class GoogleSitekitModule extends Component {
const moduleHasSetupWizard = applyFilters( 'googlesitekit.moduleHasSetupWizard', true, currentAdminPage );
if ( showModuleSetupWizard && moduleHasSetupWizard ) {
- // Set webpackPublicPath on-the-fly.
- if ( global._googlesitekitLegacyData && global._googlesitekitLegacyData.publicPath ) {
- // eslint-disable-next-line no-undef
- __webpack_public_path__ = global._googlesitekitLegacyData.publicPath; /*eslint camelcase: 0*/
- }
-
- const Setup = lazy( () => import( /* webpackChunkName: "chunk-googlesitekit-setup-wrapper" */'./components/setup/setup-wrapper' ) );
-
- return (
- <Suspense fallback={
- <div className="googlesitekit-setup">
- <div className="mdc-layout-grid">
- <div className="mdc-layout-grid__inner">
- <div className="
- mdc-layout-grid__cell
- mdc-layout-grid__cell--span-12
- ">
- <div className="googlesitekit-setup__wrapper">
- <div className="mdc-layout-grid">
- <div className="mdc-layout-grid__inner">
- <div className="
- mdc-layout-grid__cell
- mdc-layout-grid__cell--span-12
- ">
- <ProgressBar />
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- }>
- <Setup />
- </Suspense>
- );
+ return <Setup />;
}
return <ModuleApp />;
| 2 |
diff --git a/src/core/operations/AddTextToImage.mjs b/src/core/operations/AddTextToImage.mjs @@ -23,7 +23,7 @@ class AddTextToImage extends Operation {
this.name = "Add Text To Image";
this.module = "Image";
- this.description = "Adds text onto an image.<br><br>Text can be horizontally or vertically aligned, or the position can be manually specified.<br>Variants of the Roboto font face are available in any size or colour.<br><br>Note: This may cause a degradation in image quality, especially when using font sizes larger than 72.";
+ this.description = "Adds text onto an image.<br><br>Text can be horizontally or vertically aligned, or the position can be manually specified.<br>Variants of the Roboto font face are available in any size or colour.";
this.infoURL = "";
this.inputType = "ArrayBuffer";
this.outputType = "ArrayBuffer";
@@ -152,14 +152,12 @@ class AddTextToImage extends Operation {
// Make Webpack load the png font images
- const fontImages = [
+ await Promise.all([
import(/* webpackMode: "eager" */ "../../web/static/fonts/bmfonts/Roboto72White.png"),
import(/* webpackMode: "eager" */ "../../web/static/fonts/bmfonts/RobotoSlab72White.png"),
import(/* webpackMode: "eager" */ "../../web/static/fonts/bmfonts/RobotoMono72White.png"),
import(/* webpackMode: "eager" */ "../../web/static/fonts/bmfonts/RobotoBlack72White.png")
- ];
-
- await Promise.all(fontImages);
+ ]);
const font = fontsMap[fontFace];
@@ -190,14 +188,18 @@ class AddTextToImage extends Operation {
}
});
- // Scale the image to a factor of 72, so we can print the text at any size
- const scaleFactor = 72 / size;
- if (size !== 72) {
+ // Create a temporary image to hold the rendered text
+ const textImage = new jimp(jimp.measureText(jimpFont, text), jimp.measureTextHeight(jimpFont, text));
+ textImage.print(jimpFont, 0, 0, text);
+
+ // Scale the rendered text image to the correct size
+ const scaleFactor = size / 72;
+ if (size !== 1) {
// Use bicubic for decreasing size
- if (size > 72) {
- image.scale(scaleFactor, jimp.RESIZE_BICUBIC);
+ if (size > 1) {
+ textImage.scale(scaleFactor, jimp.RESIZE_BICUBIC);
} else {
- image.scale(scaleFactor, jimp.RESIZE_BILINEAR);
+ textImage.scale(scaleFactor, jimp.RESIZE_BILINEAR);
}
}
@@ -207,14 +209,11 @@ class AddTextToImage extends Operation {
xPos = 0;
break;
case "Center":
- xPos = (image.getWidth() / 2) - (jimp.measureText(jimpFont, text) / 2);
+ xPos = (image.getWidth() / 2) - (textImage.getWidth() / 2);
break;
case "Right":
- xPos = image.getWidth() - jimp.measureText(jimpFont, text);
+ xPos = image.getWidth() - textImage.getWidth();
break;
- default:
- // Adjust x position for the scaled image
- xPos = xPos * scaleFactor;
}
switch (vAlign) {
@@ -222,25 +221,15 @@ class AddTextToImage extends Operation {
yPos = 0;
break;
case "Middle":
- yPos = (image.getHeight() / 2) - (jimp.measureTextHeight(jimpFont, text) / 2);
+ yPos = (image.getHeight() / 2) - (textImage.getHeight() / 2);
break;
case "Bottom":
- yPos = image.getHeight() - jimp.measureTextHeight(jimpFont, text);
+ yPos = image.getHeight() - textImage.getHeight();
break;
- default:
- // Adjust y position for the scaled image
- yPos = yPos * scaleFactor;
}
- image.print(jimpFont, xPos, yPos, text);
-
- if (size !== 72) {
- if (size > 72) {
- image.scale(1 / scaleFactor, jimp.RESIZE_BILINEAR);
- } else {
- image.scale(1 / scaleFactor, jimp.RESIZE_BICUBIC);
- }
- }
+ // Blit the rendered text image onto the original source image
+ image.blit(textImage, xPos, yPos);
let imageBuffer;
if (image.getMIME() === "image/gif") {
| 7 |
diff --git a/server.js b/server.js @@ -309,7 +309,6 @@ app.prepare().then(async () => {
let serializedUsersMap = { [creator.id]: creator };
let serializedSlatesMap = {};
- // NOTE(jim): The most expensive call first.
const r1 = await Serializers.doSubscriptions({
users: [],
slates: [],
@@ -330,50 +329,51 @@ app.prepare().then(async () => {
creator.subscribers = r2.serializedSubscribers;
- // let exploreSlates = [];
-
- // if (Environment.IS_PRODUCTION) {
- // exploreSlates = await Data.getSlatesByIds({
- // ids: [
- // //NOTE(tara): slates in prod
- // "d2861ac4-fc41-4c07-8f21-d0bf06be364c",
- // "9c2c458c-d92a-4e81-a4b6-bf6ab4607470",
- // "7f461144-0647-43d7-8294-788b37ae5979",
- // "f72c2594-b8ac-41f6-91e0-b2da6788ae23",
- // "a0d6e2f2-564d-47ed-bf56-13c42634703d",
- // "0ba92c73-92e7-4b00-900e-afae4856c9ea",
- // ],
- // });
-
- // for (let exploreSlate of exploreSlates) {
- // let user = await Data.getUserById({ id: exploreSlate.data.ownerId });
- // exploreSlate.username = user.username;
- // }
- // } else {
- // exploreSlates = await Data.getSlatesByIds({
- // ids: [
- // //NOTE(tara): slates in localhost for testing
- // "857ad84d-7eff-4861-a988-65c84b62fc23",
- // "81fa0b39-0e96-4c7f-8587-38468bb67cb3",
- // "c4e8dad7-4ba0-4f25-a92a-c73ef5522d29",
- // "df05cb1f-2ecf-4872-b111-c4b8493d08f8",
- // "435035e6-dee4-4bbf-9521-64c219a527e7",
- // "ac907aa3-2fb2-46fd-8eba-ec8ceb87b5eb",
- // ],
- // });
-
- // for (let exploreSlate of exploreSlates) {
- // let user = await Data.getUserById({ id: exploreSlate.data.ownerId });
- // exploreSlate.username = user.username;
- // }
- // }
+ // NOTE(tara+martina)
+ // Remove this at some point.
+ /*
+ if (Environment.IS_PRODUCTION) {
+ exploreSlates = await Data.getSlatesByIds({
+ ids: [
+ //NOTE(tara): slates in prod
+ "d2861ac4-fc41-4c07-8f21-d0bf06be364c",
+ "9c2c458c-d92a-4e81-a4b6-bf6ab4607470",
+ "7f461144-0647-43d7-8294-788b37ae5979",
+ "f72c2594-b8ac-41f6-91e0-b2da6788ae23",
+ "a0d6e2f2-564d-47ed-bf56-13c42634703d",
+ "0ba92c73-92e7-4b00-900e-afae4856c9ea",
+ ],
+ });
+
+ for (let exploreSlate of exploreSlates) {
+ let user = await Data.getUserById({ id: exploreSlate.data.ownerId });
+ exploreSlate.username = user.username;
+ }
+ } else {
+ exploreSlates = await Data.getSlatesByIds({
+ ids: [
+ //NOTE(tara): slates in localhost for testing
+ "857ad84d-7eff-4861-a988-65c84b62fc23",
+ "81fa0b39-0e96-4c7f-8587-38468bb67cb3",
+ "c4e8dad7-4ba0-4f25-a92a-c73ef5522d29",
+ "df05cb1f-2ecf-4872-b111-c4b8493d08f8",
+ "435035e6-dee4-4bbf-9521-64c219a527e7",
+ "ac907aa3-2fb2-46fd-8eba-ec8ceb87b5eb",
+ ],
+ });
+
+ for (let exploreSlate of exploreSlates) {
+ let user = await Data.getUserById({ id: exploreSlate.data.ownerId });
+ exploreSlate.username = user.username;
+ }
+ }
+ */
return app.render(req, res, "/_/profile", {
viewer,
creator,
mobile,
resources: EXTERNAL_RESOURCES,
- // exploreSlates,
});
});
| 2 |
diff --git a/source/core/woogeen_base/VideoFramePacketizer.cpp b/source/core/woogeen_base/VideoFramePacketizer.cpp @@ -155,9 +155,8 @@ void VideoFramePacketizer::receiveRtpData(char* buf, int len, erizo::DataType ty
void VideoFramePacketizer::OnNetworkChanged(const uint32_t target_bitrate, const uint8_t fraction_loss, const int64_t rtt)
{
- FeedbackMsg feedback = {.type = VIDEO_FEEDBACK, .cmd = SET_BITRATE};
- feedback.data.kbps = target_bitrate / 1000;
- deliverFeedbackMsg(feedback);
+ // Receiver's network change detected. But we do not deliver feedback to
+ // sender because sender may adjust sending bitrate for a specific receiver.
}
void VideoFramePacketizer::onFrame(const Frame& frame)
| 8 |
diff --git a/plugins/identity/app/controllers/identity/projects/request_wizard_controller.rb b/plugins/identity/app/controllers/identity/projects/request_wizard_controller.rb @@ -37,7 +37,6 @@ module Identity
@project = services.identity.new_project
@project.attributes = params.fetch(:project, {})
.merge(domain_id: @scoped_domain_id)
- # #{plugin('identity').domain_url(host: request.host_with_port, protocol: request.protocol)}?overlay=#{plugin('identity').domains_create_project_path(project_id: nil)}
if @project.valid?
begin
inquiry = services.inquiry.create_inquiry(
@@ -51,7 +50,7 @@ module Identity
{
'approved': {
'name': 'Approve',
- 'action': ""
+ 'action': "#{plugin('identity').domain_url(host: request.host_with_port, protocol: request.protocol)}?overlay=#{plugin('identity').domains_create_project_path(project_id: nil)}"
}
},
nil, # no domain override
| 13 |
diff --git a/resources/test/docker-compose.yml b/resources/test/docker-compose.yml @@ -13,7 +13,7 @@ services:
- ethereum
- postgres
environment:
- postgres_host: postgres:5432
+ postgres_host: postgres
postgres_user: graph
postgres_pass: let-me-in
postgres_db: graph
| 1 |
diff --git a/spec/models/carto/oauth_app_user_spec.rb b/spec/models/carto/oauth_app_user_spec.rb @@ -157,16 +157,15 @@ module Carto
end
it 'creation and update' do
- OauthAppUser::ScopesValidator.any_instance.stubs(:validate_each)
dataset_scope = "datasets:rw:#{@table.name}"
- oau = OauthAppUser.create!(user: @carto_user, oauth_app: @app, scopes: ['no_dataset_scope', dataset_scope])
- expect(oau.scopes).to(eq(['no_dataset_scope', dataset_scope]))
+ oau = OauthAppUser.create!(user: @carto_user, oauth_app: @app, scopes: ['user:profile', dataset_scope])
+ expect(oau.scopes).to(eq(['user:profile', dataset_scope]))
oau.upgrade!([])
- expect(oau.scopes).to(eq(['no_dataset_scope', dataset_scope]))
+ expect(oau.scopes).to(eq(['user:profile', dataset_scope]))
oau.upgrade!([dataset_scope])
- expect(oau.scopes).to(eq(['no_dataset_scope', dataset_scope]))
+ expect(oau.scopes).to(eq(['user:profile', dataset_scope]))
end
end
end
| 2 |
diff --git a/test/server/cards/06-CotE/HanteiXXXVIII.spec.js b/test/server/cards/06-CotE/HanteiXXXVIII.spec.js @@ -325,7 +325,7 @@ describe('Hantei XXXVII', function() {
expect(this.player1).toHavePrompt('The Perfect Gift');
});
- fit('should trigger for Upholding Authority', function() {
+ it('should trigger for Upholding Authority', function() {
this.asahinaStoryteller.honor();
this.player2.pass();
this.player1.clickCard(this.hantei);
| 2 |
diff --git a/token-metadata/0x4E15361FD6b4BB609Fa63C81A2be19d873717870/metadata.json b/token-metadata/0x4E15361FD6b4BB609Fa63C81A2be19d873717870/metadata.json "symbol": "FTM",
"address": "0x4E15361FD6b4BB609Fa63C81A2be19d873717870",
"decimals": 18,
- "dharmaVerificationStatus": {
"dharmaVerificationStatus": "VERIFIED"
}
\ No newline at end of file
-}
\ No newline at end of file
| 3 |
diff --git a/package.json b/package.json "babel-traverse": "^6.26.0",
"css-loader": "^0.28.11",
"cssnano": "^3.10.0",
- "enzyme": "^3.1.0",
- "enzyme-adapter-react-16": "^1.0.4",
+ "enzyme": "3.8.0",
+ "enzyme-adapter-react-16": "1.7.1",
"eslint": "^5.4.0",
"eslint-config-prettier": "^3.0.1",
"eslint-plugin-import": "^2.8.0",
| 3 |
diff --git a/token-metadata/0x5D4d57cd06Fa7fe99e26fdc481b468f77f05073C/metadata.json b/token-metadata/0x5D4d57cd06Fa7fe99e26fdc481b468f77f05073C/metadata.json "symbol": "NTK",
"address": "0x5D4d57cd06Fa7fe99e26fdc481b468f77f05073C",
"decimals": 18,
- "dharmaVerificationStatus": {
"dharmaVerificationStatus": "VERIFIED"
}
\ No newline at end of file
-}
\ No newline at end of file
| 3 |
diff --git a/userscript.user.js b/userscript.user.js @@ -42692,10 +42692,15 @@ var $$IMU_EXPORT$$;
return src.replace(/\/(?:_[a-z]_|n)([0-9]+\.[^/.]*)(?:[?#].*)?$/, "/$1");
}
- if (amazon_container === "nudiez-production") {
+ if (amazon_container === "nudiez-production" ||
+ // https://d2c4tvdc1w38dj.cloudfront.net/photos/photos/f68/d6d/a8-/medium/data?1586038934
+ // https://d2c4tvdc1w38dj.cloudfront.net/photos/photos/f68/d6d/a8-/original/data
+ // https://d2c4tvdc1w38dj.cloudfront.net/photos/photos/18c/cc7/c4-/medium/IMG-3938-683x1024.jpeg?1578102185
+ // https://d2c4tvdc1w38dj.cloudfront.net/photos/photos/18c/cc7/c4-/original/IMG-3938-683x1024.jpeg
+ domain === "d2c4tvdc1w38dj.cloudfront.net") {
// https://nudiez-production.s3.amazonaws.com/photos/photos/070/714/04-/thumb/data?1551470312
// https://nudiez-production.s3.amazonaws.com/photos/photos/070/714/04-/original/data
- return src.replace(/(\/photos\/(?:[-0-9a-f]{3}\/+){3})[a-z]+\/+data(?:[?#].*)?$/, "$1original/data");
+ return src.replace(/(\/photos\/(?:[-0-9a-f]{3}\/+){3})[a-z]+\/+([^/?]+)(?:[?#].*)?$/, "$1original/$2");
}
if (domain_nosub === "avdbs.com" && /^i[0-9]*\./.test(domain)) {
@@ -56206,7 +56211,7 @@ var $$IMU_EXPORT$$;
return src.replace(/(\/phpwas\/restmb_[a-z]*make\.php)\?.*(simg=[^&]*)/, "$1?idx=999&$2");
}
- if (src.match(/.*?\/timthumb(?:\/index)?\.php[?/].*?src=(.*)/)) {
+ if (src.match(/.*?\/timthumb(?:\/index)?\.php\?(?:.*&)?src=/)) {
// http://dublinfilms.fr/wp-content/themes/purity/includes/timthumb.php?src=http://dublinfilms.fr/wp-content/uploads/2014/06/Actu-bandeau-bis.jpg&h=260&w=662&zc=1
// http://dublinfilms.fr/wp-content/uploads/2014/06/Actu-bandeau-bis.jpg
// http://www.hcwd.com.tw/template/corporate_site/fk1/timthumb.php?src=http://www.hcwd.com.tw/snlev801/product/bimg/_MG_8893(001).jpg&w=410&s=1
@@ -56221,7 +56226,12 @@ var $$IMU_EXPORT$$;
// http://lauradaluna.com/image/gallery/141441178010306.jpg
// http://www.articlelike.com/timthumb/index.php?src=https://www.articlelike.com/manage/0/product/17589/334/17589_0.jpg
// https://www.articlelike.com/manage/0/product/17589/334/17589_0.jpg
- return urljoin(src, decodeURIComponent(src.replace(/.*\/timthumb(?:\/index)?\.php[?/].*?src=([^&]*).*/, "$1")), true);
+ // https://api.sextpanther.com/public/timthumb.php?w=300&h=300&a=t&zc=1&src=https://api.sextpanther.com/pre?fk=https://media.sextpanther.com/images/lrg_images/1581196066_7RCAO.jpeg
+ // https://api.sextpanther.com/pre?fk=https://media.sextpanther.com/images/lrg_images/1581196066_7RCAO.jpeg -- doesn't work
+ newsrc = src.replace(/.*\/timthumb(?:\/index)?\.php\?(?:.*&)?src=([^&]+).*$/, "$1");
+ if (newsrc !== src) {
+ return urljoin(src, decodeURIComponent(newsrc), true);
+ }
}
if (src.match(/\/fotogallery\/[0-9]+X[0-9]+\//)) {
| 7 |
diff --git a/src/components/alerts/inline-message.css b/src/components/alerts/inline-message.css .inline-message {
color: $ui-white;
- font-family: "Helvetica Neue";
+ font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
display: flex;
justify-content: end;
align-items: center;
| 4 |
diff --git a/tools/MiniProfiler.Esquio/EsquioDiagnosticListener.cs b/tools/MiniProfiler.Esquio/EsquioDiagnosticListener.cs @@ -8,7 +8,7 @@ using System.Diagnostics;
namespace MiniProfiler.Esquio
{
- public class EsquioDiagnosticListener
+ internal class EsquioDiagnosticListener
: IMiniProfilerDiagnosticListener
{
| 12 |
diff --git a/assets/js/modules/tagmanager/setup.js b/assets/js/modules/tagmanager/setup.js @@ -594,7 +594,8 @@ class TagmanagerSetup extends Component {
this.renderContainerSelect( {
selectedStateKey: 'selectedContainerAMP',
containers: containersAMP,
- label: __( 'AMP Container', 'google-site-kit' ),
+ // Use the default label if it is the only select shown.
+ label: 'primary' === ampMode ? null : __( 'AMP Container', 'google-site-kit' ),
} )
}
</div>
| 4 |
diff --git a/src/components/PageHero.tsx b/src/components/PageHero.tsx @@ -54,7 +54,7 @@ const PageHero: React.FC<IProps> = ({
className={className}
>
<Box
- maxW={{ base: "full", lg: "640px" }}
+ maxW={{ base: "full", lg: "container.sm" }}
py={{ base: 16, lg: 32 }}
pl={{ base: 0, lg: 8 }}
pr={0}
| 4 |
diff --git a/polyfills/requestIdleCallback/tests.js b/polyfills/requestIdleCallback/tests.js @@ -296,16 +296,15 @@ describe('requestIdleCallback', function () {
});
describe.skip('cancelIdleCallback', function () {
- it('is defined"', function () {
+ it.skip('is defined"', function () {
proclaim.isTypeOf(window.cancelIdleCallback, 'function');
});
- it('should return undefined', function () {
+ it.skip('should return undefined', function () {
proclaim.equal(cancelIdleCallback(), undefined);
});
-
- it('cancels an idle callback', function (done) {
+ it.skip('cancels an idle callback', function (done) {
var callback = requestIdleCallback(function () {
done(new Error('The canceled idle callback should not be called.'));
});
@@ -314,4 +313,16 @@ describe.skip('cancelIdleCallback', function () {
done();
}, 200);
});
+
+ it.skip('does nothing if there is no idle callback to cancel', function () {
+ // Try to cancel with a random number that doesn't match a idle callback id.
+ cancelIdleCallback(Math.round(Math.random() * 100000));
+ });
+
+ it.skip('does nothing if the idle callback to cancel is executing', function (done) {
+ var handle = requestIdleCallback(function () {
+ cancelIdleCallback(handle);
+ done(); //Should reach this point. The test will timeout if not.
+ });
+ });
});
| 0 |
diff --git a/package.json b/package.json "test": "NODE_ENV=test jest",
"postpublish": "npm run docs-publish",
"release": "npm run build && standard-version",
- "postinstall": "opencollective postinstall"
+ "postinstall": "opencollective postinstall || exit 0"
},
"peerDependencies": {
"vue": "^2.4.2"
| 7 |
diff --git a/app/views/about.scala.html b/app/views/about.scala.html <p>Graduate Student</p>
</div>
<div class="col-md-4">
- <h3>Anthony Li</h3>
+ <h3><a href="https://github.com/tongning">Anthony Li</a></h3>
<p>Fall 2016 - Present</p>
<p>Undergraduate Student</p>
</div>
<div class="col-md-4">
- <h3>Maria Furman</h3>
+ <h3><a href="https://github.com/m-furman">Maria Furman</a></h3>
<p>Spring 2017 - Present</p>
<p>Undergraduate Student</p>
</div>
<p>Spring 2017 - Present</p>
<p>Undergraduate Student</p>
</div>
-
</div>
<h2 class="">Alumni</h2>
<p>Undergraduate Student</p>
</div>
<div class="col-md-4">
- <h3>Zachary Lawrence</h3>
+ <h3><a href="https://github.com/zacharylawrence">Zachary Lawrence</a></h3>
<p>Fall 2013 - Fall 2015</p>
<p>Undergraduate Student</p>
</div>
| 3 |
diff --git a/test/MUIDataTable.test.js b/test/MUIDataTable.test.js @@ -2,6 +2,7 @@ import React from 'react';
import { spy } from 'sinon';
import { mount, shallow } from 'enzyme';
import { assert, expect } from 'chai';
+import cloneDeep from 'lodash.clonedeep';
import MUIDataTable from '../src/MUIDataTable';
import TableFilterList from '../src/components/TableFilterList';
import TablePagination from '../src/components/TablePagination';
@@ -429,6 +430,21 @@ describe('<MUIDataTable />', function() {
assert.deepEqual(state.filterList, [['Joe James'], [], [], [], []]);
});
+ it('should apply columns prop change for filterList', () => {
+ const mountShallowWrapper = mount(shallow(<MUIDataTable columns={columns} data={data} />).get(0));
+ const instance = mountShallowWrapper.instance();
+ instance.initializeTable(mountShallowWrapper.props());
+ // now use updated columns props
+ const newColumns = cloneDeep(columns);
+ newColumns[0].options.filterList = ['Joe James'];
+ mountShallowWrapper.setProps({ columns: newColumns });
+ mountShallowWrapper.update();
+ instance.setTableData(mountShallowWrapper.props(), 1 /* instance.TABLE_LOAD.INITIAL */);
+
+ const updatedState = mountShallowWrapper.state();
+ assert.deepEqual(updatedState.filterList, [['Joe James'], [], [], [], []]);
+ });
+
it('should create Chip when filterList is populated', () => {
const filterList = [['Joe James'], [], [], [], []];
const filterListRenderers = [
| 0 |
diff --git a/src/plugin-api.js b/src/plugin-api.js @@ -39,7 +39,6 @@ export default class PluginAPI {
this.validationErrors = [];
this.resolvePath = utils.resolvePath;
- this.runTaskList = utils.runTaskList;
this.getDockerLogs = utils.getDockerLogs;
this.runSSHCommand = utils.runSSHCommand;
this.forwardPort = utils.forwardPort;
@@ -87,6 +86,17 @@ export default class PluginAPI {
}
}
+ runTaskList(list, sessions, opts = {}) {
+ if (!('verbose' in opts)) {
+ opts.verbose = this.verbose;
+ }
+ if (!('showDuration' in opts)) {
+ opts.showDuration = this.profileTasks;
+ }
+
+ return utils.runTaskList(list, sessions, opts);
+ }
+
validateConfig(configPath, logProblems) {
// Only print errors once.
if (this.validationErrors.length > 0) {
| 12 |
diff --git a/js/reveal.js b/js/reveal.js if( data.background ) {
// Auto-wrap image urls in url(...)
- if( /^(http|file|\/\/)/gi.test( data.background ) || /\.(svg|png|jpg|jpeg|gif|bmp)([?#]|$)/gi.test( data.background ) ) {
+ if( /^(http|file|\/\/)/gi.test( data.background ) || /\.(svg|png|jpg|jpeg|gif|bmp)([?#\s]|$)/gi.test( data.background ) ) {
slide.setAttribute( 'data-background-image', data.background );
}
else {
| 11 |
diff --git a/test/unit/cachers/redis.spec.js b/test/unit/cachers/redis.spec.js @@ -207,7 +207,19 @@ describe("Test RedisCacher set & get with namespace & ttl", () => {
});
});
-
+ it("should throw error", () => {
+ const error = new Error("Redis delete error");
+ cacher.client.del = jest.fn(() => Promise.reject(error));
+ return cacher.del(["key1"])
+ .then(protectReject)
+ .catch(err => {
+ expect(err).toBe(error);
+ expect(cacher.client.del).toHaveBeenCalledTimes(1);
+ expect(cacher.client.del).toHaveBeenCalledWith([prefix + "key1"]);
+ expect(logger.error).toHaveBeenCalledTimes(1);
+ expect(logger.error).toHaveBeenCalledWith("Redis 'del' error. Key: MOL-uat-key1", error);
+ });
+ });
it("should call client.scanStream", () => {
return cacher.clean()
@@ -273,6 +285,7 @@ describe("Test RedisCacher set & get with namespace & ttl", () => {
.catch(err => {
expect(err).toBe(error);
expect(cacher.client.scanStream).toHaveBeenCalledTimes(1);
+ expect(cacher.client.scanStream).toHaveBeenCalledWith({ count: 100, match: "MOL-uat-service-name.*" });
expect(logger.error).toHaveBeenCalledTimes(1);
expect(logger.error).toHaveBeenCalledWith("Redis 'scanDel' error. Pattern: MOL-uat-service-name.*", error);
});
| 7 |
diff --git a/packages/swagger2openapi/index.js b/packages/swagger2openapi/index.js @@ -262,7 +262,7 @@ function processParameter(param,op,path,index,openapi,options) {
singularRequestBody = false;
result.content = {};
var contentType = 'application/x-www-form-urlencoded';
- if ((consumes.length) && (consumes[0] == 'multipart/form-data')) {
+ if ((consumes.length) && (consumes.indexOf('multipart/form-data')>0)) {
contentType = 'multipart/form-data';
}
| 7 |
diff --git a/src/components/postElements/body/view/commentBodyView.tsx b/src/components/postElements/body/view/commentBodyView.tsx @@ -28,6 +28,7 @@ import { LinkData, parseLinkData } from './linkDataParser';
import IconButton from '../../../iconButton';
import getYoutubeId from '../../../../utils/getYoutubeId';
import VideoPlayerSheet from './videoPlayerSheet';
+import { TouchableWithoutFeedback } from 'react-native-gesture-handler';
const WIDTH = Dimensions.get('window').width;
@@ -450,6 +451,7 @@ const CommentBody = ({
}}
/>
{revealComment ? (
+ <TouchableWithoutFeedback onLongPress={handleOnLongPress}>
<RenderHTML
contentWidth={_contentWidth}
source={{ html:body }}
@@ -473,6 +475,8 @@ const CommentBody = ({
a:_anchorRenderer,
}}
/>
+ </TouchableWithoutFeedback>
+
) : (
<TextButton
style={styles.revealButton}
| 9 |
diff --git a/shared/middlewares/security.js b/shared/middlewares/security.js @@ -79,7 +79,8 @@ function securityMiddleware(server, { enableNonce, enableCSP }) {
// lists the URLs for workers and embedded frame contents.
// For example: child-src https://youtube.com would enable
// embedding videos from YouTube but not from other origins.
- childSrc: ["'self'"],
+ // @note: we allow users to embed any page they want.
+ childSrc: ['https:', 'http:'],
// allows control over Flash and other plugins.
objectSrc: ["'none'"],
| 11 |
diff --git a/origami.json b/origami.json "email": "[email protected]",
"slack": "financialtimes/origami-support"
},
- "supportStatus": "active"
+ "supportStatus": "active",
+ "keywords": [
+ "javascript",
+ "polyfill",
+ "262",
+ "ecmascript"
+ ]
}
| 0 |
diff --git a/ghost/admin/app/components/dashboard/charts/recents.hbs b/ghost/admin/app/components/dashboard/charts/recents.hbs <div class="gh-dashboard-list-header">
<div class="gh-dashboard-list-title">Title</div>
{{#if this.areNewslettersEnabled}}
- <div class="gh-dashboard-list-title">Sends</div>
+ <div class="gh-dashboard-list-title">Sent</div>
<div class="gh-dashboard-list-title">Open rate</div>
{{else}}
<div class="gh-dashboard-list-title">Published</div>
| 10 |
diff --git a/tests/dummy/app/pods/docs/quickstart/template.md b/tests/dummy/app/pods/docs/quickstart/template.md This quickstart guide will get you started with a docs site for your brand new
addon. After completion you will have a docs homepage, a docs subpage named
-`installation`, an automatically generated API reference and a marketing
+`usage`, an automatically generated API reference and a marketing
homepage you can use to promote your addon.
1. **Install Addon Docs.**
@@ -16,7 +16,7 @@ following route definitions to your main route.
{{#docs-snippet name='quickstart-router.js' title='tests/dummy/app/router.js'}}
this.route('docs', function() { // docs homepage (required)
- this.route('installation'); // docs subpage
+ this.route('usage'); // docs subpage
this.route('api', function() { // autogenerated API homepage (required)
this.route('item', { path: '/*path' }); // autogenerated API subpages (required)
});
@@ -32,7 +32,7 @@ all docs pages in your site.
{{#viewer.nav as |nav|}}
{{nav.item 'Introduction' 'docs.index'}}
- {{nav.item 'Installation' 'docs.installation'}}
+ {{nav.item 'Usage' 'docs.usage'}}
{{/viewer.nav}}
{{#viewer.main}}
@@ -50,7 +50,7 @@ all docs pages in your site.
actual documentation for your addon and live in the folder
`tests/dummy/app/templates/docs`. Since Addon Docs supports Markdown out
of the box we will create two `.md` files (one for your docs `index` and one
-for the `installation` page).
+for the `usage` page).
{{#docs-snippet name='quickstart-markdown-index.md' title='tests/dummy/app/templates/docs/index.md' language='markdown'}}
# Index
@@ -58,10 +58,10 @@ for the `installation` page).
This is my new addon, and it rocks!
{{/docs-snippet}}
- {{#docs-snippet name='quickstart-markdown-subpage.md' title='tests/dummy/app/templates/docs/installation.md' language='markdown'}}
- # Installation
+ {{#docs-snippet name='quickstart-markdown-subpage.md' title='tests/dummy/app/templates/docs/usage.md' language='markdown'}}
+ # Usage
- So easy to install and configure, sweet!
+ So easy to use, sweet!
{{/docs-snippet}}
5. **Create your marketing homepage**. Create a new template that will function
@@ -92,7 +92,7 @@ create the associated template.
`localhost:4200/docs` to enjoy your brand new documentation website.
8. **Create more pages.** To add more doc pages simply follow the same steps as
-used for the `Installation` page in above instructions:
+used for the `Usage` page in above instructions:
- create a docs subroute
- add a navigation item to the `docs` template
@@ -114,3 +114,4 @@ windows.
3. **Optional: better scrolling.** You may want to install
[Ember Router Scroll](https://github.com/dollarshaveclub/ember-router-scroll)
to enable "scroll to top with preserved browser history scroll position".
+
| 10 |
diff --git a/hmr.js b/hmr.js export default function HMR(Component, options = { target: document.body }, id = 'hmr', eventName = 'app-loaded') {
const oldContainer = document.getElementById(id)
-
-
-
-
-
- // Wait for the app to load before replacing the component
- addEventListener(eventName, replaceComponent)
-
// Create the new (temporarily hidden) component container
const appContainer = document.createElement("div")
if (oldContainer) appContainer.style.visibility = 'hidden'
@@ -27,6 +19,9 @@ export default function HMR(Component, options = { target: document.body }, id =
// Attach it to the target element
options.target.appendChild(appContainer)
+ // Wait for the app to load before replacing the component
+ addEventListener(eventName, replaceComponent)
+
function replaceComponent() {
if (oldContainer) oldContainer.remove()
// Show our component and take over the ID of the old container
@@ -36,6 +31,7 @@ export default function HMR(Component, options = { target: document.body }, id =
}
return new Component({
+ ...options,
target: appContainer
});
}
\ No newline at end of file
| 11 |
diff --git a/js/drawMutations.js b/js/drawMutations.js var _ = require('./underscore_ext');
var {contrastColor, lightgreyHEX} = require('./color_helper');
-var {impact} = require('./models/mutationVector');
+var {impact, getSNVEffect} = require('./models/mutationVector');
var labelFont = 12;
var labelMargin = 1; // left & right margin
@@ -60,7 +60,7 @@ function drawImpactNodes(vg, width, zoom, smallVariants) {
// --------- small variants drawing start here ---------
var varByImp = _.groupByConsec(smallVariants, v => v.color);
- varByImp = _.sortBy(varByImp, list => impact[list[0].data.effect]); // draw variants from low to high impact
+ varByImp = _.sortBy(varByImp, list => impact[getSNVEffect(impact, list[0].data.effect)]); // draw variants from low to high impact
varByImp.forEach(vars => {
var points = vars.map(v => {
| 4 |
diff --git a/articles/api/management/v2/query-string-syntax.md b/articles/api/management/v2/query-string-syntax.md @@ -37,10 +37,6 @@ Wildcard searches can be run on individual terms, using `?` to replace a single
Note that certain wildcard queries will require an enormous amount of memory and perform poorly. (For example, imagine how many terms need to be queried to match the query string `"a* b* c*"`.)
-::: warning
-Including a wildcard at the beginning of a word (e.g. `"*ing"`) is particularly memory intensive since all terms in the index will be examined for a match. Leading wildcards can be disabled by setting the `allow_leading_wildcard` option to `false`.
-:::
-
### Regular expressions
Regular expression patterns can be embedded in the query string by wrapping them in forward-slashes ("/"): `name:/joh?n(ath[oa]n)/`
@@ -49,10 +45,6 @@ Regular expression patterns can be embedded in the query string by wrapping them
A detailed explanation of the supported regular expression syntax is explained on the Elastic's site at [Regular Expression Syntax](https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-regexp-query.html#regexp-syntax).
:::
-::: warning
-The `allow_leading_wildcard` parameter does not affect regular expressions. A query string, such as the following, would force Elasticsearch to visit every term in the index: `/.*n/`. Use with caution.
-:::
-
### Fuzziness
You can search for terms that are similar to, but not exactly like, your search terms using the `~` as a "fuzzy" operator: `oauth~`
| 2 |
diff --git a/src/UserConfig.js b/src/UserConfig.js @@ -344,13 +344,19 @@ class UserConfig {
addTransform(name, callback) {
name = this.getNamespacedName(name);
- this.transforms[name] = callback;
+ this.transforms[name] = this.benchmarks.config.add(
+ `"${name}" Transform`,
+ callback
+ );
}
addLinter(name, callback) {
name = this.getNamespacedName(name);
- this.linters[name] = callback;
+ this.linters[name] = this.benchmarks.config.add(
+ `"${name}" Linter`,
+ callback
+ );
}
addLayoutAlias(from, to) {
| 0 |
diff --git a/src/samples/p2p/js/sc.websocket.js b/src/samples/p2p/js/sc.websocket.js @@ -16,6 +16,8 @@ function SignalingChannel() {
let connectPromise=null;
+ var reconnectTimes = 0;
+
/* TODO: Do remember to trigger onMessage when new message is received.
if(this.onMessage)
this.onMessage(from, message);
@@ -58,6 +60,7 @@ function SignalingChannel() {
wsServer = io(serverAddress, opts);
wsServer.on('connect', function() {
+ reconnectTimes = 0;
console.info('Connected to websocket server.');
});
@@ -69,9 +72,18 @@ function SignalingChannel() {
connectPromise=null;
});
+ wsServer.on('reconnecting', function(){
+ reconnectTimes++;
+ });
+
+ wsServer.on('reconnect_failed', function(){
+ if (self.onServerDisconnected)
+ self.onServerDisconnected();
+ })
+
wsServer.on('disconnect', function() {
console.info('Disconnected from websocket server.');
- if (self.onServerDisconnected)
+ if (reconnectTimes >= 9 && self.onServerDisconnected)
self.onServerDisconnected();
});
@@ -107,6 +119,7 @@ function SignalingChannel() {
};
this.disconnect = function() {
+ reconnectTimes = 9;
if (wsServer)
wsServer.close();
return Promise.resolve();
| 9 |
diff --git a/Trading-Process/User.Bot.js b/Trading-Process/User.Bot.js exports.newUserBot = function newUserBot (bot, logger) {
+ /*
+ Creating a new instance from the platform of this bot:
+ - bot: An instance of the bot configuration
+ - logger: An instance of the platform logger that allow both: to save logs
+ on cloud execution and browser execution
+ */
+
// Variable used for logs, this will be passed to the logger instance
const MODULE_NAME = 'User Bot'
// Debug log level
@@ -6,14 +13,6 @@ exports.newUserBot = function newUserBot (bot, logger) {
// Info log level
const LOG_INFO = true
- /*
- This variable will be used during initialization to get the parameters
- from the platform. At the moment it won't be used and we will only create
- a single bot instance. In the future it will allow to create different
- clones of the algonet.
- */
- let genes
-
/*
The reference to the Traing Platform Advanced Algos Assistant that will
allow to put positions on the exchange.
@@ -38,6 +37,10 @@ exports.newUserBot = function newUserBot (bot, logger) {
/*
The initialize function must be implemented by all trading bots.
+ pAssistant: the instance of the platform which methods will allow tu put getPositions
+ pGenes: This variable will be used during initialization to get the parameters
+ from the platform. At the moment it won't be used but in future releases
+ it will allow to create different clones of the algonet.
*/
function initialize (pAssistant, pGenes, callBackFunction) {
try {
@@ -54,7 +57,7 @@ exports.newUserBot = function newUserBot (bot, logger) {
/*
On 'assistant.dataDependencies.dataSets' we will receive the data files
- retrieved for those defined on the bot configuration (this.bot.config.json)
+ retrieved for those defined on the bot configuration
Note that the key is:
TeamName-BotName-BotProductFolder-BotProcessName-BotDataSetVersion
*/
@@ -73,57 +76,22 @@ exports.newUserBot = function newUserBot (bot, logger) {
}
/*
- This function will be used to initialize the parameters for the genes,
- it's not called at the moment and you don't need to implement it at the moment.
+ The start function is called by the platform for executing the bot every 1 minute
*/
- function checkGenes (pGenes, callBackFunction) {
- try {
- if (LOG_INFO === true) { logger.write(MODULE_NAME, '[INFO] checkGenes -> Entering function.') }
-
- function getGeneticRulesByName (pName) {
- for (let i = 0; i < bot.genes.length; i++) {
- let gene = bot.genes[i]
-
- if (gene.name === pName) {
- return gene
- }
- }
-
- return undefined
- }
-
- let stopLoss = getGeneticRulesByName('stopLoss')
-
- if (pGenes.stopLoss < stopLoss.lowerLimit || pGenes.stopLoss > stopLoss.upperLimit) {
- logger.write(MODULE_NAME, '[ERROR] getGeneticRules -> Genes received are out of range.')
- logger.write(MODULE_NAME, '[ERROR] getGeneticRules -> pGenes = ' + JSON.stringify(pGenes))
- logger.write(MODULE_NAME, '[ERROR] getGeneticRules -> bot.genes = ' + JSON.stringify(bot.genes))
- callBackFunction(global.DEFAULT_FAIL_RESPONSE)
- return
- }
-
- genes = pGenes
-
- callBackFunction(global.DEFAULT_OK_RESPONSE)
- } catch (err) {
- logger.write(MODULE_NAME, '[ERROR] checkGenes -> err = ' + err.message)
- callBackFunction(global.DEFAULT_FAIL_RESPONSE)
- }
- }
+ function start (callBackFunction) {
+ if (LOG_INFO === true) { logger.write(MODULE_NAME, '[INFO] start -> Entering function.') }
/*
- The start function is called by the platform for executing the bot every
- x number of miliseconds defined on normalWaitTime (this.bot.config.json)
+ This breakpoint will be called once the web plataform reach the graphical stop point
*/
- function start (callBackFunction) {
- if (LOG_INFO === true) { logger.write(MODULE_NAME, '[INFO] start -> Entering function.') }
+ if (global.AT_BREAKPOINT === true) {
+ if (FULL_LOG === true) { logger.write(MODULE_NAME, "[INFO] run -> loop -> Plot Breakpoint Hit."); }
+ }
- const LAST_SELL_RATE_KEY = 'AAVikings' + '-' + 'AAArtudito' + '-' + 'Trading-Process' + '-' + 'lastSellRate'
- const LAST_BUY_RATE_KEY = 'AAVikings' + '-' + 'AAArtudito' + '-' + 'Trading-Process' + '-' + 'lastBuyRate'
+ const market = global.MARKET
const CHANNEL_DOWN = -1
const CHANNEL_UP = 1
const NO_CHANNEL = 0
- const market = global.MARKET
// Some parameters defined locally, they are used to explore different variations.
const TRADE_TARGET = 2.0
| 7 |
diff --git a/test/jasmine/tests/select_test.js b/test/jasmine/tests/select_test.js @@ -284,6 +284,11 @@ describe('select box and lasso', function() {
y: 2.75,
}], 'with the correct selected points (2)');
+ expect(selectedData.lassoPoints.x).toBeCloseToArray(
+ [0.084, 0.087, 0.115, 0.103], 'lasso points x coords');
+ expect(selectedData.lassoPoints.y).toBeCloseToArray(
+ [4.648, 1.342, 1.247, 4.821], 'lasso points y coords');
+
doubleClick(250, 200).then(function() {
expect(doubleClickData).toBe(null, 'with the correct deselect data');
done();
| 0 |
diff --git a/docs/composes.md b/docs/composes.md @@ -48,8 +48,27 @@ const cls = css`
// composes also does not work in nested selectors, e.g. this doesn't work
const cls = css`
& .flex {
- composes: ${flexCenter}
+ composes: ${flexCenter};
}
`
+// ... instead, you should use this pattern for the nested styles or pseudoselectors
+const flexCenter = css`
+ & .flex {
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ }
+`
+const redHover = css`
+ &:hover {
+ color: red;
+ }
+`
+
+// ... and this class will compose both the pseudo and nested selector styles
+const cls = css`
+ composes: ${flexCenter} ${redHover};
+`
+
```
| 7 |
diff --git a/docs/components_page/components/progress.py b/docs/components_page/components/progress.py @@ -7,7 +7,7 @@ progress = html.Div(
[
html.H2("Progress"),
dbc.Progress(id="progress", value=0, striped=True, animated=True),
- dcc.Interval(id="interval", interval=250),
+ dcc.Interval(id="interval", interval=250, n_intervals=0),
]
)
| 12 |
diff --git a/server/game/cards/01 - Core/MirumotosFury.js b/server/game/cards/01 - Core/MirumotosFury.js @@ -13,8 +13,7 @@ class MirumotosFury extends DrawCard {
cardCondition: card => this.game.currentConflict.isParticipating(card) && card.getGlory() <= _.size(this.game.allCards.filter(card => card.isProvince && card.facedown && card.controller === this.controller))
},
handler: context => {
- let tmp = _.size(this.game.allCards.filter(card => card.isProvince && card.facedown && card.controller === this.controller));
- this.game.addMessage('{0} uses {1} to bow {2}', this.controller, this), context.target.getGlory();
+ this.game.addMessage('{0} uses {1} to bow {2}', this.controller, this);
this.controller.bowCard(context.target);
}
});
| 2 |
diff --git a/README.md b/README.md @@ -7,7 +7,7 @@ This application is built with the following principles.
- All data that is displayed, comes from persistent storage (Ion)
1. **UI Binds to Ion**
- UI components bind to Ion (with `Ion.connect()`) so that any change to the Ion data is automatically reflected in the component by calling setState() with the changed data.
- - Libraries bind to Ion (with `Ion.connect()`) and use a callback instead of having `setState()` be called
+ - Libraries bind to Ion (with `Ion.connect()`) and use a callback which is triggered with the changed data
- The UI should be as flexible as possible when it comes to:
- Incomplete data (always assume data is incomplete or not there)
- Order of events (all operations can and should happen in parallel rather than in sequence)
| 7 |
diff --git a/core/extension/openseadragon-zoom-control/openseadragon-zoom-control.js b/core/extension/openseadragon-zoom-control/openseadragon-zoom-control.js * zoomctrl = null; //important
*
*/
- $.CaZoomControl.prototype.destory = function(){
+ $.CaZoomControl.prototype.destroy = function(){
for(const key in this){
this[key] = null;
}
| 1 |
diff --git a/magda-web-client/src/Components/Dataset/Add/DatasetAddCommon.ts b/magda-web-client/src/Components/Dataset/Add/DatasetAddCommon.ts @@ -574,7 +574,7 @@ export function createBlankState(user?: User): State {
status: "withdraw",
hasCreated: false,
publishAttempted: false,
- publishRequired: false,
+ publishRequired: false
}
};
}
@@ -924,6 +924,14 @@ export async function createDatasetFromState(
state: State,
setState: React.Dispatch<React.SetStateAction<State>>
) {
+ if (state.datasetPublishing.publishAsOpenData?.dga) {
+ state.ckanPublish.status = "retain";
+ state.ckanPublish.publishRequired = true;
+ } else {
+ state.ckanPublish.status = "withdraw";
+ state.ckanPublish.publishRequired = false;
+ }
+
const distributionRecords = await convertStateToDistributionRecords(state);
const datasetRecord = await convertStateToDatasetRecord(
datasetId,
| 12 |
diff --git a/lib/runner/test-runners/_setup_cucumber_parallel_runner.js b/lib/runner/test-runners/_setup_cucumber_parallel_runner.js @@ -5,6 +5,7 @@ setDefaultTimeout(-1);
Before(async function({pickle}) {
const browser = await Nightwatch.createClient({
+ capabilites: {},
headless: this.parameters.headless,
env: this.parameters.env,
parallel: true,
| 13 |
diff --git a/assets/js/googlesitekit/data/create-error-store.js b/assets/js/googlesitekit/data/create-error-store.js @@ -108,7 +108,7 @@ export function createErrorStore() {
delete newState.errors[ key ];
} else {
// @TODO: remove it once all instances of the legacy behavior have been removed.
- delete newState.error;
+ newState.error = undefined;
}
return newState;
@@ -122,8 +122,8 @@ export function createErrorStore() {
newState.errors = { ...( state.errors || {} ) };
delete newState.errors[ key ];
} else {
- delete newState.errors;
- delete newState.error;
+ newState.errors = undefined;
+ newState.error = undefined;
}
return newState;
}
| 12 |
diff --git a/userscript.user.js b/userscript.user.js @@ -14310,7 +14310,7 @@ var $$IMU_EXPORT$$;
if (domain === "imgix.ranker.com") {
// https://imgix.ranker.com/user_node_img/50076/1001516851/original/sheldon-and-_39_s-in-an-insane-asylum-and-the-show-only-takes-place-in-his-head-photo-u1?w=600&q=50&fm=jpg
// https://imgix.ranker.com/user_node_img/50076/1001516851/original/sheldon-and-_39_s-in-an-insane-asylum-and-the-show-only-takes-place-in-his-head-photo-u1?fm=png
- return src.replace(/\?[^/]*$/, "?fm=png");
+ return src.replace(/\?.*$/, "?fm=png");
}
if (domain_nosub === "rnkr-static.com" &&
@@ -58563,13 +58563,13 @@ var $$IMU_EXPORT$$;
}
}
- if ((domain_nosub === "gfycat.com" || domain_nosub === "redgifs.com") && (/^(?:thumbs[0-9]*|zippy|giant)\./.test(domain))) {
+ if ((domain_nosub === "gfycat.com" || domain_nosub === "redgifs.com") && (/^(?:th(?:umbs|cf)[0-9]*|zippy|giant)\./.test(domain))) {
// https://thumbs.gfycat.com/YellowTornCockatiel-size_restricted.gif
// https://thumbs.gfycat.com/YellowTornCockatiel-mobile.mp4
// https://zippy.gfycat.com/YellowTornCockatiel.mp4
newsrc = src
.replace(/:\/\/zippy\.([^/]+\/+[^/]+)(?:-[^/.]+)?\.[^/.]+(?:[?#].*)?$/, "://giant.$1.mp4")
- .replace(/:\/\/thumbs[0-9]*\.([^/]+\/+[^/]+)-(?:size_restricted\.gif|mobile\.(?:webm|mp4)|(?:mobile|poster)\.jpg)(?:[?#].*)?$/, "://zippy.$1.mp4");
+ .replace(/:\/\/th(?:umbs|cf)[0-9]*\.([^/]+\/+[^/]+)(?:-(?:(?:size_restricted|small)\.gif|mobile\.(?:webm|mp4)|(?:mobile|poster)\.jpg)|\.webp)(?:[?#].*)?$/, "://zippy.$1.mp4");
obj = {
url: newsrc
};
| 7 |
diff --git a/packages/openneuro-indexer/src/index.ts b/packages/openneuro-indexer/src/index.ts @@ -3,7 +3,6 @@ import { Client } from '@elastic/elasticsearch'
import createClient, { datasetGenerator } from 'openneuro-client/src/client'
import indexDatasets from './indexDatasets'
import { indexQuery } from './indexQuery'
-import datasetsMapping from './datasets-mapping.json'
/**
* Indexer entrypoint
@@ -23,10 +22,8 @@ export default async function main() {
})
const elasticClient = new Client({
node: process.env.ELASTICSEARCH_CONNECTION,
- })
- await elasticClient.indices.putMapping({
- index: 'datasets',
- body: datasetsMapping,
+ maxRetries: 10,
+ requestTimeout: 60000,
})
const datasets = datasetGenerator(apolloClient, indexQuery)
await indexDatasets(elasticClient, datasets)
| 11 |
diff --git a/server/game/cards/06.5-OR/BeggingBrother.js b/server/game/cards/06.5-OR/BeggingBrother.js @@ -5,7 +5,8 @@ class BeggingBrother extends DrawCard {
this.interrupt({
canCancel: true,
when: {
- onCardAbilityInitiated: event => event.source.getType() === 'character' && event.player !== this.controller
+ //Nested cancels can get quite disorienting as this can cancel itself too, so limiting it to opponent's Begging Brother only
+ onCardAbilityInitiated: event => event.source.getType() === 'character' && (event.source.name !== this.name || event.source.controller !== this.controller)
},
cost: ability.costs.discardGold(),
handler: context => {
| 11 |
diff --git a/package.json b/package.json "node": ">=6"
},
"scripts": {
- "postinstall": "webdriver-manager update",
+ "pretest:e2e": "webdriver-manager update",
"test:e2e": "protractor",
"test": "gulp build && npm run test:e2e",
"coveralls": "cat ./coverage/lcov/lcov.info | coveralls",
| 5 |
diff --git a/src/client/js/components/Admin/ImportData/GrowiZipImportItem.jsx b/src/client/js/components/Admin/ImportData/GrowiZipImportItem.jsx @@ -176,9 +176,9 @@ export default class GrowiZipImportItem extends React.Component {
}
renderBody() {
- const { isImported } = this.props;
+ const { isImporting, isImported } = this.props;
- if (!isImported) {
+ if (!isImporting && !isImported) {
return 'Ready';
}
| 7 |
diff --git a/test/jasmine/assets/mock_lists.js b/test/jasmine/assets/mock_lists.js @@ -28,6 +28,7 @@ var svgMockList = [
['range_selector_style', require('@mocks/range_selector_style.json')],
['range_slider_multiple', require('@mocks/range_slider_multiple.json')],
['sankey_energy', require('@mocks/sankey_energy.json')],
+ ['sunburst_coffee', require('@mocks/sunburst_coffee.json')],
['parcats_bad-displayindex', require('@mocks/parcats_bad-displayindex.json')],
['scattercarpet', require('@mocks/scattercarpet.json')],
['shapes', require('@mocks/shapes.json')],
| 0 |
diff --git a/edit.js b/edit.js @@ -11,10 +11,11 @@ import {XRPackage, pe, renderer, scene, camera, parcelMaterial, floorMesh, proxy
import {downloadFile, readFile, bindUploadFileButton} from 'https://static.xrpackage.org/xrpackage/util.js';
// import {wireframeMaterial, getWireframeMesh, meshIdToArray, decorateRaycastMesh, VolumeRaycaster} from './volume.js';
import './gif.js';
+import * as b64 from './b64.js';
// import {makeTextMesh, makeWristMenu, makeHighlightMesh, makeRayMesh} from './vr-ui.js';
import {makeTextMesh} from './vr-ui.js';
import {makeLineMesh, makeTeleportMesh} from './teleport.js';
-// import storage from './storage.js';
+import storage from './storage.js';
import {
PARCEL_SIZE,
SUBPARCEL_SIZE,
@@ -5779,3 +5780,21 @@ window.addEventListener('popstate', e => {
_handleUrl(window.location.href);
});
_handleUrl(window.location.href);
+
+window.save = async () => {
+ await storage.set('planet', currentChunkMesh.subparcels.map(subparcel => {
+ return {
+ x: subparcel.x,
+ y: subparcel.y,
+ z: subparcel.z,
+ potentials: subparcel.potentials && b64.encode(subparcel.potentials.buffer),
+ builds: subparcel.builds,
+ };
+ }));
+};
+window.load = async () => {
+ const subparcels = await storage.get('planet');
+ for (const subparcel of subparcels) {
+ subparcel.potentials = new Float32Array(b64.decode(subparcel.potentials));
+ }
+};
\ No newline at end of file
| 0 |
diff --git a/articles/hosted-pages/login.md b/articles/hosted-pages/login.md description: Guide on how to use the hosted login page
---
-# Login Page
+# Hosted Login Page
-In your [Auth0 Dashboard](${manage_url}/#/login_page), you can enable your Hosted Login Page by simply flipping the toggle switch.
+Auth0 hosts a login page that is shown whenever an authentication request is triggered, such as when using the `/authorize` endpoint (OIDC/OAuth) or when sending a SAML login request.
+
+This login page will be a basic login page for your client, and will use Lock to provide your users with a beautiful and smooth authentication process. The hosted login page is both one of your most secure authentication options as well as one of the easiest to implement.
+
+> Note that if the authentication request includes a specific connection, and that connection is for an external identity provider, the hosted login page might not be displayed and the user will be directed to the identity provider's login page.
+
+## Custom Hosted Login Page
+
+In your [Auth0 Dashboard](${manage_url}/#/login_page), you can enable a custom Hosted Login Page by simply flipping the toggle switch, that allows you to customize the look and feel and behavior of the Hosted Login Page.

If you want to change some of the [configuration options](/libraries/lock/v10/customization) within Lock, you may do so _right on this page_, just make your changes and make sure to remember to hit the _Save_ button.
-This login page will be a basic login page for your client, and will use Lock to provide your users with a beautiful and smooth authentication process. The hosted login page is both one of your most secure authentication options as well as one of the easiest to implement.
+Auth0 provides a whole set of configuration values in the `@@config@@` string that you can decode and use to adjust the hosted login page behavior:
-You will be able to access your hosted login page via the following url:
+```javascript
+// Decode configuration options
+var config = JSON.parse(decodeURIComponent(escape(window.atob('@@config@@'))));
-```text
-https://${account.namespace}/login?client=${account.clientId}
+// now use the config object to tailor the behavior of the hosted login page
+...
```
-And thus will be able to simply redirect login requests to this page, and use the hosted login page to authenticate your users, and then return them to your application.
-
+Take a look at the default custom login page code to get a glimpse of the available configuration options.
| 3 |
diff --git a/common/lib/util/eventemitter.ts b/common/lib/util/eventemitter.ts @@ -47,10 +47,7 @@ function removeListener(targetListeners: any, listener: Function, eventFilter?:
}
class EventEmitter {
- any: Array<unknown>;
- events: Record<string, Array<unknown>>;
- anyOnce: Array<unknown>;
- eventsOnce: Record<string, Array<unknown>>;
+ anyOnce: Array<Function>;
constructor() {
this.any = [];
| 7 |
diff --git a/common/lib/transport/transport.ts b/common/lib/transport/transport.ts @@ -71,7 +71,7 @@ abstract class Transport extends EventEmitter {
disconnect(err?: ErrorInfo): void {
/* Used for network/transport issues that need to result in the transport
- * being disconnected, but should not affect the connection */
+ * being disconnected, but should not transition the connection to 'failed' */
if(this.isConnected) {
this.requestDisconnect();
}
| 7 |
diff --git a/packages/idyll-docs/contents.js b/packages/idyll-docs/contents.js @@ -5,7 +5,7 @@ const Contents = [
{title: 'Introduction', route: '/docs' },
{title: 'Getting started', route: '/docs/getting-started' },
{title: 'Syntax', route: '/docs/syntax' },
- {title: 'Customizing', route: '/docs/configuration-and-styles' },
+ {title: 'Build Options', route: '/docs/configuration-and-styles' },
{title: 'Advanced Configuration', route: '/docs/advanced-configuration' }
],
},
| 3 |
diff --git a/includes/Core/Assets/Assets.php b/includes/Core/Assets/Assets.php @@ -476,7 +476,6 @@ final class Assets {
new Script(
'googlesitekit-components',
array(
- 'src' => $base_url . 'js/googlesitekit-components-gm2.js',
'src' => $base_url . (
Feature_Flags::enabled( 'gm3Components' )
? 'js/googlesitekit-components-gm3.js'
| 2 |
diff --git a/CHANGELOG.md b/CHANGELOG.md # Changelog
-## Unreleased
-- Various fixes for HTTP client instrumentation
- - Fix for requests with header "Expect: 100-continue"
- - Instrument http.get and https.get separately from http(s).request
+## 1.48.0
+- Various fixes and improvements for the HTTP client instrumentation
- Support for http(s).request(url, options, callback) API introduced in Node.js 10.9.0
- Support for WHATWG URL objects
+ - Fix for requests with header "Expect: 100-continue"
+ - Instrument http.get and https.get separately from http(s).request
## 1.47.1
- MySQL: Fix for MySQL instrumentation sometimes losing the tracing context.
| 6 |
diff --git a/src/components/dashboard/FeedItems/FeedListItem.js b/src/components/dashboard/FeedItems/FeedListItem.js // @flow
-import React, { useCallback, useEffect, useState } from 'react'
+import React, { useCallback, useState } from 'react'
import { TouchableHighlight, View } from 'react-native'
import * as Animatable from 'react-native-animatable'
@@ -42,7 +42,6 @@ const FeedListItem = (props: FeedListItemProps) => {
const itemStyle = getEventSettingsByType(theme, itemType)
const disableAnimForTests = Config.env === 'test'
const easing = 'ease-in'
- const duration = 1000 // default duration for Animatable
const imageStyle = {
backgroundColor: itemStyle.color,
@@ -61,12 +60,14 @@ const FeedListItem = (props: FeedListItemProps) => {
}
}, [fireEvent, type, onItemPress, id])
- // show shadow for native android only after opacity animation was finished
- useEffect(() => {
- if (isAndroidNative) {
- setTimeout(() => setShowAndroidShadow(true), duration)
+ const onAnimationFinished = useCallback(
+ ({ finished }) => {
+ if (finished && isAndroidNative) {
+ setShowAndroidShadow(true)
}
- }, [])
+ },
+ [setShowAndroidShadow],
+ )
if (isItemEmpty) {
const feedLoadAnimShown = simpleStore.get('feedLoadAnimShown')
@@ -135,7 +136,7 @@ const FeedListItem = (props: FeedListItemProps) => {
return (
<Animatable.View
- duration={duration}
+ onAnimationEnd={onAnimationFinished}
animation={disableAnimForTests ? '' : 'fadeIn'}
easing={easing}
useNativeDriver
| 2 |
diff --git a/package.json b/package.json {
"name": "prettier-atom",
"main": "./dist/main.js",
- "version": "0.42.0",
- "description":
- "Atom plugin for formatting JavaScript using prettier with (optional) prettier-eslint integration",
- "keywords": ["atom", "javascript", "prettier", "prettier-eslint", "eslint", "formatter"],
+ "version": "0.43.0",
+ "description": "Atom plugin for formatting JavaScript using prettier with (optional) prettier-eslint integration",
+ "keywords": [
+ "atom",
+ "javascript",
+ "prettier",
+ "prettier-eslint",
+ "eslint",
+ "formatter"
+ ],
"repository": "https://github.com/prettier/prettier-atom",
"homepage": "https://github.com/prettier/prettier-atom",
"bugs": {
}
},
"jest": {
- "collectCoverageFrom": ["src/**.js"],
+ "collectCoverageFrom": [
+ "src/**.js"
+ ],
"globals": {
"atom": true
},
"notify": false,
"resetMocks": true,
"resetModules": true,
- "roots": ["src"],
+ "roots": [
+ "src"
+ ],
"testEnvironment": "node"
},
- "package-deps": ["linter:2.0.0"],
+ "package-deps": [
+ "linter:2.0.0"
+ ],
"consumedServices": {
"status-bar": {
"versions": {
| 6 |
diff --git a/src/components/sign/SignTransferReady.js b/src/components/sign/SignTransferReady.js @@ -228,7 +228,7 @@ class SignTransferReady extends Component {
</Button>
<FormButton
onClick={handleAllow}
- disabled={insufficientFunds || !availableBalance}
+ disabled={insufficientFunds}
sending={sending}
sendingString='button.authorizing'
>
| 11 |
diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml @@ -71,6 +71,7 @@ jobs:
echo "SECRET_NAME=DEV_ENV" >> $GITHUB_ENV
echo "APPCENTER_NAME=GoodDollar/GoodDollar-Android-development" >> $GITHUB_ENV
echo "$GITHUB_HEAD_REF $GITHUB_REF ${{ env.BRANCH }} ${{ env.SECRET_NAME }} ${{ env.APPCENTER_NAME }}"
+ echo "contains: ${{ contains('staging',env.BRANCH) }}"
- name: Pre-checks - Env is QA
if: ${{ contains('staging',env.BRANCH) }}
| 0 |
diff --git a/src/MultiSelect/MultiSelect.js b/src/MultiSelect/MultiSelect.js @@ -83,6 +83,8 @@ const MultiSelect = ({
function downshiftOnChange(selectedItem, downshiftProps) {
const { selectedItem: selectedItems } = downshiftProps;
+ // Ignore onChange if not item was selected (e.g. escape key)
+ if (!selectedItem) return;
const existingValues = selectedItems.map(item => item.props.value);
let values;
| 8 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.