code
stringlengths 122
4.99k
| label
int64 0
14
|
---|---|
diff --git a/token-metadata/0x97AEB5066E1A590e868b511457BEb6FE99d329F5/metadata.json b/token-metadata/0x97AEB5066E1A590e868b511457BEb6FE99d329F5/metadata.json "symbol": "ATMI",
"address": "0x97AEB5066E1A590e868b511457BEb6FE99d329F5",
"decimals": 18,
- "dharmaVerificationStatus": {
"dharmaVerificationStatus": "VERIFIED"
}
\ No newline at end of file
-}
\ No newline at end of file
| 3 |
diff --git a/CHANGELOG.md b/CHANGELOG.md @@ -10,6 +10,39 @@ https://github.com/plotly/plotly.js/compare/vX.Y.Z...master
where X.Y.Z is the semver of most recent plotly.js release.
+## [1.22.0] -- 2016-01-19
+
+### Added
+- Add `cumulative` histogram attributes to generate Cumulative Distribution
+ Functions [#1189]
+- Add `standoff` attribute for annotations to move the arrowhead away from the
+ point it's marking [#1265]
+- Add `clicktoshow`, `xclick` and `yclick` attributes for annotations to
+ show/hide annotations on click [#1265]
+- Support data-referenced annotation in gl2d subplots [#1301, #1319]
+- Honor `fixedrange: false` in y-axes anchored to xaxis with range slider
+ [#1261]
+- Add fallbacks for IE9 so that all cartesian traces can render without any
+ polyfill [#1297, #1299]
+
+### Changed
+- Adapt plot schema output for plotly.py 2.0 [#1292]
+- Bump `mouse-change` dep to `^1.4.0` [#1305]
+- Improve performance in `visible` toggling for `scattergl` [#1300]
+
+### Fixed
+- Fix XSS vulnerability in trace name on hover [#1307]
+- Fix ternary and geo subplot with `visible: false` first trace [#1291]
+- Fix opacity for `mode: 'lines'` items in legend [#1204]
+- Fix legend items style for bar trace with marker arrays [#1289]
+- Fix range slider svg / pdf and eps image exports [#1306]
+- Fix scattergl `visible: false` traces with empty data arrays [#1300]
+- Fix a few contour trace edge cases [#1309]
+- Updatemenus buttons now render above sliders [#1302]
+- Add fallback for categorical histogram on linear axes [#1284]
+- Allow style fields in sub and sup text [#1288]
+
+
## [1.21.3] -- 2016-01-05
### Fixed
| 3 |
diff --git a/generators/entity-client/templates/vue/src/main/webapp/app/entities/entity.component.ts.ejs b/generators/entity-client/templates/vue/src/main/webapp/app/entities/entity.component.ts.ejs @@ -31,7 +31,7 @@ export default class <%= entityAngularName %> extends <% if (fieldsContainBlob |
public infiniteId = +new Date();
public infiniteLoadingState = null;
public links = {};
- public page = 0;
+ public page = 1;
<%_ } _%>
public <%= entityInstancePlural %>: I<%= entityAngularName %>[] = [];
@@ -60,7 +60,7 @@ export default class <%= entityAngularName %> extends <% if (fieldsContainBlob |
this.page = 1;
<%_ } _%>
<%_ if (pagination === 'infinite-scroll') { _%>
- this.page = 0;
+ this.page = 1;
this.links = {};
this.infiniteId += 1;
this.<%= entityInstancePlural %> = [];
@@ -70,7 +70,7 @@ export default class <%= entityAngularName %> extends <% if (fieldsContainBlob |
<%_ if (pagination === 'infinite-scroll') { _%>
public reset(): void {
- this.page = 0;
+ this.page = 1;
this.infiniteId += 1;
this.<%= entityInstancePlural %> = [];
this.retrieveAll<%= entityAngularName %>s();
@@ -87,7 +87,7 @@ export default class <%= entityAngularName %> extends <% if (fieldsContainBlob |
};<% } %>
<%_ if (pagination === 'infinite-scroll') { _%>
const paginationQuery = {
- page: this.page,
+ page: this.page - 1,
size: this.itemsPerPage,
sort: this.sort()
};<% } %>
| 3 |
diff --git a/src/abstract-ops/async-generator-objects.mjs b/src/abstract-ops/async-generator-objects.mjs @@ -7,6 +7,7 @@ import {
GetGeneratorKind,
NewPromiseCapability,
PerformPromiseThen,
+ PromiseResolve,
} from './all.mjs';
import { Evaluate_FunctionBody } from '../runtime-semantics/all.mjs';
import {
@@ -121,15 +122,14 @@ function AsyncGeneratorResumeNext(generator) {
if (state === 'completed') {
if (completion.Type === 'return') {
generator.AsyncGeneratorState = 'awaiting-return';
- const promiseCapability = X(NewPromiseCapability(surroundingAgent.intrinsic('%Promise%')));
- X(Call(promiseCapability.Resolve, Value.undefined, [completion.Value]));
+ const promise = Q(PromiseResolve(surroundingAgent.intrinsic('%Promise%'), completion.Value));
const stepsFulfilled = AsyncGeneratorResumeNextReturnProcessorFulfilledFunctions;
const onFulfilled = CreateBuiltinFunction(stepsFulfilled, ['Generator']);
onFulfilled.Generator = generator;
const stepsRejected = AsyncGeneratorResumeNextReturnProcessorRejectedFunctions;
const onRejected = CreateBuiltinFunction(stepsRejected, ['Generator']);
onRejected.Generator = generator;
- X(PerformPromiseThen(promiseCapability.Promise, onFulfilled, onRejected));
+ X(PerformPromiseThen(promise, onFulfilled, onRejected));
return Value.undefined;
} else {
Assert(completion.Type === 'throw');
| 3 |
diff --git a/.vscode/settings.json b/.vscode/settings.json "blade.format.enable": true,
"html.format.wrapAttributes": "force",
"html.format.wrapLineLength": 0,
- "phpfmt.passes": [
- "AddMissingParentheses",
- "AliasToMaster",
- "AllmanStyleBraces",
- "AutoSemicolon",
- "ClassToSelf",
- "ConvertOpenTagWithEcho",
- "DoubleToSingleQuote",
- "OrderAndRemoveUseClauses",
- "OrganizeClass",
- "ReindentSwitchBlocks",
- "RemoveIncludeParentheses",
- "RemoveSemicolonAfterCurly",
- "RemoveUseLeadingSlash",
- "ReplaceBooleanAndOr",
- "ShortArray",
- "SmartLnAfterCurlyOpen",
- "SpaceAroundControlStructures",
- "SpaceBetweenMethods",
- "StripExtraCommaInArray",
- "StripNewlineAfterClassOpen",
- "StripNewlineAfterCurlyOpen",
- "UpgradeToPreg",
- "WrongConstructorName"
- ],
- "phpfmt.exclude": [
- "ReindentComments",
- "StripNewlineWithinClassBody"
- ],
- "phpfmt.psr2": false,
- "phpfmt.detect_indent": true,
- "phpfmt.smart_linebreak_after_curly": true
}
| 2 |
diff --git a/src/server/routes/comments.js b/src/server/routes/comments.js let router = require("express").Router();
router.use(require("express").json());
let Bots = require("@models/bots.js");
+
+router.get("/",(req, res)=>{
+ res.send("wip");
+})
+
+module.exports = router;
\ No newline at end of file
| 1 |
diff --git a/packages/enzyme/src/ShallowWrapper.js b/packages/enzyme/src/ShallowWrapper.js @@ -389,6 +389,7 @@ class ShallowWrapper {
originalShouldComponentUpdate = instance.shouldComponentUpdate;
instance.shouldComponentUpdate = (...args) => {
shouldRender = originalShouldComponentUpdate.apply(instance, args);
+ instance.shouldComponentUpdate = originalShouldComponentUpdate;
return shouldRender;
};
}
@@ -402,9 +403,6 @@ class ShallowWrapper {
) {
instance.componentDidUpdate(prevProps, prevState, prevContext);
}
- if (originalShouldComponentUpdate) {
- instance.shouldComponentUpdate = originalShouldComponentUpdate;
- }
this.update();
});
});
| 5 |
diff --git a/vis/js/mediator.js b/vis/js/mediator.js @@ -363,10 +363,10 @@ MyMediator.prototype = {
paper_current_bubble_clicked: function(area) {
mediator.manager.call('list', 'reset', []);
mediator.manager.call('list', 'filterListByArea', [area]);
- if (mediator.current_enlarged_paper) {
+ /*if (mediator.current_enlarged_paper) {
mediator.current_enlarged_paper.paper_selected = false
}
- mediator.current_enlarged_paper = null
+ mediator.current_enlarged_paper = null*/
mediator.manager.call('list', 'count_visible_items_to_header', []);
},
@@ -380,6 +380,7 @@ MyMediator.prototype = {
bubble_click: function(d, bubble) {
bubble.zoomin(d);
+ mediator.manager.call('papers', 'currentbubble_click', [d]);
},
bubble_zoomin: function(d) {
| 1 |
diff --git a/package.json b/package.json "name": "find-and-replace",
"main": "./lib/find",
"description": "Find and replace within buffers and across the project.",
- "version": "0.209.2",
+ "version": "0.209.3",
"license": "MIT",
"activationCommands": {
"atom-workspace": [
| 6 |
diff --git a/tests/phpunit/integration/Modules/AnalyticsTest.php b/tests/phpunit/integration/Modules/AnalyticsTest.php @@ -205,7 +205,7 @@ class AnalyticsTest extends TestCase {
// Results in an error for a mismatch (or no account ticket ID stored from before at all).
try {
$method->invokeArgs( $analytics, array() );
- throw new \Exception( 'missing redirect' );
+ $this->fail( 'Expected redirect to module page with "account_ticket_id_mismatch" error' );
} catch ( RedirectException $redirect ) {
$this->assertEquals(
add_query_arg( 'error_code', 'account_ticket_id_mismatch', $analytics_module_page_url ),
@@ -218,10 +218,10 @@ class AnalyticsTest extends TestCase {
$_GET['error'] = 'user_cancel';
try {
$method->invokeArgs( $analytics, array() );
- throw new \Exception( 'missing redirect' );
+ $this->fail( 'Expected redirect to module page with "user_cancel" error' );
} catch ( RedirectException $redirect ) {
$this->assertEquals(
- add_query_arg( 'error_code', $_GET['error'], $analytics_module_page_url ),
+ add_query_arg( 'error_code', 'user_cancel', $analytics_module_page_url ),
$redirect->get_location()
);
// Ensure transient was deleted by the method despite error.
@@ -235,7 +235,7 @@ class AnalyticsTest extends TestCase {
$_GET['webPropertyId'] = 'UA-12345678-1';
try {
$method->invokeArgs( $analytics, array() );
- throw new \Exception( 'missing redirect' );
+ $this->fail( 'Expected redirect to module page with "callback_missing_parameter" error' );
} catch ( RedirectException $redirect ) {
$this->assertEquals(
add_query_arg( 'error_code', 'callback_missing_parameter', $analytics_module_page_url ),
@@ -278,7 +278,7 @@ class AnalyticsTest extends TestCase {
->willReturn( $expected_webproperty );
try {
$method->invokeArgs( $analytics, array() );
- throw new \Exception( 'missing redirect' );
+ $this->fail( 'Expected redirect to module page with "authentication_success" notification' );
} catch ( RedirectException $redirect ) {
$this->assertEquals(
add_query_arg(
| 14 |
diff --git a/core/server/services/permissions/providers.js b/core/server/services/permissions/providers.js @@ -2,7 +2,12 @@ const _ = require('lodash');
const Promise = require('bluebird');
const models = require('../../models');
const errors = require('@tryghost/errors');
-const i18n = require('../../../shared/i18n');
+const tpl = require('@tryghost/tpl');
+
+const messages = {
+ userNotFound: 'User not found',
+ apiKeyNotFound: 'API Key not found'
+};
module.exports = {
user: function (id) {
@@ -11,7 +16,7 @@ module.exports = {
// CASE: {context: {user: id}} where the id is not in our database
if (!foundUser) {
return Promise.reject(new errors.NotFoundError({
- message: i18n.t('errors.models.user.userNotFound')
+ message: tpl(messages.userNotFound)
}));
}
@@ -56,7 +61,7 @@ module.exports = {
.then((foundApiKey) => {
if (!foundApiKey) {
throw new errors.NotFoundError({
- message: i18n.t('errors.models.api_key.apiKeyNotFound')
+ message: tpl(messages.apiKeyNotFound)
});
}
| 14 |
diff --git a/src/ui/components/download.js b/src/ui/components/download.js @@ -6,18 +6,25 @@ module.exports = networkUI
function networkUI (state) {
var stats = state.stats.get()
var download = state.download
-
if (!stats || !download) return ''
- if (download.nsync) {
- if (!state.opts.exit) return 'Ready to sync updates.'
- if (!download.modified) return 'Archive synced to latest, waiting for changes.'
- return `Archive synced, version ${stats.version}.`
- }
if (!stats.downloaded || !stats.length) {
return '' // no metadata yet
}
+
+ var title = 'Downloading updates...'
var downBar = makeBar()
+
+ if (download.nsync) {
+ if (state.opts.exit && download.modified) return `dat sync complete.\nVersion ${stats.version}`
+
+ if (!download.modified) {
+ if (state.opts.exit) title = `dat already in sync, waiting for updates.`
+ else title = `dat synced, waiting for updates.`
+ }
+ }
+
return output`
+ ${title}
${downBar(stats.downloaded)}
`
| 7 |
diff --git a/docs/templates/macros/example-navbar.html b/docs/templates/macros/example-navbar.html {% macro example_navbar() -%}
<nav class="navbar sticky-top navbar-expand navbar-dark bg-dark">
+ <span class="mr-2 bg-white" style="padding:2px;border-radius:4px">
<img
- src="/static/images/icon128x128.png"
+ src="/static/images/dbciconblack128.png"
width="36"
height="36"
alt="dbc logo thumbnail"
- class="mr-2"
/>
+ </span>
<ul class="navbar-nav mr-auto">
<li class="nav-item">
<a class="nav-link" href="/examples">Back to examples</a>
| 1 |
diff --git a/src/client.ts b/src/client.ts @@ -102,12 +102,12 @@ type AxiosConfig = {
export type HandlerCallback = (...args: unknown[]) => unknown;
-export type ActivityPartialChanges = {
- foreignID?: string;
+export type ForeignIDTimes = { foreignID: string; time: Date | string };
+
+export type ActivityPartialChanges<ActivityType extends UnknownRecord = UnknownRecord> = Partial<ForeignIDTimes> & {
id?: string;
- set?: UnknownRecord;
- time?: Date | string;
- unset?: string[];
+ set?: Partial<ActivityType>;
+ unset?: Array<Extract<keyof ActivityType, string>>;
};
/**
@@ -739,7 +739,7 @@ export default class StreamClient<
foreignIDTimes,
...params
}: EnrichOptions & {
- foreignIDTimes?: { foreignID: string; time: Date | string }[];
+ foreignIDTimes?: ForeignIDTimes[];
ids?: string[];
reactions?: Record<string, boolean>;
}) {
@@ -838,11 +838,13 @@ export default class StreamClient<
});
}
- async activityPartialUpdate(data: ActivityPartialChanges): Promise<APIResponse & Activity<ActivityType>> {
+ async activityPartialUpdate(
+ data: ActivityPartialChanges<ActivityType>,
+ ): Promise<APIResponse & Activity<ActivityType>> {
/**
* Update a single activity with partial operations.
* @since 3.20.0
- * @param {ActivityPartialChanges} data object containing either the ID or the foreign ID and time of the activity and the operations to issue as set:{...} and unset:[...].
+ * @param {ActivityPartialChanges<ActivityType>} data object containing either the ID or the foreign ID and time of the activity and the operations to issue as set:{...} and unset:[...].
* @return {Promise<Activity<ActivityType>>}
* @example
* client.activityPartialUpdate({
@@ -877,11 +879,11 @@ export default class StreamClient<
return { ...activity, ...response };
}
- activitiesPartialUpdate(changes: ActivityPartialChanges[]) {
+ activitiesPartialUpdate(changes: ActivityPartialChanges<ActivityType>[]) {
/**
* Update multiple activities with partial operations.
* @since v3.20.0
- * @param {ActivityPartialChanges[]} changes array containing the changesets to be applied. Every changeset contains the activity identifier which is either the ID or the pair of of foreign ID and time of the activity. The operations to issue can be set:{...} and unset:[...].
+ * @param {ActivityPartialChanges<ActivityType>[]} changes array containing the changesets to be applied. Every changeset contains the activity identifier which is either the ID or the pair of of foreign ID and time of the activity. The operations to issue can be set:{...} and unset:[...].
* @return {Promise<{ activities: Activity<ActivityType>[] }>}
* @example
* client.activitiesPartialUpdate([
@@ -935,7 +937,7 @@ export default class StreamClient<
if (!(changes instanceof Array)) {
throw new TypeError('changes should be an Array');
}
- changes.forEach(function (item: ActivityPartialChanges & { foreign_id?: string }) {
+ changes.forEach(function (item: ActivityPartialChanges<ActivityType> & { foreign_id?: string }) {
if (!(item instanceof Object)) {
throw new TypeError(`changeset should be and Object`);
}
| 1 |
diff --git a/components/core/DataView.js b/components/core/DataView.js @@ -19,7 +19,7 @@ import { TabGroup } from "~/components/core/TabGroup";
import SlateMediaObjectPreview from "~/components/core/SlateMediaObjectPreview";
import FilePreviewBubble from "~/components/core/FilePreviewBubble";
-const VIEW_LIMIT = 20;
+const VIEW_LIMIT = 5;
const STYLES_CONTAINER_HOVER = css`
display: flex;
@@ -231,6 +231,7 @@ export default class DataView extends React.Component {
startIndex: 0,
checked: {},
view: "grid",
+ viewLimit: 3,
};
async componentDidMount() {
@@ -240,6 +241,10 @@ export default class DataView extends React.Component {
window.addEventListener("remote-slate-object-remove", this._handleRemoteSlateObjectRemove);
window.addEventListener("remote-slate-object-add", this._handleRemoteSlateObjectAdd);
}
+
+ window.addEventListener("scroll", this._handleScroll);
+
+ await this._handleUpdate();
}
componentWillUnmount() {
@@ -247,7 +252,34 @@ export default class DataView extends React.Component {
window.removeEventListener("remote-data-deletion", this._handleDataDeletion);
window.removeEventListener("remote-slate-object-remove", this._handleRemoteSlateObjectRemove);
window.removeEventListener("remote-slate-object-add", this._handleRemoteSlateObjectAdd);
+
+ window.removeEventListener("scroll", this._handleScroll);
+ window.removeEventListener("remote-update-carousel", this._handleUpdate);
+ }
+
+ _handleScroll = (e) => {
+ const windowHeight =
+ "innerHeight" in window ? window.innerHeight : document.documentElement.offsetHeight;
+ const body = document.body;
+ const html = document.documentElement;
+ const docHeight = Math.max(
+ body.scrollHeight,
+ body.offsetHeight,
+ html.clientHeight,
+ html.scrollHeight,
+ html.offsetHeight
+ );
+ const windowBottom = windowHeight + window.pageYOffset;
+ if (windowBottom >= docHeight) {
+ console.log("END");
+ this.setState({ viewLimit: this.state.viewLimit + 5 });
+ console.log("New View Limit:" + this.state.viewLimit);
+ } else {
+ console.log("scrolling");
}
+ console.log("Window H: " + windowHeight);
+ console.log("Window H: " + windowHeight);
+ };
_increment = (direction) => {
if (
@@ -524,36 +556,6 @@ export default class DataView extends React.Component {
);
const footer = (
<React.Fragment>
- <div css={STYLES_ARROWS}>
- <span
- css={STYLES_ICON_ELEMENT}
- style={
- this.state.startIndex - VIEW_LIMIT >= 0
- ? null
- : {
- cursor: "not-allowed",
- color: Constants.system.border,
- }
- }
- onClick={() => this._increment(-1)}
- >
- <SVG.NavigationArrow height="24px" style={{ transform: `rotate(180deg)` }} />
- </span>
- <span
- css={STYLES_ICON_ELEMENT}
- style={
- this.state.startIndex + VIEW_LIMIT < this.props.viewer.library[0].children.length
- ? null
- : {
- cursor: "not-allowed",
- color: Constants.system.border,
- }
- }
- onClick={() => this._increment(1)}
- >
- <SVG.NavigationArrow height="24px" />
- </span>
- </div>
{numChecked ? (
<div css={STYLES_ACTION_BAR}>
<div css={STYLES_LEFT}>
| 2 |
diff --git a/bin/util.js b/bin/util.js @@ -319,7 +319,7 @@ function randomNumber ({ min, max, exclusiveMin = false, exclusiveMax = false, d
}
if (minIsNumber && (num < min || (num === min && exclusiveMin))) return undefined;
- if (maxIsNumber && (num < max || (num === max && exclusiveMax))) return undefined;
+ if (maxIsNumber && (num > max || (num === max && exclusiveMax))) return undefined;
return num;
}
| 1 |
diff --git a/elements/haxcms-elements/lib/core/site-list/haxcms-site-listing.js b/elements/haxcms-elements/lib/core/site-list/haxcms-site-listing.js @@ -982,12 +982,13 @@ class HAXCMSSiteListing extends PolymerElement {
this.__loginText = "Log out";
this.__loginIcon = "icons:account-circle";
// see if we should update the photo from the webcam
- if (this.__img) {
+ // this value is available if we hit camera snap earlier in the operation
+ if (this.__cameraBlob) {
// refresh user data request
this.set("setUserPhotoParams", {});
this.set("setUserPhotoParams", {
jwt: newValue,
- photo: this.__img.src
+ photo: this.__cameraBlob
});
this.notifyPath("setUserPhotoParams.*");
this.shadowRoot.querySelector("#setuserphotorequest").generateRequest();
@@ -1132,11 +1133,17 @@ class HAXCMSSiteListing extends PolymerElement {
}
async snapPhoto(e) {
const camera = this.shadowRoot.querySelector("#camera");
- this.__img = await camera.takeASnap().then(camera.renderImage);
+ // snap the photo to a blob
+ this.__cameraBlob = await camera.takeASnap().then(camera.imageBlob);
+ // make an img to show on screen
+ let img = document.createElement("img");
+ // turn blob into a url to visualize locally
+ img.src = URL.createObjectURL(this.__cameraBlob);
camera.removeAttribute("autoplay");
const selfie = this.shadowRoot.querySelector("#selfie");
selfie.innerHTML = "";
- selfie.appendChild(this.__img);
+ // append to dom so they see the photo
+ selfie.appendChild(img);
selfie.classList.add("has-snap");
}
clearPhoto(e) {
@@ -1583,10 +1590,18 @@ class HAXCMSSiteListing extends PolymerElement {
this.shadowRoot.querySelector("#settingsdialog").opened = false;
this.standardResponse("HAXCMS configuration updated!");
}
+ /**
+ * Load user data up from the backend
+ */
handleGetUserDataResponse(e) {
this.userData = e.detail.response.data;
}
+ /**
+ * Callback after saving a photo to the backend
+ */
handleSetUserPhotoResponse(e) {
+ // remove this once we've saved it
+ delete this.__cameraBlob;
this.standardResponse("User photo saved!", false);
}
/**
| 4 |
diff --git a/src/apps.json b/src/apps.json "cats": [
42
],
- "env": "^googletag$",
+ "env": [
+ "^googletag$",
+ "^google_tag_manager$"
+ ],
"html": "googletagmanager\\.com/ns\\.html[^>]+></iframe>",
"icon": "Google Tag Manager.png",
"website": "http://www.google.com/tagmanager"
| 7 |
diff --git a/src/middleware/packages/ldp/services/registry/index.js b/src/middleware/packages/ldp/services/registry/index.js @@ -48,7 +48,8 @@ module.exports = {
// First attach the container to its parent container
// This will avoid WebACL error, in case the container is fetched before
if (containerPath !== '/') {
- const parentContainerUri = getContainerFromUri(containerUri);
+ let parentContainerUri = getContainerFromUri(containerUri);
+ if (parentContainerUri + '/' === this.settings.baseUrl) parentContainerUri += '/';
const parentExists = await ctx.call('ldp.container.exist', {
containerUri: parentContainerUri,
webId: 'system'
| 1 |
diff --git a/packages/press/src/build.js b/packages/press/src/build.js @@ -136,7 +136,7 @@ module.exports = function (config, options) {
}
//Build the page output path and save the page
page.url = path.normalize(path.join(context.config.base, page.categories.join("/"), page.name + page.extension));
- page.path = path.normalize(path.join(context.targetPath, page.url));
+ page.path = path.normalize(path.join(context.targetPath, page.categories.join("/"), page.name + page.extension));
//Return the parsed page
return page;
});
| 1 |
diff --git a/src/components/app/App.module.css b/src/components/app/App.module.css @@ -20,6 +20,8 @@ html, body {
--color: #ec407a;
--color2: #ffa726;
--color3: #42a5f5;
+
+ background-color: #000;
}
.App {
@@ -50,3 +52,26 @@ html, body {
background-color: darkgrey;
outline: 1px solid slategrey;
}
+
+/* */
+
+.menu {
+ position: absolute;
+ top: 0;
+ bottom: 0;
+ left: 0;
+ right: 0;
+ background-image: linear-gradient(to bottom, #333, #000);
+ font-family: 'PlazaRegular';
+ color: #FFF;
+ font-size: 36px;
+}
+.menu h1,
+.menu p
+{
+ margin: 30px;
+}
+.menu h1 {
+ font-size: 50px;
+ font-family: 'WinchesterCaps';
+}
\ No newline at end of file
| 0 |
diff --git a/src/functionHelper.js b/src/functionHelper.js @@ -28,19 +28,19 @@ function runServerlessProxy(funOptions, options) {
const binPath = options.b || options.binPath
const cmd = binPath || 'sls'
- const process = spawn(cmd, args, {
+ const subprocess = spawn(cmd, args, {
cwd: servicePath,
shell: true,
stdio: ['pipe', 'pipe', 'pipe'],
})
- process.stdin.write(`${stringify(event)}\n`)
- process.stdin.end()
+ subprocess.stdin.write(`${stringify(event)}\n`)
+ subprocess.stdin.end()
let results = ''
let hasDetectedJson = false
- process.stdout.on('data', (data) => {
+ subprocess.stdout.on('data', (data) => {
let str = data.toString('utf8')
if (hasDetectedJson) {
@@ -70,11 +70,11 @@ function runServerlessProxy(funOptions, options) {
}
})
- process.stderr.on('data', (data) => {
+ subprocess.stderr.on('data', (data) => {
context.fail(data)
})
- process.on('close', (code) => {
+ subprocess.on('close', (code) => {
if (code.toString() === '0') {
try {
context.succeed(parse(results))
| 10 |
diff --git a/src/components/core/loop/loopDestroy.js b/src/components/core/loop/loopDestroy.js export default function () {
const swiper = this;
const { $wrapperEl, params, slides } = swiper;
- $wrapperEl.children(`.${params.slideClass}.${params.slideDuplicateClass}`).remove();
+ $wrapperEl.children(`.${params.slideClass}.${params.slideDuplicateClass},.${params.slideClass}.${params.slideBlankClass}`).remove();
slides.removeAttr('data-swiper-slide-index');
}
| 2 |
diff --git a/src/article/models/Heading.js b/src/article/models/Heading.js import { TextNode, TEXT } from 'substance'
+import { RICH_TEXT_ANNOS, EXTENDED_FORMATTING, LINKS_AND_XREFS, INLINE_NODES } from './modelConstants'
export default class Heading extends TextNode {}
Heading.schema = {
type: 'heading',
level: { type: 'number', default: 1 },
- content: TEXT()
+ content: TEXT(RICH_TEXT_ANNOS.concat(EXTENDED_FORMATTING).concat(LINKS_AND_XREFS).concat(INLINE_NODES).concat(['break']))
}
| 11 |
diff --git a/lib/carto/connector/providers/bigquery.rb b/lib/carto/connector/providers/bigquery.rb @@ -9,11 +9,20 @@ module Carto
# {
# "provider": "bigquery",
# "connection": {
- # "Catalog": "eternal-ship-170218"
+ # "project": "eternal-ship-170218"
# },
# "table": "destination_table",
# "sql_query": "select * from `eternal-ship-170218.test.test` limit 1;"
# }
+ #
+ # {
+ # "provider": "bigquery",
+ # "connection": {
+ # "project": "some_project"
+ # },
+ # "table": "mytable",
+ # "dataset": "mydataset"
+ # }
class BigQueryProvider < OdbcProvider
private
@@ -43,15 +52,8 @@ module Carto
# a connection such as obtaining metadata (list_tables?, features_information, etc.)
return if !context || !context.user
- refreshTokenErrMsg = 'BigQuery refresh token not found for the user'
- begin
- @token = context.user.oauths.select(DATASOURCE_NAME).token
- raise refreshTokenErrMsg if @token.nil?
- rescue => e
- CartoDB::Logger.error(exception: e,
- message: refreshTokenErrMsg,
- user_id: context.user.id)
- end
+ @token = context.user.oauths.select(DATASOURCE_NAME)&.token
+ raise AuthError.new('BigQuery refresh token not found for the user', DATASOURCE_NAME) if @token.nil?
end
def fixed_connection_attributes
@@ -76,9 +78,20 @@ module Carto
return conf
end
+ REQUIRED_OPTIONS = %I(table connection).freeze
+ OPTIONAL_OPTIONS = %I(dataset sql_query).freeze
+
+ def optional_parameters
+ OPTIONAL_OPTIONS
+ end
+
+ def required_parameters
+ REQUIRED_OPTIONS
+ end
+
def required_connection_attributes
{
- database: :Catalog
+ project: :Catalog
}
end
@@ -101,6 +114,16 @@ module Carto
end
end
+ public
+
+ def features_information
+ {
+ "sql_queries": true,
+ "list_projects": false,
+ "list_tables": true,
+ "preview_table": false
+ }
+ end
end
end
end
| 10 |
diff --git a/js/trackFileLoad.js b/js/trackFileLoad.js @@ -157,9 +157,24 @@ var igv = (function (igv) {
}
};
+ igv.TrackFileLoad.indexFileExtensions =
+ {
+ bam: { extension:'bai', optional:false },
+ bed: { extension:'idx', optional:true },
+ vcf: { extension:'tbi', optional:true }
+ };
+
igv.TrackFileLoad.isIndexFile = function (fileOrURL) {
- var extension = igv.getExtension({ url: fileOrURL });
- return _.contains([ 'idx', 'bai' ], extension);
+ var extension,
+ list;
+
+ extension = igv.getExtension({ url: fileOrURL });
+
+ list = _.map(_.values(igv.TrackFileLoad.indexFileExtensions), function (v) {
+ return v.extension;
+ });
+
+ return _.contains(list, extension);
};
igv.TrackFileLoad.isIndexable = function (fileOrURL) {
@@ -256,8 +271,15 @@ var igv = (function (igv) {
$ok.on('click', function (e) {
+ var extension;
+
+ extension = igv.getExtension({ url: trackFileLoader.file });
+ if (undefined === trackFileLoader.indexFile && false === igv.TrackFileLoad.indexFileExtensions[ extension ].optional) {
+ trackFileLoader.warnWithMessage('ERROR. ' + extension + ' files require an index file.');
+ } else {
igv.browser.loadTrack( { url: trackFileLoader.file, indexURL: trackFileLoader.indexFile } );
doDismiss(trackFileLoader);
+ }
});
// cancel
@@ -344,7 +366,6 @@ var igv = (function (igv) {
var _url = $(this).val();
if (igv.TrackFileLoad.isIndexFile(_url)) {
-
trackFileLoader.warnWithMessage('Error. Must enter data file URL.');
$(this).val(undefined);
} else if (false === igv.TrackFileLoad.isIndexable(_url)) {
@@ -408,14 +429,21 @@ var igv = (function (igv) {
$ok.hide();
$ok.on('click', function (e) {
- var _url,
+ var extension,
+ _url,
_indexURL;
_url = ("" === trackFileLoader.$url_input.val()) ? undefined : trackFileLoader.$url_input.val();
_indexURL = ("" === trackFileLoader.$index_url_input.val()) ? undefined : trackFileLoader.$index_url_input.val();
+ extension = igv.getExtension({ url: _url });
+ if (undefined === _indexURL && false === igv.TrackFileLoad.indexFileExtensions[ extension ].optional) {
+ trackFileLoader.warnWithMessage('ERROR. ' + extension + ' files require an index file URL.');
+ } else {
igv.browser.loadTrack( { url: _url, indexURL: _indexURL } );
doDismiss(trackFileLoader);
+ }
+
});
// cancel
| 9 |
diff --git a/installer/installer.sh b/installer/installer.sh @@ -50,8 +50,8 @@ install_aliases() {
install_directory() {
ARCHIVE_REPOSITORY_URL="github.com/OriginTrail/ot-node/archive"
- BRANCH="v6/release/testnet"
- BRANCH_DIR="/root/ot-node-6-release-testnet"
+ BRANCH="v6/release/mainnet"
+ BRANCH_DIR="/root/ot-node-6-release-mainnet"
perform_step wget https://$ARCHIVE_REPOSITORY_URL/$BRANCH.zip "Downloading node files"
perform_step unzip *.zip "Unzipping node files"
@@ -254,7 +254,7 @@ install_node() {
perform_step npm ci --omit=dev --ignore-scripts "Executing npm install"
- echo "NODE_ENV=testnet" >> $OTNODE_DIR/.env
+ echo "NODE_ENV=mainnet" >> $OTNODE_DIR/.env
perform_step touch $CONFIG_DIR/.origintrail_noderc "Configuring node config file"
perform_step $(jq --null-input --arg tripleStore "$tripleStore" '{"logLevel": "trace", "auth": {"ipWhitelist": ["::1", "127.0.0.1"]}, "modules": {"tripleStore":{"defaultImplementation": $tripleStore}}}' > $CONFIG_DIR/.origintrail_noderc) "Adding tripleStore $tripleStore to node config file"
| 3 |
diff --git a/src/apps.json b/src/apps.json "html": "<input[^>]+name=\"__VIEWSTATE",
"icon": "Microsoft ASP.NET.png",
"implies": "IIS\\;confidence:50",
- "url": "\\.aspx(?:$|\\?)",
- "website": "http://www.asp.net"
+ "url": "\\.aspx?(?:$|\\?)",
+ "website": "https://www.asp.net"
},
"Microsoft Excel": {
"cats": [
| 7 |
diff --git a/CommentFlagsHelper.user.js b/CommentFlagsHelper.user.js // @description Always expand comments (with deleted) and highlight expanded flagged comments, Highlight common chatty and rude keywords
// @homepage https://github.com/samliew/SO-mod-userscripts
// @author @samliew
-// @version 2.7.1
+// @version 2.8
//
// @include https://*stackoverflow.com/admin/dashboard?flag*=comment*
// @include https://*serverfault.com/admin/dashboard?flag*=comment*
ev.stopPropagation();
});
- // Highlight rude or abusive flag comments
- $('.revision-comment').filter((i, el) => el.innerText.indexOf('rude or abusive') >= 0).addClass('roa-flag');
-
// Highlight comments from last year or older
const thisYear = new Date().getFullYear();
$('.comment-link .relativetime').filter((i, el) => Number(el.title.substr(0,4)) < thisYear).addClass('old-comment');
@@ -374,9 +371,6 @@ table.comments tr.roa-comment > td {
.tagged-ignored {
opacity: 1 !important;
}
-.revision-comment {
- font-style: normal;
-}
</style>
`;
$('body').append(styles);
@@ -425,13 +419,6 @@ tr.comment > td {
height: 6em;
word-break: break-word;
}
-.revision-comment {
- color: #663;
- font-style: italic;
-}
-.revision-comment.roa-flag {
- color: red;
-}
table.flagged-posts .relativetime.old-comment {
color: coral;
}
| 2 |
diff --git a/src/MagicMenu.jsx b/src/MagicMenu.jsx import React, {useState, useEffect, useRef} from 'react'
+import {registerKeyHandler, unregisterKeyHandler} from './KeyHandlers.jsx'
import classes from './MagicMenu.module.css'
import ioManager from '../io-manager.js';
import * as codeAi from '../ai/code/code-ai.js';
@@ -71,27 +72,6 @@ function MagicMenu({open, setOpen}) {
await metaversefile.load(dataUri);
})();
};
- useEffect(() => {
- const types = ['keyup', 'click', 'mousedown', 'mouseup', 'mousemove', 'mouseenter', 'mouseleave', 'paste'];
- const cleanups = types.map(type => {
- const fn = e => {
- if (window.document.activeElement === inputTextarea.current || e.target === inputTextarea.current) {
- // nothing
- } else {
- ioManager[type](e);
- }
- };
- window.addEventListener(type, fn);
- return () => {
- window.removeEventListener(type, fn);
- };
- });
- return () => {
- for (const fn of cleanups) {
- fn();
- }
- };
- }, []);
useEffect(() => {
if (magicMenuOpen) {
if (page === 'input') {
@@ -104,6 +84,19 @@ function MagicMenu({open, setOpen}) {
setNeedsFocus(false);
}
}, [magicMenuOpen, inputTextarea.current, needsFocus]);
+ useEffect(() => {
+ function all(e) {
+ if (window.document.activeElement === inputTextarea.current || e.target === inputTextarea.current) {
+ return false;
+ } else {
+ return true;
+ }
+ };
+ registerKeyHandler('', all);
+ return () => {
+ unregisterKeyHandler('', all);
+ };
+ }, []);
const click = e => {
ioManager.click(new MouseEvent('click'));
| 2 |
diff --git a/src/utils/daemon.js b/src/utils/daemon.js @@ -61,7 +61,7 @@ export default async function createDaemon (opts) {
if (!origins.includes('https://webui.ipfs.io')) origins.push('https://webui.ipfs.io')
await ipfsd.api.config.set('API.HTTPHeaders.Access-Control-Allow-Origin', origins)
- await ipfsd.api.config.set('API.HTTPHeaders.Access-Control-Allow-Method', ['PUT', 'GET', 'POST'])
+ await ipfsd.api.config.set('API.HTTPHeaders.Access-Control-Allow-Methods', ['PUT', 'GET', 'POST'])
return ipfsd
}
| 1 |
diff --git a/server.js b/server.js @@ -301,8 +301,10 @@ app.prepare().then(async () => {
return file.public || publicFileIds.includes(file.id);
});
}
+
creator.library = library;
+ /*
const subscriptions = await Data.getSubscriptionsByUserId({ userId: creator.id });
const subscribers = await Data.getSubscribersByUserId({ userId: creator.id });
@@ -328,6 +330,7 @@ app.prepare().then(async () => {
});
creator.subscribers = r2.serializedSubscribers;
+ */
// NOTE(tara+martina)
// Remove this at some point.
| 2 |
diff --git a/packages/slackbot-proxy/src/controllers/growi-to-slack.ts b/packages/slackbot-proxy/src/controllers/growi-to-slack.ts import {
- Controller, Get, Inject, Req, Res, UseBefore,
+ Controller, Get, Post, Inject, Req, Res, UseBefore,
} from '@tsed/common';
import axios from 'axios';
@@ -148,4 +148,12 @@ export class GrowiToSlackCtrl {
return res.send({ relation: createdRelation });
}
+ @Post('/*')
+ @UseBefore(verifyGrowiToSlackRequest)
+ async postResult(@Req() req: GrowiReq, @Res() res: Res): Promise<void|string|Res|WebAPICallResult> {
+ const { tokenGtoPs } = req;
+ console.log(tokenGtoPs);
+
+ }
+
}
| 6 |
diff --git a/index.js b/index.js @@ -1270,10 +1270,8 @@ class Command extends EventEmitter {
default:
throw new Error(`unexpected parse option { from: '${parseOptions.from}' }`);
}
- // @ts-ignore: unknown property
- if (!this._scriptPath && process.mainModule) {
- // @ts-ignore: unknown property
- this._scriptPath = process.mainModule.filename;
+ if (!this._scriptPath && require.main) {
+ this._scriptPath = require.main.filename;
}
// Guess name, used in usage in help.
@@ -1327,10 +1325,8 @@ class Command extends EventEmitter {
// Want the entry script as the reference for command name and directory for searching for other files.
let scriptPath = this._scriptPath;
// Fallback in case not set, due to how Command created or called.
- // @ts-ignore: unknown property
- if (!scriptPath && process.mainModule) {
- // @ts-ignore: unknown property
- scriptPath = process.mainModule.filename;
+ if (!scriptPath && require.main) {
+ scriptPath = require.main.filename;
}
let baseDir;
| 14 |
diff --git a/src/commands/test.js b/src/commands/test.js @@ -36,7 +36,7 @@ module.exports = async (message, command) => {
}
if (!simple) {
- const parsedArticle = new Article(article, feed, profile || {})
+ const parsedArticle = new Article(article, article._feed, profile || {})
const testText = parsedArticle.createTestText()
await message.channel.send(testText, {
split: {
| 1 |
diff --git a/react/src/base/inputs/components/SprkInputElement/SprkInputElement.js b/react/src/base/inputs/components/SprkInputElement/SprkInputElement.js @@ -19,12 +19,11 @@ class SprkInputElement extends Component {
}
this.calculateAriaDescribedBy = this.calculateAriaDescribedBy.bind(this);
+ this.setAriaDescribedBy = this.setAriaDescribedBy.bind(this);
}
componentDidMount() {
- this.setState({
- calculatedAriaDescribedBy: this.calculateAriaDescribedBy(),
- });
+ this.setAriaDescribedBy();
}
componentDidUpdate(prevProps) {
@@ -34,11 +33,15 @@ class SprkInputElement extends Component {
errorContainerId !== prevProps.errorContainerId ||
ariaDescribedBy !== prevProps.ariaDescribedBy
) {
+ this.setAriaDescribedBy();
+ }
+ }
+
+ setAriaDescribedBy() {
this.setState({
calculatedAriaDescribedBy: this.calculateAriaDescribedBy(),
});
}
- }
calculateAriaDescribedBy() {
const { errorContainerId, ariaDescribedBy } = this.props;
@@ -172,6 +175,12 @@ SprkInputElement.propTypes = {
* attribute on the Input.
*/
ariaDescribedBy: propTypes.string,
+ children: propTypes.node,
+ disabled: propTypes.bool,
+ hiddenLabel: propTypes.bool,
+ forwardedRef: propTypes.shape(),
+ value: propTypes.string,
+ defaultValue: propTypes.string,
};
export default SprkInputElement;
| 3 |
diff --git a/src/request-base.js b/src/request-base.js @@ -543,7 +543,8 @@ RequestBase.prototype._auth = function (user, pass, options, base64Encoder) {
* using "Access-Control-Allow-Origin" with a wildcard,
* and also must set "Access-Control-Allow-Credentials"
* to "true".
- *
+ * @param {Boolean} [on=true] - Set 'withCredentials' state
+ * @return {Request} for chaining
* @api public
*/
| 0 |
diff --git a/docs/workers/background-jobs.md b/docs/workers/background-jobs.md # Background jobs
-We use [`bull`](https://github.com/OptimalBits/bull) for all of our background job needs. (at the moment that mostly means notification processing and emails) `bull` uses redis under the hood (see docs/setup.md for instructions on how to install redis) to store information about these jobs.
+We use [`bull`](https://github.com/OptimalBits/bull) for all of our background job needs (at the moment that mostly means notification processing and emails). `bull` uses redis under the hood (see docs/setup.md for instructions on how to install redis) to store information about these jobs.
-All of our servers and workers connect to the same redis instance, adding and taking jobs as they see fit. (in development that's your local instance, in production that's a remote instance hosted on compose.com) Thusly, redis acts kind of like shared global state that helps our disparate processes talk to each other.
+All of our servers and workers connect to the same redis instance, adding and taking jobs as they see fit. In development, that's your local instance. In production, that's a remote instance hosted on [compose.com](https://compose.com). Thusly, redis acts kind of like shared global state that helps our disparate processes talk to each other.
Because `bull` implements job locking we can run as many of these servers and workers in parallel without any job getting done more than one time, which is very neat and should help us a lot when we run into scaling problems.
| 7 |
diff --git a/README.md b/README.md @@ -61,7 +61,7 @@ or alternatively using `brew cask install fastlane`
You can then run the following command from the ios folder:
```
-fastlane match --readonly
+fastlane match development --readonly
```
You will need access to the private `match-ios-certificates` repo and will be prompted for the passphrase. Ask on the channel to get this sent to you in a secure way ;) On success you should be presented with the installed certificates and provisioning profile for org.prideinlondon.festival.
| 3 |
diff --git a/blockchain.js b/blockchain.js @@ -62,6 +62,9 @@ const contracts = {
},
};
+const getNetworkName = () => networkName;
+const getOtherNetworkName = () => networkName === 'main' ? 'side' : 'main';
+
const transactionQueue = {
running: false,
queue: [],
@@ -154,6 +157,8 @@ export {
web3,
contracts,
bindInterface,
+ getNetworkName,
+ getOtherNetworkName,
runSidechainTransaction,
getTransactionSignature,
getAddressFromMnemonic,
| 0 |
diff --git a/login.js b/login.js @@ -323,19 +323,34 @@ class LoginManager extends EventTarget {
}));
}
- getInventory() {
- return userObject ? _clone(userObject.inventory) : [];
- }
+ async getInventory() {
+ if (loginToken) {
+ const contractSource = await getContractSource('getHashes.cdc');
- async setInventory(inventory) {
- if (userObject) {
- userObject.inventory = inventory;
- await pushUserObject();
- // updateUserObject();
+ const res = await fetch(`https://accounts.exokit.org/sendTransaction`, {
+ method: 'POST',
+ body: JSON.stringify({
+ /* address: addr,
+ mnemonic, */
+
+ limit: 100,
+ script: contractSource
+ .replace(/ARG0/g, '0x' + loginToken.addr),
+ wait: true,
+ }),
+ });
+ const response2 = await res.json();
+
+ const entries = response2.encodedData.value.map(({value: {fields}}) => {
+ const id = parseInt(fields.find(field => field.name === 'id').value.value, 10);
+ const hash = fields.find(field => field.name === 'hash').value.value;
+ const filename = fields.find(field => field.name === 'filename').value.value;
+ return {id, hash, filename};
+ });
+ return entries;
+ } else {
+ return [];
}
- this.dispatchEvent(new MessageEvent('inventorychange', {
- data: _clone(inventory),
- }));
}
pushUpdate() {
| 0 |
diff --git a/src/platforms/app-plus/service/framework/plugins/index.js b/src/platforms/app-plus/service/framework/plugins/index.js @@ -32,7 +32,7 @@ export default {
Object.defineProperty(Vue.prototype, '$mp', {
get () {
return {
- page: this.$root.$scope.$page
+ page: this.$root.$scope
}
}
})
@@ -55,7 +55,9 @@ export default {
vdSyncCallbacks.push(cb)
} else {
// $nextTick bind vm context
- Vue.nextTick.call(this, cb)
+ Vue.nextTick(() => {
+ cb.call(this)
+ })
}
}
}
| 1 |
diff --git a/docs/content/widgets/Hscrollers.js b/docs/content/widgets/Hscrollers.js @@ -24,15 +24,15 @@ export const Hscrollers = <cx>
<Tab tab="tab2" value:bind="$page.tab">Tab 2</Tab>
<Tab tab="tab3" value:bind="$page.tab">Tab 3</Tab>
<Tab tab="tab4" value:bind="$page.tab" disabled>Tab 4</Tab>
- <Tab tab="tab5" value:bind="$page.tab" default>Tab 5</Tab>
+ <Tab tab="tab5" value:bind="$page.tab">Tab 5</Tab>
<Tab tab="tab6" value:bind="$page.tab">Tab 6</Tab>
<Tab tab="tab7" value:bind="$page.tab">Tab 7</Tab>
<Tab tab="tab8" value:bind="$page.tab" disabled>Tab 8</Tab>
- <Tab tab="tab9" value:bind="$page.tab" default>Tab 9</Tab>
+ <Tab tab="tab9" value:bind="$page.tab">Tab 9</Tab>
<Tab tab="tab10" value:bind="$page.tab">Tab 10</Tab>
<Tab tab="tab11" value:bind="$page.tab">Tab 11</Tab>
<Tab tab="tab12" value:bind="$page.tab" disabled>Tab 12</Tab>
- <Tab tab="tab13" value:bind="$page.tab" default>Tab 13</Tab>
+ <Tab tab="tab13" value:bind="$page.tab">Tab 13</Tab>
<Tab tab="tab14" value:bind="$page.tab">Tab 14</Tab>
<Tab tab="tab15" value:bind="$page.tab">Tab 15</Tab>
<Tab tab="tab16" value:bind="$page.tab" disabled>Tab 16</Tab>
@@ -55,15 +55,15 @@ export const Hscrollers = <cx>
<Tab tab="tab2" value:bind="$page.tab">Tab 2</Tab>
<Tab tab="tab3" value:bind="$page.tab">Tab 3</Tab>
<Tab tab="tab4" value:bind="$page.tab" disabled>Tab 4</Tab>
- <Tab tab="tab5" value:bind="$page.tab" default>Tab 5</Tab>
+ <Tab tab="tab5" value:bind="$page.tab">Tab 5</Tab>
<Tab tab="tab6" value:bind="$page.tab">Tab 6</Tab>
<Tab tab="tab7" value:bind="$page.tab">Tab 7</Tab>
<Tab tab="tab8" value:bind="$page.tab" disabled>Tab 8</Tab>
- <Tab tab="tab9" value:bind="$page.tab" default>Tab 9</Tab>
+ <Tab tab="tab9" value:bind="$page.tab">Tab 9</Tab>
<Tab tab="tab10" value:bind="$page.tab">Tab 10</Tab>
<Tab tab="tab11" value:bind="$page.tab">Tab 11</Tab>
<Tab tab="tab12" value:bind="$page.tab" disabled>Tab 12</Tab>
- <Tab tab="tab13" value:bind="$page.tab" default>Tab 13</Tab>
+ <Tab tab="tab13" value:bind="$page.tab">Tab 13</Tab>
<Tab tab="tab14" value:bind="$page.tab">Tab 14</Tab>
<Tab tab="tab15" value:bind="$page.tab">Tab 15</Tab>
<Tab tab="tab16" value:bind="$page.tab" disabled>Tab 16</Tab>
| 2 |
diff --git a/tests/js/utils.js b/tests/js/utils.js @@ -48,7 +48,7 @@ const allCoreStores = [
coreUser,
coreWidgets,
];
-const allModules = [
+const allCoreModules = [
modulesAdSense,
modulesAnalytics,
modulesOptimize,
@@ -291,7 +291,7 @@ export const provideModuleRegistrations = ( registry, extraData = [] ) => {
} );
Modules.registerModule = testRegisterModule;
- allModules.forEach( ( { registerModule } ) => registerModule?.( Modules ) );
+ allCoreModules.forEach( ( { registerModule } ) => registerModule?.( Modules ) );
// Register any additional modules provided.
Object.entries( extraDataBySlug )
.filter( ( [ slug ] ) => registeredModules[ slug ] !== true )
@@ -348,7 +348,7 @@ export const freezeFetch = ( matcher ) => {
export const registerAllStoresOn = ( registry ) => {
[
...allCoreStores,
- ...allModules,
+ ...allCoreModules,
].forEach( ( { registerStore } ) => registerStore?.( registry ) );
};
| 10 |
diff --git a/test/internal/connector.test.js b/test/internal/connector.test.js * See the License for the specific language governing permissions and
* limitations under the License.
*/
-var DummyChannel = require('../../lib/v1/internal/ch-dummy.js');
-var connect = require("../../lib/v1/internal/connector.js").connect;
-describe('connector', function() {
+import * as DummyChannel from "../../src/v1/internal/ch-dummy";
+import {connect} from "../../src/v1/internal/connector";
- it('should read/write basic messages', function(done) {
+describe('connector', () => {
+
+ it('should read/write basic messages', done => {
// Given
- var conn = connect("bolt://localhost")
+ const conn = connect("bolt://localhost");
// When
conn.initialize("mydriver/0.0.0", {scheme: "basic", principal: "neo4j", credentials: "neo4j"}, {
- onCompleted: function( msg ) {
+ onCompleted: msg => {
expect(msg).not.toBeNull();
conn.close();
done();
},
- onError: function(err) {
- console.log(err);
- }
+ onError: console.log
});
conn.sync();
});
- it('should retrieve stream', function(done) {
+
+ it('should retrieve stream', done => {
// Given
- var conn = connect("bolt://localhost")
+ const conn = connect("bolt://localhost");
// When
- var records = [];
+ const records = [];
conn.initialize("mydriver/0.0.0", {scheme: "basic", principal: "neo4j", credentials: "neo4j"});
conn.run("RETURN 1.0", {});
conn.pullAll({
- onNext: function( record ) {
+ onNext: record => {
records.push(record);
},
- onCompleted: function( tail ) {
+ onCompleted: () => {
expect(records[0][0]).toBe(1);
conn.close();
done();
@@ -60,13 +60,12 @@ describe('connector', function() {
conn.sync();
});
- it('should use DummyChannel to read what gets written', function(done) {
+ it('should use DummyChannel to read what gets written', done => {
// Given
- var observer = DummyChannel.observer;
- var conn = connect("bolt://localhost", {channel:DummyChannel.channel});
+ const observer = DummyChannel.observer;
+ const conn = connect("bolt://localhost", {channel: DummyChannel.channel});
// When
- var records = [];
conn.initialize("mydriver/0.0.0", {scheme: "basic", principal: "neo4j", credentials: "neo4j"});
conn.run("RETURN 1", {});
conn.sync();
@@ -74,15 +73,15 @@ describe('connector', function() {
done();
});
- it('should provide error message when connecting to http-port', function(done) {
+ it('should provide error message when connecting to http-port', done => {
// Given
- var conn = connect("bolt://localhost:7474", {encrypted:false});
+ const conn = connect("bolt://localhost:7474", {encrypted: false});
// When
conn.initialize("mydriver/0.0.0", {scheme: "basic", principal: "neo4j", credentials: "neo4j"}, {
- onCompleted: function( msg ) {
+ onCompleted: msg => {
},
- onError: function(err) {
+ onError: err => {
//only node gets the pretty error message
if (require('../../lib/v1/internal/ch-node.js').available) {
expect(err.message).toBe("Server responded HTTP. Make sure you are not trying to connect to the http endpoint " +
| 5 |
diff --git a/angular/projects/spark-angular/src/lib/components/sprk-accordion-item/sprk-accordion-item.component.ts b/angular/projects/spark-angular/src/lib/components/sprk-accordion-item/sprk-accordion-item.component.ts @@ -2,8 +2,8 @@ import { Component, Input, Output, OnInit, EventEmitter } from '@angular/core';
import * as _ from 'lodash';
import { toggleAnimations } from '../sprk-toggle/sprk-toggle-animations';
-// TODO Remove title, additionalHeadingClasses, iconTypeClosed, and
-// iconTypeOpen as part of Issue 3597
+// TODO Remove title, additionalHeadingClasses, iconTypeClosed,
+// iconTypeOpen, isActive as part of Issue 3597
@Component({
selector: 'sprk-accordion-item',
template: `
@@ -33,7 +33,7 @@ import { toggleAnimations } from '../sprk-toggle/sprk-toggle-animations';
<sprk-icon
[additionalClasses]="getIconClasses()"
- [iconName]="currentIconType"
+ [iconName]="currentIconName"
></sprk-icon>
</button>
@@ -169,10 +169,11 @@ export class SprkAccordionItemComponent implements OnInit {
* @ignore
*/
accordion_controls_id = `accordionHeading__${this.componentID}`;
+ // TODO replace default value with iconNameClosed as part of issue 3597
/**
* @ignore
*/
- public currentIconType = this.iconTypeClosed;
+ public currentIconName = this.iconTypeClosed;
/**
* @ignore
*/
@@ -189,12 +190,12 @@ export class SprkAccordionItemComponent implements OnInit {
if (this.isOpen) {
this.animState = 'open';
// TODO - Remove iconTypeOpen as part of Issue 3597
- this.currentIconType = this.iconNameOpen || this.iconTypeOpen;
+ this.currentIconName = this.iconNameOpen || this.iconTypeOpen;
this.iconStateClass = 'sprk-c-Icon--open';
} else {
this.animState = 'closed';
// TODO - Remove iconTypeClosed as part of Issue 3597
- this.currentIconType = this.iconNameClosed || this.iconTypeClosed;
+ this.currentIconName = this.iconNameClosed || this.iconTypeClosed;
this.iconStateClass = '';
}
}
| 10 |
diff --git a/lambda/export/package-lock.json b/lambda/export/package-lock.json }
},
"node_modules/minimist": {
- "version": "1.2.5",
- "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz",
- "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw=="
+ "version": "1.2.6",
+ "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz",
+ "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q=="
},
"node_modules/punycode": {
"version": "1.3.2",
}
},
"minimist": {
- "version": "1.2.5",
- "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz",
- "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw=="
+ "version": "1.2.6",
+ "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz",
+ "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q=="
},
"punycode": {
"version": "1.3.2",
| 3 |
diff --git a/magda-web-client/src/Pages/HomePageComponents/Stories.js b/magda-web-client/src/Pages/HomePageComponents/Stories.js @@ -4,6 +4,7 @@ import { Medium, Small } from "../../UI/Responsive";
import "./Stories.css";
import downArrow from "../../assets/downArrow-homepage-more-stories.svg";
import { CSSTransitionGroup } from "react-transition-group";
+import { config } from "../../config";
class Stories extends Component {
constructor(props) {
@@ -14,6 +15,9 @@ class Stories extends Component {
}
render() {
+ if (!config || !config.homePageConfig || !config.homePageConfig.stories || !config.homePageConfig.stories.length) {
+ return null;
+ }
return (
<div className="homepage-stories">
<Small>
| 11 |
diff --git a/articles/tutorials/using-auth0-with-multi-tenant-apps.md b/articles/tutorials/using-auth0-with-multi-tenant-apps.md @@ -6,7 +6,7 @@ toc: true
# Using Auth0 with Multi-Tenant Applications
-Multi-tenancy refers to the software architecture principle where a single instance of software runs on a server that is accessible to multiple groups of users (each referred to as a __tenant__ and represented in Auth0 as a __Client__).
+Multi-tenancy refers to the software architecture principle where a single instance of software runs on a server that is accessible to multiple groups of users.
By using a single Auth0 account for all of your applications, you maintain simplicity in your architecture and are able to manage all of your authentication flows in one place. Only if you need to share access to the Management Dashboard with individual applications would you need to create multiple Auth0 accounts (see this [GitHub repo](https://github.com/auth0/auth0-multitenant-spa-api-sample) for a sample application using this architecture scheme).
| 2 |
diff --git a/packages/node_modules/@node-red/editor-client/src/sass/library.scss b/packages/node_modules/@node-red/editor-client/src/sass/library.scss }
.red-ui-clipboard-dialog-tab-clipboard {
-
-
textarea {
+ color: $secondary-text-color-active !important;
resize: none;
width: 100%;
border-radius: 4px;
| 7 |
diff --git a/tests/test_ERC20Tokens.py b/tests/test_ERC20Tokens.py @@ -18,16 +18,7 @@ class TestERC20Token(unittest.TestCase):
def tearDown(self):
restore_snapshot(self.snapshot)
- """
- Test the basic ERC20 Token contract
- TODO: Add more edge case tests. Comment more. Still in progress.
- - check recent golem exploit involving addresses with trailing 0s?
- - http://vessenes.com/the-erc20-short-address-attack-explained/
- - Seems to be first account gives an allowance -> address with trailing 0s
- - That address then sends a transfer to himself/some other wallet (excluding his trailing 0s)
- - As long as there is enough balance in the first account (one that gave allowance) more than
- the allowance can be transferred
- """
+
@classmethod
def setUpClass(cls):
compiled = compile_contracts([ERC20Token_SOURCE])
@@ -150,9 +141,7 @@ class TestERC20FeeToken(unittest.TestCase):
def tearDown(self):
restore_snapshot(self.snapshot)
- """
- Test the basic ERC20 Fee Token contract
- """
+
@classmethod
def setUpClass(cls):
compiled = compile_contracts([ERC20FeeToken_SOURCE])
| 2 |
diff --git a/src/hooks/isProjectAllowed.js b/src/hooks/isProjectAllowed.js @@ -43,7 +43,10 @@ const checkOwner = context => {
const items = commons.getItems(context);
const inWhitelist = project => {
- if (ownerWhitelist.includes(project.ownerAddress.toLowerCase())) {
+ if (
+ ownerWhitelist.includes(project.ownerAddress.toLowerCase()) ||
+ project.status === 'proposed'
+ ) {
return;
}
| 11 |
diff --git a/form/index.js b/form/index.js @@ -43,31 +43,12 @@ class TonicForm extends Tonic {
return o
}
- validate () {
- const elements = this.getElements()
- let isValid = true
-
- for (const el of elements) {
- if (!el.setInvalid) continue
- if (el.setValid) el.setValid()
-
- for (const key in el.validity) {
- if (!el.validity[key]) {
- el.setInvalid(key)
- isValid = false
- }
- }
- }
-
- return isValid
- }
-
setData (data) {
- this.value = data
+ this.state = data
}
getData () {
- return this.value
+ return this.state
}
getElements () {
@@ -76,7 +57,7 @@ class TonicForm extends Tonic {
get value () {
const elements = this.getElements()
- const data = {}
+ const data = this.state
for (const element of elements) {
TonicForm.setPropertyValue(data, element.dataset.key, element.value)
@@ -96,6 +77,60 @@ class TonicForm extends Tonic {
element.value = value
}
+
+ this.state = data
+ }
+
+ validate () {
+ const elements = this.getElements()
+ let isValid = true
+
+ for (const el of elements) {
+ if (!el.setInvalid) continue
+ if (el.setValid) el.setValid()
+
+ let selector = ''
+
+ if (el.tagName === 'TONIC-INPUT') {
+ selector = 'input'
+ } else if (el.tagName === 'TONIC-TEXTAREA') {
+ selector = 'textarea'
+ } else if (el.tagName === 'TONIC-SELECT') {
+ selector = 'select'
+ } else if (el.tagName === 'TONIC-CHECKBOX') {
+ selector = 'checkbox'
+ } else if (el.tagName === 'TONIC-TOGGLE') {
+ selector = 'checkbox'
+ }
+
+ const input = selector ? el.querySelector(selector) : el
+ if (!input.checkValidity) continue
+
+ input.checkValidity()
+
+ for (const key in input.validity) {
+ if (!input.validity[key] || key === 'valid') continue
+
+ const customMessage = el.props.errorMessage || 'Required'
+ const message = key === 'customError' ? customMessage : key
+ el.setInvalid(message)
+ isValid = false
+ }
+ }
+
+ return isValid
+ }
+
+ connected () {
+ if (!this.props.fill) return
+
+ const elements = this.getElements()
+
+ for (const element of elements) {
+ const key = element.dataset.key
+ const value = TonicForm.getPropertyValue(this.state, key)
+ element.value = value || element.value || ''
+ }
}
render () {
| 7 |
diff --git a/modules/@apostrophecms/image-widget/views/widget.html b/modules/@apostrophecms/image-widget/views/widget.html srcset="{{ apos.image.srcset(attachment) }}"
src="{{ apos.attachment.url(attachment, { size: data.options.size or 'full' }) }}"
alt="{{ attachment._alt or '' }}"
+ width="{{ attachment.width }}"
+ height="{{ attachment.height }}"
{% if data.contextOptions and data.contextOptions.sizes %}
sizes="{{ data.contextOptions.sizes }}"
{% endif %}
| 12 |
diff --git a/services/acceptance/helpers.js b/services/acceptance/helpers.js @@ -39,7 +39,7 @@ class Helpers {
assertStatus(response, code) {
if (response.statusCode) {
- assert.equal(response.statusCode, code);
+ assert.equal(response.statusCode, code, 'expected: ' + code + ', received: ' + response.statusCode);
}
else {
throw response;
| 0 |
diff --git a/metaversefile-api.js b/metaversefile-api.js @@ -38,6 +38,7 @@ import * as procgen from './procgen/procgen.js';
import {getHeight} from './avatars/util.mjs';
import performanceTracker from './performance-tracker.js';
import debug from './debug.js';
+import * as sceneCruncher from './scene-cruncher.js';
const localVector = new THREE.Vector3();
const localVector2 = new THREE.Vector3();
@@ -391,6 +392,9 @@ metaversefile.setApi({
useAvatarSpriter() {
return avatarSpriter;
},
+ useSceneCruncher() {
+ return sceneCruncher;
+ },
usePostProcessing() {
return postProcessing;
},
| 0 |
diff --git a/package.json b/package.json {
"name": "prettier-atom",
"main": "./dist/main.js",
- "version": "0.35.0",
+ "version": "0.35.1",
"description": "Atom plugin for formatting JavaScript using prettier with (optional) prettier-eslint integration",
"keywords": [
"atom",
| 6 |
diff --git a/assets/js/components/setup/CompatibilityChecks/index.js b/assets/js/components/setup/CompatibilityChecks/index.js /**
* WordPress dependencies
*/
-import { Fragment } from '@wordpress/element';
import { __ } from '@wordpress/i18n';
/**
@@ -60,7 +59,7 @@ export default function CompatibilityChecks( { children, ...props } ) {
let inProgressFeedback;
if ( error ) {
- ctaFeedback = <Fragment>
+ ctaFeedback = (
<div className="googlesitekit-setup-compat mdc-layout-grid mdc-layout-grid--align-left">
<div className="googlesitekit-setup__warning">
<Warning />
@@ -71,7 +70,7 @@ export default function CompatibilityChecks( { children, ...props } ) {
</div>
{ error && <CompatibilityErrorNotice error={ error } /> }
</div>
- </Fragment>;
+ );
}
if ( ! complete ) {
| 14 |
diff --git a/src/Header.jsx b/src/Header.jsx @@ -376,7 +376,13 @@ export default function Header({
}, []);
useEffect(() => {
localPlayer.addEventListener('wearupdate', e => {
- setWearActions(_getWearActions());
+ const wearActions = _getWearActions();
+ setWearActions(wearActions);
+
+ const mouseDomEquipmentHoverObject = game.getMouseDomEquipmentHoverObject();
+ if (mouseDomEquipmentHoverObject && !wearActions.some(wearAction => action.type === 'wear' && action.instanceId === mouseDomEquipmentHoverObject.instanceId)) {
+ game.setMouseDomEquipmentHoverObject(null);
+ }
});
}, []);
useEffect(() => {
@@ -684,7 +690,19 @@ export default function Header({
</div> */}
{wearActions.map((wearAction, i) => {
return (
- <div className={styles.equipment} key={i}>
+ <div
+ className={styles.equipment}
+ key={i}
+ onMouseEnter={e => {
+ const app = metaversefile.getAppByInstanceId(wearAction.instanceId);
+ game.setMouseHoverObject(null);
+ const physicsId = app.getPhysicsObjects()[0]?.physicsId;
+ game.setMouseDomEquipmentHoverObject(app, physicsId);
+ }}
+ onMouseLeave={e => {
+ game.setMouseDomEquipmentHoverObject(null);
+ }}
+ >
<img src="images/webpencil.svg" className={classnames(styles.background, styles.violet)} />
<img src="images/flower.png" className={styles.icon} />
<div className={styles.name}>{wearAction.instanceId}</div>
| 0 |
diff --git a/packages/app/src/components/PageEditor.tsx b/packages/app/src/components/PageEditor.tsx @@ -535,7 +535,7 @@ const PageEditor = React.memo((): JSX.Element => {
isOpen={conflictDiffModalStatus?.isOpened}
onClose={() => closeConflictDiffModal()}
markdownOnEdit={markdownToPreview}
- optionsToSave={undefined} // replace undefined
+ optionsToSave={optionsToSave}
afterResolvedHandler={afterResolvedHandler}
/>
</div>
| 12 |
diff --git a/jest/setup.js b/jest/setup.js @@ -62,11 +62,10 @@ jest.mock('../src/components/Icon/Expensicons', () => {
const reduce = require('underscore').reduce;
const Expensicons = jest.requireActual('../src/components/Icon/Expensicons');
return reduce(Expensicons, (prev, _curr, key) => {
+ // We set the name of the anonymous mock function here so we can dynamically build the list of mocks and access the
+ // "name" property to use in accessibility hints for element querying
const fn = () => '';
- Object.defineProperty(fn, 'name', {
- value: key,
- configurable: true,
- });
+ Object.defineProperty(fn, 'name', {value: key});
return {...prev, [key]: fn};
}, {});
});
| 7 |
diff --git a/project/BuildHashlink.xml b/project/BuildHashlink.xml <xml>
-
- <set name="PLATFORM" value="android-16" if="android" unless="HXCPP_ARM64 || HXCPP_X86_64" />
- <set name="PLATFORM" value="android-21" if="android HXCPP_ARM64" />
- <set name="PLATFORM" value="android-21" if="android HXCPP_X86_64" />
+ <set name="PLATFORM" value="android-21" if="android" />
<set name="HXCPP_CPP11" value="1" />
<include name="${HXCPP}/build-tool/BuildCommon.xml" />
| 12 |
diff --git a/js/reveal.js b/js/reveal.js }
function loadScript( s ) {
- head.ready( s.src.match( /([\w\d_\-]*)\.?js$|[^\\\/]*$/i )[0], function() {
+ head.ready( s.src.match( /([\w\d_\-]*)\.?js(\?[\w\d.=&]*)?$|[^\\\/]*$/i )[0], function() {
// Extension may contain callback functions
if( typeof s.callback === 'function' ) {
s.callback.apply( this );
| 11 |
diff --git a/config/initializers/zz_patch_reconnect.rb b/config/initializers/zz_patch_reconnect.rb module PostgreSQLAutoReconnectionPatch
# Queries the database and returns the results in an Array-like object
def query(sql, name = nil) #:nodoc:
- with_auto_reconnect(sql, name) do
+ with_auto_reconnect do
super
end
end
| 2 |
diff --git a/userscript.user.js b/userscript.user.js @@ -64176,7 +64176,8 @@ var $$IMU_EXPORT$$;
if (zindex === "auto") {
if (el.parentElement) {
- return get_zindex(el.parentElement) + 0.001; // hack: child elements appear above parent elements
+ return get_zindex(el.parentElement);// + 0.001; // hack: child elements appear above parent elements
+ // don't use the above hack, it breaks z-ordering, the indexOf thing works already
} else {
return 0;
}
| 1 |
diff --git a/src/client/js/components/Admin/ImportData/GrowiArchive/ErrorViewer.jsx b/src/client/js/components/Admin/ImportData/GrowiArchive/ErrorViewer.jsx @@ -20,7 +20,7 @@ class ErrorViewer extends React.Component {
}
return (
- <Modal isOpen={this.props.isOpen} toggle={this.props.onClose}>
+ <Modal isOpen={this.props.isOpen} toggle={this.props.onClose} size="lg">
<ModalHeader tag="h4" toggle={this.props.onClose} className="bg-danger text-light">
Errors
</ModalHeader>
| 4 |
diff --git a/README.md b/README.md @@ -78,8 +78,8 @@ brew cask install lottie
```
### After installing
-- **Windows:** Go to Edit > Preferences > General > and check on "Allow Scripts to Write Files and Access Network"
-- **Mac:** Go to Adobe After Effects > Preferences > General > and check on "Allow Scripts to Write Files and Access Network"
+- **Windows:** Go to Edit > Preferences > Scripting & Expressions... > and check on "Allow Scripts to Write Files and Access Network"
+- **Mac:** Go to Adobe After Effects > Preferences > Scripting & Expressions... > and check on "Allow Scripts to Write Files and Access Network"
# HTML player installation
```bash
| 3 |
diff --git a/examples/SlickGoTo.js b/examples/SlickGoTo.js @@ -8,22 +8,56 @@ export default class SlickGoTo extends Component {
this.changeHandler = this.changeHandler.bind(this)
this.changeSlider = this.changeSlider.bind(this)
this.state = {
- slideIndex: 0
+ slideIndex: 0,
+ updateCount: 0,
}
}
changeHandler(e) {
- this.refs.slider.slickGoTo(e.target.value, () => {
- this.setState({ slideIndex: e.target.value })
- })
+ this.sliderWrapper.slider.slickGoTo(e.target.value)
}
changeSlider(){
this.setState({
- slideIndex: this.refs.slider.innerSlider.state.currentSlide
+ slideIndex: this.sliderWrapper.slider.innerSlider.state.currentSlide
})
}
+ changeUpdateCount(e) {
+ this.setState({
+ updateCount: this.state.updateCount + 1
+ }, () => console.log(`test state after update: ${this.state.updateCount}`))
+ }
+
+ render() {
+ return (
+ <div>
+ <h2>Slick Go To</h2>
+ <input onChange={this.changeHandler} value={this.state.slideIndex}
+ type='range' min={0} max={3} />
+ <SliderWrapper
+ ref={sliderWrapper => this.sliderWrapper = sliderWrapper}
+ beforeChange={this.changeUpdateCount.bind(this)}
+ afterChange={this.changeSlider.bind(this)}
+ slideIndex={this.state.slideIndex}
+ updateCount={this.state.updateCount}
+ />
+ </div>
+ );
+ }
+}
+
+class SliderWrapper extends React.Component {
+
+ shouldComponentUpdate(nextProps, nextState) {
+ // certain condition here, perhaps comparison between this.props and nextProps
+ // and if you want to update slider on setState in parent of this, return true, otherwise return false
+ if (this.props.updateCount !== nextProps.updateCount) {
+ return false
+ }
+ return true
+ }
+
render() {
const settings = {
dots: false,
@@ -31,21 +65,16 @@ export default class SlickGoTo extends Component {
speed: 500,
slidesToShow: 1,
slidesToScroll: 1,
- afterChange: this.changeSlider,
- ...this.props
+ afterChange: this.props.afterChange,
+ beforeChange: this.props.beforeChange,
};
return (
- <div>
- <h2>Slick Go To</h2>
- <input onChange={this.changeHandler} value={this.state.slideIndex}
- type='range' min={0} max={3} />
- <Slider ref='slider' {...settings}>
+ <Slider ref={slider => this.slider = slider} {...settings}>
<div><img src={baseUrl + '/abstract01.jpg'} /></div>
<div><img src={baseUrl + '/abstract02.jpg'} /></div>
<div><img src={baseUrl + '/abstract03.jpg'} /></div>
<div><img src={baseUrl + '/abstract04.jpg'} /></div>
</Slider>
- </div>
- );
+ )
}
}
\ No newline at end of file
| 3 |
diff --git a/src/components/DropdownItem.js b/src/components/DropdownItem.js import PropTypes from 'prop-types';
import {DropdownItem as RSDropdownItem} from 'reactstrap';
+import Link from '../private/Link';
+import Button from './Button';
const DropdownItem = props => {
const {
children,
+ href,
...otherProps
} = props;
- return (<RSDropdownItem {...otherProps}>
+ return (
+ <RSDropdownItem
+ onClick={() => {
+ if (props.setProps) {
+ props.setProps({
+ n_clicks: props.n_clicks + 1,
+ n_clicks_timestamp: Date.now()
+ })
+ }
+ if (props.fireEvent)
+ props.fireEvent({event: 'click'});
+ }
+ }
+ tag={href ? Link : 'button'}
+ href={href}
+ {...otherProps}>
{children}
- </RSDropdownItem>);
+ </RSDropdownItem>
+ );
}
DropdownItem.propTypes = {
@@ -57,7 +76,42 @@ DropdownItem.propTypes = {
/**
* Link for the menu item
*/
- href: PropTypes.string
+ href: PropTypes.string,
+
+ /**
+ * If true, the browser will treat this as an external link,
+ * forcing a page refresh at the new location. If false,
+ * this just changes the location without triggering a page
+ * refresh. Use this if you are observing dcc.Location, for
+ * instance. Defaults to true for absolute URLs and false
+ * otherwise.
+ */
+ external_link: PropTypes.bool,
+
+ /**
+ * An integer that represents the number of times
+ * that this element has been clicked on.
+ */
+ n_clicks: PropTypes.number,
+
+ /**
+ * An integer that represents the time (in ms since 1970)
+ * at which n_clicks changed. This can be used to tell
+ * which button was changed most recently.
+ */
+ n_clicks_timestamp: PropTypes.number,
+
+ /**
+ * A callback for firing events to dash.
+ */
+ fireEvent: PropTypes.func,
+
+ dashEvents: PropTypes.oneOf(['click'])
+};
+
+DropdownItem.defaultProps = {
+ n_clicks: 0,
+ n_clicks_timestamp: -1
};
export default DropdownItem;
| 11 |
diff --git a/magda-search-api/src/main/scala/au/csiro/data61/magda/search/elasticsearch/FacetDefinition.scala b/magda-search-api/src/main/scala/au/csiro/data61/magda/search/elasticsearch/FacetDefinition.scala @@ -124,7 +124,7 @@ trait FacetDefinition {
* This function will duplicate the only element in a Seq if its size is 1
* Luckily elasticsearch will ignore any duplicate items in `include` or `exclude`
*/
- def atLeast2Items(items: Seq[String]): Seq[String] = if(items.size == 1) items ++ items else items
+ def fixArrayBug(items: Seq[String]): Seq[String] = if(items.size == 1) items ++ items else items
}
object FacetDefinition {
@@ -151,7 +151,7 @@ class PublisherFacetDefinition(implicit val config: Config) extends FacetDefinit
if(inputOptions.size > 0) {
// --- this if block cannot be combined with the one below
// --- otherwise `aggs` only get a outdated copy
- otherOptionsAgg = otherOptionsAgg.exclude(atLeast2Items(inputOptions))
+ otherOptionsAgg = otherOptionsAgg.exclude(fixArrayBug(inputOptions))
}
var aggs = List(otherOptionsAgg)
@@ -159,7 +159,7 @@ class PublisherFacetDefinition(implicit val config: Config) extends FacetDefinit
if(inputOptions.size > 0) {
aggs = termsAggregation("terms-selected-options")
.size(inputOptions.size)
- .include(atLeast2Items(inputOptions))
+ .include(fixArrayBug(inputOptions))
.field("publisher.name.keyword")
.showTermDocCountError(true)
.subAggregations(
@@ -233,7 +233,7 @@ class FormatFacetDefinition(implicit val config: Config) extends FacetDefinition
.size(limit)
.field("distributions.format.keyword_lowercase")
.showTermDocCountError(true)
- .exclude(atLeast2Items("" :: inputOptions))
+ .exclude(fixArrayBug("" :: inputOptions))
.subAggregations {
reverseNestedAggregation("reverse")
}
@@ -245,8 +245,8 @@ class FormatFacetDefinition(implicit val config: Config) extends FacetDefinition
aggs = termsAggregation("terms-selected-options")
.size(inputOptions.size)
- .include(atLeast2Items(inputOptions))
- .exclude(atLeast2Items(Seq("")))
+ .include(fixArrayBug(inputOptions))
+ .exclude(fixArrayBug(Seq("")))
.field("distributions.format.keyword_lowercase")
.showTermDocCountError(true)
.subAggregations {
| 10 |
diff --git a/src/components/StakingHierarchy.js b/src/components/StakingHierarchy.js @@ -21,9 +21,9 @@ const Container = styled.div`
border-image: linear-gradient(
to bottom,
#f2bb2f 5%,
- #49de96 25%,
- #a9d3f2 50%,
- #d6bbb9 75%
+ #49de96 30%,
+ #a9d3f2 55%,
+ #d6bbb9 80%
)
1 100%;
border-left: solid 4px;
| 7 |
diff --git a/sounds.js b/sounds.js @@ -26,6 +26,7 @@ const soundFiles = {
menuDone: _getSoundFiles(/OOT_Dialogue_Done/),
menuClick: _getSoundFiles(/ff8_click/),
menuOk: _getSoundFiles(/ff8_menu_ok/),
+ menuSelect: _getSoundFiles(/PauseMenu_Select/),
menuBack: _getSoundFiles(/ff8_menu_back/),
menuLeft: _getSoundFiles(/PauseMenu_Turn_Left/),
menuRight: _getSoundFiles(/PauseMenu_Turn_Right/),
| 0 |
diff --git a/html/settings/_settings.scss b/html/settings/_settings.scss @@ -1227,7 +1227,7 @@ $sprk-error-icon-size: 1.25rem !default;
///
/// The color of the helper text for Inputs.
-$sprk-helper-color: $sprk-black-tint-75 !default;
+$sprk-helper-color: $sprk-black-tint-70 !default;
/// The font size of the helper text for Inputs.
$sprk-helper-font-size: 0.8125rem !default;
/// The font family of the helper text for Inputs.
| 3 |
diff --git a/js/ui/views/trackerlist-sliding-subview.es6.js b/js/ui/views/trackerlist-sliding-subview.es6.js @@ -89,7 +89,7 @@ TrackerList.prototype = $.extend({},
resetTrackersStats: function () {
this.model.fetch({resetTrackersData: true}).then(() => {
- console.log('TODO: pick up here on Monday, re-render lists')
+ this.updateList()
})
}
}
| 3 |
diff --git a/examples/puppeteer_crawler.js b/examples/puppeteer_crawler.js @@ -69,17 +69,14 @@ Apify.main(async () => {
// Store the results to the default dataset.
await Apify.pushData(data);
- // Find the link to the next page using Puppeteer functions.
- let nextHref;
- try {
- nextHref = await page.$eval('.morelink', el => el.href);
- } catch (err) {
- console.log(`${request.url} is the last page!`);
- return;
- }
-
- // Enqueue the link to the RequestQueue
- await requestQueue.addRequest(new Apify.Request({ url: nextHref }));
+ // Find a link to the next page and enqueue it if it exists.
+ const infos = await Apify.utils.puppeteer.enqueueLinks({
+ page,
+ requestQueue,
+ selector: '.morelink',
+ });
+
+ if (infos.length === 0) console.log(`${request.url} is the last page!`);
},
// This function is called if the page processing failed more than maxRequestRetries+1 times.
| 7 |
diff --git a/src/init.js b/src/init.js +//@flow
import initGunDB from './lib/gundb/gundb'
-import GoodWallet from './lib/wallet/GoodWallet'
+import goodWallet from './lib/wallet/GoodWallet'
import userStorage from './lib/gundb/UserStorage'
+declare var Rollbar
export const init = async () => {
- return await Promise.all([GoodWallet.ready, userStorage.ready]).then(([wallet, storage]) => {
- global.wallet = GoodWallet
+ return await Promise.all([goodWallet.ready, userStorage.ready]).then(([wallet, storage]) => {
+ global.wallet = goodWallet
+ Rollbar.configure({
+ payload: {
+ person: {
+ id: goodWallet.getAccountForType('login')
+ }
+ }
+ })
})
}
| 0 |
diff --git a/source/offline/Database.js b/source/offline/Database.js @@ -31,6 +31,11 @@ class Database {
request.onsuccess = () => {
const db = request.result;
db.onversionchange = () => this.needsUpdate();
+ db.onclose = () => {
+ if (this._db === _db) {
+ this._db = null;
+ }
+ };
resolve(db);
};
request.onerror = () => reject(request.errorCode);
| 9 |
diff --git a/services/DemoDataGeneratorService.php b/services/DemoDataGeneratorService.php @@ -198,6 +198,9 @@ class DemoDataGeneratorService extends BaseService
$stockService->AddProduct(23, 1, date('Y-m-d', strtotime('+2 days')), StockService::TRANSACTION_TYPE_PURCHASE, date('Y-m-d', strtotime('-40 days')), $this->RandomPrice());
$stockService->AddProduct(23, 1, date('Y-m-d', strtotime('+2 days')), StockService::TRANSACTION_TYPE_PURCHASE, date('Y-m-d', strtotime('-50 days')), $this->RandomPrice());
$stockService->AddMissingProductsToShoppingList();
+ $stockService->OpenProduct(6, 1);
+ $stockService->OpenProduct(21, 1);
+ $stockService->OpenProduct(22, 1);
$choresService = new ChoresService();
$choresService->TrackChore(1, date('Y-m-d H:i:s', strtotime('-5 days')));
| 0 |
diff --git a/public/index.html b/public/index.html <html lang="en">
<script>
!function(a,t){window.moufette=t;var e=a.getElementsByTagName("script"),n=[];for(var i in e){var o=e[i].src;o&&0<o.indexOf("moufette.js")&&n.push(e[i])}n[n.length-1],window.moufette.init=function(t,o){!function(t,e,n){var i=new Date;i.setTime(i.getTime()+24*n*60*60*1e3);var o="expires="+i.toUTCString();a.cookie=t+"="+e+";"+o+";path=/"}("moufette_token",t,30,o.api_host),window.addEventListener("DOMContentLoaded",function(){var t,e,n,i;(t=a.createElement("div")).setAttribute("id","moufette-widget"),a.body.appendChild(t),e=o.api_host+"/widget/main.js",(i=a.createElement("script")).setAttribute("type","text/javascript"),i.setAttribute("src",e),i.readyState?i.onreadystatechange=function(){"complete"!=this.readyState&&"loaded"!=this.readyState||n()}:i.onload=n,(a.getElementsByTagName("head")[0]||a.documentElement).appendChild(i)});var e=window.moufetteConfig||{};e.api_host=o.api_host,e.token=t,window.moufetteConfig=e}}(document,window.moufette||{});
- moufette.init("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE1OTc3NTc4NjF9.y_rSQWY5cINMSBTHSPUhuIkrx6GMTI7fbL3J7wPUqAM", { api_host: "http://localhost:3000" })
+ moufette.init("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE1OTc3NTc4NjF9.y_rSQWY5cINMSBTHSPUhuIkrx6GMTI7fbL3J7wPUqAM", { api_host: "https://moufette.universaldatatool.com" })
</script>
<head>
<meta charset="utf-8" />
| 14 |
diff --git a/README.md b/README.md @@ -13,11 +13,63 @@ Atena is an initiative of the impulse in collaboration with several Impulsers, w
## Setup
-- Install [Mongodb](https://www.mongodb.com/)
-- Create your .env file using .env.example model
+A step-by-step of the minimal setup you need to get a Atena running.
+
+### Initial configuration
+
+- Install [Mongodb](https://docs.mongodb.com/manual/installation/)
- Create your slack app - [Using ngrok to develop locally for Slack](https://api.slack.com/tutorials/tunneling-with-ngrok)
-- Install the requirements: `yarn`
-- Run the server using the following command: `yarn start:dev`
+
+### Developing
+
+- Make `fork` for your user account, then `clone`
+```sh
+> git clone https://github.com/[your account]/atena
+```
+
+- Navigate to the destination folder
+```sh
+> cd atena/
+```
+
+- Install `yarn` from npm (global is optional)
+```sh
+> npm i yarn -g
+```
+
+- Install repositories using `yarn`
+```sh
+> yarn -i
+```
+
+- Add remote reference
+```sh
+> git remote add upstream https://github.com/impulsonetwork/atena
+```
+- Create your .env file using .env.example model
+```
+PORT=4390
+SLACK_SIGNIN_EVENTS=
+SLACK_TOKEN=
+GA=
+MONGODB_URI=mongodb://localhost/atena
+CHANNELS=CCWSMJZ6U CCXCXJWBW
+```
+
+### Running
+- Run the server using the following command:
+```sh
+> yarn start:dev
+```
+
+## Contributing
+
+When contributing to this repository, please first discuss the change you wish to make via issue, email, or any other method with the owners of this repository before making a change.
+
+### Pull Request Process
+
+1. Ensure any install or build dependencies are removed before the end of the layer when doing a build.
+1. You may merge the Pull Request in once you have the sign-off of two other developers, or if you do not have permission to do that, you may request the second reviewer to merge it for you.
## Community
@@ -41,4 +93,4 @@ This project exists thanks to all the people who contribute:
## License
-MIT
+This project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details.
\ No newline at end of file
| 3 |
diff --git a/app/models/label/LabelTable.scala b/app/models/label/LabelTable.scala @@ -111,7 +111,7 @@ object LabelTable {
userId: String, username: String,
timestamp: Option[java.sql.Timestamp],
labelTypeKey:String, labelTypeValue: String, severity: Option[Int],
- temporary: Boolean, description: Option[String])
+ temporary: Boolean, description: Option[String], tags: String)
implicit val labelLocationConverter = GetResult[LabelLocation](r =>
LabelLocation(r.nextInt, r.nextInt, r.nextString, r.nextString, r.nextFloat, r.nextFloat))
@@ -346,6 +346,7 @@ object LabelTable {
| lb1.label_id = lb_big.label_id and at.user_id = u.user_id and lb1.label_id = lp.label_id
| ORDER BY lb1.label_id DESC""".stripMargin
)
+
selectQuery(labelId).list.map(label => LabelMetadata.tupled(label)).head
}
@@ -375,32 +376,29 @@ object LabelTable {
"label_type_value" -> labelMetadata.labelTypeValue,
"severity" -> labelMetadata.severity,
"temporary" -> labelMetadata.temporary,
- //this one is different because we're pulling from the tags and label_tags databases
"tags" -> getTagsFromLabelId(labelMetadata.labelId),
"description" -> labelMetadata.description
)
}
- //seperate sql request for getting tags, gets all the tags that correspond to the label Id.
+ /**
+ * This method returns a string with all the tags associated with a label
+ *
+ * @param userId Label id
+ * @return A string with all the tags asscociated with a label
+ */
def getTagsFromLabelId(labelId: Int): String = db.withSession { implicit session =>
val getTagsQuery = Q.query[Int, (String)](
- """SELECT tag FROM sidewalk.tag
- WHERE tag.tag_id IN (
- SELECT tag_id FROM sidewalk.label_tag
- WHERE label_tag.label_id = ?
- )""".stripMargin
+ """SELECT tag
+ |FROM sidewalk.tag
+ |WHERE tag.tag_id IN
+ |(
+ | SELECT tag_id
+ | FROM sidewalk.label_tag
+ | WHERE label_tag.label_id = ?
+ |)""".stripMargin
)
- var tags = getTagsQuery(labelId).list
- var str = ""
- var isFirst = true
- for(tag <- tags){
- if(!isFirst){
- str += ", "
- }
- isFirst = false;
- str += tag
- }
- return str
+ getTagsQuery(labelId).list.mkString(", ")
}
/*
| 1 |
diff --git a/app/helpers/frontend_config_helper.rb b/app/helpers/frontend_config_helper.rb @@ -4,7 +4,7 @@ module FrontendConfigHelper
include AvatarHelper
include FullstoryHelper
- UPGRADE_LINK_ACCOUNT = 'Professional'.freeze
+ UPGRADE_LINK_ACCOUNTS = ['personal30', 'basic', 'student-engine', 'professional'].freeze
def frontend_config_hash(user = current_user)
config = {
@@ -91,6 +91,6 @@ module FrontendConfigHelper
end
def show_account_update_url(user)
- user && user.account_type.casecmp(UPGRADE_LINK_ACCOUNT).zero?
+ user && UPGRADE_LINK_ACCOUNTS.include?(user.account_type.downcase)
end
end
| 3 |
diff --git a/src/content/en/agencies/js/directory.js b/src/content/en/agencies/js/directory.js @@ -564,7 +564,7 @@ var initializeDirectory = function(requestUrl, alphabeticalSortKey) {
var dropdownIcon = span.cloneNode(false);
dropdownIcon.className = 'material-icons';
- dropdownIcon.innerHTML = 'arrow_drop_down';
+ dropdownIcon.textContent = 'arrow_drop_down';
filterTitleEl.appendChild(dropdownIcon);
filterEl.appendChild(filterTitleEl);
| 14 |
diff --git a/.babelrc b/.babelrc ],
"env": {
"amd": {
- "plugins": [
- "import-noop"
- ]
+ "plugins": ["import-noop"]
},
"esm": {
"presets": [
]
},
"commonjs": {
- "plugins": [
- "import-noop"
- ]
+ "plugins": ["import-noop"]
},
"test": {
- "plugins": [
- "istanbul"
- ]
+ "plugins": ["istanbul"]
}
},
- "ignore": [
- "preset/**"
- ]
+ "ignore": ["preset/**"]
}
\ No newline at end of file
| 13 |
diff --git a/apps/viewer/init.js b/apps/viewer/init.js @@ -246,19 +246,19 @@ function initUIcomponents(){
value:'share',
callback:shareURL
},
- {
- icon: 'bug_report',
- title: 'Bug Report',
- value: 'bugs',
- type: 'btn',
- callback: ()=>{window.open('https://goo.gl/forms/mgyhx4ADH0UuEQJ53','_blank').focus()}
- },
{
icon:'view_carousel',
title:'Side By Side Viewer',
value:'dbviewers',
type:'check',
callback:toggleViewerMode
+ },
+ {
+ icon: 'bug_report',
+ title: 'Bug Report',
+ value: 'bugs',
+ type: 'btn',
+ callback: ()=>{window.open('https://goo.gl/forms/mgyhx4ADH0UuEQJ53','_blank').focus()}
}
]
| 5 |
diff --git a/src/createVelocityContext.js b/src/createVelocityContext.js @@ -69,7 +69,7 @@ module.exports = function createVelocityContext(request, options, payload) {
util: {
escapeJavaScript,
urlEncode: encodeURI,
- urlDecode: decodeURI,
+ urlDecode: x => decodeURIComponent(x.replace(/\+/g, ' ')),
base64Encode: x => new Buffer(x.toString(), 'binary').toString('base64'),
base64Decode: x => new Buffer(x.toString(), 'base64').toString('binary'),
parseJson: JSON.parse,
| 7 |
diff --git a/src/text/bitmaptext.js b/src/text/bitmaptext.js @@ -182,7 +182,7 @@ class BitmapText extends Renderable {
this._text = this.metrics.wordWrap(this._text, this.wordWrapWidth);
}
- this.getBounds().addBounds(this.measureText(), true);
+ this.getBounds().addBounds(this.metrics.measureText(this._text), true);
return this;
}
@@ -208,7 +208,7 @@ class BitmapText extends Renderable {
resize(scale) {
this.fontScale.set(scale, scale);
- this.getBounds().addBounds(this.measureText(), true);
+ this.getBounds().addBounds(this.metrics.measureText(this._text), true);
// clear the cache text to recalculate bounds
this.isDirty = true;
| 4 |
diff --git a/electron/index.js b/electron/index.js @@ -60,6 +60,11 @@ function createWindow () {
urls: ['ws://*/*', 'wss://*/*']
},
(details, callback) => {
+ if (!mainWindow) {
+ // There might be a split second where the user closes the app, so
+ // mainWindow is null, but there is still a network request done.
+ return;
+ }
details.requestHeaders.Origin = `parity://${mainWindow.id}.ui.parity`;
callback({ requestHeaders: details.requestHeaders }); // eslint-disable-line
}
| 1 |
diff --git a/lib/node_modules/@stdlib/_tools/docs/www/server/lib/main.js b/lib/node_modules/@stdlib/_tools/docs/www/server/lib/main.js var resolve = require( 'path' ).resolve;
var fastify = require( 'fastify' );
+var helmet = require( 'fastify-helmet' );
var isFunction = require( '@stdlib/assert/is-function' );
var cwd = require( '@stdlib/process/cwd' );
var copy = require( '@stdlib/utils/copy' );
@@ -95,6 +96,9 @@ function httpServer( options ) {
}
f = fastify( opts );
+ // Set basic security headers:
+ f.register( helmet );
+
// Register routes:
f.register( routes, {
'root': opts.root,
| 12 |
diff --git a/js/webcomponents/bisweb_viewerlayoutelement.js b/js/webcomponents/bisweb_viewerlayoutelement.js @@ -508,7 +508,12 @@ class ViewerLayoutElement extends HTMLElement {
this.context.textAlign="left";
this.context.fillStyle = "#dd7700";
- if (this.defaulttext.length<4) {
+ let ch=this.context.canvas.height;
+ let cw=this.context.canvas.width;
+ this.context.fillStyle = "#888888";
+ this.context.fillText(this.defaulttext,cw/2,ch/2);
+
+ /*if (this.defaulttext.length<4) {
this.context.fillText('Load (or Drag) an Image (.nii.gz or .nii)',20,100);
this.context.fillText(' or an application viewer file (.biswebstate)',20,140);
this.context.fillText('and it will appear here!',30,180);
@@ -517,7 +522,7 @@ class ViewerLayoutElement extends HTMLElement {
let cw=this.context.canvas.width;
this.context.fillStyle = "#888888";
this.context.fillText(this.defaulttext,cw/2,ch/2);
- }
+ }*/
});
| 2 |
diff --git a/packages/ember-engines/addon-test-support/index.js b/packages/ember-engines/addon-test-support/index.js import { getContext } from '@ember/test-helpers';
/**
- * Used to set up engine test. Must be called after one of the `ember-qunit`
+ * Used to set up engine for use. Must be called after one of the `ember-qunit`
* `setup*Test()` methods.
*
* Responsible for:
| 7 |
diff --git a/packages/app/test/integration/service/v5.non-public-page.test.ts b/packages/app/test/integration/service/v5.non-public-page.test.ts @@ -193,6 +193,7 @@ describe('PageService page operations with non-public pages', () => {
const pageIdDelete1 = new mongoose.Types.ObjectId();
const pageIdDelete2 = new mongoose.Types.ObjectId();
const pageIdDelete3 = new mongoose.Types.ObjectId();
+ const pageIdDelete4 = new mongoose.Types.ObjectId();
await Page.insertMany([
{
_id: pageIdDelete1,
@@ -203,7 +204,7 @@ describe('PageService page operations with non-public pages', () => {
},
{
_id: pageIdDelete2,
- path: '/npdel2_ug1',
+ path: '/npdel2_ug',
grant: Page.GRANT_USER_GROUP,
grantedGroup: groupIdA,
status: Page.STATUS_PUBLISHED,
@@ -212,13 +213,36 @@ describe('PageService page operations with non-public pages', () => {
},
{
_id: pageIdDelete3,
- path: '/npdel3_ug1',
+ path: '/npdel3_top',
grant: Page.GRANT_USER_GROUP,
grantedGroup: groupIdA,
status: Page.STATUS_PUBLISHED,
isEmpty: false,
parent: rootPage._id,
},
+ {
+ _id: pageIdDelete4,
+ path: '/npdel3_top/npdel4_ug',
+ grant: Page.GRANT_USER_GROUP,
+ grantedGroup: groupIdA,
+ status: Page.STATUS_PUBLISHED,
+ isEmpty: false,
+ parent: pageIdDelete3._id,
+ },
+ {
+ path: '/npdel3_top/npdel4_ug',
+ grant: Page.GRANT_RESTRICTED,
+ status: Page.STATUS_PUBLISHED,
+ isEmpty: false,
+ },
+ {
+ path: '/npdel3_top/npdel4_ug/npdel5_ug',
+ grant: Page.GRANT_USER_GROUP,
+ grantedGroup: groupIdA,
+ status: Page.STATUS_PUBLISHED,
+ isEmpty: false,
+ parent: pageIdDelete4._id,
+ },
]);
/**
@@ -390,8 +414,8 @@ describe('PageService page operations with non-public pages', () => {
test('should be able to delete', async() => {});
});
describe('Delete single page with grant USER_GROUP', () => {
- test('should be able to delete by a user who belongs to the group', async() => {
- const path = '/npdel2_ug1';
+ test('should be able to delete', async() => {
+ const path = '/npdel2_ug';
const page = await Page.findOne({ path, grantedGroup: groupIdA });
expect(page).toBeTruthy();
@@ -405,8 +429,7 @@ describe('PageService page operations with non-public pages', () => {
});
});
describe('Delete multiple pages with grant USER_GROUP', () => {
- test('should NOT be able to delete by a user who does NOT belong to the group', async() => {});
- test('should be able to delete by a user who belongs to the group', async() => {});
+ test('should be able to delete all descendants except page with GRANT_RESTRICTED', async() => {});
});
});
| 6 |
diff --git a/src/library/modules/TsunDBSubmission.js b/src/library/modules/TsunDBSubmission.js if (isYasenNotFound && cutinType[1] in shipIndexListSpecial) {
const hpThreshold = [400, 401].includes(cutinType[1]) ? 0.5 : 0.25;
let isPartnerShipIncapble = false;
- if (num === 0) for (let idxk = 0; idxk < shipIndexListSpecial[cutinType[1]].length; idxk++)
- isPartnerShipIncapble |= playerShipsPartial1[idxk].hp / fleet.ship(idxk).hp[1] <= hpThreshold;
- if (num === 1) for (let idxk = 0; idxk < shipIndexListSpecial[cutinType[1]].length; idxk++)
- isPartnerShipIncapble |= playerShipsPartial2[idxk].hp / fleet.ship(idxk).hp[1] <= hpThreshold;
- if (num === 2) for (let idxk = 0; idxk < shipIndexListSpecial[cutinType[1]].length; idxk++)
- isPartnerShipIncapble |= playerShipsPartial3[idxk].hp / fleet.ship(idxk).hp[1] <= hpThreshold;
+
+ // Checks HP thresholds for each helper ship (index from shipIndexListSpecial)
+ for (let idxk = 0; idxk < shipIndexListSpecial[cutinType[1]].length; idxk++) {
+ const helper_idx = shipIndexListSpecial[cutinType[1]][idxk];
+
+ if (num === 0)
+ isPartnerShipIncapble |= playerShipsPartial1[helper_idx].hp / fleet.ship(helper_idx).hp[1] <= hpThreshold;
+ if (num === 1)
+ isPartnerShipIncapble |= playerShipsPartial2[helper_idx].hp / fleet.ship(helper_idx).hp[1] <= hpThreshold;
+ if (num === 2)
+ isPartnerShipIncapble |= playerShipsPartial3[helper_idx].hp / fleet.ship(helper_idx).hp[1] <= hpThreshold;
+ }
+
if (!!isPartnerShipIncapble) { continue; }
}
// Sending helper HP info to check if chuuha affects touch trigger rate
if (cutinType[1] in shipIndexListSpecial) {
- if (num === 0) for (let idxk = 0; idxk < shipIndexListSpecial[cutinType[1]].length; idxk++)
- misc["ship" + (idxk + 1)].hp = [playerShipsPartial1[idxk].hp, fleet.ship(idxk).hp[1]];
- if (num === 1) for (let idxk = 0; idxk < shipIndexListSpecial[cutinType[1]].length; idxk++)
- misc["ship" + (idxk + 1)].hp = [playerShipsPartial2[idxk].hp, fleet.ship(idxk).hp[1]];
- if (num === 2) for (let idxk = 0; idxk < shipIndexListSpecial[cutinType[1]].length; idxk++)
- misc["ship" + (idxk + 1)].hp = [playerShipsPartial3[idxk].hp, fleet.ship(idxk).hp[1]];
+ for (let idxk = 0; idxk < shipIndexListSpecial[cutinType[1]].length; idxk++) {
+ const helper_idx = shipIndexListSpecial[cutinType[1]][idxk];
+
+ if (num === 0)
+ misc["ship" + (helper_idx + 1)].hp = [playerShipsPartial1[helper_idx].hp, fleet.ship(helper_idx).hp[1]];
+ if (num === 1)
+ misc["ship" + (helper_idx + 1)].hp = [playerShipsPartial2[helper_idx].hp, fleet.ship(helper_idx).hp[1]];
+ if (num === 2)
+ misc["ship" + (helper_idx + 1)].hp = [playerShipsPartial3[helper_idx].hp, fleet.ship(helper_idx).hp[1]];
+ }
}
} else if (time === "day"
&& !(thisNode.planeFighters.player[0] === 0
| 1 |
diff --git a/src/models/filesystemBackedImpostersRepository.js b/src/models/filesystemBackedImpostersRepository.js @@ -202,17 +202,20 @@ function create (config, logger) {
locks += 1;
// with realpath = false, the file doesn't have to exist, but the directory does
- logger.debug(`Acquiring file lock on ${filepath} for ${caller}-${currentLockId}`);
return ensureDir(filepath)
.then(() => locker.lock(filepath, options))
.then(release => {
+ const lockStart = new Date(),
+ lockWait = lockStart - start;
+ logger.debug(`Acquired file lock on ${filepath} for ${caller}-${currentLockId} after ${lockWait}ms`);
+
return readFile(filepath, defaultContents)
.then(original => transformer(original))
.then(transformed => writeFile(tmpfile, transformed))
.then(() => rename(tmpfile, filepath))
.then(() => {
- const lockDuration = new Date() - start;
- logger.debug(`Releasing file lock on ${filepath} for ${caller}-${currentLockId} after ${lockDuration}ms`);
+ const lockHeld = new Date() - lockStart;
+ logger.debug(`Released file lock on ${filepath} for ${caller}-${currentLockId} after ${lockHeld}ms`);
return release();
});
})
| 7 |
diff --git a/karma.conf.js b/karma.conf.js @@ -200,14 +200,14 @@ module.exports = (config) => {
base: "BrowserStack",
os: "Windows",
os_version: "7",
- browser: "internet explorer",
+ browser: "IE",
browser_version: "9"
},
"Internet Explorer (latest) on Windows 7": {
base: "BrowserStack",
os: "Windows",
os_version: "7",
- browser: "internet explorer",
+ browser: "IE",
browser_version: "latest"
},
"Firefox 4 on Windows 7": {
@@ -228,14 +228,14 @@ module.exports = (config) => {
base: "BrowserStack",
os: "Windows",
os_version: "10",
- browser: "MicrosoftEdge",
+ browser: "Edge",
browser_version: "13"
},
"Edge (latest) on Windows 10": {
base: "BrowserStack",
os: "Windows",
os_version: "10",
- browser: "MicrosoftEdge",
+ browser: "Edge",
browser_version: "latest"
},
"Chrome 26 on Windows 10": {
| 1 |
diff --git a/packages/app/src/components/PageEditorByHackmd.tsx b/packages/app/src/components/PageEditorByHackmd.tsx @@ -60,9 +60,9 @@ export const PageEditorByHackmd = (): JSX.Element => {
const [errorReason, setErrorReason] = useState('');
// state from pageContainer
- const { data: pageIdOnHackmd, mutate: updatePageIdOnHackmd } = usePageIdOnHackmd();
- const { data: hasDraftOnHackmd, mutate: updateHasDraftOnHackmd } = useHasDraftOnHackmd();
- const { data: revisionIdHackmdSynced, mutate: updateRevisionIdHackmdSynced } = useRevisionIdHackmdSynced();
+ const { data: pageIdOnHackmd, mutate: mutatePageIdOnHackmd } = usePageIdOnHackmd();
+ const { data: hasDraftOnHackmd, mutate: mutateHasDraftOnHackmd } = useHasDraftOnHackmd();
+ const { data: revisionIdHackmdSynced, mutate: mutateRevisionIdHackmdSynced } = useRevisionIdHackmdSynced();
const [isHackmdDraftUpdatingInRealtime, setIsHackmdDraftUpdatingInRealtime] = useState(false);
const [remoteRevisionId, setRemoteRevisionId] = useState(revision?._id); // initialize
@@ -130,8 +130,8 @@ export const PageEditorByHackmd = (): JSX.Element => {
throw new Error(res.error);
}
- updatePageIdOnHackmd(res.pageIdOnHackmd);
- updateRevisionIdHackmdSynced(res.revisionIdHackmdSynced);
+ mutatePageIdOnHackmd(res.pageIdOnHackmd);
+ mutateRevisionIdHackmdSynced(res.revisionIdHackmdSynced);
}
catch (err) {
toastError(err);
@@ -143,7 +143,7 @@ export const PageEditorByHackmd = (): JSX.Element => {
setIsInitialized(true);
setIsInitializing(false);
- }, [pageId, hackmdUri, updatePageIdOnHackmd, updateRevisionIdHackmdSynced]);
+ }, [pageId, hackmdUri, mutatePageIdOnHackmd, mutateRevisionIdHackmdSynced]);
/**
* Start to edit w/o any api request
@@ -164,10 +164,10 @@ export const PageEditorByHackmd = (): JSX.Element => {
}
setIsHackmdDraftUpdatingInRealtime(false);
- updateHasDraftOnHackmd(false);
- updatePageIdOnHackmd(res.pageIdOnHackmd);
+ mutateHasDraftOnHackmd(false);
+ mutatePageIdOnHackmd(res.pageIdOnHackmd);
setRemoteRevisionId(res.revisionIdHackmdSynced);
- updateRevisionIdHackmdSynced(res.revisionIdHackmdSynced);
+ mutateRevisionIdHackmdSynced(res.revisionIdHackmdSynced);
}
@@ -175,7 +175,7 @@ export const PageEditorByHackmd = (): JSX.Element => {
logger.error(err);
toastError(err);
}
- }, [setIsHackmdDraftUpdatingInRealtime, updateHasDraftOnHackmd, updatePageIdOnHackmd, updateRevisionIdHackmdSynced, pageId]);
+ }, [setIsHackmdDraftUpdatingInRealtime, mutateHasDraftOnHackmd, mutatePageIdOnHackmd, mutateRevisionIdHackmdSynced, pageId]);
/**
* save and update state of containers
@@ -197,8 +197,8 @@ export const PageEditorByHackmd = (): JSX.Element => {
// set updated data
setRemoteRevisionId(res.revision._id);
- updateRevisionIdHackmdSynced(res.page.revisionHackmdSynced);
- updateHasDraftOnHackmd(res.page.hasDraftOnHackmd);
+ mutateRevisionIdHackmdSynced(res.page.revisionHackmdSynced);
+ mutateHasDraftOnHackmd(res.page.hasDraftOnHackmd);
updatePageTagsForEditors(res.tags);
// call reset
@@ -214,7 +214,7 @@ export const PageEditorByHackmd = (): JSX.Element => {
}
}, [
grant, isSlackEnabled, pageTags, slackChannels, updatePageTagsForEditors, pageId, currentPagePath, currentPathname,
- revisionIdHackmdSynced, updatePageData, updateHasDraftOnHackmd, updateRevisionIdHackmdSynced, t,
+ revisionIdHackmdSynced, updatePageData, mutateHasDraftOnHackmd, mutateRevisionIdHackmdSynced, t,
]);
/**
| 10 |
diff --git a/src/client/sandbox/cookie/window-sync.js b/src/client/sandbox/cookie/window-sync.js @@ -27,7 +27,8 @@ export default class WindowSync {
else
callback();
}
- else if (message.cmd === SYNC_COOKIE_DONE_CMD) {
+ // NOTE: We need to remove the second part of the condition after a fix of GH-1715
+ else if (message.cmd === SYNC_COOKIE_DONE_CMD && this.resolversMap[message.id]) {
this.resolversMap[message.id]();
delete this.resolversMap[message.id];
| 1 |
diff --git a/dashboard/apps/job_manager.fma/js/job_manager.js b/dashboard/apps/job_manager.fma/js/job_manager.js @@ -130,6 +130,17 @@ function makeActions() {
return actions;
}
+// Returns an img string DOM element for holding the job preview thumbnail.
+function createPreviewThumbnail(job, width, height) {
+ var img = document.createElement("img");
+ img.style.marginRight = "4px";
+ img.width = width;
+ img.height = height;
+ img.alt = "[No possible preview]";
+ img.src = "/job/" + job._id + "/thumbnail";
+ return img.outerHTML;
+}
+
function addQueueEntries(jobs) {
clearQueue();
var table = document.getElementById('queue_table');
@@ -156,7 +167,7 @@ function addQueueEntries(jobs) {
listItem.setAttribute("data-id", jobs[i]._id);
table.appendChild(listItem);
var id = document.getElementById(jobs[i]._id);
- id.innerHTML = '<div id="menu"></div><div class="job_name">' + jobs[i].name + '</div><div class="description">' + jobs[i].description + '</div>';
+ id.innerHTML = '<div id="menu"></div><div class="job_name">' + jobs[i].name + '</div><div class="description">' + createPreviewThumbnail(jobs[i], 100, 100) + jobs[i].description + '</div>';
var menu = id.firstChild;
// menu.className += ' actions-control';
@@ -196,7 +207,7 @@ function addQueueEntries(jobs) {
recentItem.setAttribute("data-id", recent[i]._id);
recentJobs.appendChild(recentItem);
var id = document.getElementById(recent[i]._id);
- id.innerHTML = '<div id="menu"></div><div id="name">' + recent[i].name + '</div><div class="description">' + recent[i].description + '</div>';
+ id.innerHTML = '<div id="menu"></div><div id="name">' + recent[i].name + '</div><div class="description">' + createPreviewThumbnail(recent[i], 100, 100) + recent[i].description + '</div>';
var menu = id.firstChild;
// menu.className += ' actions-control';
@@ -293,7 +304,7 @@ function addHistoryEntries(jobs) {
var time = row.insertCell(3);
menu.innerHTML = createHistoryMenu(job._id);
- name.innerHTML = '<div class="job-' + job.state + '">' + job.name + '</div>';
+ name.innerHTML = '<div class="job-' + job.state + '">' + createPreviewThumbnail(job, 50, 50) + job.name + '</div>';
done.innerHTML = moment(job.finished_at).fromNow();
time.innerHTML = moment.utc(job.finished_at - job.started_at).format('HH:mm:ss');
});
| 0 |
diff --git a/Makefile b/Makefile @@ -102,10 +102,10 @@ test-plugins: ${TARGETS}
.PHONY: test-deno
test-deno: ${TARGETS} build/tests.esm.js
- if [ ! -f ~/.local/bin/deno ]; then \
+ if [ ! -f ~/.deno/bin/deno ]; then \
curl -fsSL https://deno.land/x/install/install.sh | sh; \
fi;
- ~/.local/bin/deno test-deno/deno-test.js
+ ~/.deno/bin/deno test-deno/deno-test.js
.PHONY: travis-coverage
travis-coverage: clean coverage
| 1 |
diff --git a/app/assets/src/components/SamplesHeatmap.jsx b/app/assets/src/components/SamplesHeatmap.jsx @@ -696,7 +696,7 @@ class SamplesHeatmap extends React.Component {
renderTaxonsPerSampleSlider() {
return (
<Slider
- label="Taxons per Sample: "
+ label="Taxa per Sample: "
min={this.state.availableOptions.taxonsPerSample.min}
max={this.state.availableOptions.taxonsPerSample.max}
value={this.state.selectedOptions.taxonsPerSample}
| 14 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.