code
stringlengths 122
4.99k
| label
int64 0
14
|
---|---|
diff --git a/src/Button.js b/src/Button.js @@ -91,12 +91,11 @@ class Button extends Component {
}
renderFab(className, mode, clickOnly) {
- const classes = cx(this.getFabClasses(mode), clickOnly);
+ const classes = cx(mode, clickOnly);
return (
<div
ref={el => (this._floatingActionBtn = el)}
className={cx('fixed-action-btn', classes)}
- style={this.props.style}
>
<a className={className}>{this.renderIcon()}</a>
<ul>
@@ -108,14 +107,6 @@ class Button extends Component {
);
}
- getFabClasses(mode) {
- if (mode === 'toolbar') return mode;
- // keep retrocompatibility on old params
- if (mode === 'vertical') mode = 'top';
- if (mode === 'horizontal') mode = 'left';
- return `direction-${mode}`;
- }
-
renderIcon() {
const { icon } = this.props;
if (!icon) return;
@@ -140,15 +131,7 @@ Button.propTypes = {
* If enabled, any children button will be rendered as actions, remember to provide an icon.
* @default vertical. This will disable any onClick function from being called on the main button.
*/
- fab: PropTypes.oneOf([
- 'vertical',
- 'horizontal',
- 'top',
- 'bottom',
- 'left',
- 'right',
- 'toolbar'
- ]),
+ fab: PropTypes.oneOf(['vertical', 'horizontal', 'toolbar']),
/**
* The icon to display, if specified it will create a button with the material icon.
*/
@@ -186,11 +169,7 @@ Button.propTypes = {
* FAB Click-Only
* Turns a FAB from a hover-toggle to a click-toggle
*/
- fabClickOnly: PropTypes.bool,
- /**
- * Styles
- */
- style: PropTypes.object
+ fabClickOnly: PropTypes.bool
};
Button.defaultProps = {
| 13 |
diff --git a/articles/metadata/lock.md b/articles/metadata/lock.md @@ -6,30 +6,11 @@ description: How to read and update user metadata with Lock.
When using Auth0's [Lock](/libraries/lock) library, you can define and update the user's `user_metadata` field.
-**NOTE**: For an overview on implementing Lock, see the [JavaScript Quickstart](/quickstart/spa/vanillajs).
-
-## Defining User Metadata on Signup
+## Define User Metadata on Signup
For information on adding `user_metadata` on signup, see the section on Lock [Additional Signup Fields](/libraries/lock/v10/customization#additionalsignupfields-array-)
-## Working with User Metadata
-
-Once you have [implemented the login functionality](/quickstart/spa/vanillajs#3-implement-the-login) for your Lock instance, you can choose to store the newly-created `id_token`.
-
-```js
-var hash = lock.parseHash(window.location.hash);
-if (hash) {
- if (hash.error) {
- console.log("There was an error logging in", hash.error);
- alert('There was an error: ' + hash.error + '\n' + hash.error_description);
- } else {
- //save the token in the session:
- localStorage.setItem('id_token', hash.id_token);
- }
-}
-```
-
-## Reading User Metadata Properties
+## Read User Metadata
You can read the user's `user_metadata` properties the same way you would for any user profile property. This example retrieves the value associated with `user_metadata.hobby`:
@@ -41,26 +22,37 @@ lock.getUserInfo(accessToken, function(error, profile) {
});
```
-## Updating Metadata Properties
-
-You can [update the metadata properties](/metadata/apiv2#update-user-metadata) with calls to the Auth0 Management API.
-
-By including the user's `id_token` in the `Authorization` header, you can make the appropriate `PATCH` call to the [Update a user](/api/management/v2#!/Users/patch_users_by_id) endpoint.
-
-Here is what a sample request might look like:
-
-```js
-var request = require("request");
-
-var options = { method: 'PATCH',
- url: 'https://${account.namespace}/api/v2/users/{user_id}',
- headers: { authorization: "Bearer " + localStorage.getItem(id_token) },
- body: { user_metadata: { addresses: { home: '123 Main Street, Anytown, ST 12345' } } },
- json: true };
-
-request(options, function (error, response, body) {
- if (error) throw new Error(error);
-
- console.log(body);
-});
+**NOTE**: For details on how to initialize `lock` refer to [new Auth0Lock(clientID, domain, options)](https://github.com/auth0/lock#new-auth0lockclientid-domain-options)
+
+## Update User Metadata
+
+You can [update the metadata properties](/metadata/apiv2#update-user-metadata) with calls to the Auth0 Management API. To do so, make a `PATCH` call to the [Update a user](/api/management/v2#!/Users/patch_users_by_id) endpoint.
+
+
+Here is a sample request, that adds the user's home address as a second-level property:
+
+```har
+{
+ "method": "PATCH",
+ "url": "https://YOURACCOUNT.auth0.com/api/v2/users/user_id",
+ "httpVersion": "HTTP/1.1",
+ "cookies": [],
+ "headers": [{
+ "name": "Authorization",
+ "value": "Bearer YOUR_TOKEN"
+ }, {
+ "name": "Content-Type",
+ "value": "application/json"
+ }],
+ "queryString": [],
+ "postData": {
+ "mimeType": "application/json",
+ "text": "{\"user_metadata\": {\"addresses\": {\"home\": \"123 Main Street, Anytown, ST 12345\"}}}"
+ },
+ "headersSize": -1,
+ "bodySize": -1,
+ "comment": ""
+}
```
+
+**Note:** The Auth0 Management APIv2 token is required to call the Auth0 Management API. [Click here to learn more about how to get a Management APIv2 Token.](/api/management/v2/tokens)
| 2 |
diff --git a/app/models/search_tweet.rb b/app/models/search_tweet.rb @@ -21,7 +21,7 @@ class SearchTweet < Sequel::Model
def self.get_twitter_imports_count(dataset, date_from, date_to)
dataset
- .where(state: ::SearchTweet::STATE_COMPLETE)
+ .where('search_tweets.state = ?', ::SearchTweet::STATE_COMPLETE)
.where('search_tweets.created_at >= ? AND search_tweets.created_at <= ?', date_from, date_to + 1.days)
.sum("retrieved_items".lit).to_i
end
| 2 |
diff --git a/package.json b/package.json "Shaun (https://github.com/starsprung)",
"Shine Li (https://github.com/shineli)",
"Stefan Siegl (https://github.com/stesie)",
+ "Stewart Gleadow (https://github.com/sgleadow)",
"Tuan Minh Huynh (https://github.com/tuanmh)",
"Utku Turunc (https://github.com/utkuturunc)",
"Vasiliy Solovey (https://github.com/miltador)"
| 0 |
diff --git a/token-metadata/0x6F3009663470475F0749A6b76195375f95495fcB/metadata.json b/token-metadata/0x6F3009663470475F0749A6b76195375f95495fcB/metadata.json "symbol": "HATCH",
"address": "0x6F3009663470475F0749A6b76195375f95495fcB",
"decimals": 18,
- "dharmaVerificationStatus": {
"dharmaVerificationStatus": "VERIFIED"
}
\ No newline at end of file
-}
\ No newline at end of file
| 3 |
diff --git a/server/game/cards/01 - Core/WarriorPoet.js b/server/game/cards/01 - Core/WarriorPoet.js -const _ = require('underscore');
-
const DrawCard = require('../../drawcard.js');
class WarriorPoet extends DrawCard {
setupCardAbilities() {
this.action({
- title: 'Reduced skill of characters',
- target: {
- cardType: 'character',
- cardCondition: card => this.game.currentConflict && card.location === 'play area' && card.controller === this.game.getOtherPlayer(this.controller)
- },
- handler: context => {
+ title: 'Reduced skill of opponent\'s characters',
+ handler: () => {
this.game.addMessage('{0} uses {1} to reduce the skill of all {2}\'s characters', this.controller, this, this.game.getOtherPlayer(this.controller));
- _.each(context.target, card => {
- card.untilEndOfConflict(ability => ({
- match: card,
+
+ this.untilEndOfConflict(ability => ({
+ match: card => (
+ card.getType() === 'character' && this.game.currentConflict.isParticipating(card)
+ ),
+ targetController: 'opponent',
effect: [
ability.effects.modifyPoliticalSkill(-1),
ability.effects.modifyMilitarySkill(-1)
]
}));
- });
}
});
}
| 3 |
diff --git a/src/components/util/svg.js b/src/components/util/svg.js -export const TEMP = 'TEMP';
-
export function domElementToSvgString(domIdOrElement) {
let elem;
if (typeof domIdOrElement === 'string') {
@@ -17,6 +15,6 @@ export function domElementToSvgString(domIdOrElement) {
return downloadStr;
}
-export function downloadSvg(domId) {
- window.open(domElementToSvgString(domId), '_new');
+export function downloadSvg(domIdOrElement) {
+ window.open(domElementToSvgString(domIdOrElement), '_new');
}
| 11 |
diff --git a/src/js/components/Meter/Bar.js b/src/js/components/Meter/Bar.js @@ -55,7 +55,7 @@ export default class Bar extends Component {
preserveAspectRatio='none'
width={size === 'full' ? '100%' : width}
height={height}
- round={round ? { size } : undefined}
+ round={round ? { size: thickness } : undefined}
theme={theme}
{...rest}
>
| 1 |
diff --git a/userscript.user.js b/userscript.user.js @@ -18568,6 +18568,19 @@ var $$IMU_EXPORT$$;
// https://p16-tiktokcdn-com.akamaized.net/obj/v0201/a4d90921ec0947ed959b757497367d9e.jpg -- 720x1080
// https://p16-tiktokcdn-com.akamaized.net/origin/v0201/a4d90921ec0947ed959b757497367d9e.jpg -- 720x1080
domain === "p16-tiktokcdn-com.akamaized.net" ||
+ // https://p16.tiktokcdn.com/aweme/100x100/tiktok-obj/1647151559190530.jpeg
+ // https://p16.tiktokcdn.com/origin/tiktok-obj/1647151559190530.jpeg
+ domain === "p16.tiktokcdn.com" ||
+ // http://p16-hypstarcdn-com.akamaized.net/img/hpimg/db21de51a5c58250bfc4daa08c218e936ba721100afcabf845ba99e09a69c409~100x100.jpg
+ // http://p16-hypstarcdn-com.akamaized.net/img/hpimg/db21de51a5c58250bfc4daa08c218e936ba721100afcabf845ba99e09a69c409~noop.jpg
+ // http://p16-hypstarcdn-com.akamaized.net/origin/hpimg/db21de51a5c58250bfc4daa08c218e936ba721100afcabf845ba99e09a69c409.jpg
+ // http://p16-hypstarcdn-com.akamaized.net/img/tos-alisg-i-0000/81caebe48e7a45ca87e6ec57322294c7~480x0_35k.jpg
+ // http://p16-hypstarcdn-com.akamaized.net/img/tos-alisg-i-0000/81caebe48e7a45ca87e6ec57322294c7~noop.jpg
+ // http://p16-hypstarcdn-com.akamaized.net/origin/tos-alisg-i-0000/81caebe48e7a45ca87e6ec57322294c7.jpg
+ domain === "p16-hypstarcdn-com.akamaized.net" ||
+ // http://p16.hypstarcdn.com/img/hpimg/db21de51a5c58250bfc4daa08c218e936ba721100afcabf845ba99e09a69c409~100x100.jpg
+ // http://p16.hypstarcdn.com/origin/hpimg/db21de51a5c58250bfc4daa08c218e936ba721100afcabf845ba99e09a69c409.jpg
+ domain === "p16.hypstarcdn.com" ||
// https://p3-tt.bytecdn.cn/img/pgc-image/f16e7bd2daf14850a8509015e6a45d71~noop_1913x1080.jpeg
// https://p3-tt.bytecdn.cn/img/pgc-image/f16e7bd2daf14850a8509015e6a45d71~noop.jpeg
// https://p3-tt.bytecdn.cn/origin/pgc-image/f16e7bd2daf14850a8509015e6a45d71.jpeg
| 7 |
diff --git a/.github/workflows/azure-static-web-apps-wonderful-grass-0354ce803.yml b/.github/workflows/azure-static-web-apps-wonderful-grass-0354ce803.yml @@ -16,8 +16,21 @@ jobs:
name: Build and Deploy Job
steps:
- uses: actions/checkout@v2
+
+ - name: Setup Node.js environment (v14)
+ uses: actions/setup-node@v2
with:
- submodules: true
+ node-version: 'lts/fermium'
+
+ - name: npm install
+ run: npm install
+
+ - name: gulp build
+ run: npm run build
+
+ - name: keepalive.html
+ run: echo "OK" > public/keepalive.html
+
- name: Build And Deploy
id: builddeploy
uses: Azure/static-web-apps-deploy@v1
@@ -27,7 +40,7 @@ jobs:
action: "upload"
###### Repository/Build Configurations - These values can be configured to match your app requirements. ######
# For more information regarding Static Web App workflow configurations, please visit: https://aka.ms/swaworkflowconfig
- app_location: "/" # App source code path
+ app_location: "/public" # App source code path
api_location: "" # Api source code path - optional
output_location: "" # Built app content directory - optional
###### End of Repository/Build Configurations ######
| 12 |
diff --git a/browser/lib/transport/jsonptransport.js b/browser/lib/transport/jsonptransport.js @@ -26,6 +26,8 @@ var JSONPTransport = (function() {
};
if(JSONPTransport.isAvailable()) {
ConnectionManager.supportedTransports[shortName] = JSONPTransport;
+ }
+ if(Platform.jsonpSupported) {
head = document.getElementsByTagName('head')[0];
}
@@ -168,7 +170,7 @@ var JSONPTransport = (function() {
this.emit('disposed');
};
- if(!Http.Request) {
+ if(Platform.jsonpSupported && !Http.Request) {
Http.Request = function(rest, uri, headers, params, body, callback) {
var req = createRequest(uri, headers, params, body, CometTransport.REQ_SEND, rest && rest.options.timeouts);
req.once('complete', callback);
| 11 |
diff --git a/scripts/docs.js b/scripts/docs.js @@ -59,8 +59,14 @@ const config = {
},
}
+const rootDir = path.join(__dirname, '..')
+const markdownFiles = [
+ path.join(rootDir, 'README.md'),
+ path.join(rootDir, 'docs/**/**.md')
+]
+
// Generate docs
-markdownMagic(['README.md', 'docs/**/**.md'], config, () => {
+markdownMagic(markdownFiles, config, () => {
/* Fix newline MDX TOC issue #https://github.com/mdx-js/mdx/issues/184#issuecomment-416093951 */
const processedDocs = globby.sync([
'docs/**/**.md',
@@ -144,9 +150,7 @@ function formatFlags(cmdFlags, command) {
let renderFlags = `**Flags**\n\n`
renderFlags += flagArray.map((flag) => {
-
const flagData = cmdFlags[flag]
- console.log('flag', flagData)
if (!flagData.description) {
throw new Error(`${command} missing flag description`)
}
| 12 |
diff --git a/docs/get-started/using-with-react.md b/docs/get-started/using-with-react.md @@ -50,7 +50,7 @@ An important companion to deck.gl is `react-map-gl`. It is a React wrapper for [
import React from 'react';
import DeckGL from '@deck.gl/react';
import {LineLayer} from '@deck.gl/layers';
-import {StaticMap} from 'react-map-gl';
+import {Map} from 'react-map-gl';
// Set your mapbox access token here
const MAPBOX_ACCESS_TOKEN = 'your_mapbox_token';
@@ -80,7 +80,7 @@ function App({data}) {
controller={true}
layers={layers}
>
- <StaticMap mapboxApiAccessToken={MAPBOX_ACCESS_TOKEN} />
+ <Map mapboxAccessToken={MAPBOX_ACCESS_TOKEN} />
</DeckGL>
);
}
@@ -126,7 +126,7 @@ function App() {
controller={true}
layers={layers} >
<MapView id="map" width="50%" controller={true}>
- <StaticMap mapboxApiAccessToken={MAPBOX_ACCESS_TOKEN} />
+ <Map mapboxAccessToken={MAPBOX_ACCESS_TOKEN} />
</MapView>
<FirstPersonView width="50%" x="50%" fovy={50} />
</DeckGL>
| 14 |
diff --git a/Dockerfile b/Dockerfile -FROM alpine:3.8
+FROM nginx:1.15-alpine
LABEL maintainer="fehguy"
@@ -16,9 +16,6 @@ ENV SWAGGER_JSON "/app/swagger.json"
ENV PORT 8080
ENV BASE_URL ""
-RUN apk add --no-cache nginx
-RUN mkdir -p /run/nginx
-
COPY nginx.conf /etc/nginx/
# copy swagger files to the `/js` folder
| 7 |
diff --git a/test/e2e/preferences.js b/test/e2e/preferences.js let test = require(`tape-promise/tape`)
let { getApp, restart } = require(`./launch.js`)
-let {
- navigateToPreferences,
- sleep,
- login,
- selectOption
-} = require(`./common.js`)
+let { navigateToPreferences, login } = require(`./common.js`)
/*
* NOTE: don't use a global `let client = app.client` as the client object changes when restarting the app
@@ -15,41 +10,15 @@ let {
test(`preferences`, async function(t) {
let { app } = await getApp(t)
- await restart(app)
-
let $ = (...args) => app.client.$(...args)
+ await restart(app)
await login(app, `testkey`)
-
- t.test(`change`, async function(t) {
- await navigateToPreferences(app)
-
- let networkSelect = () => $(`#select-network select`)
-
- t.test(`default network`, async function(t) {
- let option = await networkSelect().getValue()
- t.equal(option.toString(), `live`, `Live Testnet is correct`)
- t.end()
- })
- t.test(`mock network`, async function(t) {
- await selectOption(app, `#select-network select`, `Offline`)
- await app.client.waitForVisible(`.tm-session-wrapper`, 5000)
-
- await login(app, `default`)
await navigateToPreferences(app)
- await sleep(1000)
- let network = await app.client
- .$(`#tm-connected-network__string`)
- .getHTML()
- t.ok(
- network.indexOf(`Offline Demo`) !== -1,
- `network indicator shows 'Offline Demo'`
- )
-
- t.end()
- })
-
+ t.test(`shows preferences`, async function(t) {
+ t.ok(await $(`div*=Settings`).waitForExist(), `shows Settings`)
+ t.ok(await $(`div*=Account`).waitForExist(), `shows Account`)
t.end()
})
| 3 |
diff --git a/app/controllers/sessions_controller.rb b/app/controllers/sessions_controller.rb @@ -42,8 +42,7 @@ class SessionsController < ApplicationController
before_filter :load_organization
before_filter :initialize_oauth_config
before_filter :api_authorization_required, only: :show
- after_action :set_last_mfa_activity, only: [:multifactor_authentication]
- before_action :set_last_mfa_activity, only: [:multifactor_authentication_verify_code]
+ after_action :set_last_mfa_activity, only: [:multifactor_authentication, :multifactor_authentication_verify_code]
PLEASE_LOGIN = 'Please, log in to continue using CARTO.'.freeze
@@ -108,6 +107,8 @@ class SessionsController < ApplicationController
@mfa = @user.active_multifactor_authentication
render action: 'multifactor_authentication'
+ rescue Carto::UnauthorizedError, Warden::NotAuthenticated
+ unauthenticated
end
def multifactor_authentication_verify_code
@@ -284,12 +285,14 @@ class SessionsController < ApplicationController
def set_last_mfa_activity
user = ::User.where(id: params[:user_id]).first || current_viewer
- warden.session(user.username)[:multifactor_authentication_last_activity] = Time.now.to_i
+ warden.session(user.username)[:multifactor_authentication_last_activity] = Time.now.to_i if user
+ rescue Warden::NotAuthenticated
end
def mfa_inactivity_period_expired?(user)
time_inactive = Time.now.to_i - warden.session(user.username)[:multifactor_authentication_last_activity]
time_inactive > MAX_MULTIFACTOR_AUTHENTICATION_INACTIVITY
+ rescue Warden::NotAuthenticated
end
def after_login_url(user)
| 1 |
diff --git a/resources/js/MusicKitInterop.js b/resources/js/MusicKitInterop.js @@ -21,6 +21,10 @@ const MusicKitInterop = {
document.querySelector(`#MVLyricsBox`).style.display = 'block';
} else {
document.querySelector(`.web-chrome`).setAttribute('style', 'height: 55px !important');
+ if (nowPlayingItem["type"] !== "song"){
+ document.querySelector(`.web-chrome__grid-container`).setAttribute('style', 'margin: 15px auto 0')
+ } else {
+ document.querySelector(`.web-chrome__grid-container`).setAttribute('style', 'margin: dsds');}
document.querySelector(`#MVLyricsBox`).style.display = 'none';
}
}
@@ -35,6 +39,10 @@ const MusicKitInterop = {
document.querySelector(`#MVLyricsBox`).style.display = 'block';
} else {
document.querySelector(`.web-chrome`).setAttribute('style', 'height: 55px !important');
+ if (nowPlayingItem["type"] !== "song"){
+ document.querySelector(`.web-chrome__grid-container`).setAttribute('style', 'margin: 15px auto 0')
+ } else {
+ document.querySelector(`.web-chrome__grid-container`).setAttribute('style', 'margin: dsds');}
document.querySelector(`#MVLyricsBox`).style.display = 'none';
}
}
| 1 |
diff --git a/README.md b/README.md @@ -77,12 +77,17 @@ brew install [email protected]
brew link --force [email protected]
brew install --force node@6
brew link node@6 --force
-brew cask install java
+brew cask install java8
brew tap garrow/homebrew-elasticsearch17
brew install [email protected]
```
>:star: _Note_: Elasticsearch 1.7 does not work with Java 9
+>:star: _Note_: Brew cannot find java8
+>- `brew tap caskroom/versions # lookup more versions`
+>- `brew cask search java # java8 now in list`
+>- `brew cask install java8`
+
>:star: _Note_: This additional step is required for new macOS Sierra installations
>- `brew cask install Caskroom/cask/xquartz`
| 0 |
diff --git a/ui-manager.js b/ui-manager.js @@ -410,6 +410,33 @@ geometryManager.addEventListener('load', () => {
scene.add(detailsMesh);
uiManager.detailsMesh = detailsMesh;
+ const tradeMesh = makeDetailsMesh(weaponsManager.cubeMesh, function onrun(anchorSpec) {
+ meshComposer.run();
+ }, async function onbake(anchorSpec) {
+ const {mesh, hash} = await _bakeAndUploadComposerMesh();
+ const hashUint8Array = hex2Uint8Array(hash);
+
+ const canvas = mesh.material.map.image;
+ const texture = canvas.getContext('2d').getImageData(0, 0, canvas.width, canvas.height).data;
+ await geometryWorker.requestAddThingGeometry(tracker, geometrySet, hashUint8Array, mesh.geometry.attributes.position.array, mesh.geometry.attributes.uv.array, mesh.geometry.index.array, mesh.geometry.attributes.position.length, mesh.geometry.attributes.uv.array.length, mesh.geometry.index.array.length, texture);
+ await geometryWorker.requestAddThing(tracker, geometrySet, hashUint8Array, mesh.position, mesh.quaternion, mesh.scale);
+
+ tradeMesh.visible = false;
+ }, async function onadd(anchorSpec) {
+ await _bakeAndUploadComposerMesh();
+
+ tradeMesh.visible = false;
+ }, function onremove(anchorSpec) {
+ // console.log('got remove', anchorSpec);
+ meshComposer.cancel();
+ tradeMesh.visible = false;
+ }, function onclose() {
+ tradeMesh.visible = false;
+ });
+ tradeMesh.visible = false;
+ scene.add(tradeMesh);
+ uiManager.tradeMesh = tradeMesh;
+
uiManager.menuMeshes = [
uiManager.buildsMesh,
uiManager.thingsMesh,
@@ -417,7 +444,12 @@ geometryManager.addEventListener('load', () => {
uiManager.inventoryMesh,
uiManager.colorsMesh,
];
- uiManager.uiMeshes = uiManager.menuMeshes.concat([detailsMesh]);
+ uiManager.infoMeshes = [
+ uiManager.detailsMesh,
+ uiManager.tradeMesh,
+ ];
+ uiManager.uiMeshes = uiManager.menuMeshes
+ .concat(uiManager.infoMeshes);
uiManager.toolsMesh = makeToolsMesh(weaponsManager.weapons.map(weapon => weapon.getAttribute('weapon')), newSelectedWeapon => {
weaponsManager.setWeapon(newSelectedWeapon);
| 0 |
diff --git a/lib/jsonwp-proxy/proxy.js b/lib/jsonwp-proxy/proxy.js @@ -2,7 +2,7 @@ import _ from 'lodash';
import { logger, util } from 'appium-support';
import request from 'request-promise';
import { getSummaryByCode } from '../jsonwp-status/status';
-import { errors, errorFromMJSONWPStatusCode, errorFromW3CJsonCode } from '../protocol/errors';
+import { errors, isErrorType, errorFromMJSONWPStatusCode, errorFromW3CJsonCode } from '../protocol/errors';
const log = logger.getLogger('JSONWP Proxy');
@@ -161,7 +161,7 @@ class JWProxy {
try {
[response, resBody] = await this.proxy(url, method, body);
} catch (err) {
- if (err instanceof errors.ProxyRequestError) {
+ if (isErrorType(err, errors.ProxyRequestError)) {
throw err.getActualError();
}
throw new errors.UnknownError(err.message);
| 4 |
diff --git a/lib/NoModeWarning.js b/lib/NoModeWarning.js @@ -13,8 +13,10 @@ module.exports = class NoModeWarning extends WebpackError {
this.name = "NoModeWarning";
this.message =
"configuration\n" +
- "The 'mode' option has not been set. " +
- "Set 'mode' option to 'development' or 'production' to enable defaults for this environment. ";
+ "The 'mode' option has not been set, webpack will fallback to 'production' for this value. " +
+ "Set 'mode' option to 'development' or 'production' to enable defaults for each environment.\n" +
+ "You can also set it to 'none' to disable any default behavior. " +
+ "Learn more: https://webpack.js.org/concepts/mode/";
Error.captureStackTrace(this, this.constructor);
}
| 1 |
diff --git a/docs-www/package.json b/docs-www/package.json "lint:autofix": "eslint --ext .jsx,.js . --fix"
},
"dependencies": {
- "@brainhubeu/gatsby-docs-kit": "https://github.com/RobertHebel/gatsby-docs-kit.git#92e075bfb43c347d11b5420238a402399d1a78a9",
+ "@brainhubeu/gatsby-docs-kit": "https://github.com/RobertHebel/gatsby-docs-kit.git#upgrade-gatsby-to-v2",
"@brainhubeu/react-carousel": "^1.12.8",
"gatsby": "^2.19.17",
"gatsby-link": "^2.2.29",
| 4 |
diff --git a/src/traces/bar/plot.js b/src/traces/bar/plot.js @@ -157,6 +157,7 @@ function plot(gd, plotinfo, cdModule, traceLayer, opts, makeOnCompleteCallback)
}
di.isBlank = isBlank;
+ // for empty bars, ensure start and end positions are equal when having transition
if(isBlank && withTransition) {
if(isHorizontal) {
x1 = x0;
| 0 |
diff --git a/packages/mjml-core/src/createComponent.js b/packages/mjml-core/src/createComponent.js -import { get, forEach, identity, reduce, kebabCase } from 'lodash'
+import { get, forEach, identity, reduce, kebabCase, isNil } from 'lodash'
import MJMLParser from 'mjml-parser-xml'
@@ -98,7 +98,7 @@ export class BodyComponent extends Component {
(output, v, name) => {
const value = (specialAttributes[name] || specialAttributes.default)(v)
- if (value || value === 0) {
+ if (!isNil(value)) {
return `${output} ${name}="${value}"`
}
| 11 |
diff --git a/src/components/DashboardHeader/DashboardHeader.js b/src/components/DashboardHeader/DashboardHeader.js // @flow
// React
-import React, { useState } from "react";
+import React, { useState, useEffect } from "react";
import { withRouter } from 'react-router';
+import { useHistory } from "react-router";
// Third party
import moment from "moment";
@@ -47,6 +48,19 @@ const PathNameMapper = {
"/archive": "Archive"
};
+export const PathNames = {
+ // Only use lower case in paths.
+ summary: "/",
+ cases: "/cases",
+ testing: "/testing",
+ healthcare: "/healthcare",
+ deaths: "/deaths",
+ aboutData: "/about-data",
+ cookies: "cookies",
+ accessibility: "/accessibility",
+ archive: "/archive"
+}
+
const NoPickerPaths = [
"/",
@@ -57,21 +71,28 @@ const NoPickerPaths = [
];
-const DashboardHeader: ComponentType<Props> = ({ title, location: { search: query, pathname } }: Props) => {
+const DashboardHeader: ComponentType<Props> = ({ title }: Props) => {
const
+ history = useHistory(),
hierarchy = useHierarchy(),
[locationPickerState, setLocationPickerState] = useState(false),
// [datePickerState, setDatePickerState] = useState(false),
- params = getParams(query),
+ params = getParams(history.location.search),
currentLocation = getParamValueFor(params, "areaName", "United Kingdom"),
startDate = getParamDateFor(params, 'specimenDate', moment("2020-01-03"), ">"),
endDate = getParamDateFor(params, "specimenDate", moment(), "<"),
- isExcluded = NoPickerPaths.indexOf(pathname) > -1;
+ isExcluded = NoPickerPaths.indexOf(history.location.pathname) > -1;
+
+ useEffect(() => {
+
+ setLocationPickerState(false)
+
+ }, [ history.location.pathname ])
return <MainContainer>
<HeaderContainer>
- <Title>{ PathNameMapper[pathname] }</Title>
+ <Title>{ PathNameMapper[history.location.pathname] }</Title>
{ isExcluded
? null
: <CollapsibleLinkContainer>
@@ -96,9 +117,7 @@ const DashboardHeader: ComponentType<Props> = ({ title, location: { search: quer
{
( locationPickerState && !isExcluded )
- ? <LocationPicker hierarchy={ hierarchy }
- query={ query }
- pathname={ pathname }/>
+ ? <LocationPicker hierarchy={ hierarchy }/>
: null
}
{/*{*/}
@@ -113,4 +132,4 @@ const DashboardHeader: ComponentType<Props> = ({ title, location: { search: quer
}; // DashboardHeader
-export default withRouter(DashboardHeader);
+export default DashboardHeader;
| 14 |
diff --git a/exportutils/export to Foundry VTT.gce b/exportutils/export to Foundry VTT.gce 'By Brian Ronnle, enhanced for Foundry VTT by Chris Normand/Nose66
'Based on the original export filter by Graham Brand (Spyke)
'
-Const LastUpdated = 20210609
-' Last Updated: June 9, 2021
+Const LastUpdated = 20211129
+' Last Updated: November 11, 2021
' v1
'
Const gcaStat = 1
| 3 |
diff --git a/lib/Compiler.js b/lib/Compiler.js @@ -204,7 +204,7 @@ class Compiler extends Tapable {
const args = arguments;
this.plugin("compilation", (compilation, data) => {
data.normalModuleFactory.plugin("parser", parser => {
- parser.apply(parser, args);
+ parser.apply.apply(parser, args);
});
});
},
| 1 |
diff --git a/src/encoded/upgrade/characterization.py b/src/encoded/upgrade/characterization.py @@ -138,7 +138,6 @@ def characterization_4_5(value, system):
value['references'] = new_references
-@upgrade_step('antibody_characterization', '5', '6')
@upgrade_step('biosample_characterization', '5', '6')
@upgrade_step('donor_characterization', '5', '6')
@upgrade_step('rnai_characterization', '5', '6')
@@ -156,11 +155,24 @@ def characterization_5_6(value, system):
@upgrade_step('antibody_characterization', '6', '7')
+def antibody_characterization_6_7(value, system):
+ # http://redmine.encodedcc.org/issues/3063
+ if 'aliases' in value:
+ value['aliases'] = list(set(value['aliases']))
+
+ if 'references' in value:
+ value['references'] = list(set(value['references']))
+
+ if 'documents' in value:
+ value['documents'] = list(set(value['documents']))
+
+
@upgrade_step('biosample_characterization', '6', '7')
@upgrade_step('donor_characterization', '6', '7')
@upgrade_step('rnai_characterization', '6', '7')
@upgrade_step('construct_characterization', '6', '7')
-def antibody_characterization_6_7(value, system):
+def characterization_6_7(value, system):
+ # Let's get all the characterizations objects back in sync on version numbers
return
@@ -169,7 +181,7 @@ def antibody_characterization_6_7(value, system):
@upgrade_step('donor_characterization', '7', '8')
@upgrade_step('rnai_characterization', '7', '8')
@upgrade_step('construct_characterization', '7', '8')
-def antibody_characterization_7_8(value, system):
+def characterization_7_8(value, system):
# http://redmine.encodedcc.org/issues/1384
if 'notes' in value:
if value['notes']:
| 2 |
diff --git a/CHANGELOG.md b/CHANGELOG.md ## 6.2.1 (unreleased)
-### Breaking
-
### Feature
-- Added italian translations and translated array, token and select widget. @giuliaghisini
+- Added Italian translations and translated array, token and select widget. @giuliaghisini
- Added internationalization for French language @bsuttor #1588
-- selectableTypes in ObjectBrowserWidget @giuliaghisini
+- Added selectableTypes in ObjectBrowserWidget @giuliaghisini
### Bugfix
-- fixed duplicated items in SelectWidget and ArrayWidget @giuliaghisini
+- Fixed duplicated items in SelectWidget and ArrayWidget @giuliaghisini
- Update German translation @timo
-- removed broken preview image in ContentsUploadModal if uploaded item is not an image. @giuliaghisini
+- Removed broken preview image in ContentsUploadModal if uploaded item is not an image. @giuliaghisini
- Localized content upload modal last modified date @nzambello
- Fix overflow in folder contents with long titles @nzambello
-- fixed object browser widget when a selected items is deleted. Plone.restapi returns a null object. @giuliaghisini
-- fixed error on adding new item if parent item is not translated when multilingual is set @giuliaghisini
-
-### Internal
-
+- Fixed object browser widget when a selected items is deleted. Plone.restapi returns a null object. @giuliaghisini
+- Fixed error on adding new item if parent item is not translated when multilingual is set @giuliaghisini
- Added translations for select in querystring widget @nzambello
## 6.2.0 (2020-06-14)
| 6 |
diff --git a/README.md b/README.md <p align="center">
- <img src="website/static/img/isomorphic-git-logo.svg" alt="" height="150"/>
+ <img src="https://raw.githubusercontent.com/isomorphic-git/isomorphic-git/master/website/static/img/isomorphic-git-logo.svg?sanitize=true" alt="" height="150"/>
</p>
# isomorphic-git
@@ -22,13 +22,13 @@ The following environments are tested in CI and will continue to be supported un
<table width="100%">
<tr>
-<td align="center"><img src="website/static/img/browsers/node.webp" alt="" width="64" height="64"><br> Node 7.6</td>
-<td align="center"><img src="website/static/img/browsers/chrome.png" alt="" width="64" height="64"><br> Chrome 66</td>
-<td align="center"><img src="website/static/img/browsers/edge.png" alt="" width="64" height="64"><br> Edge 17</td>
-<td align="center"><img src="website/static/img/browsers/firefox.png" alt="" width="64" height="64"><br> Firefox 60</td>
-<td align="center"><img src="website/static/img/browsers/safari.png" alt="" width="64" height="64"><br> Safari 11</td>
-<td align="center"><img src="website/static/img/browsers/android.svg" alt="" width="64" height="64"><br> Android 7.1</td>
-<td align="center"><img src="website/static/img/browsers/ios.svg" alt="" width="64" height="64"><br> iOS 11.2</td>
+<td align="center"><img src="https://raw.githubusercontent.com/isomorphic-git/isomorphic-git/master/website/static/img/browsers/node.webp" alt="" width="64" height="64"><br> Node 7.6</td>
+<td align="center"><img src="https://raw.githubusercontent.com/isomorphic-git/isomorphic-git/master/website/static/img/browsers/chrome.png" alt="" width="64" height="64"><br> Chrome 66</td>
+<td align="center"><img src="https://raw.githubusercontent.com/isomorphic-git/isomorphic-git/master/website/static/img/browsers/edge.png" alt="" width="64" height="64"><br> Edge 17</td>
+<td align="center"><img src="https://raw.githubusercontent.com/isomorphic-git/isomorphic-git/master/website/static/img/browsers/firefox.png" alt="" width="64" height="64"><br> Firefox 60</td>
+<td align="center"><img src="https://raw.githubusercontent.com/isomorphic-git/isomorphic-git/master/website/static/img/browsers/safari.png" alt="" width="64" height="64"><br> Safari 11</td>
+<td align="center"><img src="https://raw.githubusercontent.com/isomorphic-git/isomorphic-git/master/website/static/img/browsers/android.svg?sanitize=true" alt="" width="64" height="64"><br> Android 7.1</td>
+<td align="center"><img src="https://raw.githubusercontent.com/isomorphic-git/isomorphic-git/master/website/static/img/browsers/ios.svg?sanitize=true" alt="" width="64" height="64"><br> iOS 11.2</td>
</tr>
</table>
| 1 |
diff --git a/src/core/operations/Bzip2Compress.mjs b/src/core/operations/Bzip2Compress.mjs @@ -24,7 +24,7 @@ class Bzip2Compress extends Operation {
this.description = "Bzip2 is a compression library developed by Julian Seward (of GHC fame) that uses the Burrows-Wheeler algorithm. It only supports compressing single files and its compression is slow, however is more effective than Deflate (.gz & .zip).";
this.infoURL = "https://wikipedia.org/wiki/Bzip2";
this.inputType = "ArrayBuffer";
- this.outputType = "File";
+ this.outputType = "ArrayBuffer";
this.args = [
{
name: "Block size (100s of kb)",
@@ -35,11 +35,6 @@ class Bzip2Compress extends Operation {
name: "Work factor",
type: "number",
value: 30
- },
- {
- name: "Compressed filename",
- type: "string",
- value: "compressed.bz2"
}
];
}
@@ -63,7 +58,8 @@ class Bzip2Compress extends Operation {
if (bzip2cc.error !== 0) {
reject(new OperationError(bzip2cc.error_msg));
} else {
- resolve(new File([bzip2cc.output], filename));
+ const output = bzip2cc.output;
+ resolve(output.buffer.slice(output.byteOffset, output.byteLength + output.byteOffset));
}
});
});
| 4 |
diff --git a/src/components/lazy/lazy.js b/src/components/lazy/lazy.js @@ -2,7 +2,7 @@ import $ from '../../utils/dom';
import Utils from '../../utils/utils';
const Lazy = {
- loadImagesInSlide(index, loadInDuplicate = true) {
+ loadInSlide(index, loadInDuplicate = true) {
const swiper = this;
const params = swiper.params.lazy;
if (typeof index === 'undefined') return;
@@ -54,10 +54,10 @@ const Lazy = {
const slideOriginalIndex = $slideEl.attr('data-swiper-slide-index');
if ($slideEl.hasClass(swiper.params.slideDuplicateClass)) {
const originalSlide = swiper.$wrapperEl.children(`[data-swiper-slide-index="${slideOriginalIndex}"]:not(.${swiper.params.slideDuplicateClass})`);
- swiper.lazy.loadImagesInSlide(originalSlide.index(), false);
+ swiper.lazy.loadInSlide(originalSlide.index(), false);
} else {
const duplicatedSlide = swiper.$wrapperEl.children(`.${swiper.params.slideDuplicateClass}[data-swiper-slide-index="${slideOriginalIndex}"]`);
- swiper.lazy.loadImagesInSlide(duplicatedSlide.index(), false);
+ swiper.lazy.loadInSlide(duplicatedSlide.index(), false);
}
}
swiper.emit('lazyImageReady', $slideEl[0], $imageEl[0]);
@@ -96,14 +96,14 @@ const Lazy = {
if (swiper.params.watchSlidesVisibility) {
$wrapperEl.children(`.${swiperParams.slideVisibleClass}`).each((elIndex, slideEl) => {
const index = isVirtual ? $(slideEl).attr('data-swiper-slide-index') : $(slideEl).index();
- swiper.lazy.loadImagesInSlide(index);
+ swiper.lazy.loadInSlide(index);
});
} else if (slidesPerView > 1) {
for (let i = activeIndex; i < activeIndex + slidesPerView; i += 1) {
- if (slideExist(i)) swiper.lazy.loadImagesInSlide(i);
+ if (slideExist(i)) swiper.lazy.loadInSlide(i);
}
} else {
- swiper.lazy.loadImagesInSlide(activeIndex);
+ swiper.lazy.loadInSlide(activeIndex);
}
if (params.loadPrevNext) {
if (slidesPerView > 1 || (params.loadPrevNextAmount && params.loadPrevNextAmount > 1)) {
@@ -113,18 +113,18 @@ const Lazy = {
const minIndex = Math.max(activeIndex - Math.max(spv, amount), 0);
// Next Slides
for (let i = activeIndex + slidesPerView; i < maxIndex; i += 1) {
- if (slideExist(i)) swiper.lazy.loadImagesInSlide(i);
+ if (slideExist(i)) swiper.lazy.loadInSlide(i);
}
// Prev Slides
for (let i = minIndex; i < activeIndex; i += 1) {
- if (slideExist(i)) swiper.lazy.loadImagesInSlide(i);
+ if (slideExist(i)) swiper.lazy.loadInSlide(i);
}
} else {
const nextSlide = $wrapperEl.children(`.${swiperParams.slideNextClass}`);
- if (nextSlide.length > 0) swiper.lazy.loadImagesInSlide(slideIndex(nextSlide));
+ if (nextSlide.length > 0) swiper.lazy.loadInSlide(slideIndex(nextSlide));
const prevSlide = $wrapperEl.children(`.${swiperParams.slidePrevClass}`);
- if (prevSlide.length > 0) swiper.lazy.loadImagesInSlide(slideIndex(prevSlide));
+ if (prevSlide.length > 0) swiper.lazy.loadInSlide(slideIndex(prevSlide));
}
}
},
@@ -151,7 +151,7 @@ export default {
lazy: {
initialImageLoaded: false,
load: Lazy.load.bind(swiper),
- loadImagesInSlide: Lazy.loadImagesInSlide.bind(swiper),
+ loadInSlide: Lazy.loadInSlide.bind(swiper),
},
});
},
| 10 |
diff --git a/weapons-manager.js b/weapons-manager.js +/*
+this file contains the main game logic tying together the managers.
+general game logic goes here.
+*/
+
import * as THREE from 'three';
// import {GLTFLoader} from 'three/examples/jsm/loaders/GLTFLoader.js';
import * as BufferGeometryUtils from 'three/examples/jsm/utils/BufferGeometryUtils.js';
| 0 |
diff --git a/src/components/core/slide/slideToClickedSlide.js b/src/components/core/slide/slideToClickedSlide.js @@ -5,7 +5,7 @@ export default function () {
const swiper = this;
const { params, $wrapperEl } = swiper;
- const slidesPerView = params.slidesPerView === 'auto' ? swiper.slidesPerView() : params.slidesPerView;
+ const slidesPerView = params.slidesPerView === 'auto' ? swiper.slidesPerViewDynamic() : params.slidesPerView;
let slideToIndex = swiper.clickedIndex;
let realIndex;
if (params.loop) {
| 10 |
diff --git a/docs/pages/careers.tsx b/docs/pages/careers.tsx @@ -144,17 +144,6 @@ const faqData = [
];
const openRolesData = [
- {
- title: 'Product',
- roles: [
- {
- title: 'Designer',
- description:
- 'Design is critical to the success of our mission. We are looking for skills that complement our Lead Designer. You will empower our audience that seeks to build outstanding-looking UIs with new tools.',
- url: '/careers/designer/',
- },
- ],
- },
{
title: 'Engineering',
roles: [
| 2 |
diff --git a/src/pages/LogInWithShortLivedTokenPage.js b/src/pages/LogInWithShortLivedTokenPage.js @@ -53,24 +53,11 @@ const defaultProps = {
class LogInWithShortLivedTokenPage extends Component {
componentDidMount() {
- const accountID = parseInt(lodashGet(this.props.route.params, 'accountID', ''), 10);
- const email = lodashGet(this.props.route.params, 'email', '');
- const shortLivedToken = lodashGet(this.props.route.params, 'shortLivedToken', '');
-
- const signedIn = this.props.session && this.props.session.authToken;
- if (!signedIn) {
- Session.signInWithShortLivedToken(accountID, email, shortLivedToken);
+ if (this.signInIfNeeded()) {
return;
}
- // User is trying to transition with a different account than the one
- // they are currently signed in as so we will sign them out, clear Onyx,
- // and cancel all network requests made with their old login. This
- // component will mount again from PublicScreens and since they are no
- // longer signed in, a request will be made to sign them in with their new account.
- if (email !== this.props.session.email) {
- Session.signOutAndRedirectToSignIn();
- }
+ this.signOutIfNeeded();
}
componentDidUpdate() {
@@ -78,29 +65,17 @@ class LogInWithShortLivedTokenPage extends Component {
return;
}
- const email = lodashGet(this.props.route.params, 'email', '');
-
- // exitTo is URI encoded because it could contain a variable number of slashes (i.e. "workspace/new" vs "workspace/<ID>/card")
- const exitTo = decodeURIComponent(lodashGet(this.props.route.params, 'exitTo', ''));
-
- const signedIn = this.props.session && this.props.session.authToken;
- if (!signedIn) {
- const accountID = parseInt(lodashGet(this.props.route.params, 'accountID', ''), 10);
- const shortLivedToken = lodashGet(this.props.route.params, 'shortLivedToken', '');
- Session.signInWithShortLivedToken(accountID, email, shortLivedToken);
+ if (this.signInIfNeeded()) {
return;
}
- // User is trying to transition with a different account than the one
- // they are currently signed in as so we will sign them out, clear Onyx,
- // and cancel all network requests. This component will mount again from
- // PublicScreens and since they are no longer signed in, a request will be
- // made to sign them in with their new account.
- if (email !== this.props.session.email) {
- Session.signOutAndRedirectToSignIn();
+ if (this.signOutIfNeeded()) {
return;
}
+ // exitTo is URI encoded because it could contain a variable number of slashes (i.e. "workspace/new" vs "workspace/<ID>/card")
+ const exitTo = decodeURIComponent(lodashGet(this.props.route.params, 'exitTo', ''));
+
if (exitTo === ROUTES.WORKSPACE_NEW) {
// New workspace creation is handled in AuthScreens, not in its own screen
return;
@@ -116,6 +91,43 @@ class LogInWithShortLivedTokenPage extends Component {
Navigation.navigate(exitTo);
}
+ /**
+ * Determine if the user needs to be signed in. If so sign them in with the
+ * short lived token.
+ * @returns {Boolean}
+ */
+ signInIfNeeded() {
+ const accountID = parseInt(lodashGet(this.props.route.params, 'accountID', ''), 10);
+ const email = lodashGet(this.props.route.params, 'email', '');
+ const shortLivedToken = lodashGet(this.props.route.params, 'shortLivedToken', '');
+
+ const isUserSignedIn = this.props.session && this.props.session.authToken;
+ if (isUserSignedIn) {
+ return false;
+ }
+
+ Session.signInWithShortLivedToken(accountID, email, shortLivedToken);
+ return true;
+ }
+
+ /**
+ * If the user is trying to transition with a different account than the one
+ * they are currently signed in as so we will sign them out, clear Onyx,
+ * and cancel all network requests. This component will mount again from
+ * PublicScreens and since they are no longer signed in, a request will be
+ * made to sign them in with their new account.
+ * @returns {Boolean}
+ */
+ signOutIfNeeded() {
+ const email = lodashGet(this.props.route.params, 'email', '');
+ if (this.props.session && this.props.session.email === email) {
+ return false;
+ }
+
+ Session.signOutAndRedirectToSignIn();
+ return true;
+ }
+
render() {
return <FullScreenLoadingIndicator />;
}
| 9 |
diff --git a/docs/rule/no-route-action.md b/docs/rule/no-route-action.md @@ -10,6 +10,14 @@ Most route actions should either be sent to the controller first or encapsulated
This rule **forbids** the following:
+```hbs
+<CustomComponent @onUpdate={{route-action 'updateFoo'}} />
+```
+
+```hbs
+<CustomComponent @onUpdate={{route-action 'updateFoo' 'bar'}} />
+```
+
```hbs
{{custom-component onUpdate=(route-action 'updateFoo')}}
```
@@ -18,15 +26,26 @@ This rule **forbids** the following:
{{custom-component onUpdate=(route-action 'updateFoo' 'bar')}}
```
-```hbs
-<CustomComponent @onUpdate={{route-action 'foo'}} />
+With the given route:
+```js
+// app/routes/foo.js
+export default class extends Route {
+ @action
+ updateFoo(baz) {
+ // ...
+ }
+}
```
+This rule **allows** the following:
+
```hbs
-<CustomComponent @onUpdate={{route-action 'foo' 'bar'}} />
+<CustomComponent @onUpdate={{this.updateFoo}} />
```
-Instead, use controller actions as the following:
+```hbs
+<CustomComponent @onUpdate={{fn this.updateFoo 'bar'}} />
+```
```hbs
{{custom-component onUpdate=this.updateFoo}}
@@ -36,12 +55,87 @@ Instead, use controller actions as the following:
{{custom-component onUpdate=(fn this.updateFoo 'bar')}}
```
+With the given controller:
+```js
+// app/controllers/foo.js
+export default class extends Controller {
+ @action
+ updateFoo(baz) {
+ // ...
+ }
+}
+```
+
+## Migration
+
+The example below shows how to migrate from route-action to controller actions.
+
+**Before**
+
+```js
+// app/routes/posts.js
+export default class extends Route {
+ model(params) {
+ return this.store.query('post', { page: params.page })
+ }
+
+ @action
+ goToPage(pageNum) {
+ this.transitionTo({ queryParams: { page: pageNum } });
+ }
+}
+```
+
+```js
+// app/controllers/posts.js
+export default class extends Controller {
+ queryParams = ['page'];
+ page = 1;
+}
+```
+
```hbs
-<CustomComponent @onUpdate={{this.updateFoo}} />
+{{#each @model as |post|}}
+ <Post @title={{post.title}} @content={{post.content}} />
+{{/each}}
+
+<button {{action (route-action 'goToPage' 1)}}>1</button>
+<button {{action (route-action 'goToPage' 2)}}>2</button>
+<button {{action (route-action 'goToPage' 3)}}>3</button>
+```
+
+**After**
+
+```js
+// app/routes/posts.js
+export default class extends Route {
+ model(params) {
+ return this.store.query('post', { page: params.page })
+ }
+}
+```
+
+```js
+// app/controllers/posts.js
+export default class extends Controller {
+ queryParams = ['page'];
+ page = 1;
+
+ @action
+ goToPage(pageNum) {
+ this.transitionToRoute({ queryParams: { page: pageNum } });
+ }
+}
```
```hbs
-<CustomComponent @onUpdate={{fn this.updateFoo 'bar'}} />
+{{#each @model as |post|}}
+ <Post @title={{post.title}} @content={{post.content}} />
+{{/each}}
+
+<button {{on 'click' (fn this.goToPage 1)}}>1</button>
+<button {{on 'click' (fn this.goToPage 2)}}>2</button>
+<button {{on 'click' (fn this.goToPage 3)}}>3</button>
```
## References
| 7 |
diff --git a/server/classes/softwarePanels.js b/server/classes/softwarePanels.js @@ -35,6 +35,9 @@ export default class SoftwarePanel {
this.class = "SoftwarePanel";
this.simulatorId = params.simulatorId || null;
this.name = params.name || "Panel";
+ this.cables = [];
+ this.components = [];
+ this.connections = [];
this.update(params);
}
update(panel) {
| 1 |
diff --git a/test/webserver.js b/test/webserver.js @@ -80,10 +80,19 @@ WebServer.prototype = {
_handler: function (req, res) {
var url = req.url.replace(/\/\//g, '/');
var urlParts = /([^?]*)((?:\?(.*))?)/.exec(url);
- // guard against directory traversal attacks,
- // e.g. /../../../../../../../etc/passwd
- // which let you make GET requests for files outside of this.root
+ try {
+ // Guard against directory traversal attacks such as
+ // `/../../../../../../../etc/passwd`, which let you make GET requests
+ // for files outside of `this.root`.
var pathPart = path.normalize(decodeURI(urlParts[1]));
+ } catch (ex) {
+ // If the URI cannot be decoded, a `URIError` is thrown. This happens for
+ // malformed URIs such as `http://localhost:8888/%s%s` and should be
+ // handled as a bad request.
+ res.writeHead(400);
+ res.end('Bad request', 'utf8');
+ return;
+ }
var queryPart = urlParts[3];
var verbose = this.verbose;
| 9 |
diff --git a/js/models/trackerlist-top-blocked.es6.js b/js/models/trackerlist-top-blocked.es6.js const Parent = window.DDG.base.Model;
const backgroundPage = chrome.extension.getBackgroundPage();
-function TrackerList (attrs) {
+function TrackerListTopBlocked (attrs) {
Parent.call(this, attrs);
@@ -25,15 +25,15 @@ function TrackerList (attrs) {
};
-TrackerList.prototype = $.extend({},
+TrackerListTopBlocked.prototype = $.extend({},
Parent.prototype,
{
- modelName: 'trackerListByCompany'
+ modelName: 'trackerListTopBlocked'
}
);
-module.exports = TrackerList;
+module.exports = TrackerListTopBlocked;
| 3 |
diff --git a/ThirdParty.json b/ThirdParty.json "license": [
"BSD-3-Clause"
],
- "version": "2.4.10",
+ "version": "2.4.12",
"url": "https://www.npmjs.com/package/@zip.js/zip.js"
},
{
"license": [
"MIT"
],
- "version": "1.0.3",
+ "version": "1.0.4",
"url": "https://www.npmjs.com/package/bitmap-sdf"
},
{
"license": [
"Apache-2.0"
],
- "version": "2.3.6",
+ "version": "2.3.8",
"url": "https://www.npmjs.com/package/dompurify",
"notes": "dompurify is available as both MPL-2.0 OR Apache-2.0"
},
| 3 |
diff --git a/docs/src/examples/QTable/PopupEditing.vue b/docs/src/examples/QTable/PopupEditing.vue </template>
<script>
+import { ref } from 'vue'
+
const columns = [
{
name: 'name',
@@ -170,7 +172,7 @@ export default {
setup () {
return {
columns,
- rows
+ rows: ref(rows)
}
}
}
| 3 |
diff --git a/src/components/Heroes/index.jsx b/src/components/Heroes/index.jsx @@ -75,18 +75,17 @@ class RequestLayer extends React.Component {
}
const json = this.props.data;
- const { strings } = this.props;
// Assemble the result data array
const matchCountPro = json.map(heroStat => heroStat.pro_pick || 0).reduce(sum, 0) / 10;
- const matchCount8 = this.getMatchCountByRank('8_pick');
- const matchCount7 = this.getMatchCountByRank('7_pick');
- const matchCount6 = this.getMatchCountByRank('6_pick');
- const matchCount5 = this.getMatchCountByRank('5_pick');
- const matchCount4 = this.getMatchCountByRank('4_pick');
- const matchCount3 = this.getMatchCountByRank('3_pick');
- const matchCount2 = this.getMatchCountByRank('2_pick');
- const matchCount1 = this.getMatchCountByRank('1_pick');
+ const matchCount8 = this.getMatchCountByRank(json, '8_pick');
+ const matchCount7 = this.getMatchCountByRank(json, '7_pick');
+ const matchCount6 = this.getMatchCountByRank(json, '6_pick');
+ const matchCount5 = this.getMatchCountByRank(json, '5_pick');
+ const matchCount4 = this.getMatchCountByRank(json, '4_pick');
+ const matchCount3 = this.getMatchCountByRank(json, '3_pick');
+ const matchCount2 = this.getMatchCountByRank(json, '2_pick');
+ const matchCount1 = this.getMatchCountByRank(json, '1_pick');
const matchCountPublic = matchCount8 + matchCount7 + matchCount6 + matchCount5 + matchCount4 + matchCount3 + matchCount2 + matchCount1;
const processedData = json.map((heroStat) => {
@@ -135,7 +134,7 @@ class RequestLayer extends React.Component {
];
const selectedTab = heroTabs.find(_tab => _tab.key === route);
- const { loading } = this.props;
+ const { loading, strings } = this.props;
return (
<div>
| 1 |
diff --git a/packages/ui/src/components/SearchPage/FootstampIcon.jsx b/packages/ui/src/components/SearchPage/FootstampIcon.jsx @@ -3,6 +3,8 @@ import React from 'react';
export const FootstampIcon = () => (
<svg
xmlns="http://www.w3.org/2000/svg"
+ width={16}
+ height={16}
viewBox="0 0 16 16"
>
<path d="M7.34,8,3.31,9a1.83,1.83,0,0,1-1.24-.08A1.28,1.28,0,0,1,1.34,8a3.24,3.24,0,0,1,.2-1.82A6.06,6.06,0,0,1,2.6,4.35h0a2.56,
| 13 |
diff --git a/netlify.toml b/netlify.toml @@ -5,6 +5,7 @@ command = "npm run build-production"
[functions]
directory = "netlify/functions/"
node_bundler = "esbuild"
+external_node_modules = ["uglify-js", "@11ty/eleventy", "@11ty/dependency-tree", "@11ty/eleventy-fetch", "prismjs", "pug-filters", "any-promise"]
[functions.serverless]
included_files = [
| 4 |
diff --git a/packages/node_modules/@node-red/runtime/lib/nodes/context/localfilesystem.js b/packages/node_modules/@node-red/runtime/lib/nodes/context/localfilesystem.js @@ -137,6 +137,16 @@ function stringify(value) {
return { json: result, circular: hasCircular };
}
+
+function writeFileAtomic(storagePath, content) {
+ // To protect against file corruption, write to a tmp file first and then
+ // rename to the destination file
+ let finalFile = storagePath + ".json";
+ let tmpFile = finalFile + "."+Date.now()+".tmp";
+ return fs.outputFile(tmpFile, content, "utf8").then(function() {
+ return fs.rename(tmpFile,finalFile);
+ })
+}
function LocalFileSystem(config){
this.config = config;
this.storageBaseDir = getBasePath(this.config);
@@ -202,7 +212,7 @@ LocalFileSystem.prototype.open = function(){
delete self.knownCircularRefs[scope];
}
log.debug("Flushing localfilesystem context scope "+scope);
- promises.push(fs.outputFile(storagePath + ".json", stringifiedContext.json, "utf8"));
+ promises.push(writeFileAtomic(storagePath, stringifiedContext.json))
});
delete self._pendingWriteTimeout;
return Promise.all(promises);
@@ -319,7 +329,7 @@ LocalFileSystem.prototype.set = function(scope, key, value, callback) {
} else {
delete self.knownCircularRefs[scope];
}
- return fs.outputFile(storagePath + ".json", stringifiedContext.json, "utf8");
+ return writeFileAtomic(storagePath, stringifiedContext.json);
}).then(function(){
if(typeof callback === "function"){
callback(null);
| 4 |
diff --git a/src/components/ActivityCollector/createLinkClick.js b/src/components/ActivityCollector/createLinkClick.js @@ -54,7 +54,7 @@ export default (window, config) => {
event.mergeXdm({
eventType: "web.webinteraction.linkClicks",
web: {
- webinteraction: {
+ webInteraction: {
name: linkName,
type: linkType,
URL: linkUrl,
| 3 |
diff --git a/app/actions/ledgerActions.js b/app/actions/ledgerActions.js // @flow
import createBatchActions from '../util/api/createBatchActions'
import createRequestActions from '../util/api/createRequestActions'
-import getDeviceInfo from '../ledger/getDeviceInfo'
-import getPublicKey from '../ledger/getPublicKey'
+import {getDeviceInfo, getPublicKey} from '../ledger/ledgerNanoS'
const DEVICE_ID = 'LEDGER_DEVICE'
const PUBLIC_KEY_ID = 'LEDGER_PUBLIC_KEY'
| 3 |
diff --git a/src/Model.js b/src/Model.js @@ -373,7 +373,7 @@ export class Model {
let properties = expression.properties
items.start = this.table.unmarshall(result.LastEvaluatedKey)
items.next = async () => {
- params = Object.assign({}, params, {start: result.LastEvaluatedKey})
+ params = Object.assign({}, params, {start: items.start})
if (!params.high) {
if (op == 'find') op = 'queryItems'
else if (op == 'scan') op = 'scanItems'
| 1 |
diff --git a/editor/js/toolbox.js b/editor/js/toolbox.js @@ -2155,7 +2155,7 @@ var EDITOR = (function ($, parent) {
while (newText.indexOf("<math", mathNum) != -1) {
var text1 = newText.substring(mathNum, newText.indexOf("<math", mathNum)),
tableNum = 0;
- while (text1.indexOf("<table", tableNum) != -1) { // check for table tags before/between math tags
+ while (text1.indexOf("<table", tableNum) != -1 && newText.indexOf("</table", tableNum) != -1) { // check for table tags before/between math tags
tempText += text1.substring(tableNum, text1.indexOf("<table", tableNum)).replace(/(\n|\r|\r\n)/g, "<br />");
tempText += text1.substring(text1.indexOf("<table", tableNum), text1.indexOf("</table>", tableNum) + 8);
tableNum = text1.indexOf("</table>", tableNum) + 8;
@@ -2167,7 +2167,7 @@ var EDITOR = (function ($, parent) {
var text2 = newText.substring(mathNum),
tableNum = 0;
- while (text2.indexOf("<table", tableNum) != -1) { // check for table tags after math tags
+ while (text2.indexOf("<table", tableNum) != -1 && newText.indexOf("</table", tableNum) != -1) { // check for table tags after math tags
tempText += text2.substring(tableNum, text2.indexOf("<table", tableNum)).replace(/(\n|\r|\r\n)/g, "<br />");
tempText += text2.substring(text2.indexOf("<table", tableNum), text2.indexOf("</table>", tableNum) + 8);
tableNum = text2.indexOf("</table>", tableNum) + 8;
@@ -2178,7 +2178,8 @@ var EDITOR = (function ($, parent) {
} else if (newText.indexOf("<table") != -1) { // no math tags - so just check table tags
var tempText = "",
tableNum = 0;
- while (newText.indexOf("<table", tableNum) != -1) {
+
+ while (newText.indexOf("<table", tableNum) != -1 && newText.indexOf("</table", tableNum) != -1) {
tempText += newText.substring(tableNum, newText.indexOf("<table", tableNum)).replace(/(\n|\r|\r\n)/g, "<br />");
tempText += newText.substring(newText.indexOf("<table", tableNum), newText.indexOf("</table>", tableNum) + 8);
tableNum = newText.indexOf("</table>", tableNum) + 8;
| 1 |
diff --git a/generators/entity-client/templates/common/src/main/webapp/app/entities/enumerations/enum.model.ts.ejs b/generators/entity-client/templates/common/src/main/webapp/app/entities/enumerations/enum.model.ts.ejs See the License for the specific language governing permissions and
limitations under the License.
-%>
-export const enum <%= enumName %> {
+export enum <%= enumName %> {
<% enumValues.forEach((enumValue, index) => { %>
<%= enumValue.name %> = '<%= enumValue.value %>'<% if (index < enumValues.length - 1) { %>,<% } %>
<% }); %>
| 2 |
diff --git a/token-metadata/0x0947b0e6D821378805c9598291385CE7c791A6B2/metadata.json b/token-metadata/0x0947b0e6D821378805c9598291385CE7c791A6B2/metadata.json "symbol": "LND",
"address": "0x0947b0e6D821378805c9598291385CE7c791A6B2",
"decimals": 18,
- "dharmaVerificationStatus": {
"dharmaVerificationStatus": "VERIFIED"
}
\ No newline at end of file
-}
\ No newline at end of file
| 3 |
diff --git a/OurUmbraco/Documentation/DocumentationUpdater.cs b/OurUmbraco/Documentation/DocumentationUpdater.cs @@ -206,6 +206,24 @@ namespace OurUmbraco.Documentation
return 10;
case "common-pitfalls":
return 11;
+ case "angular":
+ return 12;
+ case "api-documentation":
+ return 13;
+ case "debugging":
+ return 14;
+ case "language-variation":
+ return 15;
+ case "mapping":
+ return 16;
+ case "notifications":
+ return 17;
+ case "scheduling":
+ return 18;
+ case "using-loc":
+ return 19;
+ case "v9-config":
+ return 20;
//Tutorials
case "creating-basic-site":
@@ -317,64 +335,136 @@ namespace OurUmbraco.Documentation
return 2;
//Reference - Config
- case "webconfig":
- return 0;
case "404handlers":
- return 1;
+ return 0;
case "applications":
+ return 1;
+ case "baserestextensions":
return 2;
- case "embeddedmedia":
+ case "dashboard":
return 3;
- case "examineindex":
+ case "embeddedmedia":
return 4;
- case "examinesettings":
+ case "examineindex":
return 5;
- case "filesystemproviders":
+ case "examinesettings":
return 6;
- case "baserestextensions":
+ case "filesystemproviders":
return 7;
- case "tinymceconfig":
+ case "healthchecks":
return 8;
- case "trees":
+ case "serilog":
return 9;
- case "umbracosettings":
+ case "tinymceconfig":
return 10;
- case "dashboard":
+ case "trees":
return 11;
- case "healthchecks":
+ case "umbracosettings":
return 12;
+ case "webconfig":
+ return 13;
//Reference - Templating
- case "mvc":
+ case "macros":
return 0;
case "masterpages":
return 1;
- case "macros":
- return 2;
case "modelsbuilder":
+ return 2;
+ case "mvc":
return 3;
//Reference - Querying
- case "ipublishedcontent":
- return 0;
case "dynamicpublishedcontent":
+ return 0;
+ case "imembermanager":
return 1;
- case "umbracohelper":
+ case "ipublishedcontent":
return 2;
- case "membershiphelper":
+ case "ipublishedcontentquery":
return 3;
+ case "itagquery":
+ return 4;
+ case "membershiphelper":
+ return 5;
+ case "umbracohelper":
+ return 6;
//Reference - Routing
case "authorized":
return 0;
- case "request-pipeline":
+ case "iisrewriterules":
return 1;
+ case "request-pipeline":
+ return 2;
+ case "url-tracking":
+ return 3;
case "webapi":
+ return 4;
+
+ //Reference - Events
+ case "editormodel-events":
+ return 0;
+ case "memberservice-events":
+ return 1;
+
+ //Reference - V9 Config
+ case "basicauthsettings":
+ return 0;
+ case "connectionstringssettings":
+ return 1;
+ case "contentsettings":
return 2;
- case "iisrewriterules":
+ case "debugsettings":
return 3;
- case "url-tracking":
+ case "examinesettings":
return 4;
+ case "exceptionfiltersettings":
+ return 5;
+ case "globalsettings":
+ return 6;
+ case "healthchecks":
+ return 7;
+ case "hostingsettings":
+ return 8;
+ case "imagingsettings":
+ return 9;
+ case "keepalivesettings":
+ return 10;
+ case "loggingsettings":
+ return 11;
+ case "maximumuploadsizesettings":
+ return 12;
+ case "modelsbuildersettings":
+ return 13;
+ case "nucachesettings":
+ return 14;
+ case "packagemigrationsettings":
+ return 15;
+ case "pluginssettings":
+ return 16;
+ case "requesthandlersettings":
+ return 17;
+ case "richtexteditorsettings":
+ return 18;
+ case "runtimeminificationsettings":
+ return 19;
+ case "runtimesettings":
+ return 20;
+ case "securitysettings":
+ return 21;
+ case "serilog":
+ return 22;
+ case "tourssettings":
+ return 23;
+ case "typefindersettings":
+ return 24;
+ case "umbracosettings":
+ return 25;
+ case "unattendedsettings":
+ return 26;
+ case "webroutingsettings":
+ return 27;
//Tutorials - Basic site from scratch
case "getting-started":
| 3 |
diff --git a/src/components/pagination/pagination.js b/src/components/pagination/pagination.js @@ -103,8 +103,8 @@ const Pagination = {
}
}
if (params.type === 'fraction') {
- $el.find(`.${params.currentClass}`).text(current + 1);
- $el.find(`.${params.totalClass}`).text(total);
+ $el.find(`.${params.currentClass}`).text(params.formatFractionCurrent(current + 1));
+ $el.find(`.${params.totalClass}`).text(params.formatFractionTotal(total));
}
if (params.type === 'progressbar') {
let progressbarDirection;
@@ -254,6 +254,8 @@ export default {
type: 'bullets', // 'bullets' or 'progressbar' or 'fraction' or 'custom'
dynamicBullets: false,
dynamicMainBullets: 1,
+ formatFractionCurrent: number => number,
+ formatFractionTotal: number => number,
bulletClass: 'swiper-pagination-bullet',
bulletActiveClass: 'swiper-pagination-bullet-active',
modifierClass: 'swiper-pagination-', // NEW
| 0 |
diff --git a/character-controller.js b/character-controller.js @@ -155,18 +155,24 @@ class PlayerBase extends THREE.Object3D {
this.rightHand,
];
+ this.detached = false;
+
this.avatar = null;
this.appManager = new AppManager({
appsMap: null,
});
this.appManager.addEventListener('appadd', e => {
+ if (!this.detached) {
const app = e.data;
scene.add(app);
+ }
});
this.appManager.addEventListener('appremove', e => {
+ if (!this.detached) {
const app = e.data;
app.parent && app.parent.remove(app);
+ }
});
this.eyeballTarget = new THREE.Vector3();
@@ -993,6 +999,7 @@ class LocalPlayer extends UninterpolatedPlayer {
this.isLocalPlayer = !opts.npc;
this.isNpcPlayer = !!opts.npc;
+ this.detached = !!opts.detached;
this.name = defaultPlayerName;
this.bio = defaultPlayerBio;
| 0 |
diff --git a/src/js/services/correspondentListService.js b/src/js/services/correspondentListService.js @@ -54,8 +54,10 @@ angular.module('copayApp.services').factory('correspondentListService', function
$rootScope.newMessagesCount[peer_address] = 1;
}
if ($state.is('walletHome') && $rootScope.tab == 'walletHome') {
+ setCurrentCorrespondent(peer_address, function(bAnotherCorrespondent){
$stickyState.reset('correspondentDevices.correspondentDevice');
go.path('correspondentDevices.correspondentDevice');
+ });
}
else
$rootScope.$digest();
| 12 |
diff --git a/item-spec/README.md b/item-spec/README.md @@ -21,4 +21,3 @@ schemas validate additional fields defined in *[Common Metadata](common-metadata
**Common Metadata:** A set of commonly-used fields for STAC Items is listed in
*[common-metadata.md](common-metadata.md)*.
-
| 2 |
diff --git a/packages/siimple-helpers/scss/all.scss b/packages/siimple-helpers/scss/all.scss @use "./vertical-align.scss" as valign;
// @description: include all helpers generators
-@mixin all-helpers () {
+@mixin all () {
@include themed.color();
@include themed.font();
@include themed.font-weight();
| 10 |
diff --git a/bin/serverless.js b/bin/serverless.js @@ -29,14 +29,14 @@ if (process.env.SLS_DEBUG) {
}
process.on('unhandledRejection', e => {
+ process.exitCode = 1;
logError(e);
});
process.noDeprecation = true;
const invocationId = uuid.v4();
-initializeErrorReporter(invocationId)
- .then(() => {
+initializeErrorReporter(invocationId).then(() => {
if (process.argv[2] === 'completion') {
return autocomplete();
}
@@ -70,8 +70,4 @@ initializeErrorReporter(invocationId)
throw err;
});
});
- })
- .catch(e => {
- process.exitCode = 1;
- logError(e);
});
| 7 |
diff --git a/shared/data/constants.js b/shared/data/constants.js @@ -85,7 +85,7 @@ module.exports = {
},
{
"name": "tds",
- "url": "https://staticcdn.duckduckgo.com/trackerblocking/tds.json",
+ "url": "https://staticcdn.duckduckgo.com/trackerblocking/v2/tds.json",
"format": "json"
},
{
| 3 |
diff --git a/src/containers/order/withOrders.js b/src/containers/order/withOrders.js import React from "react";
import PropTypes from "prop-types";
import { Query, withApollo } from "react-apollo";
+import { toJS } from "mobx";
import { inject, observer } from "mobx-react";
import hoistNonReactStatic from "hoist-non-react-statics";
import { pagination, paginationVariablesFromUrlParams } from "lib/utils/pagination";
@@ -39,7 +40,7 @@ export default function withOrders(Component) {
const variables = {
accountId: authStore.accountId,
language: uiStore.language,
- orderStatus: uiStore.orderStatusQuery,
+ orderStatus: toJS(uiStore.orderStatusQuery),
shopIds: [primaryShopId],
...paginationVariablesFromUrlParams(routingStore.query, { defaultPageLimit: uiStore.orderQueryLimit })
};
| 4 |
diff --git a/docs/FAQ.md b/docs/FAQ.md @@ -56,18 +56,15 @@ function getLore(item) {
const ChatMessage = require('prismarine-chat')(bot.version)
const data = nbt.simplify(item.nbt)
- const display = data['display']
+ const display = data.display
if (display == null) return message
- const lore = display['Lore']
+ const lore = display.Lore
if (lore == null) return message
-
for (const line of lore) {
- for (const group of JSON.parse(line)) {
- message += new ChatMessage(group).toString()
+ message += new ChatMessage(line).toString()
message += '\n'
}
- }
return message
}
| 2 |
diff --git a/exampleSite/content/docs/development/content.md b/exampleSite/content/docs/development/content.md @@ -25,6 +25,18 @@ You can change these colors by editing them in `config.toml`.
Change other Bootstrap variables using `assets/styles/bootstrap/_variables.scss`.
Syna customizes some parts of the theme via custom css, which is available in the `assets/styles` directory.
+### Fonts
+
+FontAwesome Free is supported by default and is used throughout built-in fragments. You can disable it by setting `fontawesome.disabled` in your `config.toml` to `true`.
+
+If you want to add FontAwesome Pro to the theme, the following recipe may be helpful.
+
+- Move all the files from `fontawesome-pro-[version]-web/webfonts/` (from the archive) to `static/fonts` directory in the theme.
+- Move all the files from `fontawesome-pro-[version]-web/scss/` (from the archive) to `assets/styles/fontawesome` directory in the theme.
+- Set `fontawesome.pro` in your `config.toml` file to `true`.
+
+After these steps, FontAwesome Pro will be loaded in every page of your website.
+
### JavaScript
Syna uses code spliting to get bundles for each fragment.
| 0 |
diff --git a/README.md b/README.md @@ -34,10 +34,16 @@ GET https://api.spacexdata.com/v1/launches/latest
"launch_year": "2017",
"launch_date_utc": "2017-07-05T23:35:00Z",
"launch_date_local": "2017-07-05T19:35:00-04:00",
- "rocket": "Falcon 9",
+ "rocket": {
+ "rocket_id": "falcon9",
+ "rocket_name": "Falcon 9",
"rocket_type": "FT",
"core_serial": "B1037",
- "cap_serial": null,
+ "cap_serial": null
+ },
+ "telemetry": {
+ "flight_club": null
+ },
"launch_site": {
"site_id": "ksc_lc_39a",
"site_name": "KSC LC 39A"
| 3 |
diff --git a/articles/sso/current/setup.md b/articles/sso/current/setup.md @@ -58,8 +58,8 @@ Auth0 Enterprise subscribers can set session limits to the following levels:
| **Setting** | **Description** | Recommended | Enterprise |
| - | - | - | - |
- | **Inactivity timeout** | The maximum session session lifetime without user activity. | 10080 minutes (7 days) | 144000 minutes (100 days) |
- | **Require log in after** | The maximum possible session lifetime regardless of user activity. | 4320 minutes (3 days) | 525600 minutes (365 days).|
+ | **Inactivity timeout** | The maximum session session lifetime without user activity. | 4320 minutes (3 days) | 144000 minutes (100 days) |
+ | **Require log in after** | The maximum possible session lifetime regardless of user activity. | 10080 minutes (7 days) | 525600 minutes (365 days).|

@@ -84,16 +84,10 @@ The [Auth0 OIDC SSO Sample](https://github.com/auth0-samples/oidc-sso-sample) re
In addition to the settings available under tenant settings, legacy tenants may see slightly different options available for SSO under [Dashboard > Tenant Settings > Advanced](${manage_url}/#/tenant/advanced).
-
+While all new Auth0 tenants come with seamless SSO enabled, legacy tenants may choose whether to enable this feature. If you do not choose to **Enable Seamless SSO**, you have an additional setting available to you under Application Settings.
-While all new Auth0 tenants come with seamless SSO enabled, legacy tenants may choose whether to enable this feature.
+To see this, navigate to the Applications section of the [Dashboard](${manage_url}/#/applications). Click on **Settings** (represented by the gear icon) for the application with which you're working. Scroll to the bottom of the page and click **Show Advanced Settings**.
-If you do not choose to **Enable Seamless SSO**, you have an additional setting available to you under Application Settings.
-
-To see this, navigate to the Applications section of the [Dashboard](${manage_url}/#/applications). Click on **Settings** (represented by the gear icon) for the Application with which you're working. Scroll to the bottom of the page and click **Show Advanced Settings**.
-
-
+
You have the option to enable or disable the **Use Auth0 instead of the IdP to do Single Sign On** feature.
-
-
| 2 |
diff --git a/src/encoded/types/assay_data.py b/src/encoded/types/assay_data.py @@ -46,5 +46,6 @@ assay_terms = {
'BruChase-seq': 'OBI:0002114',
'genetic modification followed by DNase-seq': 'NTR:0004774',
'CRISPRi followed by RNA-seq': 'NTR:0004619',
- 'genotyping by Hi-C': 'NTR:0004875'
+ 'genotyping by Hi-C': 'NTR:0004875',
+ 'Circ-seq': 'NTR:0005023'
}
| 0 |
diff --git a/src/parsers/linter/GmlLinter.hx b/src/parsers/linter/GmlLinter.hx @@ -644,7 +644,7 @@ class GmlLinter {
if (minArgs == maxArgs) {
addError('Too many arguments for $currName (expected $maxArgs, got $argc)');
} else {
- addError('Not enough arguments for $currName (expected $minArgs..$maxArgs, got $argc)');
+ addError('Too many arguments for $currName (expected $minArgs..$maxArgs, got $argc)');
}
}
}
| 1 |
diff --git a/docs/request.md b/docs/request.md @@ -27,7 +27,8 @@ Makes XHR (aka AJAX) requests, and returns a [promise](promise.md)
m.request({
method: "PUT",
url: "/api/v1/users/:id",
- params: {id: 1, name: "test"}
+ params: {id: 1},
+ body: {name: "test"}
})
.then(function(result) {
console.log(result)
| 7 |
diff --git a/src/dom_components/model/ComponentFrame.js b/src/dom_components/model/ComponentFrame.js import Component from './Component';
+import { toLowerCase } from 'utils/mixins';
const type = 'iframe';
@@ -17,6 +18,6 @@ export default Component.extend(
}
},
{
- isComponent: el => el.tagName === 'IFRAME'
+ isComponent: el => toLowerCase(el.tagName) === type
}
);
| 7 |
diff --git a/wallet.js b/wallet.js @@ -1898,8 +1898,20 @@ function sendMultiPayment(opts, handleResult)
if (err)
throw Error(err);
- if (outputs_by_asset && (objAsset.is_private || objAsset.fixed_denominations))
- throw Error("outputs_by_asset cannot be used for private payments and indivisible assets");
+ if (outputs_by_asset && (objAsset.is_private || objAsset.fixed_denominations)) {
+ if (Object.keys(outputs_by_asset).filter(a => a !== 'base' && a !== nonbaseAsset).length > 0)
+ throw Error("outputs_by_asset with multiple assets cannot be used for private payments and indivisible assets");
+ // else rewrite using base_outputs/asset_outputs
+ asset = nonbaseAsset;
+ asset_outputs = outputs_by_asset[nonbaseAsset];
+ base_outputs = outputs_by_asset.base; // might be undefined
+ outputs_by_asset = null;
+ delete params.outputs_by_asset;
+
+ params.asset = asset;
+ params.asset_outputs = asset_outputs;
+ params.base_outputs = base_outputs;
+ }
if (objAsset.is_private){
var saveMnemonicsPreCommit = params.callbacks.preCommitCb;
// save messages in outbox before committing
| 11 |
diff --git a/userscript.user.js b/userscript.user.js @@ -1050,6 +1050,7 @@ var $$IMU_EXPORT$$;
// thanks to decembre on github for the idea: https://github.com/qsniyg/maxurl/issues/14#issuecomment-531080061
mouseover_zoom_custom_percent: 100,
mouseover_pan_behavior: "drag",
+ mouseover_drag_min: 5,
mouseover_scroll_behavior: "zoom",
scroll_zoom_behavior: "fitfull",
mouseover_move_with_cursor: false,
@@ -1745,6 +1746,19 @@ var $$IMU_EXPORT$$;
category: "popup",
subcategory: "behavior"
},
+ mouseover_drag_min: {
+ name: "Minimum drag amount",
+ description: "How many pixels the mouse should move to start a drag",
+ type: "number",
+ number_min: 0,
+ number_int: true,
+ number_unit: "pixels",
+ requires: {
+ mouseover_pan_behavior: "drag"
+ },
+ category: "popup",
+ subcategory: "behavior"
+ },
mouseover_scroll_behavior: {
name: "Popup scroll action",
description: "How the popup reacts to a scroll/mouse wheel event",
@@ -56632,7 +56646,7 @@ var $$IMU_EXPORT$$;
var viewport = get_viewport();
var edge_buffer = 80;
- var min_move_amt = 5;
+ var min_move_amt = parseInt(settings.mouseover_drag_min);
var moved = false;
// lefttop: true = top, false = left
| 11 |
diff --git a/src/pipeline/index.js b/src/pipeline/index.js @@ -2,7 +2,6 @@ const fs = require('fs');
const Promise = require('bluebird');
const writeFile = Promise.promisify(fs.writeFile);
const UglifyJS = require('uglify-js');
-const compile = require('./compile');
const {
getASTJSON,
getComponentsJS,
@@ -12,7 +11,7 @@ const {
const css = require('./css');
const bundleJS = require('./bundle-js');
-let tree;
+let output;
const build = (opts, paths, inputConfig) => {
// always store source in opts.inputString
@@ -25,7 +24,7 @@ const build = (opts, paths, inputConfig) => {
// to start a Promise chain and turn any synchronous exceptions into a rejection
() => {
const ast = compile(opts.inputString, opts.compilerOptions);
- tree = {
+ output = {
ast: getASTJSON(ast),
components: getComponentsJS(ast, paths, inputConfig),
css: css(opts),
@@ -37,11 +36,11 @@ const build = (opts, paths, inputConfig) => {
.then(() => {
// write everything but JS to disk
return Promise.all([
- writeFile(paths.AST_OUTPUT_FILE, tree.ast),
- writeFile(paths.COMPONENTS_OUTPUT_FILE, tree.components),
- writeFile(paths.CSS_OUTPUT_FILE, tree.css),
- writeFile(paths.DATA_OUTPUT_FILE, tree.data),
- writeFile(paths.HTML_OUTPUT_FILE, tree.html),
+ writeFile(paths.AST_OUTPUT_FILE, output.ast),
+ writeFile(paths.COMPONENTS_OUTPUT_FILE, output.components),
+ writeFile(paths.CSS_OUTPUT_FILE, output.css),
+ writeFile(paths.DATA_OUTPUT_FILE, output.data),
+ writeFile(paths.HTML_OUTPUT_FILE, output.html),
]);
})
.then(() => {
@@ -52,19 +51,22 @@ const build = (opts, paths, inputConfig) => {
if (opts.minify) {
js = UglifyJS.minify(js, {fromString: true}).code;
}
- tree.js = js;
+ output.js = js;
})
.then(() => {
- writeFile(paths.JS_OUTPUT_FILE, tree.js); // write JS to disk
+ writeFile(paths.JS_OUTPUT_FILE, output.js); // write JS to disk
})
.then(() => {
- return tree; // return all results
+ return output; // return all results
});
}
const updateCSS = (opts, paths) => {
- tree.css = css(opts);
- return writeFile(paths.CSS_OUTPUT_FILE, tree.css);
+ output.css = css(opts);
+ return writeFile(paths.CSS_OUTPUT_FILE, output.css)
+ .then(() => {
+ return output; // return all results
+ });
}
module.exports = {
| 10 |
diff --git a/test/index.js b/test/index.js @@ -66,6 +66,15 @@ function handleTestResult(testResult) {
}
+/**
+ * Fail if the process takes longer than 10 seconds.
+ */
+setTimeout(function() {
+ console.log("Tests took longer than 10 seconds to run, returning.");
+ process.exit(1);
+}, 1 * 1000);
+
+
TestRegister.runTests()
.then(function(results) {
results.forEach(handleTestResult);
| 0 |
diff --git a/src/components/DateRangePicker.js b/src/components/DateRangePicker.js @@ -165,7 +165,7 @@ class DateRangePicker extends React.Component {
selectedDefaultRange: '',
selectedBox: isLargeOrMediumWindowSize ? this._getToggledSelectBox(state.selectedBox) : state.selectedBox,
selectedStartDate: modifiedRangeCompleteButDatesInversed ? endDate : startDate,
- selectedEndDate: modifiedRangeCompleteButDatesInversed ? startDate : endDate,
+ selectedEndDate: modifiedRangeCompleteButDatesInversed ? moment.unix(startDate).endOf('day').unix() : moment.unix(endDate).endOf('day').unix(),
showCalendar: false
};
},
| 12 |
diff --git a/userscript.user.js b/userscript.user.js @@ -68067,8 +68067,7 @@ var $$IMU_EXPORT$$;
};
}
- if (domain === "content.ray-web.jp" && options && options.cb && options.do_request && options.element &&
- host_domain_nowww === "ray-web.jp") {
+ if (domain_nowww === "ray-web.jp") {
// thanks to vick2 on greasyfork: https://greasyfork.org/en/forum/discussion/65328/add-support-for-ray-web-jp
// https://ray-web.jp/50370/photos/47668
// https://content.ray-web.jp/photos/pictures/47668/medium/d51ee4a492a483a6606aa407015527ae1b9f986d.jpg?1550540662
@@ -68076,64 +68075,33 @@ var $$IMU_EXPORT$$;
// other:
// https://ray-web.jp/series/riho
// https://content.ray-web.jp/series/images/17/original/a2695c70afbe13d62003e7d8f38291247e853e64.png?1568888397
-
- regex = /\/photos\/+pictures\/+([0-9]+)\/+([a-z]+)\/+[0-9a-f]{20,}\./;
- match = src.match(regex);
-
- if (match) {
- var get_og_image = function(data) {
- var url = data.match(/<meta\s+property=["']og:image["']\s+content=["'](https?:.*?)["']/);
- if (url)
- return decode_entities(url[1]);
- return null;
- };
-
- var fetch_image_page = function(albumid, pictureid, cb) {
- var cache_key = "ray-web:" + albumid + "-" + pictureid;
- api_cache.fetch(cache_key, cb, function(done) {
- options.do_request({
- url: "https://ray-web.jp/" + albumid + "/photos/" + pictureid,
- method: "GET",
- onload: function(result) {
- if (result.readyState !== 4)
- return;
-
- if (result.status !== 200) {
- console_error(cache_key, result);
+ newsrc = website_query({
+ website_regex: /^([a-z]+:\/\/[^/]+\/+[0-9]+\/+photos\/+[0-9]+)(?:[?#].*)?$/,
+ query_for_id: "${id}",
+ process: function(done, resp, cache_key) {
+ var url = get_meta(resp.responseText, "og:image");
+ if (!url) {
+ console_error(cache_key, "Unable to find og:image from", resp);
return done(null, false);
}
- return done(result.responseText, 6*60*60);
+ return done(url, 6*60*60);
}
});
- });
- };
-
- var rayweb_url_to_parts = function(url) {
- var match = url.match(/:\/\/[^/]*\/+([0-9]+)\/+photos\/+([0-9]+)(?:[?#].*)?$/);
- if (match) {
- return [match[1], match[2]];
- } else {
- return null;
- }
- };
-
- var parts = null;
- if (options.element.parentElement.tagName === "A") {
- parts = rayweb_url_to_parts(options.element.parentElement.href);
- } else {
- parts = rayweb_url_to_parts(options.host_url);
- if (!parts || match[1] !== parts[1])
- parts = null;
+ if (newsrc) return newsrc;
}
- if (parts) {
- fetch_image_page(parts[0], parts[1], function (data) {
- options.cb(get_og_image(data));
- });
+ if (host_domain_nowww === "ray-web.jp" && domain === "content.ray-web.jp" && options.element) {
+ newsrc = common_functions.get_pagelink_el_matching(options.element, /^[a-z]+:\/\/[^/]+\/+[0-9]+\/+photos\/+[0-9]+/);
+ if (newsrc) return newsrc;
+ if (options.element.tagName === "IMG" &&
+ options.element.parentElement && options.element.parentElement.classList.contains("current_photo")) {
+ var match = options.host_url.match(/\/([0-9]+)\/+photos\/+([0-9]+)/);
+ if (match) {
return {
- waiting: true
+ url: options.host_url,
+ is_pagelink: true
};
}
}
@@ -79926,10 +79894,8 @@ var $$IMU_EXPORT$$;
return {
element_ok: function(el) {
// thanks to ambler on discord for reporting
- //console_log(el, el.tagName, el.id);
if (el.tagName === "DIV" && el.id === "background") {
var newel = el.querySelector("div#backgroundFrontLayer");
- //console_log("NEW", newel);
if (newel)
return newel;
}
@@ -79937,6 +79903,27 @@ var $$IMU_EXPORT$$;
};
}
+ if (host_domain_nowww === "ray-web.jp") {
+ return {
+ element_ok: function(el) {
+ if (!el.children)
+ return;
+
+ var imgchild = null;
+ array_foreach(el.children, function(child) {
+ // all imgs are pointer-events: none
+ if (child.tagName === "IMG") {
+ imgchild = child;
+ return false;
+ }
+ });
+
+ if (imgchild)
+ return imgchild;
+ }
+ };
+ }
+
return null;
};
| 7 |
diff --git a/test/resources/reftest-analyzer.js b/test/resources/reftest-analyzer.js @@ -147,20 +147,17 @@ window.onload = function () {
}
}
- function loadFromWeb(url) {
+ async function loadFromWeb(url) {
const lastSlash = url.lastIndexOf("/");
if (lastSlash) {
gPath = url.substring(0, lastSlash + 1);
}
- const r = new XMLHttpRequest();
- r.open("GET", url);
- r.onreadystatechange = function () {
- if (r.readyState === 4) {
- processLog(r.response);
+ const response = await fetch(url);
+ if (!response.ok) {
+ throw new Error(response.statusText);
}
- };
- r.send(null);
+ processLog(await response.text());
}
function fileEntryChanged() {
| 14 |
diff --git a/packages/components/src/components/as-stacked-bar-widget/as-stacked-bar-widget.tsx b/packages/components/src/components/as-stacked-bar-widget/as-stacked-bar-widget.tsx @@ -130,8 +130,7 @@ export class StackedBarWidget {
private _renderLegend() {
if (this.showLegend && this.colorMap) {
- const data = this._colorMaptoLegendData(this.colorMap);
- return <as-legend data={data}></as-legend>;
+ return <as-legend data={this.colorMap}></as-legend>;
}
}
@@ -139,18 +138,4 @@ export class StackedBarWidget {
const keys = dataProcessor.getKeys(data);
return ColorMapFactory.create(keys, metadata);
}
-
- /**
- * Transform a color map into a object that legends can understand.
- */
- private _colorMaptoLegendData(colorMap: ColorMap) {
- const legendData = {};
- Object.keys(colorMap).forEach((key) => {
- legendData[key] = {
- color: colorMap[key],
- label: key,
- };
- });
- return legendData;
- }
}
| 4 |
diff --git a/demos/zoom-wheel.html b/demos/zoom-wheel.html let nxMax = nxMin + nxRange;
[nxMin, nxMax] = clamp(nxRange, nxMin, nxMax, xRange, xMin, xMax);
+ if (u.scales.x.distr == 2) {
+ nxMin = u.valToIdx(nxMin);
+ nxMax = u.valToIdx(nxMax);
+ }
+
let nyRange = e.deltaY < 0 ? oyRange * factor : oyRange / factor;
let nyMin = yVal - btmPct * nyRange;
let nyMax = nyMin + nyRange;
| 9 |
diff --git a/src/pages/StrategyEditor/StrategyEditor.container.js b/src/pages/StrategyEditor/StrategyEditor.container.js @@ -2,7 +2,9 @@ import { connect } from 'react-redux'
import StrategyEditor from './StrategyEditor'
-const mapStateToProps = state => ({}) // eslint-disable-line
+const mapStateToProps = state => ({
+ firstLogin: state.ui.firstLogin,
+}) // eslint-disable-line
const mapDispatchToProps = dispatch => ({}) // eslint-disable-line
| 3 |
diff --git a/packages/live-server/test/cli.js b/packages/live-server/test/cli.js @@ -6,31 +6,37 @@ var opts = {
timeout: 2000,
maxBuffer: 1024
};
+function exec_test(args, callback) {
+ if (process.platform === 'win32')
+ exec(process.execPath, [ cmd ].concat(args), opts, callback);
+ else
+ exec(cmd, args, opts, callback);
+}
describe('command line usage', function() {
it('--version', function(done) {
- exec(cmd, [ "--version" ], opts, function(error, stdout, stdin) {
+ exec_test([ "--version" ], function(error, stdout, stdin) {
assert(!error, error);
assert(stdout.indexOf("live-server") == 0, "version not found");
done();
});
});
it('--help', function(done) {
- exec(cmd, [ "--help" ], opts, function(error, stdout, stdin) {
+ exec_test([ "--help" ], function(error, stdout, stdin) {
assert(!error, error);
assert(stdout.indexOf("Usage: live-server") == 0, "usage not found");
done();
});
});
it('--quiet', function(done) {
- exec(cmd, [ "--quiet", "--no-browser", "--test" ], opts, function(error, stdout, stdin) {
+ exec_test([ "--quiet", "--no-browser", "--test" ], function(error, stdout, stdin) {
assert(!error, error);
assert(stdout === "", "stdout not empty");
done();
});
});
it('--port', function(done) {
- exec(cmd, [ "--port=16123", "--no-browser", "--test" ], opts, function(error, stdout, stdin) {
+ exec_test([ "--port=16123", "--no-browser", "--test" ], function(error, stdout, stdin) {
assert(!error, error);
assert(stdout.indexOf("Serving") == 0, "serving string not found");
assert(stdout.indexOf("at http://127.0.0.1:16123") != -1, "port string not found");
@@ -38,7 +44,7 @@ describe('command line usage', function() {
});
});
it('--host', function(done) {
- exec(cmd, [ "--host=localhost", "--no-browser", "--test" ], opts, function(error, stdout, stdin) {
+ exec_test([ "--host=localhost", "--no-browser", "--test" ], function(error, stdout, stdin) {
assert(!error, error);
assert(stdout.indexOf("Serving") == 0, "serving string not found");
assert(stdout.indexOf("at http://localhost:") != -1, "host string not found");
@@ -46,11 +52,11 @@ describe('command line usage', function() {
});
});
it('--htpasswd', function(done) {
- exec(cmd,
+ exec_test(
[ "--htpasswd=" + path.join(__dirname, "data/htpasswd-test"),
"--no-browser",
"--test"
- ], opts, function(error, stdout, stdin) {
+ ], function(error, stdout, stdin) {
assert(!error, error);
assert(stdout.indexOf("Serving") == 0, "serving string not found");
done();
| 11 |
diff --git a/token-metadata/0x667088b212ce3d06a1b553a7221E1fD19000d9aF/metadata.json b/token-metadata/0x667088b212ce3d06a1b553a7221E1fD19000d9aF/metadata.json "symbol": "WINGS",
"address": "0x667088b212ce3d06a1b553a7221E1fD19000d9aF",
"decimals": 18,
- "dharmaVerificationStatus": {
"dharmaVerificationStatus": "VERIFIED"
}
\ No newline at end of file
-}
\ No newline at end of file
| 3 |
diff --git a/src/lib/wallet/__tests__/GoodWallet.js b/src/lib/wallet/__tests__/GoodWallet.js +import { BN } from 'web3-utils'
import goodWallet from '../GoodWallet'
const httpProviderMock = jest.fn().mockImplementation(() => {
@@ -13,15 +14,100 @@ beforeAll(() => {
jest.resetAllMocks()
})
-describe('Wallet Creation', () => {
- it(`should create wallet property`, () => {
- goodWallet.ready.then(() => {
- const { wallet } = goodWallet
+describe('Polling for events', () => {
+ it(`should stop polling after cancel returns true`, () => {
+ // Given
+ const contract = {
+ getPastEvents() {
+ return Promise.resolve([])
+ }
+ }
+
+ return new Promise(async resolve => {
+ // When
+ await goodWallet.ready
+ goodWallet.setBlockNumber(new BN(1))
+ goodWallet.pollForEvents(
+ { event: 'Transfer', contract },
+ () => {},
+ () => {
+ goodWallet.setBlockNumber(goodWallet.blockNumber.add(new BN(1)))
+ const shouldCancel = goodWallet.blockNumber > 7
+
+ if (shouldCancel) {
+ resolve(undefined)
+ }
+
+ return shouldCancel
+ },
+ 1
+ )
+ }).then(() => {
+ // Then
+ expect(goodWallet.blockNumber.toString()).toEqual('8')
+ })
+ })
+
+ it(`should fail if no callback is provided`, () => {
+ // Given
+ const contract = {
+ getPastEvents() {
+ return Promise.resolve([])
+ }
+ }
+
+ return new Promise(async (resolve, reject) => {
+ await goodWallet.ready
+
+ // When
+ try {
+ await goodWallet.pollForEvents({ event: 'Transfer', contract })
+ } catch (e) {
+ reject(e)
+ }
+ }).catch(error => {
+ // Then
+ expect(error.message).toBe('callback must be provided')
+ })
+ })
- expect(wallet).toBeDefined()
- expect(wallet).not.toBeNull()
- expect(wallet.wallet).toBeDefined()
- expect(wallet.wallet).not.toBeNull()
+ it(`should fail if no event is provided`, () => {
+ // Given
+ const contract = {
+ getPastEvents() {
+ return Promise.resolve([])
+ }
+ }
+
+ return new Promise(async (resolve, reject) => {
+ await goodWallet.ready
+
+ // When
+ try {
+ await goodWallet.pollForEvents({ contract }, () => {})
+ } catch (e) {
+ reject(e)
+ }
+ }).catch(error => {
+ // Then
+ expect(error.message).toBe('event must be provided')
+ })
+ })
+
+ it(`should fail if no contract is provided`, () => {
+ return new Promise(async (resolve, reject) => {
+ // Given
+ await goodWallet.ready
+
+ // When
+ try {
+ await goodWallet.pollForEvents({ event: 'Transfer' }, () => {})
+ } catch (e) {
+ reject(e)
+ }
+ }).catch(error => {
+ // Then
+ expect(error.message).toBe('contract object must be provided')
})
})
})
@@ -30,26 +116,24 @@ describe('Wallet Initialization', () => {
it(`should initialize wallet property`, () => {
const numOfAcoounts = 10
- goodWallet.ready.then(() => {
- const { wallet } = goodWallet
-
- expect(wallet.account).toBeDefined()
- expect(wallet.account).not.toBeNull()
- expect(wallet.accounts).toBeDefined()
- expect(wallet.accounts).not.toBeNull()
- expect(wallet.accounts.length).toEqual(numOfAcoounts)
- expect(wallet.networkId).toBeDefined()
- expect(wallet.networkId).not.toBeNull()
- expect(wallet.identityContract).toBeDefined()
- expect(wallet.identityContract).not.toBeNull()
- expect(wallet.claimContract).toBeDefined()
- expect(wallet.claimContract).not.toBeNull()
- expect(wallet.tokenContract).toBeDefined()
- expect(wallet.tokenContract).not.toBeNull()
- expect(wallet.reserveContract).toBeDefined()
- expect(wallet.reserveContract).not.toBeNull()
- expect(wallet.oneTimePaymentLinksContract).toBeDefined()
- expect(wallet.oneTimePaymentLinksContract).not.toBeNull()
+ return goodWallet.ready.then(() => {
+ expect(goodWallet.account).toBeDefined()
+ expect(goodWallet.account).not.toBeNull()
+ expect(goodWallet.accounts).toBeDefined()
+ expect(goodWallet.accounts).not.toBeNull()
+ expect(goodWallet.accounts.length).toEqual(numOfAcoounts)
+ expect(goodWallet.networkId).toBeDefined()
+ expect(goodWallet.networkId).not.toBeNull()
+ expect(goodWallet.identityContract).toBeDefined()
+ expect(goodWallet.identityContract).not.toBeNull()
+ expect(goodWallet.claimContract).toBeDefined()
+ expect(goodWallet.claimContract).not.toBeNull()
+ expect(goodWallet.tokenContract).toBeDefined()
+ expect(goodWallet.tokenContract).not.toBeNull()
+ expect(goodWallet.reserveContract).toBeDefined()
+ expect(goodWallet.reserveContract).not.toBeNull()
+ expect(goodWallet.oneTimePaymentLinksContract).toBeDefined()
+ expect(goodWallet.oneTimePaymentLinksContract).not.toBeNull()
})
})
@@ -59,3 +143,14 @@ describe('Wallet Initialization', () => {
expect(goodWallet.getAccountForType('zoomId')).toBe(goodWallet.accounts[5].address)
})
})
+
+describe('Wallet Creation', () => {
+ it(`should create wallet property`, () => {
+ return goodWallet.ready.then(() => {
+ expect(goodWallet).toBeDefined()
+ expect(goodWallet).not.toBeNull()
+ expect(goodWallet.wallet).toBeDefined()
+ expect(goodWallet.wallet).not.toBeNull()
+ })
+ })
+})
| 0 |
diff --git a/assets/js/googlesitekit/datastore/user/feature-tours.test.js b/assets/js/googlesitekit/datastore/user/feature-tours.test.js @@ -367,8 +367,7 @@ describe( 'core/user feature-tours', () => {
it( 'uses a resolver to set lastDismissedAt in the store if there is a value in the cache', async () => {
const timestamp = Date.now();
-
- setItem( FEATURE_TOUR_LAST_DISMISSED_AT, timestamp, { ttl: FEATURE_TOUR_COOLDOWN_SECONDS } );
+ setItem( FEATURE_TOUR_LAST_DISMISSED_AT, timestamp );
registry.select( STORE_NAME ).getLastDismissedAt();
await untilResolved( registry, STORE_NAME ).getLastDismissedAt();
| 2 |
diff --git a/NewCommentsLayout.user.js b/NewCommentsLayout.user.js // @description Better comments layout for easier readability and moderation
// @homepage https://github.com/samliew/SO-mod-userscripts
// @author @samliew
-// @version 1.1.1
+// @version 1.2
//
// @include https://*stackoverflow.com/*
// @include https://*serverfault.com/*
@@ -61,6 +61,7 @@ ul.comments-list .comment-score span,
}
.comment-copy + .comment-user {
margin-left: 5px;
+ margin-right: 5px;
}
.comment-user {
font-style: italic;
@@ -89,6 +90,36 @@ ul.comments-list .comment:not(.deleted-comment):hover .comment-text {
background-color: var(--yellow-050);
}
+/* New mod/staff badges */
+.s-badge__staff {
+ border-color: var(--orange-400) !important;
+ background-color: transparent !important;
+ color: var(--orange-400) !important;
+}
+.s-badge__moderator {
+ border-color: var(--theme-secondary-color) !important;
+ background-color: transparent !important;
+ color: var(--theme-secondary-color) !important;
+}
+.s-badge__moderator.s-badge__xs:before {
+ background-image: url("data:image/svg+xml,%3Csvg width='7' height='9' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M2.798.246c.3-.329 1.1-.327 1.399 0l2.579 3.66c.3.329.298.864 0 1.192L4.196 8.75c-.299.329-1.1.327-1.398 0L.224 5.098a.904.904 0 010-1.192L2.798.246z' fill='%230077cc'/%3E%3C/svg%3E") !important;
+}
+.s-badge__moderator:before {
+ background-image: url("data:image/svg+xml,%3Csvg width='12' height='14' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5.528.746c.257-.329.675-.327.93 0l4.42 5.66c.258.329.257.864 0 1.192l-4.42 5.66c-.256.328-.674.327-.93 0l-4.42-5.66c-.257-.329-.256-.865 0-1.192l4.42-5.66z' fill='%230077cc'/%3E%3C/svg%3E") !important;
+}
+.comment-body > .s-badge {
+ position: relative;
+ display: inline-block;
+ white-space: nowrap;
+ margin: 0px 0px 5px;
+}
+.comment-body > .s-badge + .comment-date {
+ margin-left: 6px;
+}
+.s-badge__moderator:before {
+ display: inline-block !important;
+}
+
`);
})();
| 1 |
diff --git a/src/models/marker.js b/src/models/marker.js @@ -30,7 +30,11 @@ const Marker = Model.extend({
this._super(name, value, parent, binds, persistent);
this.on("change", "space", this.updateSpaceReferences.bind(this));
- utils.defer(() => _this.updateSpaceReferences());
+ },
+
+ setInterModelListeners() {
+ this._super();
+ this.updateSpaceReferences()
},
updateSpaceReferences() {
| 12 |
diff --git a/package.json b/package.json "dat-encoding": "^5.0.1",
"dat-json": "^1.0.0",
"dat-link-resolve": "^2.2.0",
- "dat-log": "^1.1.0",
+ "dat-log": "^1.2.0",
"dat-node": "^3.5.5",
"dat-registry": "^4.0.0",
"debug": "^3.0.0",
| 4 |
diff --git a/lib/reducers/cosmosV0-reducers.js b/lib/reducers/cosmosV0-reducers.js @@ -401,18 +401,18 @@ function formatTransactionsReducer(txs, reducers) {
const sortedTxs = sortBy(duplicateFreeTxs, ['timestamp'])
const reversedTxs = reverse(sortedTxs)
// here we filter out all transactions related to validators
- let filteredTxs = []
+ let filteredMsgs = []
reversedTxs.forEach(transaction => {
- const index = transaction.tx.value.msg.findIndex(msg =>
- cosmosWhitelistedMessageTypes.has(msg.type.split('/')[1])
- )
+ transaction.tx.value.msg.forEach(msg => {
// only push transactions messages supported by Lunie
- if (index !== -1) {
- transaction.tx.value.msg = [transaction.tx.value.msg[index]]
- filteredTxs.push(transaction)
+ if (cosmosWhitelistedMessageTypes.has(msg.type.split('/')[1])) {
+ filteredMsgs.push(msg)
}
})
- return filteredTxs.map(tx => transactionReducer(tx, reducers))
+ transaction.tx.value.msg = filteredMsgs
+ filteredMsgs = []
+ })
+ return reversedTxs.map(tx => transactionReducer(tx, reducers))
}
function transactionReducerV2(transaction, reducers) {
| 1 |
diff --git a/userscript.user.js b/userscript.user.js @@ -92888,7 +92888,10 @@ var $$IMU_EXPORT$$;
if (domain === "matrix-client.matrix.org") {
// https://matrix-client.matrix.org/_matrix/media/r0/thumbnail/matrix.org/...?width=200&height=573&method=scale
// https://matrix-client.matrix.org/_matrix/media/r0/download/matrix.org/...
- return src.replace(/(\/_matrix\/+media\/+r[0-9]+\/+)thumbnail\/+([^/]+\/+[a-zA-Z0-9]+)\?.*$/, "$1download/$2");
+ // thanks to Noodlers on discord:
+ // https://matrix-client.matrix.org/_matrix/media/r0/thumbnail/matrix.org/2021-05-19_hcVvTKCeROYgekNO?width=100&height=100&method=scale
+ // https://matrix-client.matrix.org/_matrix/media/r0/download/matrix.org/2021-05-19_hcVvTKCeROYgekNO
+ return src.replace(/(\/_matrix\/+media\/+r[0-9]+\/+)thumbnail\/+([^/]+\/+[-_a-zA-Z0-9]+)\?.*$/, "$1download/$2");
}
if (domain_nowww === "pornssd.com") {
| 7 |
diff --git a/devices.js b/devices.js @@ -3715,7 +3715,7 @@ const devices = [
vendor: 'Innr',
description: 'Smart plug',
supports: 'on/off',
- fromZigbee: [fz.on_off],
+ fromZigbee: [fz.on_off, fz.ignore_basic_report],
toZigbee: [tz.on_off],
meta: {configureKey: 1},
configure: async (device, coordinatorEndpoint) => {
| 8 |
diff --git a/site/download.xml b/site/download.xml @@ -136,7 +136,7 @@ limitations under the License.
<li><a href="https://github.com/rabbitmq/signing-keys/releases/download/2.0/rabbitmq-release-signing-key.asc">Release Signing Key</a> <code>0x6B73A36E6026DFCA</code> (on GitHub)</li>
<li><a href="/signatures.html">How to Verify Release Artifact Signatures</a></li>
<li><a href="/rabbitmq-release-signing-key.asc">Release Signing Key</a> (alternative download location on rabbitmq.com)</li>
- <li><a href="https://bintray.com/rabbitmq/Keys/download_file?file_path=rabbitmq-release-signing-key.asc">Release Signing Key</a> (alternative download location on Bintray)</li>
+ <li><a href="https://dl.bintray.com/rabbitmq/Keys/rabbitmq-release-signing-key.asc">Release Signing Key</a> (alternative download location on Bintray)</li>
</ul>
</doc:section>
| 4 |
diff --git a/lib/modules/blockchain_connector/provider.js b/lib/modules/blockchain_connector/provider.js @@ -47,7 +47,6 @@ class Provider {
}
});
self.web3.eth.defaultAccount = self.addresses[0];
- console.dir(self.addresses);
const realSend = self.provider.send.bind(self.provider);
self.provider.send = function (payload, cb) {
| 2 |
diff --git a/website_code/scripts/properties_tab.js b/website_code/scripts/properties_tab.js @@ -790,7 +790,6 @@ function change_notes(template_id, form_tag){
var i = document.getElementById(form_tag).childNodes[0].nodeName.toLowerCase() == 'textarea' ? 0 : 1;
new_notes = document.getElementById(form_tag).childNodes[i].value;
- if(is_ok_notes(new_notes)){
$.ajax({
type: "POST",
url: "website_code/php/properties/notes_change_template.php",
@@ -802,9 +801,6 @@ function change_notes(template_id, form_tag){
.done(function (response) {
properties_stateChanged(response);
});
- }else{
- alert(NOTES_FAIL);
- }
}
/**
| 11 |
diff --git a/projects/ngx-extended-pdf-viewer/src/lib/ngx-extended-pdf-viewer.component.ts b/projects/ngx-extended-pdf-viewer/src/lib/ngx-extended-pdf-viewer.component.ts @@ -864,7 +864,11 @@ export class NgxExtendedPdfViewerComponent implements OnInit, AfterViewInit, OnC
const PDFViewerApplicationOptions: IPDFViewerApplicationOptions = (window as any).PDFViewerApplicationOptions;
PDFViewerApplicationOptions.set('enableDragAndDrop', this.enableDragAndDrop);
- PDFViewerApplicationOptions.set('locale', this.language);
+ let language = this.language === "" ? undefined: this.language;
+ if (!language) {
+ language = navigator.language;
+ }
+ PDFViewerApplicationOptions.set('locale', language);
PDFViewerApplicationOptions.set('imageResourcesPath', this.imageResourcesPath);
PDFViewerApplicationOptions.set('minZoom', this.minZoom);
PDFViewerApplicationOptions.set('maxZoom', this.maxZoom);
| 4 |
diff --git a/src/data/image.js b/src/data/image.js @@ -18,11 +18,13 @@ export const getImageDetails = (images: Images) => (
id: string,
dimensions: ?{ width: number, height: number }
): ?ImageDetails => {
- if (!dimensions) {
- return images[id];
+ const imageDetails = images[id];
+
+ // Image details might be undefined in case of unpublished image
+ if (!dimensions || !imageDetails) {
+ return imageDetails;
}
- const imageDetails = images[id];
const imageUriWithResizingBehaviourParameters = `${imageDetails.uri}?w=${
dimensions.width
}&h=${dimensions.height}&fit=fill`;
| 9 |
diff --git a/brands/amenity/fast_food.json b/brands/amenity/fast_food.json "takeaway": "yes"
}
},
+ "amenity/fast_food|Greggs": {
+ "countryCodes": ["gb"],
+ "tags": {
+ "amenity": "fast_food",
+ "brand": "Greggs",
+ "brand:wikidata": "Q3403981",
+ "brand:wikipedia": "en:Greggs",
+ "cuisine": "sandwich;bakery",
+ "name": "Greggs",
+ "takeaway": "yes"
+ }
+ },
"amenity/fast_food|Grill'd": {
"countryCodes": ["au"],
"tags": {
"brand": "Num Pang",
"brand:wikidata": "Q62079702",
"brand:wikipedia": "en:Num Pang",
- "cuisine": "cambodian, sandwich",
+ "cuisine": "cambodian;sandwich",
"name": "Num Pang",
"takeaway": "yes"
}
"brand": "Panera Bread",
"brand:wikidata": "Q7130852",
"brand:wikipedia": "en:Panera Bread",
- "cuisine": "sandwich",
+ "cuisine": "sandwich;bakery",
"name": "Panera Bread",
"short_name": "Panera",
"takeaway": "yes"
| 5 |
diff --git a/accessibility-checker/test/mocha/aChecker.Slow1/aChecker.ObjectStructure/aChecker.getCompliance.JSONObjectVerificationSelenium.test.js b/accessibility-checker/test/mocha/aChecker.Slow1/aChecker.ObjectStructure/aChecker.getCompliance.JSONObjectVerificationSelenium.test.js @@ -180,7 +180,7 @@ describe("JSON Structure Verification Selenium", function () {
})
//console.log("report= " + JSON.stringify(report));
// Run the diff algo to get the list of differences
- differences = aChecker.diffResultsWithExpected(report, expected, false);
+ differences = aChecker.diffResultsWithExpected(report, expected, false);console.log("report= " + report);
}
expect(typeof differences).to.equal("undefined", "\nDoes not follow the correct JSON structure or can't load baselines" + JSON.stringify(differences, null, ' '));
| 3 |
diff --git a/src/discord_commands/translate.js b/src/discord_commands/translate.js @@ -28,6 +28,17 @@ function throwPublicError(publicMessage, logMessage) {
return throwPublicErrorInfo('Translate', publicMessage, logMessage);
}
+function replaceMentionsWithUsernames(str, msg) {
+ const mentions = msg.mentions;
+ let replacedString = str;
+ mentions.forEach((mention) => {
+ replacedString = replacedString
+ .replace(new RegExp(`<@!?${mention.id}>`, 'g'), mention.username);
+ });
+
+ return replacedString;
+}
+
module.exports = {
commandAliases: ['translate', 'trans', 'gt', 't'],
aliasesForHelp: ['translate', 't'],
@@ -93,8 +104,10 @@ module.exports = {
return throwPublicError(errorMessage, 'No suffix');
}
+ const mentionReplacedSuffix = replaceMentionsWithUsernames(suffix, msg);
+
if (!secondLanguageCode) {
- let detectedLanguageCode = await googleTranslate.detectLanguage(suffix);
+ let detectedLanguageCode = await googleTranslate.detectLanguage(mentionReplacedSuffix);
if (detectedLanguageCode === 'und' || !googleTranslate.getPrettyLanguageForLanguageCode(detectedLanguageCode)) {
detectedLanguageCode = 'en';
@@ -119,7 +132,7 @@ module.exports = {
}
return translateQuery(
- suffix,
+ mentionReplacedSuffix,
firstLanguageCode,
secondLanguageCode,
googleTranslate.translate,
| 14 |
diff --git a/packages/app/src/components/Admin/SlackIntegration/ManageCommandsProcess.jsx b/packages/app/src/components/Admin/SlackIntegration/ManageCommandsProcess.jsx @@ -71,10 +71,10 @@ const ManageCommandsProcess = ({
const updatePermittedChannelsForEachCommand = (e) => {
const commandName = e.target.name;
const allowedChannelsString = e.target.value;
- // remove all whitespace
- const spaceRemovedAllowedChannelsString = allowedChannelsString.replace(/\s+/g, '');
// string to array
- const allowedChannelsArray = spaceRemovedAllowedChannelsString.split(',');
+ const allowedChannelsArray = allowedChannelsString.split(',');
+ // trim whitespace from all elements
+ const trimedAllowedChannelsArray = allowedChannelsArray.map(channelName => channelName.trim());
setPermittedChannelsForEachCommand((prevState) => {
const channelsObject = prevState.channelsObject;
channelsObject[commandName] = allowedChannelsArray;
| 14 |
diff --git a/articles/hosted-pages/login/index.md b/articles/hosted-pages/login/index.md @@ -40,16 +40,7 @@ Additionally, Universal Login is the best (and often only) way to implement Sing
### Single Sign-On (SSO)
-If you want to use single sign-on, you should use Universal Login rather than an embedded login solution. With Universal Login, when a user logs in via the login page, a cookie will be created and stored. On future calls to the `/authorize` endpoint, the cookie will be checked, and if SSO is achieved, the user will not ever be redirected to the login page. They will see the page only when they need to actually log in.
-
-This behavior occurs in login pages (that have not been customized to alter behavior) without the need for changes to the page code itself. This is a simple two step process:
-
-1. Configure SSO for the application in the [Dashboard](${manage_url}). Go to the Application's Settings, then scroll down to the **Use Auth0 instead of the IdP to do Single Sign On** setting and toggle it on.
-1. Use the [authorize endpoint](/api/authentication#authorization-code-grant) with `?prompt=none` for [silent SSO](/api-auth/tutorials/silent-authentication).
-
-::: note
-For more details about how SSO works, see the [SSO documentation](/sso).
-:::
+If you want to configure single sign-on, see the [SSO documentation](/sso) for additional details.
### Passwordless on native platforms
| 2 |
diff --git a/packages/idyll-components/src/graphic.js b/packages/idyll-components/src/graphic.js @@ -3,15 +3,13 @@ const React = require('react');
class Graphic extends React.Component {
render() {
const { idyll, updateProps, hasError, ...props } = this.props;
- return (
- <div {...props} />
- );
+ return <div className="idyll-graphic" {...props} />;
}
}
Graphic._idyll = {
- name: "Graphic",
- tagType: "open"
-}
+ name: 'Graphic',
+ tagType: 'open'
+};
module.exports = Graphic;
| 3 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.