code
stringlengths 122
4.99k
| label
int64 0
14
|
---|---|
diff --git a/app/controllers/observation_photos_controller.rb b/app/controllers/observation_photos_controller.rb @@ -95,7 +95,11 @@ class ObservationPhotosController < ApplicationController
end
return unless require_owner
- @observation_photo.photo.file = params[:file] if params[:file]
+ if params[:file]
+ @photo = LocalPhoto.new(:file => params[:file], :user => current_user, :mobile => is_mobile_app?)
+ @photo.save
+ @observation_photo.photo = @photo
+ end
respond_to do |format|
if @observation_photo.update_attributes(params[:observation_photo])
@observation_photo.observation.elastic_index!
| 1 |
diff --git a/etc/test-setup-users.js b/etc/test-setup-users.js @@ -80,18 +80,6 @@ function setupUsers(manager, done) {
endpoint: '/manage/v2/roles/'+encodeURIComponent('rest-temporal-writer')
}).result();
}).
- then(function(response) {
- return manager.get({
- endpoint: '/manage/v2/roles',
- body: {
- 'role-name': 'rest-writer',
- description: 'REST writer who can eval, invoke, or set a dynamic databases',
- role: [
- 'rest-evaluator'
- ]
- }
- }).result();
- }).
then(function(response) {
if (response.statusCode < 400) {
return this;
@@ -161,14 +149,14 @@ function setupUsers(manager, done) {
};
userName = testconfig.restReaderConnection.user;
requiredUsers[userName] = {
- role: 'rest-reader',
+ role: ['rest-reader','rest-evaluator'],
'user-name': userName,
description: 'rest-reader user',
password: testconfig.restReaderConnection.password
};
userName = testconfig.restWriterConnection.user;
requiredUsers[userName] = {
- role: 'rest-writer',
+ role: ['rest-writer','rest-evaluator'],
'user-name': userName,
description: 'rest-writer user',
password: testconfig.restWriterConnection.password
| 0 |
diff --git a/packages/cx/src/widgets/grid/Grid.js b/packages/cx/src/widgets/grid/Grid.js @@ -493,7 +493,7 @@ export class Grid extends Widget {
let {data} = instance;
let header = column.components[`header${headerLine + 1}`];
- if (header.allowSorting && column.sortable && (column.field || column.sortField || column.value)) {
+ if (header && header.allowSorting && column.sortable && (column.field || column.sortField || column.value)) {
let sortField = column.sortField || column.field;
let dir = 'ASC';
if (data.sorters && data.sorters[0].field == sortField && (data.sorters[0].value == column.value || data.sortField)) {
| 1 |
diff --git a/app/shared/utils/EOS/Account.js b/app/shared/utils/EOS/Account.js @@ -107,6 +107,17 @@ export default class EOSAccount {
getAuthorizations(pubkey) {
const { account } = this;
+ // If multiple keys are passed, recurse
+ if (Array.isArray(pubkey)) {
+ let valid = [];
+ pubkey.forEach((pkey) => {
+ const matches = filter(account.permissions, (perm) => !!filter(perm.required_auth.keys, { key: pkey }).length);
+ if (matches.length) {
+ valid = [...valid, ...matches];
+ }
+ })
+ return valid;
+ }
if (account) {
// Return all authorizations which this key matches
return filter(account.permissions, (perm) =>
| 11 |
diff --git a/app/screens/home/search/results/results.tsx b/app/screens/home/search/results/results.tsx // See LICENSE.txt for license information.
import React, {useMemo} from 'react';
-import {ScaledSize, StyleSheet, useWindowDimensions, View} from 'react-native';
+import {StyleSheet, useWindowDimensions, View} from 'react-native';
import Animated, {useAnimatedStyle, withTiming} from 'react-native-reanimated';
import Loading from '@components/loading';
@@ -17,21 +17,21 @@ import type PostModel from '@typings/database/models/servers/post';
const duration = 250;
-const getStyles = (dimensions: ScaledSize) => {
+const getStyles = (width: number) => {
return StyleSheet.create({
container: {
flex: 1,
flexDirection: 'row',
- width: dimensions.width * 2,
+ width: width * 2,
},
result: {
flex: 1,
- width: dimensions.width,
+ width,
},
loading: {
justifyContent: 'center',
flex: 1,
- width: dimensions.width,
+ width,
},
});
};
@@ -63,12 +63,12 @@ const Results = ({
searchValue,
selectedTab,
}: Props) => {
- const dimensions = useWindowDimensions();
+ const {width} = useWindowDimensions();
const theme = useTheme();
- const styles = useMemo(() => getStyles(dimensions), [dimensions]);
+ const styles = useMemo(() => getStyles(width), [width]);
const transform = useAnimatedStyle(() => {
- const translateX = selectedTab === TabTypes.MESSAGES ? 0 : -dimensions.width;
+ const translateX = selectedTab === TabTypes.MESSAGES ? 0 : -width;
return {
transform: [
{translateX: withTiming(translateX, {duration})},
@@ -77,7 +77,7 @@ const Results = ({
// Do not transform if loading new data. Causes a case where post
// results show up in Files results when the team is changed
- }, [selectedTab, dimensions.width, !loading]);
+ }, [selectedTab, width, !loading]);
const paddingTop = useMemo(() => (
{paddingTop: scrollPaddingTop, flexGrow: 1}
| 4 |
diff --git a/includes/Core/REST_API/REST_Routes.php b/includes/Core/REST_API/REST_Routes.php @@ -576,7 +576,7 @@ final class REST_Routes {
),
// TODO: Remove this and replace usage with calls to wp/v1/posts.
new REST_Route(
- 'core/search/data/(?P<query>[0-9A-Za-z%.\-]+)',
+ 'core/search/data/(?P<query>.+)',
array(
array(
'methods' => WP_REST_Server::READABLE,
| 3 |
diff --git a/src/components/dashboard/Claim.js b/src/components/dashboard/Claim.js @@ -420,7 +420,7 @@ const Claim = props => {
const { transactionHash, status } = receipt || {}
const isTxError = name === 'CLAIM_TX_FAILED'
- const errorLabel = isTxError ? t`Claim transaction failed` : t`Claim transaction failed`
+ const errorLabel = isTxError ? t`Claim transaction failed` : t`Claim request failed`
const logLabel = isTxError ? errorLabel : 'claiming failed'
const logPayload = { dialogShown: true }
| 0 |
diff --git a/localization/strings.pot b/localization/strings.pot @@ -20,11 +20,6 @@ msgid_plural "%s products expiring"
msgstr[0] ""
msgstr[1] ""
-msgid "%s is due"
-msgid_plural "%s are due"
-msgstr[0] ""
-msgstr[1] ""
-
msgid "within the next day"
msgid_plural "within the next %s days"
msgstr[0] ""
| 2 |
diff --git a/Source/Core/BoundingRectangle.js b/Source/Core/BoundingRectangle.js define([
'./Cartesian2',
'./Cartographic',
+ './Check',
'./defaultValue',
'./defined',
- './DeveloperError',
'./GeographicProjection',
'./Intersect',
'./Rectangle'
], function(
Cartesian2,
Cartographic,
+ Check,
defaultValue,
defined,
- DeveloperError,
GeographicProjection,
Intersect,
Rectangle) {
@@ -79,12 +79,8 @@ define([
*/
BoundingRectangle.pack = function(value, array, startingIndex) {
//>>includeStart('debug', pragmas.debug);
- if (!defined(value)) {
- throw new DeveloperError('value is required');
- }
- if (!defined(array)) {
- throw new DeveloperError('array is required');
- }
+ Check.typeOf.object(value, 'value');
+ Check.defined(array, 'array');
//>>includeEnd('debug');
startingIndex = defaultValue(startingIndex, 0);
@@ -107,9 +103,7 @@ define([
*/
BoundingRectangle.unpack = function(array, startingIndex, result) {
//>>includeStart('debug', pragmas.debug);
- if (!defined(array)) {
- throw new DeveloperError('array is required');
- }
+ Check.defined(array, 'array');
//>>includeEnd('debug');
startingIndex = defaultValue(startingIndex, 0);
@@ -242,12 +236,8 @@ define([
*/
BoundingRectangle.union = function(left, right, result) {
//>>includeStart('debug', pragmas.debug);
- if (!defined(left)) {
- throw new DeveloperError('left is required.');
- }
- if (!defined(right)) {
- throw new DeveloperError('right is required.');
- }
+ Check.typeOf.object(left, 'left');
+ Check.typeOf.object(right, 'right');
//>>includeEnd('debug');
if (!defined(result)) {
@@ -276,12 +266,8 @@ define([
*/
BoundingRectangle.expand = function(rectangle, point, result) {
//>>includeStart('debug', pragmas.debug);
- if (!defined(rectangle)) {
- throw new DeveloperError('rectangle is required.');
- }
- if (!defined(point)) {
- throw new DeveloperError('point is required.');
- }
+ Check.typeOf.object(rectangle, 'rectangle');
+ Check.typeOf.object(point, 'point');
//>>includeEnd('debug');
result = BoundingRectangle.clone(rectangle, result);
@@ -315,12 +301,8 @@ define([
*/
BoundingRectangle.intersect = function(left, right) {
//>>includeStart('debug', pragmas.debug);
- if (!defined(left)) {
- throw new DeveloperError('left is required.');
- }
- if (!defined(right)) {
- throw new DeveloperError('right is required.');
- }
+ Check.typeOf.object(left, 'left');
+ Check.typeOf.object(right, 'right');
//>>includeEnd('debug');
var leftX = left.x;
| 14 |
diff --git a/generators/client/templates/vue/src/main/webapp/app/account/settings/settings.component.ts.ejs b/generators/client/templates/vue/src/main/webapp/app/account/settings/settings.component.ts.ejs @@ -31,7 +31,7 @@ export default class Settings extends Vue {
public success: string = null;
public error: string = null;
public errorEmailExists: string = null;
- public languages: any = this.$store.getters.languages;
+ public languages: any = this.$store.getters.languages || [];
public save(): void {
this.error = null;
| 12 |
diff --git a/test/tests/KeyboardDirectionMixin.tests.js b/test/tests/KeyboardDirectionMixin.tests.js @@ -3,10 +3,17 @@ import KeyboardDirectionMixin from '../../src/KeyboardDirectionMixin.js';
class KeyboardDirectionMixinTest extends KeyboardDirectionMixin(HTMLElement) {
+
+ constructor() {
+ super();
+ this.state = {};
+ }
+
[symbols.goRight]() {
if (super[symbols.goRight]) { super[symbols.goRight](); }
return true;
}
+
}
customElements.define('keyboard-direction-test', KeyboardDirectionMixinTest);
@@ -25,9 +32,9 @@ describe("KeyboardDirectionMixin", () => {
it("ignores a Right arrow key when orientation is vertical", () => {
const fixture = new KeyboardDirectionMixinTest();
- fixture.state = {
+ Object.assign(fixture.state, {
orientation: 'vertical'
- };
+ });
const spy = sinon.spy(fixture, symbols.goRight);
const result = fixture[symbols.keydown]({
key: 'ArrowRight'
| 1 |
diff --git a/bl-kernel/pages.class.php b/bl-kernel/pages.class.php @@ -68,8 +68,6 @@ class Pages extends dbJSON {
{
$row = array();
- var_dump(debug_backtrace());
-
// Predefined values
foreach ($this->dbFields as $field=>$value) {
if ($field=='tags') {
| 2 |
diff --git a/src/utils/index.js b/src/utils/index.js // This will take an object and for each (k,v) will return
// v rounded such that the sum of all v is 100.
+
+// Used the following as a reference:
+// https://stackoverflow.com/questions/13483430/how-to-make-rounded-percentages-add-up-to-100
+// Note: We pass an object, and want to keep the (key, value) association.
+
export const roundObjectPercentages = dataMap => {
// This algorithm workson integers and we want 2 decimal places.
// So round up first.
+ const scale = 100
let asArray = Object.entries(dataMap).map(([key, value]) => {
- const newValue = value * 100
- return [key, newValue]
+ return [key, value * scale]
})
const sumRounded = (acc, x) => {
return acc + Math.round(x[1])
}
- // Calculate difference from 100%
- const scale = 100
- var margin = scale * 100 - asArray.reduce(sumRounded, 0)
+ // The leftOver is the difference beween 100 and
+ // the sum of the rounded values.
+ var leftOver = scale * 100 - asArray.reduce(sumRounded, 0)
+ //
const cmpNumberValue = (a, b) => {
return b[1] - Math.round(a[1]) - a[1]
}
- // Sort and distribute difference amongst values
+ // Here we distribute the leftOver as evenly as possible amongst the rounded values.
+ // The values are sorted first.
asArray.sort(cmpNumberValue)
const result = asArray.map(function(x, i) {
+ // Note: leftOver can be negative.
const rounded = [
x[0],
- (Math.round(x[1]) + (margin > i) - (i >= asArray.length + margin)) / 100.0
+ (Math.round(x[1]) + (leftOver > i) - (i >= asArray.length + leftOver)) /
+ 100.0
]
return rounded
})
| 7 |
diff --git a/kamu/prod_settings.py b/kamu/prod_settings.py @@ -4,7 +4,7 @@ import os
PROJECT_ROOT = os.path.dirname(os.path.abspath(__file__))
STATIC_ROOT = os.path.join(PROJECT_ROOT, 'staticfiles')
-DEBUG = True
+DEBUG = False
ALLOWED_HOSTS = ['staging-kamu.herokuapp.com', 'kamu.herokuapp.com']
DATABASES = {
| 2 |
diff --git a/samples/javascript_nodejs/45.state-management/bots/stateManagementBot.js b/samples/javascript_nodejs/45.state-management/bots/stateManagementBot.js @@ -11,8 +11,8 @@ class StateManagementBot extends ActivityHandler {
constructor(conversationState, userState) {
super();
// Create the state property accessors for the conversation data and user profile.
- this.conversationData = conversationState.createProperty(CONVERSATION_DATA_PROPERTY);
- this.userProfile = userState.createProperty(USER_PROFILE_PROPERTY);
+ this.conversationDataAccessor = conversationState.createProperty(CONVERSATION_DATA_PROPERTY);
+ this.userProfileAccessor = userState.createProperty(USER_PROFILE_PROPERTY);
// The state management objects for the conversation and user state.
this.conversationState = conversationState;
@@ -20,8 +20,8 @@ class StateManagementBot extends ActivityHandler {
this.onMessage(async (turnContext, next) => {
// Get the state properties from the turn context.
- const userProfile = await this.userProfile.get(turnContext, {});
- const conversationData = await this.conversationData.get(
+ const userProfile = await this.userProfileAccessor.get(turnContext, {});
+ const conversationData = await this.conversationDataAccessor.get(
turnContext, { promptedForUserName: false });
if (!userProfile.name) {
@@ -31,7 +31,7 @@ class StateManagementBot extends ActivityHandler {
userProfile.name = turnContext.activity.text;
// Acknowledge that we got their name.
- await turnContext.sendActivity(`Thanks ${ userProfile.name }.`);
+ await turnContext.sendActivity(`Thanks ${ userProfile.name }. To see conversation data, type anything.`);
// Reset the flag to allow the bot to go though the cycle again.
conversationData.promptedForUserName = false;
@@ -65,6 +65,17 @@ class StateManagementBot extends ActivityHandler {
// By calling next() you ensure that the next BotHandler is run.
await next();
});
+
+ this.onMembersAdded(async (context, next) => {
+ const membersAdded = context.activity.membersAdded;
+ for (let cnt = 0; cnt < membersAdded.length; ++cnt) {
+ if (membersAdded[cnt].id !== context.activity.recipient.id) {
+ await context.sendActivity('Welcome to State Bot Sample. Type anything to get started.');
+ }
+ }
+ // By calling next() you ensure that the next BotHandler is run.
+ await next();
+ });
}
}
| 3 |
diff --git a/src/encoded/schemas/changelogs/file.md b/src/encoded/schemas/changelogs/file.md ### Schema version 10
+* *platform* value is now required for files with *file_format* that is one of ["fastq", "rcc", "csfasta", "csqual", "sra", "CEL", "idat"]
* *output_type* values ["tRNA reference", "miRNA reference", "snRNA reference"] added to the ist of values that could be submitted only by DCC personnel
* *file_format* values ["sra", "btr"] could be submitted only by DCC personnel
* *status* value could be submitted only by DCC personnel, statuses *uploaded* and *format check failed* were removed
| 0 |
diff --git a/package.json b/package.json "author": "Open Observatory of Network Interference (OONI) <[email protected]>",
"productName": "OONI Probe",
"version": "3.0.5-dev",
- "probeVersion": "3.0.8",
+ "probeVersion": "3.0.9",
"main": "main/index.js",
"license": "MIT",
"repository": "ooni/probe-desktop",
| 3 |
diff --git a/src/lib/utils.js b/src/lib/utils.js @@ -58,7 +58,7 @@ function addFileToFormData(uri, name, contentType) {
const data = new FormData();
let fileField;
- if (isReadableStream(uri) || uri instanceof File) {
+ if (isReadableStream(uri) || (uri && uri.toString && uri.toString() === '[object File]')) {
fileField = uri;
} else {
fileField = { uri, name: name || uri.split('/').reverse()[0] };
| 1 |
diff --git a/templates/html5/output.js b/templates/html5/output.js @@ -4,9 +4,12 @@ $hx_exports.lime = $hx_exports.lime || {};
$hx_exports.lime.$scripts = $hx_exports.lime.$scripts || {};
$hx_exports.lime.$scripts["::APP_FILE::"] = $hx_script;
$hx_exports.lime.embed = function(projectName) { var exports = {};
- $hx_exports.lime.$scripts[projectName](exports, $global);
+ var script = $hx_exports.lime.$scripts[projectName];
+ if (!script) throw Error("Cannot find project name \"" + projectName + "\"");
+ script(exports, $global);
for (var key in exports) $hx_exports[key] = $hx_exports[key] || exports[key];
- exports.lime.embed.apply(exports.lime, arguments);
+ var lime = exports.lime || window.lime;
+ if (lime && lime.embed && this != lime.embed) lime.embed.apply(lime, arguments);
return exports;
};
})(typeof exports != "undefined" ? exports : typeof window != "undefined" ? window : typeof self != "undefined" ? self : this, typeof window != "undefined" ? window : typeof global != "undefined" ? global : typeof self != "undefined" ? self : this);
| 7 |
diff --git a/js/app/chooseBlockchain.js b/js/app/chooseBlockchain.js @@ -12,7 +12,12 @@ function toggleBlockchainExplorer() {
function refreshBlockchainExplorer() {
var strBlockchainExplorer = localStorage.getItem("ext-etheraddresslookup-blockchain_explorer");
+
+ if(strBlockchainExplorer === null) {
+ document.getElementById("ext-etheraddresslookup-choose_blockchain").value = "https://etherscan.io/address";
+ } else {
document.getElementById("ext-etheraddresslookup-choose_blockchain").value = strBlockchainExplorer;
+ }
//Notify the tab to do a class method
var strMethod = "changeBlockchainExplorer";
| 12 |
diff --git a/success.sh b/success.sh #!/usr/bin/env bash
echo 'Sending Discord Webhook';
export TIMESTAMP=$(date --utc +%FT%TZ);
-export SHORT_COMMIT= $($TRAVIS_COMMIT:7);
-curl -v -H User-Agent:bot -H Content-Type:application/json -d '{"avatar_url":"https://i.imgur.com/kOfUGNS.png","username":"Travis CI","embeds":[{"author":{"name":"Build #'"$TRAVIS_BUILD_NUMBER"' Passed - '"$AUTHOR_NAME"'","icon_url":"https://github.com/'"$AUTHOR_NAME"'.png","url":"https://github.com/'"$AUTHOR_NAME"'"},"url":"https://github.com/'"$REPO_OWNER"'/'"$REPO_NAME"'/commit/'"$TRAVIS_COMMIT"'","title":"['"$TRAVIS_REPO_SLUG"':'"$TRAVIS_BRANCH"'] ","color":65280,"description":"\`'"$SHORT_COMMIT"'\` "$TRAVIS_COMMIT_MESSAGE"'","timestamp":"'"$TIMESTAMP"'","footer":{"text":"Node Version: '"$TRAVIS_NODE_VERSION"'"}}]}' $DISCORD_WEBHOOK_URL;
+export SHORT_COMMIT=${TRAVIS_COMMIT:0:7};
+curl -v -H User-Agent:bot -H Content-Type:application/json -d '{"avatar_url":"https://i.imgur.com/kOfUGNS.png","username":"Travis CI","embeds":[{"author":{"name":"Build #'"$TRAVIS_BUILD_NUMBER"' Passed - '"$AUTHOR_NAME"'","icon_url":"https://github.com/'"$AUTHOR_NAME"'.png","url":"https://github.com/'"$AUTHOR_NAME"'"},"url":"https://github.com/'"$REPO_OWNER"'/'"$REPO_NAME"'/commit/'"$TRAVIS_COMMIT"'","title":"['"$TRAVIS_REPO_SLUG"':'"$TRAVIS_BRANCH"'] ","color":65280,"description":"\`['"$SHORT_COMMIT"'](https://github.com/'"$REPO_OWNER"'/'"$REPO_NAME"'/commit/'"$TRAVIS_COMMIT"')\` '"$TRAVIS_COMMIT_MESSAGE"'","timestamp":"'"$TIMESTAMP"'","footer":{"text":"Node Version: '"$TRAVIS_NODE_VERSION"'"}}]}' $DISCORD_WEBHOOK_URL;
| 1 |
diff --git a/test/server/dynastycardaction.spec.js b/test/server/dynastycardaction.spec.js @@ -7,8 +7,8 @@ describe('DynastyCardAction', function () {
beforeEach(function() {
this.gameSpy = jasmine.createSpyObj('game', ['addMessage', 'on', 'removeListener']);
this.playerSpy = jasmine.createSpyObj('player', ['canPutIntoPlay', 'isCardInPlayableLocation', 'putIntoPlay']);
- this.cardSpy = jasmine.createSpyObj('card', ['canBeMarshaled', 'getType']);
- this.cardSpy.canBeMarshaled.and.returnValue(true);
+ this.cardSpy = jasmine.createSpyObj('card', ['canBeDynastyed', 'getType']);
+ this.cardSpy.canBeDynastyed.and.returnValue(true);
this.cardSpy.controller = this.playerSpy;
this.cardSpy.owner = this.playerSpy;
this.context = {
@@ -22,7 +22,7 @@ describe('DynastyCardAction', function () {
describe('meetsRequirements()', function() {
beforeEach(function() {
- this.gameSpy.currentPhase = 'marshal';
+ this.gameSpy.currentPhase = 'dynasty';
this.playerSpy.canPutIntoPlay.and.returnValue(true);
this.playerSpy.isCardInPlayableLocation.and.returnValue(true);
this.cardSpy.getType.and.returnValue('character');
@@ -34,9 +34,9 @@ describe('DynastyCardAction', function () {
});
});
- describe('when the phase not marshal', function() {
+ describe('when the phase not dynasty', function() {
beforeEach(function() {
- this.gameSpy.currentPhase = 'dominance';
+ this.gameSpy.currentPhase = 'conflict';
});
it('should return false', function() {
@@ -44,7 +44,7 @@ describe('DynastyCardAction', function () {
});
});
- describe('when the card is not in a valid marshal location', function() {
+ describe('when the card is not in a valid dynasty location', function() {
beforeEach(function() {
this.playerSpy.isCardInPlayableLocation.and.returnValue(false);
});
@@ -64,9 +64,9 @@ describe('DynastyCardAction', function () {
});
});
- describe('when the card is forbidden from being marshalled', function() {
+ describe('when the card is forbidden from being played in dynasty', function() {
beforeEach(function() {
- this.cardSpy.canBeMarshaled.and.returnValue(false);
+ this.cardSpy.canBeDynastyed.and.returnValue(false);
});
it('should return false', function() {
@@ -91,7 +91,7 @@ describe('DynastyCardAction', function () {
});
it('should put the card into play', function() {
- expect(this.playerSpy.putIntoPlay).toHaveBeenCalledWith(this.cardSpy, 'marshal');
+ expect(this.playerSpy.putIntoPlay).toHaveBeenCalledWith(this.cardSpy, 'dynasty');
});
});
});
| 14 |
diff --git a/weapons-manager.js b/weapons-manager.js @@ -1524,6 +1524,10 @@ const bindInterface = () => {
}
}
});
+ chatInputEl.addEventListener('blur', e => {
+ chatInputEl.classList.remove('open');
+ chatInputEl.value = '';
+ });
};
renderer.domElement.addEventListener('dragover', e => {
| 0 |
diff --git a/admin-base/ui.apps/src/main/content/jcr_root/apps/field/texteditor/template.vue b/admin-base/ui.apps/src/main/content/jcr_root/apps/field/texteditor/template.vue })
const toolbar = this.quill.getModule('toolbar')
toolbar.addHandler('link', (value) => {
- console.log('showPathBrowser: ', value)
this.showPathBrowser(this.getSelectedPath())
})
this.quill.on('text-change', (delta, oldDelta, source) => {
var range = this.quill.getSelection()
if (range && !range.length == 0) {
var selectedText = this.quill.getText(range.index, range.length)
- console.log('User has highlighted: ', selectedText)
// find link with text as value
var linkNodes = document.querySelectorAll('.ql-editor > p > a')
- console.log('linkNodes: ', linkNodes)
// find link with selected text (selectedText)
let len = linkNodes.length
for(let i=0; i<len; i++){
let node = linkNodes[i]
if(node.textContent === selectedText) {
- // return link pathname so we can set as selectedText
- return node.pathname
+ // is this an external link?
+ // TODO: better way to determin internal vs external links
+ return ['localhost', 'headwire'].indexOf(node.hostname) >= 0
+ ? node.pathname
+ : node.href
}
}
}
showPathBrowser(selectedPath) {
let root = '/content/sites'
let currentPath
- selectedPath
- ? currentPath = selectedPath.substr(0, selectedPath.lastIndexOf('/'))
- : currentPath = root
+ // is selectedPath an internal or external link?
+ if(selectedPath && selectedPath.startsWith('/content/')){
+ // selectedPath is internal link
+ currentPath = selectedPath.substr(0, selectedPath.lastIndexOf('/'))
+ } else {
+ // selectedPath is external link
+ currentPath = root
+ }
const initModalState = {
root: root,
- type: 'default',
+ type: 'link',
current: currentPath,
- selected: selectedPath,
- withLinkTab: true
+ selected: selectedPath
}
- console.log('initialModalState: ', initModalState)
const options = {
complete: this.setLinkValue
}
+ console.log('initModalState: ', initModalState)
$perAdminApp.pathBrowser(initModalState, options)
},
setLinkValue(){
| 11 |
diff --git a/modules/e2ee/KeyHandler.js b/modules/e2ee/KeyHandler.js @@ -63,12 +63,12 @@ export class KeyHandler extends Listenable {
* @returns {void}
*/
async setEnabled(enabled) {
+ this._enabling && await this._enabling;
+
if (enabled === this.enabled) {
return;
}
- this._enabling && await this._enabling;
-
this._enabling = new Deferred();
this.enabled = enabled;
| 1 |
diff --git a/src/interval/UnbanInterval.js b/src/interval/UnbanInterval.js import Interval from './Interval.js';
import Database from '../bot/Database.js';
-import Log from '../discord/GuildLog.js';
import Bot from '../bot/Bot.js';
-import {RESTJSONErrorCodes} from 'discord.js';
+import {MessageEmbed, RESTJSONErrorCodes} from 'discord.js';
import Logger from '../logging/Logger.js';
+import GuildWrapper from '../discord/GuildWrapper.js';
+import util from '../util.js';
+import MemberWrapper from '../discord/MemberWrapper.js';
export default class UnbanInterval extends Interval {
getInterval() {
@@ -16,11 +18,24 @@ export default class UnbanInterval extends Interval {
for (const result of await Database.instance.queryAll('SELECT * FROM moderations WHERE action = \'ban\' AND active = TRUE AND expireTime IS NOT NULL AND expireTime <= ?',
Math.floor(Date.now()/1000))) {
const user = await client.users.fetch(result.userid);
+ /** @property {number} insertId */
const unban = await Database.instance.queryAll('INSERT INTO moderations (guildid, userid, action, created, reason, active) VALUES (?,?,?,?,?,?)', result.guildid, result.userid, 'unban', Math.floor(Date.now()/1000), reason, false);
+ const guild = await GuildWrapper.fetch(result.guildid);
+ const member = new MemberWrapper(user, guild);
+
await Database.instance.query('UPDATE moderations SET active = FALSE WHERE action = \'ban\' AND userid = ? AND guildid = ?',result.userid, result.guildid);
try {
- await client.guilds.resolve(result.guildid).members.unban(result.userid, reason);
- await Log.logCheck(result.guildid, user, reason, unban.insertId, 'Unban');
+ await member.unban(reason);
+ const embed = new MessageEmbed()
+ .setColor(util.color.green)
+ .setAuthor({name: `Case ${unban.insertId} | Unban | ${user.tag}`, iconURL: user.avatarURL()})
+ .setFooter({text: user.id})
+ .setTimestamp()
+ .addFields(
+ /** @type {any} */ { name: 'User', value: `<@!${user.id}>`, inline: true},
+ /** @type {any} */ { name: 'Reason', value: reason.substring(0, 512), inline: true}
+ );
+ await guild.log({embeds: [embed]});
}
catch (e) {
if (![RESTJSONErrorCodes.UnknownBan].includes(e.code)) {
| 4 |
diff --git a/src/encoded/commands/generate_ontology.py b/src/encoded/commands/generate_ontology.py @@ -117,9 +117,6 @@ assay_slims = {
'OBI:0001916': 'Replication timing',
'OBI:0000435': 'Genotyping',
'OBI:0000615': 'Proteomics',
- 'OBI:0002091': 'Transcription',
- 'OBI:0002092': 'Transcription',
- 'OBI:0002093': 'Transcription'
}
slim_shims = {
@@ -135,6 +132,9 @@ slim_shims = {
'OBI:0001923': 'Proteomics', # OBI:0000615': 'MS-MS'
'OBI:0001849': 'Genotyping', # OBI:0000435 (DNA-PET)
'OBI:0002044': 'RNA binding', # OBI:0001854 (RNA-Bind-N-Seq)
+ 'OBI:0002091': 'Transcription',
+ 'OBI:0002092': 'Transcription',
+ 'OBI:0002093': 'Transcription'
}
}
| 13 |
diff --git a/src/video/renderer.js b/src/video/renderer.js @@ -351,6 +351,10 @@ class Renderer {
* @param {boolean} [fill=false] fill the shape with the current color if true
*/
stroke(shape, fill) {
+ if (shape instanceof RoundRect) {
+ this.strokeRoundRect(shape.left, shape.top, shape.width, shape.height, shape.radius, fill);
+ return;
+ }
if (shape instanceof Rect || shape instanceof Bounds) {
this.strokeRect(shape.left, shape.top, shape.width, shape.height, fill);
return;
@@ -359,10 +363,6 @@ class Renderer {
this.strokePolygon(shape, fill);
return;
}
- if (shape instanceof RoundRect) {
- this.strokeRoundRect(shape.left, shape.top, shape.width, shape.height, shape.radius, fill);
- return;
- }
if (shape instanceof Ellipse) {
this.strokeEllipse(
shape.pos.x,
| 1 |
diff --git a/src/components/List.js b/src/components/List.js @@ -14,7 +14,7 @@ export default (config) => {
list.setAttribute("role", "listbox");
list.setAttribute("tabindex", "-1");
if (config.resultsList.container) config.resultsList.container(list);
- const destination = document.querySelector(config.resultsList.destination);
+ const destination = 'string' === typeof config.resultsList.destination ? document.querySelector(config.resultsList.destination) : config.resultsList.destination();
// Append the DIV element as a child of autoComplete container
destination.insertAdjacentElement(config.resultsList.position, list);
return list;
| 11 |
diff --git a/packages/insomnia-app/app/network/network.ts b/packages/insomnia-app/app/network/network.ts @@ -58,7 +58,7 @@ import {
} from 'insomnia-url';
import fs from 'fs';
import { database as db } from '../common/database';
-import * as caCerts from './ca-certs';
+import caCerts from './ca-certs';
import * as plugins from '../plugins/index';
import * as pluginContexts from '../plugins/context/index';
import { getAuthHeader } from './authentication';
| 1 |
diff --git a/pad/padPane.source.ts b/pad/padPane.source.ts import UI from 'solid-ui'
import { PaneDefinition } from '../types'
+// @ts-ignore
+// @@ TODO: serialize is not part rdflib type definitions
+// Might be fixed in https://github.com/linkeddata/rdflib.js/issues/341
import { graph, log, NamedNode, Namespace, sym, serialize } from 'rdflib'
/* pad Pane
**
| 8 |
diff --git a/js/main.js b/js/main.js @@ -245,7 +245,7 @@ const MM = (function () {
if (moduleWrapper !== null) {
moduleWrapper.style.transition = "opacity " + speed / 1000 + "s";
moduleWrapper.style.opacity = 0;
- moduleWrapper.className += " hidden";
+ moduleWrapper.classList.add("hidden");
clearTimeout(module.showHideTimer);
module.showHideTimer = setTimeout(function () {
@@ -311,7 +311,7 @@ const MM = (function () {
moduleWrapper.style.transition = "opacity " + speed / 1000 + "s";
// Restore the position. See hideModule() for more info.
moduleWrapper.style.position = "static";
- moduleWrapper.className = moduleWrapper.className.split(" hidden").join("");
+ moduleWrapper.classList.remove("hidden");
updateWrapperStates();
| 12 |
diff --git a/src/extras/helpers.js b/src/extras/helpers.js @@ -124,10 +124,15 @@ function getFXServerPort(rawCfgFile) {
if(!matches.length) throw new Error("No endpoints found");
- let allInterfacesValid = matches.every((match) => {
- return match.interface === '0.0.0.0'
+ let validTCPEndpoint = matches.find((match) => {
+ return (match.type.toLowerCase() === 'tcp' && match.interface === '0.0.0.0')
})
- if(!allInterfacesValid) throw new Error("All endpoints MUST use interface 0.0.0.0");
+ if(!validTCPEndpoint) throw new Error("You MUST have a TCP endpoint with interface 0.0.0.0");
+
+ let validUDPEndpoint = matches.find((match) => {
+ return (match.type.toLowerCase() === 'udp')
+ })
+ if(!validUDPEndpoint) throw new Error("You MUST have at least one UDP endpoint");
matches.forEach((m) => {
if(m.port !== matches[0].port) throw new Error("All endpoints MUST have the same port")
| 7 |
diff --git a/src/compiler/rewriter.imba1 b/src/compiler/rewriter.imba1 @@ -342,7 +342,7 @@ export class Rewriter
tokens.splice i, 0, Token.new('IDENTIFIER','$CARET$',token.@loc,0)
return 2
elif prev.@type == '.'
- if (token.@type === TERMINATOR and next.@type != 'INDENT') or nextTest.test(token.@type)
+ if (token.@type === TERMINATOR and next.@type != 'INDENT') or nextTest.test(token.@value)
tokens.splice i, 0, Token.new('IDENTIFIER','$CARET$',token.@loc,0)
return 2
| 7 |
diff --git a/packages/slackbot-proxy/src/controllers/slack.ts b/packages/slackbot-proxy/src/controllers/slack.ts @@ -140,8 +140,14 @@ export class SlackCtrl {
// See https://api.slack.com/apis/connections/events-api#the-events-api__responding-to-events
res.send();
- if (singlePostCommands.includes(growiCommand.growiCommandType)) {
- body.growiUris = relations.map(relation => relation.growiUri);
+ body.growiUris = [];
+ relations.forEach((relation) => {
+ if (relation.siglePostCommands.includes(growiCommand.growiCommandType)) {
+ body.growiUris.push(relation.growiUri);
+ }
+ });
+
+ if (body.growiUris != null && body.growiUris.length > 0) {
return this.selectRequestService.process(growiCommand, authorizeResult, body);
}
| 12 |
diff --git a/package.json b/package.json "file-loader": "^0.11.0",
"find-remove": "^1.1.0",
"fs-extra": "^3.0.0",
+ "identity-obj-proxy": "^3.0.0",
"istanbul-instrumenter-loader": "^3.0.1",
"jest": "^23.1.0",
"js-beautify": "^1.6.8",
| 3 |
diff --git a/shared/osdHeader.php b/shared/osdHeader.php @@ -81,7 +81,7 @@ if (isset($_GET["cancerType"])) {
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-modal/0.7.0/jquery.modal.js"></script>
<script src="js/dependencies/simplemodal.js"></script>
<script src="js/dependencies/d3.js"></script>
- <script src="shared/overlay_image_test.js"></script>
+ <script src="shared/tile_overlays.js"></script>
<style type="text/css">
.openseadragon {
| 10 |
diff --git a/src/components/nextPageButton/index.js b/src/components/nextPageButton/index.js @@ -11,10 +11,20 @@ type Props = {
fetchMore: () => any,
children?: string,
automatic?: boolean,
+ topOffset?: number,
+ bottomOffset?: number,
};
const NextPageButtonWrapper = (props: Props) => {
- const { isFetchingMore, fetchMore, href, children, automatic = true } = props;
+ const {
+ isFetchingMore,
+ fetchMore,
+ href,
+ children,
+ automatic = true,
+ topOffset = -250,
+ bottomOffset = -250,
+ } = props;
const onChange = (isVisible: boolean) => {
if (isFetchingMore || !isVisible) return;
return fetchMore();
@@ -34,11 +44,11 @@ const NextPageButtonWrapper = (props: Props) => {
delayedCall
partialVisibility
scrollCheck
- intervalDelay={250}
+ intervalDelay={150}
onChange={onChange}
offset={{
- top: -250,
- bottom: -250,
+ top: topOffset,
+ bottom: bottomOffset,
}}
>
<NextPageButton loading={isFetchingMore}>
| 11 |
diff --git a/includes/Modules/AdSense.php b/includes/Modules/AdSense.php @@ -529,7 +529,7 @@ tag_partner: "site_kit"
$data = array_merge(
array(
// Named date range slug.
- 'dateRange' => array( 'last-28-days' ),
+ 'dateRange' => 'last-28-days',
// Array of dimension strings.
'dimensions' => array(),
),
| 13 |
diff --git a/lib/response/set/SetResponse.js b/lib/response/set/SetResponse.js @@ -31,6 +31,7 @@ var SetResponse = function SetResponse(model, args, isJSONGraph,
this._isProgressive = isProgressive || false;
this._initialArgs = args;
this._value = [{}];
+ this._error = null;
var groups = [];
var group, groupType;
@@ -38,21 +39,33 @@ var SetResponse = function SetResponse(model, args, isJSONGraph,
var argCount = args.length;
// Validation of arguments have been moved out of this function.
- while (++argIndex < argCount) {
+ while (!this._error && ++argIndex < argCount) {
var arg = args[argIndex];
var argType;
if (isArray(arg) || typeof arg === "string") {
+ try {
arg = pathSyntax.fromPath(arg);
argType = "PathValues";
+ } catch (errorMessage) {
+ this._error = new Error(errorMessage);
+ }
} else if (isPathValue(arg)) {
+ try {
arg.path = pathSyntax.fromPath(arg.path);
argType = "PathValues";
+ } catch (errorMessage) {
+ this._error = new Error(errorMessage);
+ }
} else if (isJSONGraphEnvelope(arg)) {
argType = "JSONGs";
} else if (isJSONEnvelope(arg)) {
argType = "PathMaps";
}
+ if (this._error) {
+ break;
+ }
+
if (groupType !== argType) {
groupType = argType;
group = {
@@ -65,7 +78,7 @@ var SetResponse = function SetResponse(model, args, isJSONGraph,
group.arguments.push(arg);
}
- this._groups = groups;
+ this._groups = this._error ? [] : groups;
};
SetResponse.prototype = Object.create(ModelResponse.prototype);
@@ -77,11 +90,17 @@ SetResponse.prototype = Object.create(ModelResponse.prototype);
* @private
*/
SetResponse.prototype._subscribe = function _subscribe(observer) {
+ var error = this._error;
var groups = this._groups;
var model = this._model;
var isJSONGraph = this._isJSONGraph;
var isProgressive = this._isProgressive;
+ if (error) {
+ observer.onError(error);
+ return;
+ }
+
// Starts the async request cycle.
return setRequestCycle(
model, observer, groups, isJSONGraph, isProgressive, 1);
| 9 |
diff --git a/generators/typedlang/lists.js b/generators/typedlang/lists.js @@ -44,7 +44,7 @@ Blockly.TypedLang['lists_create_with_typed'] = function(block) {
var code = '[' + elements.join(', ') + ']';
return [code, Blockly.TypedLang.ORDER_ATOMIC];
};
-/*
+
Blockly.TypedLang['lists_repeat'] = function(block) {
// Create a list with one element repeated.
var functionName = Blockly.TypedLang.provideFunction_(
@@ -400,4 +400,3 @@ Blockly.TypedLang['lists_reverse'] = function(block) {
var code = list + '.slice().reverse()';
return [code, Blockly.TypedLang.ORDER_FUNCTION_CALL];
};
-*/
| 2 |
diff --git a/bin/deletePad.js b/bin/deletePad.js * to fix a window.
*/
+const request = require('../src/node_modules/request');
+const settings = require(__dirname+'/../tests/backend/loadSettings').loadSettings();
+const supertest = require(__dirname+'/../src/node_modules/supertest');
+const api = supertest('http://'+settings.ip+":"+settings.port);
+const path = require('path');
+const fs = require('fs');
if (process.argv.length != 3) {
console.error("Use: node deletePad.js $PADID");
process.exit(1);
@@ -11,31 +17,34 @@ if (process.argv.length != 3) {
// get the padID
let padId = process.argv[2];
-let npm = require('../src/node_modules/npm');
-
-npm.load({}, async function(er) {
- if (er) {
- console.error("Could not load NPM: " + er)
- process.exit(1);
- }
-
- try {
- let settings = require('../src/node/utils/Settings');
- let db = require('../src/node/db/DB');
- await db.init();
-
- padManager = require('../src/node/db/PadManager');
- await padManager.removePad(padId);
-
- console.log("Finished deleting padId: " + padId);
- process.exit(0);
-
- } catch (e) {
- if (err.name === "apierror") {
- console.error(e);
+// get the API Key
+var filePath = path.join(__dirname, '../APIKEY.txt');
+var apikey = fs.readFileSync(filePath, {encoding: 'utf-8'});
+
+// Set apiVersion to base value, we change this later.
+var apiVersion = 1;
+
+// Update the apiVersion
+api.get('/api/')
+ .expect(function(res){
+ apiVersion = res.body.currentVersion;
+ if (!res.body.currentVersion) throw new Error("No version set in API");
+ return;
+ })
+ .end(function(err, res){
+
+ // Now we know the latest API version, let's delete pad
+ var uri = '/api/'+apiVersion+'/deletePad?apikey='+apikey+'&padID='+padId;
+ api.post(uri)
+ .expect(function(res){
+ if (res.body.code === 1){
+ console.error("Error deleting pad", res.body);
}else{
- console.trace(e);
- }
- process.exit(1);
+ console.log("Deleted pad", res.body);
}
+ return;
+ })
+ .end(function(){})
});
+// end
+
| 4 |
diff --git a/packages/openneuro-app/src/scripts/refactor_2021/search/search-container.tsx b/packages/openneuro-app/src/scripts/refactor_2021/search/search-container.tsx @@ -72,7 +72,7 @@ const SearchContainer: FC = () => {
)}
renderSearchResultsList={() =>
loading ? (
- <h1>Datasets loading placeholder</h1>
+ resultsList.length !== 0 && <>Datasets loading placeholder</>
) : (
<h1>
<SearchResultsList items={resultsList} profile={profile} />
@@ -82,9 +82,11 @@ const SearchContainer: FC = () => {
Showing <b>{numResultsShown}</b> of <b>{numTotalResults}</b>{' '}
Datasets
</div>
+ {resultsList.length == 0 || resultsList.length < 25 ? null : (
<div className="col col-12 load-more ">
<Button label="Load More" />
</div>
+ )}
</div>
</h1>
)
| 9 |
diff --git a/struts2-jquery-integration-tests/README.md b/struts2-jquery-integration-tests/README.md @@ -11,9 +11,11 @@ There are currently 2 Webdriver implementations that are configured to run
Not all tests are possible to run with each of the drivers
- HtmlUnitDriver does not fully support Mouse interactions
- PhantomJSDriver does not fully support javascript Alerts
+
#### Parametrised
Given there are several modes in which the `sj:head` tag can be configured, the same tests are run for several configurations.
To do this, the `@RunWith(Parameterized.class)` annotation is used, in an effort to prevent duplicating the exact same test for multiple configuration.
+
###### Current configurations
- `regular`
- `<sj:head/>`
@@ -23,40 +25,56 @@ To do this, the `@RunWith(Parameterized.class)` annotation is used, in an effort
- `<sj:head loadFromGoogle="true"/>`
- `uncompressed`
- `<sj:head compressed="false"/>`
+
#### Profiles
In order to be able to switch between WebDriver implementation used for the tests, maven profiles are used.
+
###### default profile
* Uses HtmlUnitDriver
* should be able to run on any machine
+
###### phantomjs profile
* name: `phantomjs`
* Uses PhantomJSDriver
* requires phantomjs to be installed and configured on the path
+
#### Categories
In order to filter which tests should be executed, `JUnit @Category` is being used.
Currently 2 categories are defined:
- `HtmlUnitCategory` : used to filter tests that need to be run with the HtmlUnitDriver
- `PhantomJSCategory` : used to filter tests that need to be run with the PhantomJSDriver
+
## How to run the tests
+
#### HtmlUnitDriver tests
+
###### Run all tests
mvn verify
+
###### Run all tests in a single TestClass
mvn verify -Dit.test=ATagIT
+
###### Run a single test for all modes
mvn verify -Dit.test=ATagIT#testSimpleAjaxPageLink[*]
+
###### Run a single test for a single mode
mvn verify -Dit.test=ATagIT#testSimpleAjaxPageLink[0]
+
#### PhantomJSDriver tests
+
###### Requirements
- phantomjs installed
- phantomjs configured on path
+
###### Run all tests
mvn -P phantomjs verify
+
###### Run all tests in a single TestClass
mvn -P phantomjs verify -Dit.test=ATagIT
+
###### Run a single test for all modes
mvn -P phantomjs verify -Dit.test=ATagIT#testSimpleAjaxPageLink[*]
+
###### Run a single test for a single mode
mvn -P phantomjs verify -Dit.test=ATagIT#testSimpleAjaxPageLink[0]
| 1 |
diff --git a/src/components/NavigationDesktop/NavigationItemDesktop.js b/src/components/NavigationDesktop/NavigationItemDesktop.js @@ -76,12 +76,11 @@ class NavigationItemDesktop extends Component {
onClick = (event) => {
event.preventDefault();
- const { navItem } = this.props;
if (this.hasSubNavItems) {
this.setState({ isSubNavOpen: !this.state.isSubNavOpen });
} else {
const path = this.linkPath();
- Router.pushRoute(path, { slug: navItem.navigationItem.data.url });
+ Router.pushRoute(path);
}
};
| 2 |
diff --git a/app/styles/base.scss b/app/styles/base.scss --unit12: calc(var(--unit1) * 12);
}
-h1,
-h2,
-h3,
-h4,
-h5,
-h6 {
- font-size: 12px;
- font-weight: normal;
- margin: 0;
- padding: 0;
+html {
+ font-size: 62.5%;
+}
+
+body {
+ font-size: 1.2rem;
}
html,
@@ -47,6 +43,18 @@ nav {
padding: 0;
}
+h1,
+h2,
+h3,
+h4,
+h5,
+h6 {
+ font-size: 1.2rem;
+ font-weight: normal;
+ margin: 0;
+ padding: 0;
+}
+
a {
color: var(--inherit);
}
| 12 |
diff --git a/articles/quickstart/backend/java-spring-security/01-authorization.md b/articles/quickstart/backend/java-spring-security/01-authorization.md @@ -63,6 +63,11 @@ Start by configuring your API to use the RS256 signing algorithm. If you downloa
@Configuration
public class SecurityConfig extends WebSecurityConfigurerAdapter {
+ @Value(value = "<%= "${auth0.apiAudience}" %>")
+ private String apiAudience;
+ @Value(value = "<%= "${auth0.issuer}" %>")
+ private String issuer;
+
@Override
protected void configure(HttpSecurity http) throws Exception {
JwtWebSecurityConfigurer
@@ -83,6 +88,11 @@ This example assumes one entity called **Photos** and implements CRUD methods fo
@Configuration
public class SecurityConfig extends WebSecurityConfigurerAdapter {
+ @Value(value = "<%= "${auth0.apiAudience}" %>")
+ private String apiAudience;
+ @Value(value = "<%= "${auth0.issuer}" %>")
+ private String issuer;
+
@Override
protected void configure(HttpSecurity http) throws Exception {
JwtWebSecurityConfigurer
| 0 |
diff --git a/esinstall/package.json b/esinstall/package.json "builtin-modules": "^3.2.0",
"cjs-module-lexer": "^1.0.0",
"es-module-lexer": "^0.3.24",
+ "execa": "^5.0.0",
"is-valid-identifier": "^2.0.2",
"kleur": "^4.1.1",
"mkdirp": "^1.0.3",
| 0 |
diff --git a/src/common/quiz/pause_manager.js b/src/common/quiz/pause_manager.js @@ -113,7 +113,7 @@ module.exports.getSaveMementos = function(savingUser) {
let rightFormatMementos = allMementos.filter(memento => memento.formatVersion === MEMENTO_VERSION);
return deleteMementos(wrongFormatVersionMementos).then(() => {
- return rightFormatMementos;
+ return rightFormatMementos.sort((a, b) => b.time - a.time);
});
});
};
@@ -124,7 +124,7 @@ module.exports.save = function(saveData, savingUser, quizName, gameType) {
module.exports.getRestorable = function(userId) {
return globals.persistence.getDataForUser(userId).then(dbData => {
- return dbData[QUIZ_SAVES_BACKUP_KEY];
+ return (dbData[QUIZ_SAVES_BACKUP_KEY] || []).reverse();
});
}
| 7 |
diff --git a/assets/js/modules/adsense/components/setup/v2/SetupUseSnippetSwitch.stories.js b/assets/js/modules/adsense/components/setup/v2/SetupUseSnippetSwitch.stories.js @@ -37,9 +37,9 @@ const validSettings = {
siteStatus: SITE_STATUS_ADDED,
};
-const Template = ( { setupRegistry, ...args } ) => (
+const Template = ( { setupRegistry } ) => (
<WithRegistrySetup func={ setupRegistry }>
- <SetupUseSnippetSwitch { ...args } />
+ <SetupUseSnippetSwitch />
</WithRegistrySetup>
);
| 2 |
diff --git a/src/article/TableCellNode.js b/src/article/TableCellNode.js import { XMLTextElement } from 'substance'
+import { TEXT } from '../kit'
export default class TableCellNode extends XMLTextElement {
constructor (...args) {
@@ -27,6 +28,10 @@ export default class TableCellNode extends XMLTextElement {
TableCellNode.type = 'table-cell'
+TableCellNode.schema = {
+ content: TEXT('bold', 'italic', 'sup', 'sub', 'monospace', 'ext-link', 'xref', 'inline-formula')
+}
+
function _parseSpan (str) {
let span = parseInt(str, 10)
if (isFinite(span)) {
| 11 |
diff --git a/packages/nexrender-core/src/helpers/autofind.js b/packages/nexrender-core/src/helpers/autofind.js @@ -15,6 +15,7 @@ const defaultPaths = {
'/Applications/Adobe After Effects 2022',
'/Applications/Adobe After Effects CC 2021',
'/Applications/Adobe After Effects CC 2022',
+ '/Applications/Adobe After Effects CC 2023',
],
win32: [
'C:\\Program Files\\Adobe\\After Effects CC',
| 3 |
diff --git a/token-metadata/0x3b4cAAAF6F3ce5Bee2871C89987cbd825Ac30822/metadata.json b/token-metadata/0x3b4cAAAF6F3ce5Bee2871C89987cbd825Ac30822/metadata.json "symbol": "ON",
"address": "0x3b4cAAAF6F3ce5Bee2871C89987cbd825Ac30822",
"decimals": 18,
- "dharmaVerificationStatus": {
"dharmaVerificationStatus": "VERIFIED"
}
\ No newline at end of file
-}
\ No newline at end of file
| 3 |
diff --git a/static/css/app.css b/static/css/app.css @@ -25,7 +25,7 @@ body {
/* Set the fixed height of the footer here */
height: 40px;
border-top: 1px solid #f5f5f5;
- background-color: rgb(215, 215, 215);
+ background-color: #dfdfdf;
vertical-align: top;
color: rgb(50, 50, 50);
}
| 3 |
diff --git a/src/components/TableBodyRow.js b/src/components/TableBodyRow.js @@ -6,6 +6,7 @@ import { withStyles } from '@material-ui/core/styles';
const defaultBodyRowStyles = theme => ({
root: {},
+ hover: {},
responsiveStacked: {
[theme.breakpoints.down('sm')]: {
border: 'solid 2px rgba(0, 0, 0, 0.15)',
@@ -35,6 +36,7 @@ class TableBodyRow extends React.Component {
className={classNames(
{
[classes.root]: true,
+ [classes.hover]: options.rowHover,
[classes.responsiveStacked]: options.responsive === 'stacked',
},
className,
| 0 |
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md @@ -42,7 +42,7 @@ The following is a set of guidelines for contributing to the Auth0 documentation
* Read and follow the [Style Guide](STYLEGUIDE.md).
* Consult the [Words](WORDS.md) document for Auth0 specific spellings and definitions.
* Always use relative URLs for internal `auth0.com/docs` links. For example, if the absolute path to the document is `https://auth0.com/docs/identityproviders`, use `/identityproviders`. These links will be correctly formatted in the build process.
-* Do not hard code links to Auth0 sites like `docs.auth0.com` or `manage.auth0.com`. Instead, use [Parameter Aliases](#parameter-aliases), such as `${manage_url}`.
+* Do not hard code links to Auth0 sites like `docs.auth0.com` or `manage.auth0.com`. Instead, use [Document Variables](#document-variables), such as `${manage_url}`.
* Name files with all lowercase using dashes (-) to separate words. If using a date in the file name, it should be in the format YYYY-MM-DD. For example, `this-is-my-file.md` or `this-is-a-title-2015-10-01.md`.
* Do not store images in external locations like Dropbox, CloudUp, or the Auth0 CDN. Link to images in this repo using a relative path ``. The image will be uploaded to the CDN and the link will be formatted during the build process. Do not forget to set the alternate text for each image.
* Keep images to no more than 750 pixels wide.
| 14 |
diff --git a/packages/node_modules/@node-red/nodes/core/function/89-delay.html b/packages/node_modules/@node-red/nodes/core/function/89-delay.html timeoutUnits: {value:"seconds"},
rate: {value:"1", required:true, validate:function(v) { return RED.validators.number(v) && (v >= 0); }},
nbRateUnits: {value:"1", required:false,
- validate:function(v) { return RED.validators.number(v) && (v >= 0); }},
+ validate:function(v) { return v === undefined || (RED.validators.number(v) && (v >= 0)); }},
rateUnits: {value: "second"},
randomFirst: {value:"1", required:true, validate:function(v) { return RED.validators.number(v) && (v >= 0); }},
randomLast: {value:"5", required:true, validate:function(v) { return RED.validators.number(v) && (v >= 0); }},
| 11 |
diff --git a/source/views/controls/SearchInputView.js b/source/views/controls/SearchInputView.js import { Class } from '../../core/Core.js';
-import { create as el } from '../../dom/Element.js';
import { loc } from '../../localisation/i18n.js';
import { when } from '../collections/SwitchView.js';
import { Activatable } from './Activatable.js';
@@ -37,17 +36,6 @@ const SearchInputView = Class({
);
}.property('type', 'isDisabled', 'isFocused'),
- drawControl() {
- return (this._domControl = el('input', {
- id: this.get('id') + '-input',
- className: this.get('baseClassName') + '-input',
- name: this.get('name'),
- disabled: this.get('isDisabled'),
- placeholder: this.get('placeholder'),
- value: this.get('value'),
- }));
- },
-
draw(layer) {
const control = this.drawControl();
| 2 |
diff --git a/source/jquery.flot.time.js b/source/jquery.flot.time.js @@ -482,6 +482,9 @@ API.txt for details.
if (opts.mode === "time") {
axis.tickGenerator = dateTickGenerator;
+ // if a tick formatter is already provided do not overwrite it
+ if ('tickFormatter' in opts && opts.tickFormatter !== null) return;
+
axis.tickFormatter = function (v, axis) {
var d = dateGenerator(v, axis.options);
| 11 |
diff --git a/src/kea/build.ts b/src/kea/build.ts @@ -135,7 +135,7 @@ export function getBuiltLogic(
const key = props && input.key ? input.key(props) : undefined
if (input.key && typeof key === 'undefined') {
- throw new Error('[KEA] Must have key to build logic')
+ throw new Error(`[KEA] Must have key to build logic, got props: ${JSON.stringify(props)}`)
}
// get a path for the input, even if no path was manually specified in the input
| 7 |
diff --git a/bl-kernel/admin/views/edit-content.php b/bl-kernel/admin/views/edit-content.php @@ -258,19 +258,6 @@ echo Bootstrap::formOpen(array(
}
});
- // Generate slug when the user type the title and the slug field is empty
- var currentSlug = $("#jsslug").val();
- $("#jstitle").keyup(function() {
- var text = $(this).val();
- var parent = $("#jsparent").val();
- var currentKey = "";
- var ajax = new bluditAjax();
- var callBack = $("#jsslug");
- if (currentSlug.length === 0) {
- ajax.generateSlug(text, parent, currentKey, callBack);
- }
- });
-
// Datepicker
$("#jsdate").datetimepicker({format:DB_DATE_FORMAT});
| 2 |
diff --git a/token-metadata/0x09617F6fD6cF8A71278ec86e23bBab29C04353a7/metadata.json b/token-metadata/0x09617F6fD6cF8A71278ec86e23bBab29C04353a7/metadata.json "symbol": "ULT",
"address": "0x09617F6fD6cF8A71278ec86e23bBab29C04353a7",
"decimals": 18,
- "dharmaVerificationStatus": {
"dharmaVerificationStatus": "VERIFIED"
}
\ No newline at end of file
-}
\ No newline at end of file
| 3 |
diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md @@ -8,9 +8,6 @@ assignees: ''
Thanks for reporting this bug!
-If this is related to a typo or the documentation being unclear, please click on the relevant page's `Edit` button
-(pencil icon) and suggest a correction instead.
-
Please search other issues to make sure this bug has not already been reported.
Then fill in the sections below.
@@ -19,38 +16,23 @@ Then fill in the sections below.
A clear and concise description of what the bug is.
-**Steps to reproduce**
-
-Step-by-step instructions on how to reproduce the behavior.
-
-Example:
-
-1. Type the following command: [...]
-2. etc.
-
-**Expected behavior**
-
-A clear and concise description of what you expected to happen.
-
**Configuration**
-Command line flags and/or configuration file, if any.
-
-**Environment**
-
-Enter the following command in a terminal and copy/paste its output:
+- If possible, please copy/paste below your `netlify.toml`.
+- Did you run your build through the UI or the CLI?
+- If using the CLI, which flags did you use?
+- If using the CLI, please enter the following command in a terminal and copy/paste its output:
```bash
npx envinfo --system --binaries --npmPackages @netlify/build,@netlify/config,@netlify/git-utils,@netlify/cache-utils,@netlify/functions-utils,@netlify/run-utils,netlify-cli
```
-**Screenshots**
-
-If applicable, add screenshots to help explain your problem.
+**Deploy logs**
-**Can you submit a pull request?**
+If possible, please share a link to the Deploy that failed. If this is not possible or if the build was run in the CLI,
+please copy/paste the deploy logs below instead.
-Yes/No.
+**Pull requests**
Pull requests are welcome! If you would like to help us fix this bug, please check our
[contributions guidelines](../blob/master/CONTRIBUTING.md).
| 7 |
diff --git a/lib/LazyLoad.js b/lib/LazyLoad.js @@ -12,7 +12,7 @@ var extend = function (Instance, Model, properties) {
function addLazyLoadProperty(name, Instance, Model, property) {
var method = ucfirst(name);
var promiseFunctionPostfix = Settings.defaults().promiseFunctionPostfix;
- var funcNamesObj = {
+ var functionNames = {
get: {
callback : "get" + method,
promise : "get" + method + promiseFunctionPostfix
@@ -30,7 +30,7 @@ function addLazyLoadProperty(name, Instance, Model, property) {
var conditions = {};
conditions[Model.id] = Instance[Model.id];
- Object.defineProperty(Instance, funcNamesObj.get['callback'], {
+ Object.defineProperty(Instance, functionNames.get['callback'], {
value: function (cb) {
Model.find(conditions, { identityCache: false }).only(Model.id.concat(property)).first(function (err, item) {
@@ -42,7 +42,7 @@ function addLazyLoadProperty(name, Instance, Model, property) {
enumerable: false
});
- Object.defineProperty(Instance, funcNamesObj.remove['callback'], {
+ Object.defineProperty(Instance, functionNames.remove['callback'], {
value: function (cb) {
Model.find(conditions, { identityCache: false }).only(Model.id.concat(property)).first(function (err, item) {
@@ -63,7 +63,7 @@ function addLazyLoadProperty(name, Instance, Model, property) {
enumerable: false
});
- Object.defineProperty(Instance, funcNamesObj.set['callback'], {
+ Object.defineProperty(Instance, functionNames.set['callback'], {
value: function (data, cb) {
Model.find(conditions, { identityCache: false }).first(function (err, item) {
@@ -84,18 +84,18 @@ function addLazyLoadProperty(name, Instance, Model, property) {
enumerable: false
});
- Object.defineProperty(Instance, funcNamesObj.get['promise'], {
- value: Promise.promisify(Instance[funcNamesObj.get['callback']]),
+ Object.defineProperty(Instance, functionNames.get['promise'], {
+ value: Promise.promisify(Instance[functionNames.get['callback']]),
enumerable: false
});
- Object.defineProperty(Instance, funcNamesObj.remove['promise'], {
- value: Promise.promisify(Instance[funcNamesObj.remove['callback']]),
+ Object.defineProperty(Instance, functionNames.remove['promise'], {
+ value: Promise.promisify(Instance[functionNames.remove['callback']]),
enumerable: false
});
- Object.defineProperty(Instance, funcNamesObj.set['promise'], {
- value: Promise.promisify(Instance[funcNamesObj.set['callback']]),
+ Object.defineProperty(Instance, functionNames.set['promise'], {
+ value: Promise.promisify(Instance[functionNames.set['callback']]),
enumerable: false
});
}
| 10 |
diff --git a/package.json b/package.json {
"name": "nativescript-doctor",
- "version": "0.11.0",
+ "version": "0.12.0",
"description": "Library that helps identifying if the environment can be used for development of {N} apps.",
"main": "lib/index.js",
"types": "./typings/nativescript-doctor.d.ts",
| 12 |
diff --git a/src/anim/controller/anim-controller.js b/src/anim/controller/anim-controller.js @@ -282,6 +282,10 @@ class AnimController {
// filter out transitions that don't have their conditions met
transitions = transitions.filter(function (transition) {
+ // if the transition is moving to the already active state, ignore it
+ if (transition.to === this.activeStateName) {
+ return false;
+ }
// when an exit time is present, we should only exit if it falls within the current frame delta time
if (transition.hasExitTime) {
let progressBefore = this._getActiveStateProgressForTime(this._timeInStateBefore);
| 13 |
diff --git a/userscript.user.js b/userscript.user.js @@ -33686,11 +33686,39 @@ var $$IMU_EXPORT$$;
return src.replace(/(\/[0-9]+)_[0-9]+(\.[^/.]*)$/, "$1$2");
}
- if (domain_nowww === "previiew.com") {
+ // portrix.net ceemes
+ if (domain_nowww === "previiew.com" ||
+ // https://lfi-online.de/ceemes/webfile/img/4717852/x=20/Dafydpressimage1Leonardo_web.jpg?x=600&y=400
+ // https://lfi-online.de/ceemes/webfile/img/4717852/Dafydpressimage1Leonardo_web.jpg
+ // https://lfi-online.de/ceemes/webfile/img/1002350/YToxOntzOjE6IngiO3M6MzoiNjAwIjt9/cover.jpg
+ // atob: a:1:{s:1:"x";s:3:"600";}
+ // https://lfi-online.de/ceemes/webfile/img/1002350/cover.jpg
+ domain_nowww === "lfi-online.de" ||
+ // http://s-magazine.photography/ceemes/webfile/img/4625/GlamFreak-Mag_1A.jpg?y=1000
+ // http://s-magazine.photography/ceemes/webfile/img/4625/GlamFreak-Mag_1A.jpg
+ domain_nowww === "s-magazine.photography" ||
+ // http://m-magazine.photography/ceemes/webfile/img/222682/PAPEL-Cobelo-2.jpg?x=1920
+ // http://m-magazine.photography/ceemes/webfile/img/222682/PAPEL-Cobelo-2.jpg
+ domain_nowww === "m-magazine.photography" ||
+ // https://l-mount.com/webfile/img/532/LMount-Mount-FullFrame-Sensor-Leica-SL.jpg?x=1024
+ // https://l-mount.com/webfile/img/532/LMount-Mount-FullFrame-Sensor-Leica-SL.jpg
+ domain_nowww === "l-mount.com" ||
+ // https://bettinaschoenbach.com/ceemes/webfile/img/1060/x=1024/T-Shirt_ka_weiss_1.jpg
+ // https://bettinaschoenbach.com/ceemes/webfile/img/1060/T-Shirt_ka_weiss_1.jpg
+ domain_nowww === "bettinaschoenbach.com" ||
+ // https://portrix-ls.de/webfile/img/864/x=600/y=400/blog3.jpg
+ // https://portrix-ls.de/webfile/img/864/blog3.jpg
+ domain_nowww === "portrix-ls.de" ||
+ // https://glocon.eu/ceemes/webfile/img/1405/x=1000/grafik4c.jpg
+ // https://glocon.eu/ceemes/webfile/img/1405/grafik4c.jpg
+ domain_nowww === "glocon.eu" ||
+ // https://wow.olympus.eu/webfile/img/1632/x=1024/oly_testwow_stage.jpg
+ // https://wow.olympus.eu/webfile/img/1632/oly_testwow_stage.jpg
+ domain_nosub === "olympus.eu") {
// https://previiew.com/webfile/img/3217/x=500/y=600
// https://previiew.com/webfile/img/3217 -- 501 on head
return {
- url: src.replace(/(\/webfile\/img\/[0-9]+)(?:\/[xy]=[0-9]+)*(?:[?#].*)?$/, "$1"),
+ url: src.replace(/(\/webfile\/+img\/+[0-9]+)(?:\/+[xy]=[0-9]+)*(?:\/+[a-zA-Z0-9=]{10,})?(\/[^/]+\.[^/.?]+)?(?:[?#].*)?$/, "$1$2"),
can_head: false
};
}
| 7 |
diff --git a/app/shared/components/Producers/Modal/Preview/Selection.js b/app/shared/components/Producers/Modal/Preview/Selection.js @@ -25,7 +25,7 @@ export default class ProducersVotingPreviewSelection extends Component<Props> {
if (lastRow && lastRow.length < 4) {
times((4 - lastRow.length), i => {
lastRow.push((
- <Table.Cell key={`blank-${i}`} />
+ <Table.Cell width={4} key={`blank-${i}`} />
));
});
}
| 12 |
diff --git a/src/Template.js b/src/Template.js @@ -946,15 +946,15 @@ class Template extends TemplateContent {
}
}
} else {
- let filenameRegex = this.inputPath.match(/(\d{4}-\d{2}-\d{2})/);
- if (filenameRegex !== null) {
- let dateObj = DateTime.fromISO(filenameRegex[1], {
+ let filepathRegex = this.inputPath.match(/(\d{4}-\d{2}-\d{2})/);
+ if (filepathRegex !== null) {
+ let dateObj = DateTime.fromISO(filepathRegex[1], {
zone: "utc",
}).toJSDate();
debug(
"getMappedDate: using filename regex time for %o of %o: %o",
this.inputPath,
- filenameRegex[1],
+ filepathRegex[1],
dateObj
);
return dateObj;
| 10 |
diff --git a/components/AppLayout/Widgets/Avatar.js b/components/AppLayout/Widgets/Avatar.js @@ -11,12 +11,12 @@ const useStyles = makeStyles({
},
});
-function Avatar({ user = {}, size = 24, className, ...rest }) {
+function Avatar({ user, size = 24, className, ...rest }) {
const classes = useStyles(size);
return (
<img
className={cx(classes.root, className)}
- src={user.avatarUrl}
+ src={user?.avatarUrl}
alt=""
{...rest}
/>
| 9 |
diff --git a/edit.js b/edit.js @@ -450,6 +450,43 @@ class MultiSimplex {
textMesh.position.y = 2;
scene.add(textMesh);
+ const _makeButtonMesh = (text, font, size = 0.1) => {
+ const object = new THREE.Object3D();
+
+ const textMesh = makeTextMesh(text, font, size);
+ textMesh._needsSync = true;
+ textMesh.sync(() => {
+ const renderInfo = textMesh.textRenderInfo;
+ const [x1, y1, x2, y2] = renderInfo.totalBounds;
+ const w = x2 - x1;
+ const h = y2 - y1;
+
+ const blackMaterial = new THREE.MeshBasicMaterial({color: 0x333333});
+ const leftMesh = new THREE.Mesh(new THREE.RingBufferGeometry(size*0.6, size*0.6 * 1.1, 8, 8, Math.PI/2, Math.PI), blackMaterial);
+ object.add(leftMesh);
+ const rightMesh = new THREE.Mesh(new THREE.RingBufferGeometry(size*0.6, size*0.6 * 1.1, 8, 8, -Math.PI/2, Math.PI), blackMaterial);
+ rightMesh.position.x = w;
+ object.add(rightMesh);
+ const topMesh = new THREE.Mesh(new THREE.PlaneBufferGeometry(1, 1), blackMaterial);
+ topMesh.position.x = w/2;
+ topMesh.position.y = size*0.6 + size*0.6*0.1/2;
+ topMesh.scale.x = w;
+ topMesh.scale.y = size*0.6 * 0.1;
+ object.add(topMesh);
+ const bottomMesh = new THREE.Mesh(new THREE.PlaneBufferGeometry(1, 1), blackMaterial);
+ bottomMesh.position.x = w/2;
+ bottomMesh.position.y = -size*0.6 - size*0.6*0.1/2;
+ bottomMesh.scale.x = w;
+ bottomMesh.scale.y = size*0.6 * 0.1;
+ object.add(bottomMesh);
+ });
+ object.add(textMesh);
+
+ return object;
+ };
+ const buttonMesh = _makeButtonMesh('Lol');
+ buttonMesh.position.y = 1;
+ scene.add(buttonMesh);
}
const mesh = await runtime.loadFile({
| 0 |
diff --git a/paywall/.eslintrc.js b/paywall/.eslintrc.js module.exports = {
extends: [
- 'standard',
- 'airbnb',
- 'eslint:recommended',
+ '../.eslintrc.js',
'plugin:react/recommended',
- 'prettier',
'prettier/react',
- 'prettier/standard',
'plugin:prettier/recommended',
],
- env: {
- es6: true,
- node: true,
- browser: true,
- jest: true,
- },
- plugins: ['jest', 'mocha', 'promise', 'react-hooks'],
- parser: 'babel-eslint',
+ plugins: ['react-hooks'],
settings: {
react: {
version: 'detect',
},
},
rules: {
- 'prettier/prettier': 'error',
'react/prefer-stateless-function': [2],
- 'linebreak-style': ['error', 'unix'],
- quotes: [
- 'error',
- 'single',
- { avoidEscape: true, allowTemplateLiterals: false },
- ],
- 'brace-style': 0,
'react/forbid-prop-types': 2,
- indent: 0, // this conflicts with prettier and is not needed
'jsx-a11y/anchor-is-valid': [
'error',
{
@@ -42,18 +22,6 @@ module.exports = {
aspects: ['invalidHref', 'preferButton'],
},
],
- 'mocha/no-exclusive-tests': 'error',
'react/jsx-filename-extension': [0, { extensions: ['.js', '.jsx'] }],
- 'import/no-named-as-default': 0,
- 'import/no-named-as-default-member': 0,
- 'standard/computed-property-even-spacing': 0,
- 'standard/object-curly-even-spacing': 0,
- 'standard/array-bracket-even-spacing': 0,
- 'promise/prefer-await-to-then': 'warn',
- 'jest/no-disabled-tests': 'warn',
- 'jest/no-identical-title': 'error',
- 'jest/no-focused-tests': 'error',
- 'jest/prefer-expect-assertions': 'warn', // TODO: fix errors and change into error
- 'eol-last': ['error'],
},
}
| 4 |
diff --git a/web/kiri/filter/FDM/Flashforge.Guider.II b/web/kiri/filter/FDM/Flashforge.Guider.II {
"pre":[
- "; M118 X15.00 Y15.00 Z10.00 T0",
+ "; set bed and nozzle temps",
"M104 S{temp} T0",
"M140 S{bed_temp}",
- "; M107",
+ "; absolute positioning and home",
"G90",
- "; M132 X Y Z A B",
- "; M907 X100 Y100 Z40 A80 B20",
+ "G28",
+ "; wait for nozzle and bed to reach target temps",
"M190 S{bed_temp}",
"M109 S{temp} T0",
- "; pre-extrude",
- "G1 X-140 Y-115 Z0.4 F400",
- "G1 Y50 Z0.2 E240 F1800"
+ "M7 T0",
+ "M6 T0",
+ "; select nozzle 0",
+ "M108 T0",
+ "G92 E0",
+ "G1 E0 F300",
+ "; purge nozzle",
+ "G1 X150 Y75 Z15 E-2 F500",
+ "G1 Y125 Z0.5 F600",
+ "G1 Y50 E40 F600"
],
"post":[
+ "; stop fan, cool nozzle and bed",
"M107",
"M104 S0 T0",
"M140 S0",
- "G162 Z",
+ "; slow descent of bed",
+ "G0 F300",
+ "; end print",
"M18"
],
"cmd":{
| 3 |
diff --git a/articles/overview/index.md b/articles/overview/index.md @@ -11,10 +11,10 @@ Auth0 is a service that abstracts how users authenticate to applications.
You can connect any application (written in any language or on any stack) to Auth0 and define its [connection](/connections), the method used to authenticate the users of that application:
-* Custom credentials: username + passwords
-* Social network logins: Google, Facebook, Twitter, and any OAuth2, OAuth1 or OpenID Connect provider
-* Enterprise directories: LDAP, Google Apps, Office 365, ADFS, AD, SAML-P, WS-Federation, etc.
-* Passwordless systems: Touch ID, one time codes on SMS, or email
+* [Custom credentials](/connections/database): username + passwords
+* [Social network logins](/identityproviders#social): Google, Facebook, Twitter, and any OAuth2, OAuth1 or OpenID Connect provider
+* [Enterprise directories](/identityproviders#enterprise): LDAP, Google Apps, Office 365, ADFS, AD, SAML-P, WS-Federation, etc.
+* [Passwordless systems](/connections/passwordless): Touch ID, one time codes on SMS, or email
## Video: Developer Overview
| 0 |
diff --git a/packages/openneuro-app/src/scripts/datalad/download/download-link.jsx b/packages/openneuro-app/src/scripts/datalad/download/download-link.jsx @@ -8,9 +8,20 @@ const DownloadLinkNative = ({ datasetId, snapshotTag }) => (
<h4>Download with your browser</h4>
<p>
This method is convenient and allows you to select a local directory to
- download the dataset to. Existing files will not be downloaded if you
- select an existing directory.
+ download the dataset to.
</p>
+ <h5>Steps</h5>
+ <ol>
+ <li>
+ Select a local directory to save the dataset and grant permission to
+ OpenNeuro to read and write into this directory.
+ </li>
+ <li>
+ Download will run in the background, please leave the site open while
+ downloading.
+ </li>
+ <li>A notification will appear when complete.</li>
+ </ol>
<button
className="btn-blue"
onClick={downloadNative(datasetId, snapshotTag)}>
@@ -31,6 +42,10 @@ const DownloadLinkServiceWorker = ({ datasetId, snapshotTag }) => (
This method is convenient and best for smaller datasets and with a good
internet connection.
</p>
+ <p>
+ Firefox has known issues with this method, please try the CLI or DataLad
+ download methods if your cannot complete a download with Firefox.
+ </p>
<button
className="btn-blue"
onClick={downloadClick(datasetId, snapshotTag)}>
| 7 |
diff --git a/ui/src/components/Notification/Notification.scss b/ui/src/components/Notification/Notification.scss @import "src/app/variables.scss";
@import "src/app/mixins.scss";
-$notification-items-padding: $aleph-grid-size/3;
+$notification-items-padding: 1px;
.Notification {
padding: $aleph-grid-size;
@@ -11,8 +11,6 @@ $notification-items-padding: $aleph-grid-size/3;
justify-content: space-between;
.notification-action {
- display: flex;
- flex-wrap: wrap;
.param {
font-weight: bold;
.bp3-icon, .bp3-icon svg {
@@ -27,6 +25,11 @@ $notification-items-padding: $aleph-grid-size/3;
.token {
@include rtlSupportInvertedProp(padding, right, $notification-items-padding, null);
}
+
+ .bp3-icon.left-icon {
+ @include rtlSupportInvertedProp(padding, right, 3px !important, null);
+ }
+
& > * {
padding: 0 $notification-items-padding;
}
@@ -35,7 +38,7 @@ $notification-items-padding: $aleph-grid-size/3;
.timestamp {
color: $aleph-greyed-text;
white-space: nowrap;
- // font-size: $pt-font-size-small;
+ @include rtlSupportInvertedProp(padding, left, $aleph-grid-size, null);
}
.EntityLabel {
| 12 |
diff --git a/package.json b/package.json "css/**/*",
"fonts/**/*",
"js/**/*",
- "static/**/*"
+ "static/**/*",
+ "cardIcons/**/*",
+ "parts/**/*",
+ "viewscreen/**/*",
+ "sciences.ogg",
+ "favicon.ico"
]
}
}
| 1 |
diff --git a/articles/tokens/access-token.md b/articles/tokens/access-token.md @@ -26,21 +26,11 @@ The **audience** is a parameter set during [authorization](/api/authentication#a
When a custom API audience is specified along with an `openid` scope, an access token is generated that will be valid for both the `/userinfo` endpoint and for the custom API.
:::panel Use RS256 for multiple audiences
-If you specify more than one audience, then your custom API must use **RS256**. Tokens signed with HS256 can hold only one audience for security reasons. This applies also if you have set a **Default Audience** at your [API Authorization settings](${manage_url}/#/tenant).
+If you specify more than one audience, then your custom API must use **RS256** (read [how to change an API's settings](/apis#api-settings)). Tokens signed with HS256 can hold only one audience for security reasons. This applies also if you have set a **Default Audience** at your [API Authorization settings](${manage_url}/#/tenant).
:::
-Both the client and the API will also need to be using the same signing algorithm (RS256/HS256) in order to get and use a properly formed JWT access token.
-
-The client signing algorithm can be specified in the [Dashboard](${manage_url}) under the **client's settings > Advanced Settings > Oauth**.
-
-
-
-When setting up an API in the [Dashboard](${manage_url}/#/apis), the signing algorithm can also be specified.
-
-
-
::: warning
-The important thing to remember is that the client should not be depending on the access token to be any specific format, but instead should treat the access token as opaque.
+Remember always that the client should not depend on the access token to be any specific format, but instead treat the access token as opaque. It is meant **only** for the API.
:::
## How to get an access token
| 2 |
diff --git a/entry_types/scrolled/package/src/frontend/Backdrop.js b/entry_types/scrolled/package/src/frontend/Backdrop.js @@ -136,6 +136,7 @@ function BackgroundVideo(props) {
playerActions={playerActions}
id={props.video}
fit="cover"
- loop={true} />
+ loop={true}
+ playsInline={true} />
);
}
| 11 |
diff --git a/src/components/signup/EmailForm.js b/src/components/signup/EmailForm.js // @flow
import React from 'react'
-import { TextInput } from 'react-native-paper'
+import { HelperText, TextInput } from 'react-native-paper'
import isEmail from 'validator/lib/isEmail'
import { Wrapper, Title } from './components'
import logger from '../../lib/logger/pino-logger'
@@ -16,55 +16,57 @@ type Props = {
export type EmailRecord = {
email: string,
- isEmailConfirmed?: boolean
+ isEmailConfirmed?: boolean,
+ errorMessage: string
}
type State = EmailRecord & { valid?: boolean }
export default class EmailForm extends React.Component<Props, State> {
- constructor(props: Props) {
- super(props)
- this.state = {
+ state = {
email: this.props.screenProps.data.email || '',
- valid: false
- }
- this.state.valid = isEmail(this.state.email)
- }
- componentDidMount() {
- this.focusInput()
+ errorMessage: ''
}
- focusInput() {
- if (window.Keyboard && window.Keyboard.show) {
- window.Keyboard.show()
- }
+ handleChange = (email: string) => {
+ if (this.state.errorMessage !== '') {
+ this.setState({ errorMessage: '' })
}
- handleChange = (text: string) => {
- this.setState({
- email: text,
- valid: isEmail(text)
- })
+ this.setState({ email })
}
handleSubmit = () => {
+ if (this.state.errorMessage === '') {
this.props.screenProps.doneCallback({ email: this.state.email })
}
+ }
+
+ checkErrors = () => {
+ const errorMessage = isEmail(this.state.email) ? '' : 'Please enter an email in format: [email protected]'
+
+ this.setState({ errorMessage })
+ }
render() {
- // const MIcon = (<Icon name="rocket" size={30} color="#900" />)
- log.info(this.props.navigation)
+ const { errorMessage } = this.state
+
return (
- <Wrapper valid={this.state.valid} handleSubmit={this.handleSubmit}>
- <Title>{'And which email address should we use to notify you?'}</Title>
+ <Wrapper valid={true} handleSubmit={this.handleSubmit}>
+ <Title>And which email address should we use to notify you?</Title>
<TextInput
id="signup_email"
label="Your Email"
value={this.state.email}
onChangeText={this.handleChange}
+ onBlur={this.checkErrors}
keyboardType="email-address"
+ error={errorMessage !== ''}
autoFocus
/>
+ <HelperText type="error" visible={errorMessage}>
+ {errorMessage}
+ </HelperText>
</Wrapper>
)
}
| 0 |
diff --git a/components/Icons/MdCheckSmall.js b/components/Icons/MdCheckSmall.js @@ -3,6 +3,6 @@ import React from 'react'
export default ({ size = 24, fill }) => (
<svg width={size} height={size} viewBox='0 0 24 24'>
<path d='M0 0h24v24H0V0zm0 0h24v24H0V0z' fill='none' />
- <path d='M16.59 7.58L10 14.17l-3.59-3.58L5 12l5 5 8-8zM12' fill='black' />
+ <path d='M16.59 7.58L10 14.17l-3.59-3.58L5 12l5 5 8-8z' fill={fill} />
</svg>
)
| 1 |
diff --git a/exampleSite/config.toml b/exampleSite/config.toml @@ -36,10 +36,6 @@ googleAnalytics = ""
# Optional hash for integrity check
#hash = "sha512-RfeD0pacGTqy9m7U6PgehQfS4cc7SIt+e+P+H5e848kEvB/RW84CUGO3O4O3LNbxjevym6KPUZ8muPsMrI8WIw=="
- # Optional, global disable switch for form related files
- [params.contact]
- disabled = false
-
# Optional, global disable switch for fontawesome related files
# For custom fontawesome js files use the custom.js method
[params.fontawesome]
| 2 |
diff --git a/packages/node_modules/@node-red/nodes/core/common/20-inject.js b/packages/node_modules/@node-red/nodes/core/common/20-inject.js @@ -95,19 +95,24 @@ module.exports = function(RED) {
}
this.on("input", function(msg, send, done) {
- var errors = [];
- var props = this.props;
+ const errors = [];
+ let props = this.props;
if (msg.__user_inject_props__ && Array.isArray(msg.__user_inject_props__)) {
props = msg.__user_inject_props__;
}
delete msg.__user_inject_props__;
- props.forEach(p => {
- var property = p.p;
- var value = p.v ? p.v : '';
- var valueType = p.vt ? p.vt : 'str';
-
- if (!property) return;
+ props = [...props]
+ function evaluateProperty(doneEvaluating) {
+ if (props.length === 0) {
+ doneEvaluating()
+ return
+ }
+ const p = props.shift()
+ const property = p.p;
+ const value = p.v ? p.v : '';
+ const valueType = p.vt ? p.vt : 'str';
+ if (property) {
if (valueType === "jsonata") {
if (p.v) {
try {
@@ -119,21 +124,35 @@ module.exports = function(RED) {
errors.push(err.message);
}
}
- return;
- }
+ evaluateProperty(doneEvaluating)
+ } else {
try {
- RED.util.setMessageProperty(msg,property,RED.util.evaluateNodeProperty(value, valueType, this, msg),true);
+ RED.util.evaluateNodeProperty(value, valueType, node, msg, (err, newValue) => {
+ if (err) {
+ errors.push(err.toString())
+ } else {
+ RED.util.setMessageProperty(msg,property,newValue,true);
+ }
+ evaluateProperty(doneEvaluating)
+ })
} catch (err) {
errors.push(err.toString());
+ evaluateProperty(doneEvaluating)
+ }
+ }
+ } else {
+ evaluateProperty(doneEvaluating)
+ }
}
- });
+ evaluateProperty(() => {
if (errors.length) {
done(errors.join('; '));
} else {
send(msg);
done();
}
+ })
});
}
| 11 |
diff --git a/src/components/inspectors/TimerExpression.vue b/src/components/inspectors/TimerExpression.vue <form-date-picker
:emit-iso="true"
data-test="end-date-picker"
- type="date"
class="form-date-picker p-0 m-0"
:class="{'date-disabled' : ends !== 'ondate'}"
:disabled="ends !== 'ondate'"
:placeholder="$t('End date')"
control-class="form-control"
- data-format="date"
:value="endDate"
@input="setEndDate"
+ name="end date"
/>
</b-form-group>
| 2 |
diff --git a/assets/js/hooks/useActivateModuleCallback.test.js b/assets/js/hooks/useActivateModuleCallback.test.js @@ -29,6 +29,7 @@ import {
} from '../../../tests/js/test-utils';
import { mockLocation } from '../../../tests/js/mock-browser-utils';
import * as tracking from '../util/tracking';
+import { VIEW_CONTEXT_DASHBOARD } from '../googlesitekit/constants';
import {
CORE_USER,
PERMISSION_MANAGE_OPTIONS,
@@ -92,7 +93,7 @@ describe( 'useActivateModuleCallback', () => {
const { result } = renderHook(
() => useActivateModuleCallback( 'analytics' ),
- { registry }
+ { viewContext: VIEW_CONTEXT_DASHBOARD, registry }
);
fetchMock.postOnce(
| 1 |
diff --git a/packages/gatsby/lib/bootstrap/index.js b/packages/gatsby/lib/bootstrap/index.js @@ -155,7 +155,7 @@ data
let browserAPIRunner = ``
try {
- fs.readFileSync(`${siteDir}/api-runner-browser.js`, `utf-8`)
+ browserAPIRunner = fs.readFileSync(`${siteDir}/api-runner-browser.js`, `utf-8`)
} catch (err) {
console.error(`Failed to read ${siteDir}/api-runner-browser.js`)
}
| 12 |
diff --git a/assets/js/modules/adsense/dashboard/adsense-in-process-status.js b/assets/js/modules/adsense/dashboard/adsense-in-process-status.js /**
* External dependencies
*/
-import PropTypes from 'prop-types';
import Link from 'GoogleComponents/link';
import Error from 'GoogleComponents/notifications/error';
import ProgressBar from 'GoogleComponents/progress-bar';
@@ -114,9 +113,4 @@ class AdSenseInProcessStatus extends Component {
}
}
-AdSenseInProcessStatus.propTypes = {
- status: PropTypes.string,
- module: PropTypes.string,
-};
-
export default AdSenseInProcessStatus;
| 2 |
diff --git a/plugins/resource_management/app/views/resource_management/application/_resource_name.html.haml b/plugins/resource_management/app/views/resource_management/application/_resource_name.html.haml = link_to translated_name, plugin('block_storage').volumes_path, title: linktitle
- when :snapshots
= link_to translated_name, plugin('block_storage').snapshots_path, title: linktitle
+ - else
+ = translated_name
- when :compute
= link_to translated_name, plugin('compute').instances_path(), title: linktitle
- when :networking
= link_to translated_name, plugin('loadbalancing').loadbalancers_path, title: linktitle
- when :pools, :healthmonitors, :l7policies
= link_to translated_name, plugin('loadbalancing').loadbalancers_path, title: linktitle
+ - else
+ = translated_name
- when :dns
- case name
- when :zones, :recordsets
= translated_name
- else
= translated_name
+ - else
+ = translated_name
| 1 |
diff --git a/README.md b/README.md @@ -53,6 +53,7 @@ v6.x changelog, breaking changes and migration path from previous releases, see:
- [Installation](#installation)
- [Usage and command line options](#usage-and-command-line-options)
+- [Supported config items](#supported-config-items)
- [Usage with invoke](#usage-with-invoke)
- [Token authorizers](#token-authorizers)
- [Custom authorizers](#custom-authorizers)
@@ -137,7 +138,8 @@ By default you can send your requests to `http://localhost:3000/`. Please note t
But if you send an `application/x-www-form-urlencoded` or a `multipart/form-data` body with an `application/json` (or no) Content-Type, API Gateway won't parse your data (you'll get the ugly raw as input), whereas the plugin will answer 400 (malformed JSON).
Please consider explicitly setting your requests' Content-Type and using separate templates.
-## Support
+
+## Supported config items
`Serverless-Offline` currently supports the following [serverless events](https://serverless.com/framework/docs/providers/aws/events/):
| 0 |
diff --git a/src/server/service/config-loader.js b/src/server/service/config-loader.js @@ -17,13 +17,13 @@ const ENV_VAR_NAME_TO_KEY_MAP = {
* So, key names of these are under consideration.
*/
// 'ELASTICSEARCH_URI': 'elasticsearch:url',
- // 'FILE_UPLOAD': 'app:fileUpload',
+ // 'FILE_UPLOAD': 'app:fileUploadMethod',
// 'HACKMD_URI': 'hackmd:url',
// 'HACKMD_URI_FOR_SERVER': 'hackmd:urlForServer',
// 'PLANTUML_URI': 'plantuml:url',
// 'BLOCKDIAG_URI': 'blockdiag:url',
- // 'OAUTH_GOOGLE_CLIENT_ID': 'security:oauth:googleClientId',
- // 'OAUTH_GOOGLE_CLIENT_SECRET': 'security:oauth:googleClientSecret',
+ // 'OAUTH_GOOGLE_CLIENT_ID': 'google:clientId' -> 'security:oauth:googleClientId',
+ // 'OAUTH_GOOGLE_CLIENT_SECRET': 'google:clientSecret' -> 'security:oauth:googleClientSecret',
// 'OAUTH_GITHUB_CLIENT_ID': 'security:oauth:githubClientId',
// 'OAUTH_GITHUB_CLIENT_SECRET': 'security:oauth:githubClientSecret',
// 'OAUTH_TWITTER_CONSUMER_KEY': 'security:oauth:twitterConsumerKey',
| 10 |
diff --git a/src/web/App.mjs b/src/web/App.mjs @@ -670,18 +670,22 @@ class App {
*
* @param {string} title - The title of the box
* @param {string} body - The question (HTML supported)
+ * @param {string} accept - The text of the accept button
+ * @param {string} reject - The text of the reject button
* @param {function} callback - A function accepting one boolean argument which handles the
* response e.g. function(answer) {...}
* @param {Object} [scope=this] - The object to bind to the callback function
*
* @example
* // Pops up a box asking if the user would like a cookie. Prints the answer to the console.
- * this.confirm("Question", "Would you like a cookie?", function(answer) {console.log(answer);});
+ * this.confirm("Question", "Would you like a cookie?", "Yes", "No", function(answer) {console.log(answer);});
*/
- confirm(title, body, callback, scope) {
+ confirm(title, body, accept, reject, callback, scope) {
scope = scope || this;
document.getElementById("confirm-title").innerHTML = title;
document.getElementById("confirm-body").innerHTML = body;
+ document.getElementById("confirm-yes").innerText = accept;
+ document.getElementById("confirm-no").innerText = reject;
document.getElementById("confirm-modal").style.display = "block";
this.confirmClosed = false;
@@ -694,9 +698,14 @@ class App {
callback.bind(scope)(true);
$("#confirm-modal").modal("hide");
}.bind(this))
- .one("hide.bs.modal", function(e) {
- if (!this.confirmClosed)
+ .one("click", "#confirm-no", function() {
+ this.confirmClosed = true;
callback.bind(scope)(false);
+ }.bind(this))
+ .one("hide.bs.modal", function(e) {
+ if (!this.confirmClosed) {
+ callback.bind(scope)(undefined);
+ }
this.confirmClosed = true;
}.bind(this));
}
| 0 |
diff --git a/utilities/model-helper.js b/utilities/model-helper.js @@ -175,7 +175,7 @@ internals.extendSchemaAssociations = function (Schema, mongoose, modelPath) {
//EXPL: if the association isn't embedded, create separate collection for linking model
if (!embedAssociation) {
- const modelName = Schema.options.collection;
+ const modelName = Schema.statics.collectionName;
if (!modelExists) {
const Types = mongoose.Schema.Types;
linkingModel.Schema[modelName] = {
@@ -219,8 +219,8 @@ internals.extendSchemaAssociations = function (Schema, mongoose, modelPath) {
else {
//EXPL: if the association isn't embedded and a linking model isn't defined, then we need to create a basic linking collection
if (!embedAssociation) {
- const linkingModelName_1 = Schema.options.collection + "_" + association.model;
- const linkingModelName_2 = association.model + "_" + Schema.options.collection;
+ const linkingModelName_1 = Schema.statics.collectionName + "_" + association.model;
+ const linkingModelName_2 = association.model + "_" + Schema.statics.collectionName;
let linkingModelName = linkingModelName_1;
association.include = {};
@@ -240,7 +240,7 @@ internals.extendSchemaAssociations = function (Schema, mongoose, modelPath) {
catch(error) {
modelExists[1] = false;
}
- const modelName = Schema.options.collection;
+ const modelName = Schema.statics.collectionName;
if (!modelExists[0] && !modelExists[1]) {
const Types = mongoose.Schema.Types;
| 1 |
diff --git a/token-metadata/0xCb94be6f13A1182E4A4B6140cb7bf2025d28e41B/metadata.json b/token-metadata/0xCb94be6f13A1182E4A4B6140cb7bf2025d28e41B/metadata.json "symbol": "TRST",
"address": "0xCb94be6f13A1182E4A4B6140cb7bf2025d28e41B",
"decimals": 6,
- "dharmaVerificationStatus": {
"dharmaVerificationStatus": "VERIFIED"
}
\ No newline at end of file
-}
\ No newline at end of file
| 3 |
diff --git a/articles/api-auth/grant/implicit.md b/articles/api-auth/grant/implicit.md @@ -44,6 +44,12 @@ For details on how to implement this using Auth0, refer to [Execute an Implicit
For details on how to implement this, refer to [How to implement the Implicit Grant: Customize the Tokens](/api-auth/tutorials/implicit-grant#optional-customize-the-tokens).
+## Silent Authentication
+
+If you need to authenticate your users without a login page (for example, when the user is already logged in via [SSO](/sso) scenario) or get a new `access_token` (thus simulate refreshing an expired token), you can use Silent Authentication.
+
+For details on how to implement this, refer to [Silent Authentication](/api-auth/tutorials/silent-authentication).
+
## Keep reading
<i class="notification-icon icon-budicon-345"></i> [How to implement the Implicit Grant](/api-auth/tutorials/implicit-grant)<br/>
| 0 |
diff --git a/articles/tutorials/step-up-authentication.md b/articles/tutorials/step-up-authentication.md ---
description: You can add step-up authentication to your app with Authentication Context Class Reference
---
-
# Step-Up Authentication
With Step-Up Authentication, applications that allow access to different types of resources can require users to authenticate with a stronger authentication mechanism to access sensitive resources.
@@ -22,7 +21,7 @@ There are three core concepts used when addressing authentication level at Auth0
* `acr_values`: this is a space-separated string that specifies the `acr` values that have been requested to use for processing the request, with the values appearing in order of preference. This can be used to request the class of `acr` above when authentication is to be performed. See [here](http://openid.net/specs/openid-connect-core-1_0.html) for more details.
-`acr` and `amr` are both available on the `id_token` of the current session, when appropriate. Both can signal to use MFA. The `acr_values` field is added to the request for authentication.
+`acr` and `amr` are both available on the [ID token](/tokens/id-token) of the current session, when appropriate. Both can signal to use MFA. The `acr_values` field is added to the request for authentication.
## Example
@@ -66,15 +65,11 @@ if(decoded.acr !== 'http://schemas.openid.net/pape/policies/2007/06/multi-factor
More example code with the step-up functionality can be found [here](https://github.com/auth0/guardian-example).
-## Further Reading
+## Keep reading
-* [Multifactor Authentication in Auth0](/multifactor-authentication)
-* [Auth0 id_token](/tokens/id_token)
-* [Overview of JSON Web Tokens](/jwt)
+::: next-steps
* [Reference for acr, amr and acr_values](http://openid.net/specs/openid-connect-core-1_0.html)
* [Authentication policy definitions](http://openid.net/specs/openid-provider-authentication-policy-extension-1_0.html#rfc.section.4)
* [JSON Web Token Example](https://github.com/auth0/node-jsonwebtoken)
* [Guardian example (with step-up functionality)](https://github.com/auth0/guardian-example)
-
-
-
+:::
| 0 |
diff --git a/detox/test/src/app.js b/detox/test/src/app.js @@ -53,6 +53,7 @@ class example extends Component {
async componentDidMount() {
const url = await Linking.getInitialURL();
if (url) {
+ console.log('App@didMount: Found pending URL', url);
this.setState({url: url});
}
}
@@ -63,7 +64,7 @@ class example extends Component {
render() {
if (this.state.notification) {
- console.log("notification:", this.state.notification);
+ console.log("App@render: rendering a notification", this.state.notification);
if (this.state.notification.title) {
return this.renderText(this.state.notification.title);
} else {
@@ -73,12 +74,12 @@ class example extends Component {
}
else if (this.state.url) {
- console.log("url:", this.state.url);
+ console.log("App@render: rendering a URL:", this.state.url);
return this.renderText(this.state.url);
}
if (!this.state.screen) {
- console.log("JS rendering");
+ console.log("App@render: JS rendering main screen");
return (
<View style={{flex: 1, paddingTop: 10, justifyContent: 'center', alignItems: 'center'}}>
<Text style={{fontSize: 20, marginBottom: 10}}>
@@ -115,12 +116,12 @@ class example extends Component {
}
_onNotification(notification) {
- console.log("onNotification:", notification);
+ console.log('App@onNotification:', notification);
this.setState({notification: notification.getAlert()});
}
_handleOpenURL(params) {
- console.log("handleOpenURL:", params);
+ console.log('App@handleOpenURL:', params);
this.setState({url: params.url});
}
}
| 7 |
diff --git a/assets/src/services/ProfileService.test.js b/assets/src/services/ProfileService.test.js -import { getLoggedUser, getRegion, setRegion } from './ProfileService';
+import { getLoggedUser, getRegion, setRegion, clearRegion } from './ProfileService';
import { fetchFromAPI } from './helpers';
jest.mock('./helpers');
@@ -43,4 +43,9 @@ describe('Profile Service', () => {
setRegion(region);
expect(sessionStorage.getItem('region')).toEqual(region);
});
+
+ it("should clear the region in session storage", () => {
+ clearRegion();
+ expect(sessionStorage.getItem('region')).toBeNull;
+ });
});
\ No newline at end of file
| 0 |
diff --git a/angular/projects/spark-angular/src/lib/components/sprk-card/sprk-card.stories.ts b/angular/projects/spark-angular/src/lib/components/sprk-card/sprk-card.stories.ts import { storyWrapper } from '../../../../../../.storybook/helpers/storyWrapper';
import { SprkCardModule } from './sprk-card.module';
+import { SprkCardContentModule } from './directives/sprk-card-content/sprk-card-content.module';
+import { SprkLinkDirectiveModule } from '../../directives/sprk-link/sprk-link.module';
import { SprkCardComponent } from './sprk-card.component';
import { SprkStackModule } from '../sprk-stack/sprk-stack.module';
+import { SprkTextModule } from '../../directives/sprk-text/sprk-text.module';
+import { SprkHeadingModule } from '../../directives/sprk-heading/sprk-heading.module';
import { SprkStackItemModule } from '../../directives/sprk-stack-item/sprk-stack-item.module';
import { markdownDocumentationLinkBuilder } from '../../../../../../../storybook-utilities/markdownDocumentationLinkBuilder';
import { RouterModule } from '@angular/router';
@@ -25,7 +29,11 @@ const modules = {
imports: [
SprkCardModule,
SprkStackModule,
+ SprkCardContentModule,
SprkStackItemModule,
+ SprkHeadingModule,
+ SprkLinkDirectiveModule,
+ SprkTextModule,
RouterModule.forRoot([
{
path: 'iframe.html',
@@ -39,6 +47,16 @@ const modules = {
export const defaultStory = () => ({
moduleMetadata: modules,
template: `
+ <sprk-card idString="new-card">
+ <sprk-stack sprkCardContent sprkStackItem itemSpacing="medium">
+ <p sprkStackItem sprkText variant="bodyTwo">
+ New Default Card. This works without the cardType="base" because
+ we have ng-content running for when cardType=base
+ but we also have the default cardType set to base if not supplied.
+ </p>
+ </sprk-stack>
+ </sprk-card>
+
<sprk-card
cardType="base"
idString="card-default"
@@ -48,7 +66,7 @@ export const defaultStory = () => ({
sprk-c-Card__content
sprk-o-Stack
sprk-o-Stack--medium">
- Base Card Content
+ Old Card
</div>
</sprk-card>
`,
@@ -76,6 +94,14 @@ export const standout = () => ({
sprk-o-Stack
sprk-o-Stack--medium">Standout Card Content</div>
</sprk-card>
+
+ <sprk-card idString="standout" isStandout="true">
+ <sprk-stack sprkCardContent sprkStackItem itemSpacing="medium">
+ <p sprkStackItem sprkText variant="bodyTwo">
+ New Standout Card
+ </p>
+ </sprk-stack>
+ </sprk-card>
`,
});
@@ -154,6 +180,51 @@ export const teaser = () => ({
idString="card-teaser"
>
</sprk-card>
+
+
+ <sprk-card idString="card-teaser">
+ <a
+ sprkLink
+ variant="unstyled"
+ routerLink="/test"
+ sprkStackItem
+ [analyticsString]="img-link-analytics"
+ >
+ <img
+ class="sprk-c-Card__media"
+ alt="Learn more"
+ src="https://spark-assets.netlify.app/desktop.jpg"
+ />
+ </a>
+
+ <sprk-stack sprkCardContent itemSpacing="medium" sprkStackItem>
+ <h3 sprkHeading variant="displayFive" sprkStackItem>
+ New Teaser Card
+ </h3>
+
+ <p sprkText variant="bodytwo" sprkStackItem>
+ Lorem ipsum dolor sit amet, doctus
+ invenirevix te. Facilisi perpetua.
+ This card words because it falls into
+ the ng-content catch because the default
+ cardType is base which allows for ng-content.
+ The old one works still because we did not remove
+ the old cardType input from the component.
+ </p>
+
+ <div sprkStackItem>
+ <a
+ sprkLink
+ variant="unstyled"
+ routerLink="/test"
+ class="sprk-c-Button sprk-c-Button--secondary"
+ analyticsString="test-cta"
+ >
+ Learn More
+ </a>
+ </div>
+ </sprk-stack>
+ </sprk-card>
`,
});
| 3 |
diff --git a/contracts/indexer/test/Indexer-unit.js b/contracts/indexer/test/Indexer-unit.js const Indexer = artifacts.require('Indexer')
const Market = artifacts.require('Market')
const MockContract = artifacts.require('MockContract')
-const FungibleToken = artifacts.require('FungibleToken')
const {
getResult,
@@ -38,27 +37,14 @@ contract('Indexer Unit Tests', async accounts => {
let tokenOne = accounts[8]
let tokenTwo = accounts[9]
- setupMockToken = async () => {
- stakingTokenTemplate = await FungibleToken.new()
+ async function setupMockToken() {
stakingTokenMock = await MockContract.new()
- stakingTokenAddress = stakingTokenMock.address
- }
+ await stakingTokenMock.givenAnyReturnBool(true)
- mockStakingSuccess = async () => {
- mockTransferFrom = stakingTokenTemplate.contract.methods
- .transferFrom(EMPTY_ADDRESS, EMPTY_ADDRESS, 0)
- .encodeABI()
- await stakingTokenMock.givenMethodReturnBool(mockTransferFrom, true)
- }
-
- mockStakingFailure = async () => {
- mockTransferFrom = stakingTokenTemplate.contract.methods
- .transferFrom(EMPTY_ADDRESS, EMPTY_ADDRESS, 0)
- .encodeABI()
- await stakingTokenMock.givenMethodReturnBool(mockTransferFrom, false)
+ stakingTokenAddress = stakingTokenMock.address
}
- checkMarketAtAddress = async (marketAddress, makerToken, takerToken) => {
+ async function checkMarketAtAddress(marketAddress, makerToken, takerToken) {
// find the market
let market = await Market.at(marketAddress)
@@ -390,7 +376,7 @@ contract('Indexer Unit Tests', async accounts => {
})
// The transfer is not approved
- await mockStakingFailure()
+ await stakingTokenMock.givenAnyReturnBool(false)
// now try to set an intent
await reverted(
@@ -414,9 +400,6 @@ contract('Indexer Unit Tests', async accounts => {
from: aliceAddress,
})
- // approve the tokens to be staked
- await mockStakingSuccess()
-
let expiry = await getTimestampPlusDays(1)
// now set an intent
@@ -449,9 +432,6 @@ contract('Indexer Unit Tests', async accounts => {
from: aliceAddress,
})
- // approve the tokens to be staked
- await mockStakingSuccess()
-
// set one intent
await indexer.setIntent(
tokenOne,
@@ -488,9 +468,6 @@ contract('Indexer Unit Tests', async accounts => {
from: aliceAddress,
})
- // approve the tokens to be staked
- await mockStakingSuccess()
-
let expiry = await getTimestampPlusDays(1)
// try to set both intents, but one market doesnt exist
@@ -526,9 +503,6 @@ contract('Indexer Unit Tests', async accounts => {
from: aliceAddress,
})
- // approve the tokens to be staked
- await mockStakingSuccess()
-
let expiry = await getTimestampPlusDays(1)
// set the intents
| 2 |
diff --git a/test/integration/cloud/activities.js b/test/integration/cloud/activities.js @@ -23,7 +23,7 @@ describe('Get activities', () => {
activity.should.have.property('foreign_id');
activity.actor.should.equal(ctx.alice.userId);
activity.verb.should.equal('eat');
- activity.object.data.should.eql(ctx.cheeseBurgerData);
+ activity.object.should.eql(ctx.cheeseBurger.full);
// activity.object.collection.should.equal('food');
// activity.object.data.name.should.equal('cheese burger');
});
| 7 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.