code
stringlengths 122
4.99k
| label
int64 0
14
|
---|---|
diff --git a/test/jasmine/tests/bar_test.js b/test/jasmine/tests/bar_test.js @@ -1191,9 +1191,9 @@ describe('bar hover', function() {
};
}
- function _hover(gd, xval, yval, closest) {
+ function _hover(gd, xval, yval, hovermode) {
var pointData = getPointData(gd);
- var pt = Bar.hoverPoints(pointData, xval, yval, closest)[0];
+ var pt = Bar.hoverPoints(pointData, xval, yval, hovermode)[0];
return {
style: [pt.index, pt.color, pt.xLabelVal, pt.yLabelVal],
@@ -1274,6 +1274,66 @@ describe('bar hover', function() {
});
});
+ describe('with special width/offset combinations', function() {
+
+ beforeEach(function() {
+ gd = createGraphDiv();
+ });
+
+ it('should return correct \'closest\' hover data (single bar, trace width)', function(done) {
+ Plotly.plot(gd, [{
+ type: 'bar',
+ x: [1],
+ y: [2],
+ width: 10,
+ marker: { color: 'red' }
+ }], {
+ xaxis: { range: [-200, 200] }
+ })
+ .then(function() {
+ var out = _hover(gd, 0, 0, 'closest');
+
+ expect(out.style).toEqual([0, 'red', 1, 2]);
+ assertPos(out.pos, [264, 278, 14, 14]);
+ })
+ .then(done);
+ });
+
+ it('should return correct \'closest\' hover data (two bars, array width)', function(done) {
+ Plotly.plot(gd, [{
+ type: 'bar',
+ x: [1, 200],
+ y: [2, 1],
+ width: [10, 20],
+ marker: { color: 'red' }
+ }, {
+ type: 'bar',
+ x: [1, 200],
+ y: [1, 2],
+ width: [20, 10],
+ marker: { color: 'green' }
+ }], {
+ xaxis: { range: [-200, 300] },
+ width: 500,
+ height: 500
+ })
+ .then(function() {
+ var out = _hover(gd, -36, 1.5, 'closest');
+
+ expect(out.style).toEqual([0, 'red', 1, 2]);
+ assertPos(out.pos, [99, 106, 13, 13]);
+ })
+ .then(function() {
+ var out = _hover(gd, 164, 0.8, 'closest');
+
+ expect(out.style).toEqual([1, 'red', 200, 1]);
+ assertPos(out.pos, [222, 235, 168, 168]);
+ })
+ .then(done);
+ });
+
+ });
+
});
function mockBarPlot(dataWithoutTraceType, layout) {
| 0 |
diff --git a/lib/assets/test/spec/fixtures/builder/config-model.fixture.js b/lib/assets/test/spec/fixtures/builder/config-model.fixture.js var ConfigModel = require('builder/data/config-model');
+var _ = require('underscore');
function getConfigModelFixture (opts) {
opts = opts || {};
var baseUrl = opts.baseUrl || '/u/pepe';
var username = opts.username || 'pepe';
- var configModel = new ConfigModel({
+ var defaults = {
sql_api_protocol: 'http',
base_url: baseUrl,
user_name: username
- });
+ };
+
+ var modelParams = _.extend(defaults, opts);
+
+ var configModel = new ConfigModel(modelParams);
return configModel;
}
| 11 |
diff --git a/generators/generator-botbuilder/generators/app/templates/echo/package.json.ts b/generators/generator-botbuilder/generators/app/templates/echo/package.json.ts "test": "echo \"Error: no test specified\" && exit 1",
"build": "tsc",
"start": "tsc && node ./lib/index.js",
- "watch": "tsc && node ./lib/index.js"
+ "watch": "concurrently --kill-others \"tsc -w\" \"nodemon ./lib/index.js\""
},
"dependencies": {
"botbuilder": "^4.0.6",
"restify": "^6.3.4"
},
"devDependencies": {
+ "concurrently": "^4.0.1",
"eslint": "^5.6.0",
"eslint-config-standard": "^12.0.0",
"eslint-plugin-import": "^2.14.0",
| 0 |
diff --git a/N/query.d.ts b/N/query.d.ts @@ -594,6 +594,37 @@ export interface Result {
readonly columns: Column[];
}
+/**
+ * One page of the paged query results.
+ * @since 2018.1
+ */
+export interface Page {
+ /**
+ * References the query results contained in this page.
+ */
+ readonly data: ResultSet;
+
+ /**
+ * Indicates whether this page is the first of the paged query results.
+ */
+ readonly isFirst: boolean;
+
+ /**
+ * Indicates whether this page is the last of the paged query results.
+ */
+ readonly isLast: boolean;
+
+ /**
+ * References the set of paged query results that this page is from.
+ */
+ readonly pagedData: PagedData;
+
+ /**
+ * The range of query results for this page.
+ */
+ readonly pageRange: PageRange;
+}
+
/**
* Encapsulates a set of paged query results. This object also contains information about the set of paged results
* it encapsulates.
@@ -619,7 +650,7 @@ export interface PagedData {
*/
iterator(): Iterator;
- fetch(index: number): PagedData;
+ fetch(index: number): Page;
}
/**
| 1 |
diff --git a/components/core/Application.js b/components/core/Application.js @@ -776,6 +776,12 @@ export default class ApplicationPage extends React.Component {
const next = this.state.history[this.state.currentIndex];
const current = NavigationData.getCurrentById(navigation, next.id);
+ // NOTE(jim): Only happens during a bad query parameter.
+ if (!current.target) {
+ window.location.replace("/_");
+ return null;
+ }
+
const navigationElement = (
<ApplicationNavigation
viewer={this.state.viewer}
| 9 |
diff --git a/assets/js/components/GoogleChartV2.js b/assets/js/components/GoogleChartV2.js @@ -155,6 +155,8 @@ export default function GoogleChartV2( props ) {
if ( chartWrapper !== chartWrapperRef.current ) {
// eslint-disable-next-line no-unused-expressions
googleRef.current?.visualization.events.removeAllListeners( chartWrapperRef.current?.getChart() );
+ // eslint-disable-next-line no-unused-expressions
+ googleRef.current?.visualization.events.removeAllListeners( chartWrapperRef.current );
}
chartWrapperRef.current = chartWrapper;
| 2 |
diff --git a/CHANGELOG.md b/CHANGELOG.md All notable changes to this project are documented in this file.
-# Head
+# 14.4.0
- Added: `function-no-unknown` rule ([#5865](https://github.com/stylelint/stylelint/pull/5865)).
- Added: `font-family-name-quotes` autofix ([#5806](https://github.com/stylelint/stylelint/pull/5806)).
| 6 |
diff --git a/packages/app/src/components/SearchPage/SearchResultList.jsx b/packages/app/src/components/SearchPage/SearchResultList.jsx import React from 'react';
import PropTypes from 'prop-types';
-import Page from '../PageList/Page';
-import loggerFactory from '~/utils/logger';
+import SearchResultListItem from './SearchResultListItem';
-const logger = loggerFactory('growi:searchResultList');
class SearchResultList extends React.Component {
render() {
return this.props.pages.map((page) => {
- // Add prefix 'id_' in pageId, because scrollspy of bootstrap doesn't work when the first letter of id attr of target component is numeral.
- const pageId = `#${page._id}`;
return (
- <li key={page._id} className="nav-item page-list-li w-100 m-0 border-bottom">
- <a
- className="nav-link page-list-link d-flex align-items-baseline"
- href={pageId}
- onClick={() => {
- try {
- if (this.props.onClickInvoked == null) { throw new Error('onClickInvoked is null') }
- this.props.onClickInvoked(page._id);
- }
- catch (error) {
- logger.error(error);
- }
- }}
- >
- <div className="form-check my-auto">
- <input className="form-check-input my-auto" type="checkbox" value="" id="flexCheckDefault" />
- </div>
- {/* TODO: remove dummy snippet and adjust style */}
- <div className="d-block">
- <Page page={page} noLink />
- <div className="border-gray mt-5">{page.snippet}</div>
- </div>
- <div className="ml-auto d-flex">
- {this.props.deletionMode && (
- <div className="custom-control custom-checkbox custom-checkbox-danger">
- <input
- type="checkbox"
- id={`page-delete-check-${page._id}`}
- className="custom-control-input search-result-list-delete-checkbox"
- value={pageId}
- checked={this.props.selectedPages.has(page)}
- onChange={() => {
- try {
- if (this.props.onChangeInvoked == null) { throw new Error('onChnageInvoked is null') }
- return this.props.onChangeInvoked(page);
- }
- catch (error) {
- logger.error(error);
- }
- }}
+ <SearchResultListItem
+ page={page}
+ onClickInvoked={this.props.onClickInvoked}
+ noLink
/>
- <label className="custom-control-label" htmlFor={`page-delete-check-${page._id}`}></label>
- </div>
- )}
- <div className="page-list-option">
- <button
- type="button"
- className="btn btn-link p-0"
- value={page.path}
- onClick={(e) => {
- window.location.href = e.currentTarget.value;
- }}
- >
- <i className="icon-login" />
- </button>
- </div>
- </div>
- </a>
- </li>
);
});
}
}
-
SearchResultList.propTypes = {
pages: PropTypes.array.isRequired,
deletionMode: PropTypes.bool.isRequired,
@@ -85,5 +26,4 @@ SearchResultList.propTypes = {
onChangeInvoked: PropTypes.func,
};
-
export default SearchResultList;
| 5 |
diff --git a/.travis.yml b/.travis.yml @@ -3,12 +3,12 @@ jobs:
- sudo: required
services:
- docker
- language: generic
+ language: node_js
before_install: docker pull carto/nodejs6-xenial-pg101:postgis-2.4.4.5
script: npm run docker-test -- nodejs6-xenial-pg101:postgis-2.4.4.5
- sudo: required
services:
- docker
- language: generic
+ language: node_js
before_install: docker pull carto/nodejs10-xenial-pg101:postgis-2.4.4.5
script: npm run docker-test -- nodejs10-xenial-pg101:postgis-2.4.4.5
| 12 |
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md @@ -145,7 +145,7 @@ Once a new Pull Request is started,
## Submitting contributions
-Before opening a pull request (or submitting a contribution) you will need to sign a Contributor License Agreement (CLA) before making a submission, [learn more here](https://carto.com/contributing).
+Before opening a pull request (or submitting a contribution) you will need to sign a Contributor License Agreement (CLA) before making a submission, [learn more here](https://carto.com/contributions).
After that, there are several rules you should follow when a new pull request is created:
| 1 |
diff --git a/components/mapbox/open-gps.js b/components/mapbox/open-gps.js import React from 'react'
import PropTypes from 'prop-types'
import Link from 'next/link'
-import {MapPin} from 'react-feather'
+import {Navigation} from 'react-feather'
function OpenGPS({lat, lon, isSafariBrowser}) {
const href = isSafariBrowser ? 'http://maps.apple.com/?address=' : 'geo:'
@@ -12,7 +12,7 @@ function OpenGPS({lat, lon, isSafariBrowser}) {
type='button'
className='mapboxgl-ctrl'
>
- <MapPin size={18} />
+ <Navigation size={18} />
</button>
</Link>
)
| 14 |
diff --git a/webpack.config.js b/webpack.config.js @@ -83,7 +83,11 @@ function getBasePlugins() {
ecma: 7,
warnings: false,
mangle: false,
- compress: true
+ compress: true,
+ output: {
+ ascii_only: true,
+ beautify: false
+ }
}
})
];
| 12 |
diff --git a/src/vuex/modules/session.js b/src/vuex/modules/session.js @@ -148,16 +148,7 @@ export default () => {
// TODO split into sign in with ledger and signin with local key
async signIn(
{ state, commit, dispatch },
-<<<<<<< HEAD:app/src/renderer/vuex/modules/session.js
{ localKeyPairName, address, sessionType = `ledger` }
-=======
- {
- localKeyPairName,
- address,
- sessionType = `local`,
- errorCollection = false
- }
->>>>>>> develop:src/vuex/modules/session.js
) {
let accountAddress
switch (sessionType) {
@@ -173,20 +164,10 @@ export default () => {
commit(`setSignIn`, true)
commit(`setSessionType`, sessionType)
commit(`setUserAddress`, accountAddress)
-<<<<<<< HEAD:app/src/renderer/vuex/modules/session.js
dispatch(`loadPersistedState`)
commit(`toggleSessionModal`, false)
await dispatch(`getStakingParameters`)
await dispatch(`getGovParameters`)
-=======
- dispatch(`setErrorCollection`, {
- account: accountAddress,
- optin: errorCollection
- })
- await dispatch(`loadPersistedState`)
- commit(`toggleSessionModal`, false)
- dispatch(`loadErrorCollection`, accountAddress)
->>>>>>> develop:src/vuex/modules/session.js
await dispatch(`initializeWallet`, { address: accountAddress })
dispatch(`persistSession`, {
localKeyPairName,
@@ -228,19 +209,8 @@ export default () => {
if (state.analyticsCollection !== analyticsCollection)
dispatch(`setAnalyticsCollection`, analyticsCollection)
},
-<<<<<<< HEAD:app/src/renderer/vuex/modules/session.js
storeLocalPreferences({ state }) {
state.cookiesAccepted = true
-=======
- setErrorCollection({ state, commit }, { address, optin }) {
- if (optin && state.externals.config.development) {
- commit(`notifyError`, {
- title: `Couldn't switch on error collection.`,
- body: `Error collection is disabled during development.`
- })
- }
- state.errorCollection = state.externals.config.development ? false : optin
->>>>>>> develop:src/vuex/modules/session.js
localStorage.setItem(
USER_PREFERENCES_KEY,
JSON.stringify({
| 1 |
diff --git a/app/controllers/announcements_controller.rb b/app/controllers/announcements_controller.rb class AnnouncementsController < ApplicationController
- load_and_authorize_resource
+ load_and_authorize_resource params_method: :announcement_params
skip_before_filter :authenticate_user!, only: [ :index ]
skip_before_filter :store_location, only: [ :enroll ]
@@ -10,22 +10,18 @@ class AnnouncementsController < ApplicationController
# GET /announcements/1
def show
- @announcement = Announcement.find(params[:id])
end
# GET /announcements/new
def new
- @announcement = Announcement.new
end
# GET /announcements/1/edit
def edit
- @announcement = Announcement.find(params[:id])
end
# POST /announcements
def create
- @announcement = Announcement.new(announcement_params)
@announcement.originator = current_user
if @announcement.save
@@ -37,8 +33,6 @@ class AnnouncementsController < ApplicationController
# PUT /announcements/1
def update
- @announcement = Announcement.find(params[:id])
-
if @announcement.update_attributes(announcement_params)
redirect_to announcements_path, notice: 'Announcement was successfully updated.'
else
@@ -48,7 +42,6 @@ class AnnouncementsController < ApplicationController
# DELETE /announcements/1
def destroy
- @announcement = Announcement.find(params[:id])
@announcement.destroy
respond_to do |format|
| 2 |
diff --git a/packages/openneuro-app/src/scripts/datalad/routes/admin.jsx b/packages/openneuro-app/src/scripts/datalad/routes/admin.jsx @@ -18,17 +18,17 @@ export function hashDatasetToRange(dataset, range) {
const AdminDataset = ({ dataset }) => (
<div className="dataset-form">
- <div className="col-xs-12 dataset-form-header">
+ <div className="col-lg-12 dataset-form-header">
<div className="form-group">
<label>Admin</label>
</div>
- <div className="col-xs-6">
+ <div className="col-lg-6">
<h3>Draft Head</h3> {dataset.draft.head}
</div>
<DatasetHistory datasetId={dataset.id} />
<hr />
- <div className="col-xs-12 dataset-form-controls">
- <div className="col-xs-12 modal-actions">
+ <div className="col-lg-12 dataset-form-controls">
+ <div className="col-lg-12 modal-actions">
<Link to={`/datasets/${dataset.id}`}>
<button className="btn-admin-blue">Return to Dataset</button>
</Link>
| 7 |
diff --git a/src/pages/settings/Security/CloseAccountPage.js b/src/pages/settings/Security/CloseAccountPage.js @@ -43,7 +43,6 @@ class CloseAccountPage extends Component {
CloseAccount.clearError();
this.state = {
isConfirmModalVisible: false,
- confirmModalPrompt: '',
};
}
@@ -57,8 +56,7 @@ class CloseAccountPage extends Component {
}
showConfirmModal() {
- const prompt = this.props.translate('closeAccountPage.iouConfirmation');
- this.setState({isConfirmModalVisible: true, confirmModalPrompt: prompt});
+ this.setState({isConfirmModalVisible: true});
}
hideConfirmModal() {
@@ -104,18 +102,7 @@ class CloseAccountPage extends Component {
containerStyles={[styles.mt5, styles.closeAccountMessageInput]}
/>
<Text style={[styles.mt5]}>
- <Text style={[styles.textStrong]}>
- {this.props.translate('closeAccountPage.closeAccountWarning')}
- </Text>
- {' '}
- {this.props.translate('closeAccountPage.closeAccountPermanentlyDeleteData')}
- </Text>
- <Text textBreakStrategy="simple" style={[styles.mt5]}>
- <Text style={[styles.textStrong]}>
- {this.props.translate('closeAccountPage.defaultContact')}
- </Text>
- {' '}
- {userEmailOrPhone}
+ {this.props.translate('closeAccountPage.enterDefaultContactToConfirm', {userEmailOrPhone})}
</Text>
<TextInput
inputID="phoneOrEmail"
@@ -126,11 +113,11 @@ class CloseAccountPage extends Component {
keyboardType={CONST.KEYBOARD_TYPE.EMAIL_ADDRESS}
/>
<ConfirmModal
- title="Are you sure?"
+ title={this.props.translate('closeAccountPage.closeAccountWarning')}
onConfirm={this.hideConfirmModal}
onCancel={this.hideConfirmModal}
isVisible={this.state.isConfirmModalVisible}
- prompt={this.state.confirmModalPrompt}
+ prompt={this.props.translate('closeAccountPage.closeAccountPermanentlyDeleteData')}
confirmText={this.props.translate('common.close')}
shouldShowCancelButton
/>
| 5 |
diff --git a/magda-web-client/src/Components/SearchFacets/FacetHeader.js b/magda-web-client/src/Components/SearchFacets/FacetHeader.js @@ -208,6 +208,7 @@ class FacetHeader extends Component {
>
<img
className="facet-icon"
+ alt=""
src={
this.state.buttonActive
? IconList[`${this.props.id}_active`]
@@ -222,7 +223,7 @@ class FacetHeader extends Component {
className="btn-remove au-btn"
aria-label={this.calculateRemoveAltText()}
>
- <img src={remove_light} />
+ <img alt="" src={remove_light} />
</button>
)}
</div>
| 12 |
diff --git a/ui/analytics.js b/ui/analytics.js @@ -130,7 +130,7 @@ const analytics: Analytics = {
}
},
videoStartEvent: (claimId, duration) => {
- sendGaTimingEvent('Media', 'StartDelay', Number((duration * 1000).toFixed(0)), claimId);
+ sendGaTimingEvent('Media', 'TimeToStart', Number((duration * 1000).toFixed(0)), claimId);
},
videoBufferEvent: (claimId, currentTime) => {
sendGaTimingEvent('Media', 'BufferTimestamp', currentTime * 1000, claimId);
| 10 |
diff --git a/app/components/syntax_highlight/index.tsx b/app/components/syntax_highlight/index.tsx import React, {useCallback, useMemo} from 'react';
import {StyleSheet, View} from 'react-native';
import SyntaxHighlighter from 'react-syntax-highlighter';
-import {github, monokai, solarizedDark, solarizedLight} from 'react-syntax-highlighter/dist/cjs/styles/hljs';
+import {githubGist as github, monokai, solarizedDark, solarizedLight} from 'react-syntax-highlighter/dist/cjs/styles/hljs';
import {useTheme} from '@context/theme';
| 4 |
diff --git a/token-metadata/0x05860d453C7974CbF46508c06CBA14e211c629Ce/metadata.json b/token-metadata/0x05860d453C7974CbF46508c06CBA14e211c629Ce/metadata.json "symbol": "EDN",
"address": "0x05860d453C7974CbF46508c06CBA14e211c629Ce",
"decimals": 18,
- "dharmaVerificationStatus": {
"dharmaVerificationStatus": "VERIFIED"
}
\ No newline at end of file
-}
\ No newline at end of file
| 3 |
diff --git a/token-metadata/0x3449FC1Cd036255BA1EB19d65fF4BA2b8903A69a/metadata.json b/token-metadata/0x3449FC1Cd036255BA1EB19d65fF4BA2b8903A69a/metadata.json "symbol": "BAC",
"address": "0x3449FC1Cd036255BA1EB19d65fF4BA2b8903A69a",
"decimals": 18,
- "dharmaVerificationStatus": "UNVERIFIED"
+ "dharmaVerificationStatus": "VERIFIED"
}
\ No newline at end of file
| 3 |
diff --git a/new-semantics/Semantics.hs b/new-semantics/Semantics.hs @@ -395,32 +395,11 @@ addToEnvironment = M.insert
lookupEnvironment :: LetLabel -> Environment -> Maybe Contract
lookupEnvironment = M.lookup
-maxIdFromContract :: Contract -> LetLabel
-maxIdFromContract Null = 0
-maxIdFromContract (Commit _ _ _ _ _ _ contract1 contract2) =
- (max (maxIdFromContract contract1) (maxIdFromContract contract2))
-maxIdFromContract (Pay _ _ _ _ _ contract1 contract2) =
- (max (maxIdFromContract contract1) (maxIdFromContract contract2))
-maxIdFromContract (Both contract1 contract2) =
- (max (maxIdFromContract contract1) (maxIdFromContract contract2))
-maxIdFromContract (Choice _ contract1 contract2) =
- (max (maxIdFromContract contract1) (maxIdFromContract contract2))
-maxIdFromContract (When _ _ contract1 contract2) =
- (max (maxIdFromContract contract1) (maxIdFromContract contract2))
-maxIdFromContract (While _ _ contract1 contract2) =
- (max (maxIdFromContract contract1) (maxIdFromContract contract2))
-maxIdFromContract (Scale _ _ _ contract) =
- (maxIdFromContract contract)
-maxIdFromContract (Let letLabel contract1 contract2) =
- max letLabel (max (maxIdFromContract contract1) (maxIdFromContract contract2))
-maxIdFromContract (Use letLabel) =
- letLabel
-
-getFreshKey :: Environment -> Contract -> LetLabel
-getFreshKey env c =
- 1 + max (case M.lookupMax env of
- Nothing -> 0
- Just (k, _) -> max k 0) (maxIdFromContract c)
+getFreshLabel :: Environment -> LetLabel
+getFreshLabel env =
+ case M.lookupMax env of
+ Nothing -> 1
+ Just (k, _) -> k + 1
nullifyInvalidUses :: Environment -> Contract -> Contract
nullifyInvalidUses _ Null = Null
@@ -511,10 +490,10 @@ reduceRec blockNum state env (Let label boundContract contract) =
case lookupEnvironment label env of
Nothing -> let newEnv = addToEnvironment label checkedBoundContract env in
Let label checkedBoundContract $ reduceRec blockNum state newEnv contract
- Just _ -> let freshKey = getFreshKey env contract in
- let newEnv = addToEnvironment freshKey checkedBoundContract env in
- let fixedContract = relabel label freshKey contract in
- Let freshKey checkedBoundContract $ reduceRec blockNum state newEnv fixedContract
+ Just _ -> let freshLabel = getFreshLabel env in
+ let newEnv = addToEnvironment freshLabel checkedBoundContract env in
+ let fixedContract = relabel label freshLabel contract in
+ Let freshLabel checkedBoundContract $ reduceRec blockNum state newEnv fixedContract
where checkedBoundContract = nullifyInvalidUses env boundContract
reduceRec blockNum state env (Use label) =
case lookupEnvironment label env of
| 10 |
diff --git a/app/controllers/carto/api/visualization_presenter.rb b/app/controllers/carto/api/visualization_presenter.rb @@ -60,18 +60,16 @@ module Carto
prev_id: @visualization.prev_id,
next_id: @visualization.next_id,
transition_options: @visualization.transition_options,
- active_child: @visualization.active_child,
table: user_table_presentation,
external_source: Carto::Api::ExternalSourcePresenter.new(@visualization.external_source).to_poro,
synchronization: Carto::Api::SynchronizationPresenter.new(@visualization.synchronization).to_poro,
- children: @visualization.children.map { |v| children_poro(v) },
liked: @current_viewer ? @visualization.is_liked_by_user_id?(@current_viewer.id) : false,
url: url,
uses_builder_features: @visualization.uses_builder_features?,
auth_tokens: auth_tokens,
version: @visualization.version || 2
}
- poro.merge!( { related_tables: related_tables } ) if @options.fetch(:related, true)
+ poro[:related_tables] = related_tables if @options.fetch(:related, true)
poro
end
| 2 |
diff --git a/website/ops.py b/website/ops.py @@ -1946,7 +1946,10 @@ def notifyUsers(configOld, configNew, dictInfo, dictID):
mailText += "\nYou can access the dictionary at the following address:\n"
mailText += siteconfig['baseUrl'] + "#/" + dictID
mailText += "\n\nYours,\nThe Lexonomy team"
+ try:
sendmail(user, mailSubject, mailText)
+ except Exception as e:
+ pass
def get_iso639_1():
codes = []
| 8 |
diff --git a/packages/app/src/components/ReactMarkdownComponents/NextLink.tsx b/packages/app/src/components/ReactMarkdownComponents/NextLink.tsx @@ -40,7 +40,7 @@ export const NextLink = ({
return (
<Link {...props} href={href}>
- <a className={className}>{children}</a>
+ <a href={href} className={className}>{children}</a>
</Link>
);
};
| 7 |
diff --git a/articles/security/store-tokens.md b/articles/security/store-tokens.md @@ -48,5 +48,3 @@ If your single-page app has a backend server at all, then tokens should be handl
### If no backend is present
If you have a single-page app (SPA) with no corresponding backend server, your SPA should request new tokens on login and store them in memory without any persistence. To make API calls, your SPA would then use the in-memory copy of the token.
-
-For an example of how to handle sessions in SPAs, check out the [Handle Authentication Tokens](/quickstart/spa/vanillajs#handle-authentication-tokens) section of the [JavaScript Single-Page App Quickstart](/quickstart/spa/vanillajs).
| 2 |
diff --git a/Docker/_README.md b/Docker/_README.md @@ -69,7 +69,7 @@ Do _not_ forget, to increase the version numer in the next section, too.
BASE_DIR=/data/openroberta-lab
ARCH=x64 # either x64 or arm32v7
CCBIN_VERSION=1 # this is needed in the dockerfile!
-BASE_VERSION=23
+BASE_VERSION=24
CC_RESOURCES=/data/openroberta-lab/git/ora-cc-rsc
cd $CC_RESOURCES
@@ -101,7 +101,7 @@ If called, it will checkout a branch given as parameter and runs both the tests
```bash
BASE_DIR=/data/openroberta-lab
ARCH=x64
-BASE_VERSION=23
+BASE_VERSION=24
BRANCH=develop
cd ${BASE_DIR}/conf/${ARCH}/docker-for-test
docker build --no-cache --build-arg BASE_VERSION=${BASE_VERSION} --build-arg BRANCH=${BRANCH} \
@@ -112,7 +112,7 @@ docker push openroberta/it-${ARCH}:${BASE_VERSION}
To run the integration tests on your local machine (usually a build server like `bamboo` will do this), execute:
```bash
-BASE_VERSION=23
+BASE_VERSION=24
export BRANCH='develop'
docker run openroberta/it-${ARCH}:${BASE_VERSION} ${BRANCH} x.x.x # x.x.x is the db version and unused for tests
```
| 6 |
diff --git a/src/lib/userStorage/UserProfileStorage.js b/src/lib/userStorage/UserProfileStorage.js // @flow
-import * as TextileCrypto from '@textile/crypto'
+import TextileCrypto from '@textile/crypto'
import { assign } from 'lodash'
import IPFS from '../ipfs/IpfsStorage'
import pino from '../logger/pino-logger'
@@ -22,9 +22,6 @@ export interface ProfileDB {
deleteProfile(): Promise<boolean>;
}
-// private methods couldn't be a part of the interface
-// by definition interface describes only public API
-// so they have been removed
export interface ProfileStorage {
init(): Promise<void>;
setProfile(profile: UserModel): Promise<void>;
@@ -33,7 +30,7 @@ export interface ProfileStorage {
setAvatar(avatar: string): Promise<void>;
removeAvatar(): Promise<void>;
getProfileByWalletAddress(walletAddress: string): Promise<Profile>;
- getPublicProfile(key: string, value: string): { name: string, avatar: string };
+ getPublicProfile(key: string, value?: string): Promise<{ [field: string]: string }>;
getProfileFieldValue(field: string): string;
getProfileFieldDisplayValue(field: string): string;
getProfileField(field: string): ProfileField;
@@ -45,7 +42,6 @@ export interface ProfileStorage {
deleteProfile(): Promise<boolean>;
}
-//5. implement pubsub for profile changes (one method to subscribe for profile updates, when profile changes notify the subscribers)
export class UserProfileStorage implements ProfileStorage {
profileSettings: {} = {
fullName: { defaultPrivacy: 'public' },
@@ -71,8 +67,6 @@ export class UserProfileStorage implements ProfileStorage {
profile: Profile = {}
constructor(wallet: GoodWallet, profiledb: ProfileDB, privateKey: TextileCrypto.PrivateKey) {
- // const seed = Uint8Array.from(Buffer.from(pkeySeed, 'hex'))
- // this.privateKey = TextileCrypto.PrivateKey.fromRawEd25519Seed(seed)
this.wallet = wallet
this.profiledb = profiledb
this.privateKey = privateKey
| 3 |
diff --git a/includes/Modules/Idea_Hub.php b/includes/Modules/Idea_Hub.php @@ -327,8 +327,6 @@ final class Idea_Hub extends Module
* @return mixed Parsed response data on success, or WP_Error on failure.
*/
protected function parse_data_response( Data_Request $data, $response ) {
- $this->register();
-
switch ( "{$data->method}:{$data->datapoint}" ) {
case 'GET:draft-post-ideas':
return array_map(
| 2 |
diff --git a/plugins/debug/debugPanel.js b/plugins/debug/debugPanel.js var DEBUG_HEIGHT = 50;
var Counters = function(name) {
- this.stats = {};
- this.reset(stats);
+ this.stats = [];
+ this.reset(this.stats);
}
- Counters.prototype.reset = function() {
+ Counters.prototype.reset = function(stats) {
var self = this;
(stats || Object.keys(this.stats)).forEach(function (stat) {
self.stats[stat] = 0;
});
}
- Counters.prototype.inc = function() {
+ Counters.prototype.inc = function(stat, value) {
this.stats[stat] += (value || 1);
}
- Counters.prototype.get = function() {
+ Counters.prototype.get = function(stat) {
return this.stats[stat];
}
| 1 |
diff --git a/shared/js/background/trackers.es6.js b/shared/js/background/trackers.es6.js @@ -117,7 +117,7 @@ function checkTrackersWithParentCompany (url, siteDomain, request) {
if (!tracker) return
// Check to see if this request matches any of the blocking rules for this tracker
- if (tracker.rules) {
+ if (tracker.rules && tracker.rules.length) {
tracker.rules.some(ruleObj => {
if (requestMatchesRule(request, ruleObj, siteDomain)) {
matchedTracker = {data: tracker, rule: ruleObj.rule, type: trackerType, block: true}
@@ -172,17 +172,11 @@ function matchRuleOptions (rule, request, siteDomain) {
if (!rule.options) return true
if (rule.options.types) {
- let matchesType = rule.options.types.findIndex(t => { return t === request.type })
- if (matchesType === -1) {
- return false
- }
+ return rule.options.types.includes(request.type)
}
if (rule.options.domains) {
- let matchesDomain = rule.options.domains.findIndex(d => { return d === siteDomain })
- if (matchesDomain === -1) {
- return false
- }
+ return rule.options.domains.includes(siteDomain)
}
return true
| 3 |
diff --git a/grails-app/conf/application.groovy b/grails-app/conf/application.groovy @@ -52,6 +52,7 @@ grails.plugin.springsecurity.controllerAnnotations.staticRules = [
[pattern:'/settings/index', access :['IS_AUTHENTICATED_REMEMBERED']],
[pattern:'/report/save', access :['IS_AUTHENTICATED_REMEMBERED']],
[pattern:'/video/markCompleted', access :['IS_AUTHENTICATED_REMEMBERED']],
+ [pattern:'/video/markAsUnviewed', access :['IS_AUTHENTICATED_REMEMBERED']],
[pattern:'/subtitles/get', access :['IS_AUTHENTICATED_REMEMBERED']],
[pattern:'/subtitles/download', access :['IS_AUTHENTICATED_REMEMBERED']],
| 11 |
diff --git a/Readme.md b/Readme.md @@ -5,7 +5,7 @@ This is the desktop implementation of OONI Probe.
Our two primary target platforms are:
- macOS
-- Windows > 7 (we may also support older versions, but not as primary tagets)
+- Windows > 7 (we may also support older versions, but not as primary targets)
Moreover, since it's written in electron, we plan on also supporting Linux desktop users.
| 1 |
diff --git a/nodes/core/storage/50-file.js b/nodes/core/storage/50-file.js @@ -28,10 +28,9 @@ module.exports = function(RED) {
this.createDir = n.createDir || false;
var node = this;
node.wstream = null;
- node.data = [];
node.msgQueue = [];
node.closing = false;
- node.closeCallbacks = [];
+ node.closeCallback = null;
function processMsg(msg, done) {
var filename = node.filename || msg.filename || "";
@@ -76,22 +75,20 @@ module.exports = function(RED) {
if (typeof data === "boolean") { data = data.toString(); }
if (typeof data === "number") { data = data.toString(); }
if ((node.appendNewline) && (!Buffer.isBuffer(data))) { data += os.EOL; }
- node.data.push({msg:msg,data:Buffer.from(data)});
-
- while (node.data.length > 0) {
if (node.overwriteFile === "true") {
- (function(packet) {
- node.wstream = fs.createWriteStream(filename, { encoding:'binary', flags:'w', autoClose:true });
- node.wstream.on("error", function(err) {
+ var wstream = fs.createWriteStream(filename, { encoding:'binary', flags:'w', autoClose:true });
+ node.wstream = wstream;
+ wstream.on("error", function(err) {
node.error(RED._("file.errors.writefail",{error:err.toString()}),msg);
+ done();
});
- node.wstream.on("open", function() {
- node.wstream.end(packet.data, function() {
- node.send(packet.msg);
+ wstream.on("open", function() {
+ wstream.end(data, function() {
+ node.send(msg);
done();
});
})
- })(node.data.shift());
+ return;
}
else {
// Append mode
@@ -130,21 +127,19 @@ module.exports = function(RED) {
});
node.wstream.on("error", function(err) {
node.error(RED._("file.errors.appendfail",{error:err.toString()}),msg);
+ done();
});
}
if (node.filename) {
// Static filename - write and reuse the stream next time
- var packet = node.data.shift()
- node.wstream.write(packet.data, function() {
- node.send(packet.msg);
+ node.wstream.write(data, function() {
+ node.send(msg);
done();
});
-
} else {
// Dynamic filename - write and close the stream
- var packet = node.data.shift()
- node.wstream.end(packet.data, function() {
- node.send(packet.msg);
+ node.wstream.end(data, function() {
+ node.send(msg);
delete node.wstream;
delete node.wstreamIno;
done();
@@ -152,6 +147,8 @@ module.exports = function(RED) {
}
}
}
+ else {
+ done();
}
}
@@ -162,6 +159,9 @@ module.exports = function(RED) {
if (queue.length > 0) {
processQ(queue);
}
+ else if (node.closing) {
+ closeNode();
+ }
});
}
@@ -171,33 +171,39 @@ module.exports = function(RED) {
// pending write exists
return;
}
+ try {
processQ(msgQueue);
+ }
+ catch (e) {
+ node.msgQueue = [];
if (node.closing) {
closeNode();
}
+ throw e;
+ }
});
function closeNode() {
if (node.wstream) { node.wstream.end(); }
if (node.tout) { clearTimeout(node.tout); }
node.status({});
- var callbacks = node.closeCallbacks;
- node.closeCallbacks = [];
+ var cb = node.closeCallback;
+ node.closeCallback = null;
node.closing = false;
- for (cb in callbacks) {
+ if (cb) {
cb();
}
}
- this.on('close', function(cb) {
- if (cb) {
- node.closeCallbacks.push(done);
- }
+ this.on('close', function(done) {
if (node.closing) {
// already closing
return;
}
node.closing = true;
+ if (done) {
+ node.closeCallback = done;
+ }
if (node.msgQueue.length > 0) {
// close after queue processed
return;
| 3 |
diff --git a/src/lib/gundb/UserPropertiesClass.js b/src/lib/gundb/UserPropertiesClass.js // @flow
-import { assign } from 'lodash'
+import { assign, isUndefined } from 'lodash'
import { defer, from as fromPromise } from 'rxjs'
import { retry } from 'rxjs/operators'
@@ -50,36 +50,39 @@ export default class UserProperties {
* a gun node referring tto gun.user().get('properties')
* @instance {UserProperties}
*/
- gun: Gun
+ propsNode: Gun
data: {}
constructor(gun: Gun) {
- this.gun = gun
+ this.propsNode = gun.user().get('properties')
this.ready = (async () => {
let props
+ const { propsNode } = this
const { defaultProperties } = UserProperties
// make sure we fetch props first and not having gun return undefined
- await this.props
+ await propsNode.then()
try {
- props = await defer(() => fromPromise(this.props.decrypt())) // init user storage
+ props = await defer(() => fromPromise(propsNode.decrypt())) // init user storage
.pipe(retry(1)) // if exception thrown, retry init one more times
.toPromise()
} catch (e) {
log.error('failed decrypting props', e.message, e)
props = {}
}
- props === undefined && log.warn('undefined props from decrypt')
- this.data = assign({}, defaultProperties, props)
- return this.data
- })()
+
+ if (isUndefined(props)) {
+ log.warn('undefined props from decrypt')
}
- get props() {
- return this.gun.user().get('properties')
+ props = assign({}, defaultProperties, props)
+ this.data = props
+
+ return props
+ })()
}
/**
@@ -116,10 +119,10 @@ export default class UserProperties {
* Set value to multiple properties
*/
async updateAll(properties: { [string]: any }): Promise<boolean> {
- const { data } = this
+ const { data, propsNode } = this
assign(data, properties)
- await this.props.secret(data)
+ await propsNode.secret(data)
return true
}
@@ -128,10 +131,11 @@ export default class UserProperties {
* Reset properties to the default state
*/
async reset() {
+ const { propsNode } = this
const { defaultProperties } = UserProperties
this.data = assign({}, defaultProperties)
- await this.props.secret(defaultProperties)
+ await propsNode.secret(defaultProperties)
return true
}
| 1 |
diff --git a/angular/projects/spark-angular/src/lib/components/sprk-flag/sprk-flag.stories.ts b/angular/projects/spark-angular/src/lib/components/sprk-flag/sprk-flag.stories.ts @@ -57,7 +57,7 @@ defaultStory.story = {
},
};
-export const reverse = () => ({
+export const reversed = () => ({
moduleMetadata: modules,
template: `
<sprk-flag
@@ -76,7 +76,7 @@ export const reverse = () => ({
`
});
-reverse.story = {
+reversed.story = {
parameters: {
jest: ['sprk-flag.component'],
},
| 3 |
diff --git a/src/components/dashboard/FaceRecognition.js b/src/components/dashboard/FaceRecognition.js @@ -18,10 +18,6 @@ type Props = {
}
class FaceRecognition extends React.Component<Props> {
- handleSubmit = () => {
- this.props.screenProps.doneCallback({ isEmailConfirmed: true })
- }
-
handleClaim = async () => {
try {
const goodWalletWrapped = wrapper(goodWallet, this.props.store)
@@ -32,7 +28,7 @@ class FaceRecognition extends React.Component<Props> {
title: 'Success',
message: `You've claimed your GD`,
dismissText: 'YAY!',
- onDismiss: this._handleDismissDialog
+ onDismiss: this.props.screenProps.goToRoot
},
loading: true
})
@@ -41,18 +37,12 @@ class FaceRecognition extends React.Component<Props> {
}
}
- _handleDismissDialog = dialogData => {
- const { title } = dialogData
- // TODO: Improve this flow
- if (title === 'Success') this.props.screenProps.pop()
- }
-
render() {
- this.props.screenProps.data = { name: 'John' }
+ const { fullName } = this.props.store.get('profile')
return (
<Wrapper>
<View style={styles.topContainer}>
- <Title>{`${this.props.screenProps.data.name},\n Just one last thing...`}</Title>
+ <Title>{`${fullName},\n Just one last thing...`}</Title>
<Description style={styles.description}>
{"In order to give you a basic income we need to make sure it's really you"}
</Description>
| 0 |
diff --git a/src/sections/Workshop-grid/index.js b/src/sections/Workshop-grid/index.js @@ -18,6 +18,7 @@ import Lab from "../../images/socialIcons/lab_color.png";
const WorkshopsPage = ({hide_path}) => {
const [content, setContent] = useState(false);
+ const [open, setOpen] = useState(false);
const [ID, setID] = useState("");
const data = useStaticQuery(
@@ -106,9 +107,24 @@ const WorkshopsPage = ({hide_path}) => {
</a> : ""}
</div>
{frontmatter.status === "delivered" ? "" : <p>Upcoming...</p>}
- <button type="button" className="readme-btn" onClick={() => {
+ <button type="button" className="readme-btn" onClick={open ?
+ ID === id ?
+ () => {
+ setOpen(false);
+ setContent(false);
+ setID("");
+ } :
+ () => {
+ setOpen(false);
+ setContent(false);
setID(id);
- setContent(!content);
+ setContent(true);
+ setOpen(true);
+ } :
+ () => {
+ setID(id);
+ setContent(true);
+ setOpen(true);
}}>
{content && ID === id ? "Show Less" : "Show More"}
</button>
| 1 |
diff --git a/data.js b/data.js @@ -2357,6 +2357,13 @@ module.exports = [
url: "https://github.com/wessman/defer.js",
source: "https://raw.githubusercontent.com/wessman/defer.js/master/src/defer.js"
},
+ {
+ name: "@shinsenter/defer.js",
+ tags: ["lazy", "loader", "lazyloader", "lazy-load", "async", "defer"],
+ description: "A super small, super efficient library that helps you lazy load (almost) anything. Core Web Vitals friendly.",
+ url: "https://github.com/shinsenter/defer.js",
+ source: "https://raw.githubusercontent.com/shinsenter/defer.js/master/src/defer.js"
+ },
{
name: "BottleJS",
tags: ["dependency injection", "dependency", "injection", "ioc", "di", "provider"],
| 0 |
diff --git a/activities/GameOfLife.activity/css/activity.css b/activities/GameOfLife.activity/css/activity.css @@ -230,3 +230,16 @@ canvas {
background-color: #808080;
border: 2px solid #808080;
}
+
+@media screen and (min-width: 641px) and (max-width: 820px) {
+ .generation-container {
+ height: 20px;
+ margin: 10px 0;
+ }
+ .generation-count {
+ font-size: 32px;
+ }
+ canvas {
+ transform: scale(0.8);
+ }
+}
\ No newline at end of file
| 7 |
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb @@ -280,7 +280,7 @@ module ApplicationHelper
return text if text.blank?
split ||= "\n\n"
text = text.split(split)[0]
- text = strip_tags(text).html_safe
+ sanitize( text, tags: %w(a b strong i em) ).html_safe
end
def remaining_paragraphs_of_text(text,split)
| 11 |
diff --git a/docs/README.md b/docs/README.md @@ -189,8 +189,9 @@ The most updated and useful are :
* [Auto Crystal](https://github.com/link-discord/mineflayer-autocrystal) - Automatic placing & breaking of end crystals.
* [Tool](https://github.com/TheDudeFromCI/mineflayer-tool) - A utility for automatic tool/weapon selection with a high level API.
* [Hawkeye](https://github.com/sefirosweb/minecraftHawkEye) - A utility for using auto-aim with bows.
- * [GUI](https://github.com/firejoust/mineflayer-GUI) - Eased navigation & management of nested chest-GUI windows
- * [Projectile](https://github.com/firejoust/mineflayer-projectile) - Configurable tool for projectile based combat
+ * [GUI](https://github.com/firejoust/mineflayer-GUI) - Interact with nested GUI windows using async/await
+ * [Projectile](https://github.com/firejoust/mineflayer-projectile) - Get the required launch angle for projectiles
+* [Movement](https://github.com/firejoust/mineflayer-movement) - Smooth and realistic player movement, best suited for PvP
But also check out :
| 3 |
diff --git a/base/main_menus/MainBattleMenu.ts b/base/main_menus/MainBattleMenu.ts @@ -120,8 +120,8 @@ export class MainBattleMenu {
this.abilities[char.key_name] = [];
});
this.djinni_already_used = ordered_elements.reduce((a, b) => ((a[b] = 0), a), {});
- this.inner_horizontal_menu.open();
let this_char = this.data.info.party_data.members[this.current_char_index];
+ let open_inner_menu = true;
while (this_char.is_paralyzed(true)) {
this.abilities[this.data.info.party_data.members[this.current_char_index].key_name].push({
key_name: "",
@@ -133,12 +133,16 @@ export class MainBattleMenu {
this.current_char_index >= Battle.MAX_CHARS_IN_BATTLE ||
this.current_char_index >= this.data.info.party_data.members.length
) {
+ open_inner_menu = false;
this.current_char_index = 0;
this.battle_instance.on_abilities_choose(this.abilities);
break;
}
}
+ if (open_inner_menu) {
+ this.inner_horizontal_menu.open();
this.set_avatar();
+ }
});
break;
case "flee":
@@ -330,6 +334,8 @@ export class MainBattleMenu {
if (pop_ability) {
const ability_info = this.abilities[next_char.key_name].pop();
if (
+ ability_info.key_name &&
+ ability_info.key_name in this.data.info.abilities_list &&
this.data.info.abilities_list[ability_info.key_name].ability_category === ability_categories.SUMMON
) {
const requirements = this.data.info.summons_list[ability_info.key_name].requirements;
@@ -339,6 +345,10 @@ export class MainBattleMenu {
}
}
if (next_char.is_paralyzed(true)) {
+ this.abilities[this.data.info.party_data.members[this.current_char_index].key_name].push({
+ key_name: "",
+ targets: [],
+ });
this.change_char(step, pop_ability);
} else {
this.set_avatar();
@@ -362,7 +372,10 @@ export class MainBattleMenu {
inner_menu_cancel() {
const char_key_name = this.data.info.party_data.members[this.current_char_index].key_name;
- if (this.current_char_index > 0 || this.abilities[char_key_name].length === 1) {
+ if (
+ this.current_char_index > 0 ||
+ (this.abilities[char_key_name].length === 1 && this.abilities[char_key_name][0].key_name)
+ ) {
this.change_char(BACKWARD, true);
} else {
this.inner_horizontal_menu.close();
| 1 |
diff --git a/src/mixpanel/index.js b/src/mixpanel/index.js @@ -26,7 +26,7 @@ export const Mixpanel = {
mixpanel.people.set_once(props)
}
},
- withTracking: async (name, fn, errorOpration, finalOperation) => {
+ withTracking: async (name, fn, errorOpration = () => {}, finalOperation = () => {}) => {
try {
mixpanel.track(`${name} start`)
await fn();
| 1 |
diff --git a/src/generators/posthtml.js b/src/generators/posthtml.js @@ -6,10 +6,15 @@ const includes = require('posthtml-include')
const expressions = require('posthtml-expressions')
module.exports = async (html, config) => {
+ const directives = [
+ { name: '?php', start: '<', end: '>' },
+ ...config.build.posthtml.directives
+ ]
+
return posthtml([
layouts({ ...config.build.layouts, strict: false }),
includes(),
modules(config.build.modules),
expressions({ locals: { page: config } })
- ]).process(html).then(result => fm(result.html).body)
+ ]).process(html, { directives: directives }).then(result => fm(result.html).body)
}
| 0 |
diff --git a/includes/Modules/Idea_Hub.php b/includes/Modules/Idea_Hub.php @@ -315,7 +315,7 @@ final class Idea_Hub extends Module
}
}
- add_action( 'transition_post_status', 'on_all_status_transitions', 10, 3 );
+ add_action( 'transition_post_status', 'on_idea_hub_post_status_transition', 10, 3 );
return parent::is_connected();
}
@@ -747,7 +747,7 @@ final class Idea_Hub extends Module
* @param string $old_status Previous post status.
* @param WP_Post $post The post in question.
*/
- public function on_all_status_transitions( $new_status, $old_status, $post ) {
+ public function on_idea_hub_post_status_transition( $new_status, $old_status, $post ) {
if ( ! $this->is_idea_post( $post->ID ) ) {
return;
}
| 10 |
diff --git a/lib/form/admin/plugin.js b/lib/form/admin/plugin.js @@ -4,6 +4,6 @@ var form = require('express-form')
, field = form.field;
module.exports = form(
- field('settingForm[plugin:isEnabledPlugins]').trim().toBoolean()
+ field('settingForm[plugin:isEnabledPlugins]').trim().toBooleanStrict()
);
| 7 |
diff --git a/Specs/Core/PolygonPipelineSpec.js b/Specs/Core/PolygonPipelineSpec.js @@ -132,14 +132,14 @@ describe("Core/PolygonPipeline", function () {
const indices = PolygonPipeline.triangulate(combinedPositions, [4]);
expect(indices).toEqual([
- 3,
0,
4,
+ 7,
5,
4,
0,
3,
- 4,
+ 0,
7,
5,
0,
@@ -183,6 +183,9 @@ describe("Core/PolygonPipeline", function () {
const indices = PolygonPipeline.triangulate(combinedPositions, [4, 8]);
expect(indices).toEqual([
+ 0,
+ 8,
+ 11,
0,
4,
7,
@@ -191,15 +194,15 @@ describe("Core/PolygonPipeline", function () {
0,
3,
0,
- 8,
+ 11,
8,
0,
7,
5,
0,
1,
+ 2,
3,
- 8,
11,
9,
8,
@@ -208,8 +211,8 @@ describe("Core/PolygonPipeline", function () {
5,
1,
2,
- 3,
11,
+ 10,
9,
7,
6,
@@ -217,14 +220,11 @@ describe("Core/PolygonPipeline", function () {
1,
2,
2,
- 11,
10,
9,
+ 9,
6,
2,
- 2,
- 10,
- 9,
]);
});
});
| 3 |
diff --git a/html/objects/_flag.scss b/html/objects/_flag.scss }
}
-/// Adds 4px gutter.
+/// Adds extra small gutter. (Default 4px)
.sprk-o-Flag--tiny {
> .sprk-o-Flag__figure {
padding-right: $sprk-flag-gutter-tiny;
}
}
-/// Adds 8px gutter.
+/// Adds small gutter. (Default 8px)
.sprk-o-Flag--small {
> .sprk-o-Flag__figure {
padding-right: $sprk-flag-gutter-small;
}
}
-/// Adds 32px gutter.
+/// Adds large gutter. (Default 32px)
.sprk-o-Flag--large {
> .sprk-o-Flag__figure {
padding-right: $sprk-flag-gutter-large;
}
}
-/// Adds 64px gutter.
+/// Adds extra large gutter. (Default 64px)
.sprk-o-Flag--huge {
> .sprk-o-Flag__figure {
padding-right: $sprk-flag-gutter-huge;
| 3 |
diff --git a/test/MUIDataTableBody.test.js b/test/MUIDataTableBody.test.js @@ -202,6 +202,137 @@ describe('<TableBody />', function() {
assert.strictEqual(selectRowUpdate.callCount, 1);
});
+ it('should gather selected row data when clicking row with selectableRowsOnClick=true.', () => {
+ let selectedRowData;
+ const options = { selectableRows: true, selectableRowsOnClick: true };
+ const selectRowUpdate = (type, data) => selectedRowData = data;
+ const toggleExpandRow = spy();
+
+ const mountWrapper = mount(
+ <TableBody
+ data={displayData}
+ count={displayData.length}
+ columns={columns}
+ page={0}
+ rowsPerPage={10}
+ selectedRows={[]}
+ selectRowUpdate={selectRowUpdate}
+ expandedRows={[]}
+ toggleExpandRow={toggleExpandRow}
+ options={options}
+ searchText={''}
+ filterList={[]}
+ />,
+ );
+
+ mountWrapper
+ .find('#MUIDataTableBodyRow-2')
+ .first()
+ .simulate('click');
+
+ const expectedResult = { index: 2, dataIndex: 2 };
+ assert.deepEqual(selectedRowData, expectedResult);
+ assert.strictEqual(toggleExpandRow.callCount, 0);
+ });
+
+ it('should gather expanded row data when clicking row with expandableRows=true and expandableRowsOnClick=true.', () => {
+ let expandedRowData;
+ const options = { selectableRows: true, expandableRows: true, expandableRowsOnClick: true };
+ const selectRowUpdate = spy();
+ const toggleExpandRow = data => expandedRowData = data;
+
+ const mountWrapper = mount(
+ <TableBody
+ data={displayData}
+ count={displayData.length}
+ columns={columns}
+ page={0}
+ rowsPerPage={10}
+ selectedRows={[]}
+ selectRowUpdate={selectRowUpdate}
+ expandedRows={[]}
+ toggleExpandRow={toggleExpandRow}
+ options={options}
+ searchText={''}
+ filterList={[]}
+ />,
+ );
+
+ mountWrapper
+ .find('#MUIDataTableBodyRow-2')
+ .first()
+ .simulate('click');
+
+ const expectedResult = { index: 2, dataIndex: 2 };
+ assert.deepEqual(expandedRowData, expectedResult);
+ assert.strictEqual(selectRowUpdate.callCount, 0);
+ });
+
+ it('should gather both selected and expanded row data when clicking row with expandableRows=true, selectableRowsOnClick=true, and expandableRowsOnClick=true.', () => {
+ let expandedRowData;
+ let selectedRowData;
+ const options = { selectableRows: true, selectableRowsOnClick: true, expandableRows: true, expandableRowsOnClick: true };
+ const selectRowUpdate = (type, data) => selectedRowData = data;
+ const toggleExpandRow = data => expandedRowData = data;
+
+ const mountWrapper = mount(
+ <TableBody
+ data={displayData}
+ count={displayData.length}
+ columns={columns}
+ page={0}
+ rowsPerPage={10}
+ selectedRows={[]}
+ selectRowUpdate={selectRowUpdate}
+ expandedRows={[]}
+ toggleExpandRow={toggleExpandRow}
+ options={options}
+ searchText={''}
+ filterList={[]}
+ />,
+ );
+
+ mountWrapper
+ .find('#MUIDataTableBodyRow-2')
+ .first()
+ .simulate('click');
+
+ const expectedResult = { index: 2, dataIndex: 2 };
+ assert.deepEqual(selectedRowData, expectedResult);
+ assert.deepEqual(expandedRowData, expectedResult);
+ });
+
+ it('should not call onRowClick when clicking on checkbox for selectable row', () => {
+ const options = { selectableRows: true, onRowClick: spy() };
+ const selectRowUpdate = spy();
+ const toggleExpandRow = spy();
+
+ const mountWrapper = mount(
+ <TableBody
+ data={displayData}
+ count={displayData.length}
+ columns={columns}
+ page={0}
+ rowsPerPage={10}
+ selectedRows={[]}
+ selectRowUpdate={selectRowUpdate}
+ expandedRows={[]}
+ toggleExpandRow={toggleExpandRow}
+ options={options}
+ searchText={''}
+ filterList={[]}
+ />,
+ );
+
+ mountWrapper
+ .find('TableSelectCell')
+ .first()
+ .find('input')
+ .simulate('click');
+
+ assert.strictEqual(options.onRowClick.callCount, 0);
+ });
+
it('should call onRowClick when Row is clicked', () => {
const options = { selectableRows: true, onRowClick: spy() };
const selectRowUpdate = stub();
| 0 |
diff --git a/karma.conf.js b/karma.conf.js @@ -32,6 +32,9 @@ module.exports = function (config) {
!process.env.TRAVIS_PULL_REQUEST_BRANCH // Catch Travis "PR" builds
? 'unexpected'
: 'unexpected-dev',
+ // Attempt to fix timeouts on CI:
+ // https://github.com/karma-runner/karma-browserstack-launcher/pull/168#issuecomment-582373514
+ timeout: 1800,
},
customLaunchers: {
| 12 |
diff --git a/admin-base/ui.apps/src/main/js/perAdminApp.js b/admin-base/ui.apps/src/main/js/perAdminApp.js @@ -238,9 +238,11 @@ function findNodeFromPathImpl(node, path) {
function notifyUserImpl(title, message, cb) {
set(view, '/state/notification/title', title)
set(view, '/state/notification/message', message)
- set(view, '/state/notification/onOk', cb)
- $('.modal').modal()
- $('#notifyUserModal').modal('open')
+ set(view, '/state/notification/onOk', function(){
+ set(view, '/state/notification/isVisible', false)
+ cb()
+ })
+ set(view, '/state/notification/isVisible', true)
}
function pathBrowserImpl(root, cb) {
| 12 |
diff --git a/modules/xerte/parent_templates/Nottingham/models_html5/results.html b/modules/xerte/parent_templates/Nottingham/models_html5/results.html this.init = function() {
if (x_currentPageXML.getAttribute("text") != undefined && x_currentPageXML.getAttribute("text") != "") {
- $('#pageContents').prepend('<div id="txtHolder">' + x_addLineBreaks(x_currentPageXML.getAttribute("text")) + '</div>');
+ $('#txtHolder').html(x_addLineBreaks(x_currentPageXML.getAttribute("text")));
+ } else {
+ $('#txtHolder').remove();
}
var loadFiles = true;
@@ -620,6 +622,7 @@ results.init();
<div id="pageContents">
+ <div id="txtHolder"></div>
<div id="dialog-form" title="Create new user">
<form>
<fieldset>
| 1 |
diff --git a/source/delegate-factory/package.json b/source/delegate-factory/package.json {
"name": "@airswap/delegate-factory",
- "version": "0.4.4",
+ "version": "1.4.4",
"description": "Deploys Delegate contracts for use in the Swap Protocol",
"license": "Apache-2.0",
"repository": {
| 3 |
diff --git a/packages/idyll-document/src/components/author-tool.js b/packages/idyll-document/src/components/author-tool.js @@ -68,7 +68,7 @@ class AuthorTool extends React.PureComponent {
<div className="icon-links">
<a className="icon-link" href={componentDocsLink}>
<img className="icon-link-image"
- src="https://raw.githubusercontent.com/google/material-design-icons/master/action/svg/production/ic_description_24px.svg?sanitize=true"
+ src="https://raw.githubusercontent.com/google/material-design-icons/master/action/svg/design/ic_description_24px.svg?sanitize=true"
/>
</a>
</div>
@@ -87,7 +87,7 @@ class AuthorTool extends React.PureComponent {
render() {
const { idyll, updateProps, hasError, ...props } = this.props;
const addBorder = this.state.isAuthorView ? {outline: '2px solid grey',
- backgroundColor: '#E7E3D0',
+ backgroundColor: '#F5F5F5',
transition: 'background-color 0.4s linear'} : null;
return (
<div className="component-debug-view" style={addBorder}>
@@ -101,6 +101,7 @@ class AuthorTool extends React.PureComponent {
type='info'
effect='solid'
place='right'
+ disable={this.state.isAuthorView}
>
<h3>{props.authorComponent.type._idyll.name} Component</h3>
<p>Click for more info</p>
| 4 |
diff --git a/packages/jsdoc-eslint-config/index.js b/packages/jsdoc-eslint-config/index.js @@ -284,7 +284,11 @@ module.exports = {
'sort-keys': 'off',
'sort-vars': 'off', // TODO: enable?
'space-before-blocks': ['error', 'always'],
- 'space-before-function-paren': ['error', 'never'],
+ 'space-before-function-paren': ['error', {
+ anonymous: 'never',
+ named: 'never',
+ asyncArrow: 'always'
+ }],
'space-in-parens': 'off', // TODO: enable?
'space-infix-ops': 'error',
'space-unary-ops': 'error',
| 11 |
diff --git a/src/components/DrawerForm/index.js b/src/components/DrawerForm/index.js @@ -288,7 +288,7 @@ class DrawerForm extends PureComponent {
const serviceComponentLists =
serviceComponentList &&
serviceComponentList.length > 0 &&
- serviceComponentList.length;
+ serviceComponentList[0].service_id;
const containerPorts =
editInfo && editInfo.container_port && editInfo.container_port;
const portLists =
| 1 |
diff --git a/token-metadata/0xd321Ca7Cd7A233483b8CD5a11a89E9337e70Df84/metadata.json b/token-metadata/0xd321Ca7Cd7A233483b8CD5a11a89E9337e70Df84/metadata.json "symbol": "VI",
"address": "0xd321Ca7Cd7A233483b8CD5a11a89E9337e70Df84",
"decimals": 18,
- "dharmaVerificationStatus": {
"dharmaVerificationStatus": "VERIFIED"
}
\ No newline at end of file
-}
\ No newline at end of file
| 3 |
diff --git a/lib/tasks/remote_tables_maintenance.rake b/lib/tasks/remote_tables_maintenance.rake @@ -88,6 +88,21 @@ namespace :cartodb do
target_username: args['target_username'], granted_api_key: args['granted_api_key'])
end
+ desc 'Removes a Data Library entry from a user'
+ task :remove_from_data_library, [:username, :visualization_name] => [:environment] do |_, args|
+ username = args['username']
+ name = args['visualization_name']
+ raise 'All Arguments are mandatory' unless username.present? && name.present?
+
+ user = Carto::User.find_by_username(username)
+ raise 'User not found' unless user
+
+ visualization = Carto::Visualization.remotes.where(user_id: user.id, name: name).first
+ raise 'Visualization not found' unless visualization
+
+ visualization.destroy
+ end
+
desc "Invalidate user's date flag and make them refresh data library"
task :invalidate_common_data => [:environment] do
require_relative '../../app/helpers/common_data_redis_cache'
| 2 |
diff --git a/config/sidebar.yml b/config/sidebar.yml @@ -139,7 +139,7 @@ articles:
- title: "Mobile App"
url: "/client-auth/current/mobile-desktop"
- - title: "Authentication"
+ - title: "Legacy"
url: "/client-auth/legacy"
hidden: true
children:
| 3 |
diff --git a/packages/build/src/install/local.js b/packages/build/src/install/local.js @@ -53,7 +53,10 @@ const LOCAL_INSTALL_NAME = '@netlify/plugin-local-install-core'
// Core plugins and non-local plugins already have their dependencies installed
const getLocalPluginsOptions = function(pluginsOptions) {
- return pluginsOptions.filter(isLocalPlugin).filter(isUnique)
+ return pluginsOptions
+ .filter(isLocalPlugin)
+ .filter(isUnique)
+ .filter(hasPackageDir)
}
const isLocalPlugin = function({ loadedFrom }) {
@@ -65,6 +68,10 @@ const isUnique = function({ packageDir }, index, pluginsOptions) {
return pluginsOptions.slice(index + 1).every(pluginOption => pluginOption.packageDir !== packageDir)
}
+const hasPackageDir = function({ packageDir }) {
+ return packageDir !== undefined
+}
+
// We only install dependencies of local plugins that have their own `package.json`
const removeMainRoot = async function(localPluginsOptions, buildDir) {
const mainPackageDir = await pkgDir(buildDir)
| 7 |
diff --git a/src/ApiGateway.js b/src/ApiGateway.js @@ -563,8 +563,6 @@ module.exports = class ApiGateway {
event = lambdaProxyIntegrationEvent.getEvent()
}
- event.isOffline = true
-
if (this._service.custom && this._service.custom.stageVariables) {
event.stageVariables = this._service.custom.stageVariables
} else if (integration !== 'lambda-proxy') {
| 2 |
diff --git a/app/middlewares/error.js b/app/middlewares/error.js @@ -3,13 +3,13 @@ var PgErrorHandler = require('../postgresql/error_handler');
module.exports = function errorMiddleware() {
return function error(err, req, res, next) {
- var pgErrorHandler = new PgErrorHandler(err);
-
- var msg = {
- error: [pgErrorHandler.getMessage()]
- };
+ if (isTimeoutError(err)) {
+ pgErrorHandler = createTimeoutError();
+ } else {
+ pgErrorHandler = createPgError(err);
+ }
- _.defaults(msg, pgErrorHandler.getFields());
+ var msg = pgErrorHandler.getResponse();
if (global.settings.environment === 'development') {
msg.stack = err.stack;
@@ -28,7 +28,7 @@ module.exports = function errorMiddleware() {
res.header('X-SQLAPI-Profiler', req.profiler.toJSONString());
}
- setErrorHeader(msg, pgErrorHandler.getStatus(), res);
+ setErrorHeader(msg, pgErrorHandler.http_status, res);
res.header('Content-Type', 'application/json; charset=utf-8');
res.status(getStatusError(pgErrorHandler, req));
@@ -48,7 +48,7 @@ module.exports = function errorMiddleware() {
function getStatusError(pgErrorHandler, req) {
- var statusError = pgErrorHandler.getStatus();
+ var statusError = pgErrorHandler.http_status;
// JSONP has to return 200 status error
if (req && req.query && req.query.callback) {
@@ -89,3 +89,30 @@ function stringifyForLogs(object) {
return JSON.stringify(object);
}
+
+function isTimeoutError(err) {
+ return err.message && (
+ err.message.indexOf('statement timeout') > -1 ||
+ err.message.indexOf('RuntimeError: Execution of function interrupted by signal') > -1
+ );
+}
+
+function createTimeoutError() {
+ return new PgErrorHandler(
+ 'You are over platform\'s limits. Please contact us to know more details',
+ 429,
+ 'limit',
+ 'datasource'
+ );
+}
+
+function createPgError(err) {
+ return new PgErrorHandler(
+ err.message,
+ PgErrorHandler.getStatus(err),
+ err.context,
+ err.detail,
+ err.hint,
+ PgErrorHandler.getName(err)
+ );
+}
| 4 |
diff --git a/test/test262.mjs b/test/test262.mjs @@ -66,14 +66,6 @@ const excludedTests = new Set([
'test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/conversion-operation.js',
'test/built-ins/TypedArrayConstructors/internals/Set/conversion-operation.js',
- // -0 is apparently broken.
- 'test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/detached-buffer.js',
- 'test/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/key-is-minus-zero.js',
- 'test/built-ins/TypedArrayConstructors/internals/Get/key-is-not-minus-zero.js',
- 'test/built-ins/TypedArrayConstructors/internals/GetOwnProperty/key-is-minus-zero.js',
- 'test/built-ins/TypedArrayConstructors/internals/HasProperty/key-is-minus-zero.js',
- 'test/built-ins/TypedArrayConstructors/internals/Set/key-is-minus-zero.js',
-
// Unimplemented methods on %TypedArrayPrototype%.
'test/built-ins/TypedArray/prototype/filter/arraylength-internal.js',
'test/built-ins/TypedArray/prototype/filter/callbackfn-arguments-with-thisarg.js',
| 2 |
diff --git a/package.json b/package.json "truffle-privatekey-provider",
"solc",
"sequelize",
- "sequelize-cli"
+ "sequelize-cli",
+ "ipfs"
],
"ignorePaths": [],
- "schedule": "before 2am",
+ "schedule": "before 11am",
"rebaseStalePrs": false
}
}
| 8 |
diff --git a/storage.js b/storage.js import localforage from './localforage.js';
+import {makePromise} from './util.js';
+let ids = 0;
+const loadPromise = new Promise((accept, reject) => {
const iframe = document.createElement('iframe');
iframe.onload = () => {
console.log('iframe load outer 1');
@@ -9,48 +12,92 @@ iframe.onload = () => {
console.log('got message outer', e.data);
};
- /* iframe.contentWindow.onmessage = e => {
- const j = e.data;
- if (j && j._localstorage) {
- window.removeEventListener('message', _message);
- console.log('got json', j);
- j.port.postMessage({lol: zol});
- }
- }; */
iframe.contentWindow.postMessage({
_localstorage: true,
port: channel.port2,
}, '*', [channel.port2]);
- channel.port1.postMessage({lol: 'zol'});
+ /* channel.port1.postMessage({
+
+ }); */
+ // window.port = channel.port1;
console.log('iframe load outer 2');
+ accept(channel.port1);
};
-iframe.onerror = err => {
- console.warn('iframe error', err);
-};
+ iframe.onerror = reject;
iframe.src = 'https://localstorage.webaverse.com/';
+ iframe.setAttribute('frameborder', 0);
+ iframe.style.position = 'absolute';
+ iframe.style.top = '-4096px';
+ iframe.style.left = '-4096px';
document.body.appendChild(iframe);
+});
const tempStorage = {};
const storage = {
- async get(k) {
- const s = await localforage.getItem(k);
- return typeof s === 'string' ? JSON.parse(s) : s;
+ get(key) {
+ return loadPromise.then(port => new Promise((accept, reject) => {
+ const _message = e => {
+ const j = e.data;
+ if (j.id === id) {
+ port.removeEventListener('message', _message);
+ accept(j.result);
+ }
+ };
+ port.addEventListener('message', _message);
+ const id = ++ids;
+ port.postMessage({
+ method: 'get',
+ id,
+ key,
+ });
+ }));
},
- async getRaw(k) {
+ /* async getRaw(k) {
return await localforage.getItem(k);
+ }, */
+ set(key, value) {
+ return loadPromise.then(port => new Promise((accept, reject) => {
+ const _message = e => {
+ const j = e.data;
+ if (j.id === id) {
+ port.removeEventListener('message', _message);
+ accept(j.result);
+ }
+ };
+ port.addEventListener('message', _message);
+ const id = ++ids;
+ port.postMessage({
+ method: 'set',
+ id,
+ key,
+ value,
+ });
+ }));
},
- async set(k, v) {
- await localforage.setItem(k, JSON.stringify(v));
- },
- async setRaw(k, v) {
+ /* async setRaw(k, v) {
await localforage.setItem(k, v);
+ }, */
+ remove(key) {
+ return loadPromise.then(port => new Promise((accept, reject) => {
+ const _message = e => {
+ const j = e.data;
+ if (j.id === id) {
+ port.removeEventListener('message', _message);
+ accept(j.result);
+ }
+ };
+ port.addEventListener('message', _message);
+ const id = ++ids;
+ port.postMessage({
+ method: 'remove',
+ id,
+ key,
+ });
+ }));
},
- async remove(k) {
- await localforage.removeItem(k);
- },
- async keys() {
+ /* async keys() {
return await localforage.keys();
},
async getRawTemp(k) {
@@ -58,6 +105,6 @@ const storage = {
},
async setRawTemp(k, v) {
tempStorage[k] = v;
- },
+ }, */
};
export default storage;
| 4 |
diff --git a/404.html b/404.html if (window.location.href.indexOf("react-ui") == -1) {
window.locationSubdirectory = '';
- document.write('<link rel="stylesheet" type="text/css" href="/components/styles/index.css" />');
+ /* document.write('<link rel="stylesheet" type="text/css" href="/components/styles/index.css" />');
document.write('<link rel="stylesheet" type="text/css" href="/components/styles/inventory.css" />');
document.write('<link rel="stylesheet" type="text/css" href="/components/styles/weaponWheel.css" />');
document.write('<link rel="stylesheet" type="text/css" href="/components/styles/menu.css" />');
document.write('<link rel="stylesheet" type="text/css" href="/components/styles/trade.css" />');
document.write('<link href="https://fonts.googleapis.com/css?family=Open+Sans:300,400,600,700&display=swap" rel="stylesheet">');
document.write(' <link href="https://fonts.googleapis.com/css2?family=Muli:wght@400;600&display=swap" rel="stylesheet">');
- loadJS('/404.js')
+ loadJS('/404.js') */
} else {
window.locationSubdirectory = '/react-ui';
| 2 |
diff --git a/token-metadata/0x584B44853680ee34a0F337B712a8f66d816dF151/metadata.json b/token-metadata/0x584B44853680ee34a0F337B712a8f66d816dF151/metadata.json "symbol": "AIDOC",
"address": "0x584B44853680ee34a0F337B712a8f66d816dF151",
"decimals": 18,
- "dharmaVerificationStatus": {
"dharmaVerificationStatus": "VERIFIED"
}
\ No newline at end of file
-}
\ No newline at end of file
| 3 |
diff --git a/conf/routes b/conf/routes @@ -131,5 +131,5 @@ POST /amtAssignment @controllers.Missio
# Clustering and Attributes
GET /runSingleUserClusteringAllUsers @controllers.AttributeController.runSingleUserClusteringAllUsers
-GET /userLabelsToCluster @controllers.AttributeController.getUserLabelsToCluster(userId: String, isAnonymous: Boolean)
+GET /userLabelsToCluster @controllers.AttributeController.getUserLabelsToCluster(userIdOrIp: String, isAnonymous: Boolean)
POST /singleUserClusteringResults @controllers.AttributeController.postSingleUserClusteringResults(userId: String, isAnonymous: Boolean)
| 1 |
diff --git a/src/components/ExpensiTextInput/BaseExpensiTextInput.js b/src/components/ExpensiTextInput/BaseExpensiTextInput.js @@ -166,7 +166,6 @@ class BaseExpensiTextInput extends Component {
<View
style={[
styles.expensiTextInputContainer,
- !hasLabel && styles.pv0,
this.state.isFocused && styles.borderColorFocus,
(hasError || errorText) && styles.borderColorDanger,
]}
@@ -194,7 +193,7 @@ class BaseExpensiTextInput extends Component {
placeholder={(this.state.isFocused || !label) ? placeholder : null}
placeholderTextColor={themeColors.placeholderText}
underlineColorAndroid="transparent"
- style={inputStyle}
+ style={[inputStyle, !hasLabel && styles.pv0,]}
multiline={multiline}
onFocus={this.onFocus}
onBlur={this.onBlur}
| 5 |
diff --git a/src/inner-slider.js b/src/inner-slider.js @@ -122,47 +122,33 @@ export class InnerSlider extends React.Component {
}
this.ro.disconnect();
};
- UNSAFE_componentWillReceiveProps = nextProps => {
- let spec = {
- listRef: this.list,
- trackRef: this.track,
- ...nextProps,
- ...this.state
- };
+
+ didPropsChange(prevProps) {
let setTrackStyle = false;
for (let key of Object.keys(this.props)) {
- if (!nextProps.hasOwnProperty(key)) {
+ if (!prevProps.hasOwnProperty(key)) {
setTrackStyle = true;
break;
}
if (
- typeof nextProps[key] === "object" ||
- typeof nextProps[key] === "function"
+ typeof prevProps[key] === "object" ||
+ typeof prevProps[key] === "function"
) {
continue;
}
- if (nextProps[key] !== this.props[key]) {
+ if (prevProps[key] !== this.props[key]) {
setTrackStyle = true;
break;
}
}
- this.updateState(spec, setTrackStyle, () => {
- if (this.state.currentSlide >= React.Children.count(nextProps.children)) {
- this.changeSlide({
- message: "index",
- index:
- React.Children.count(nextProps.children) - nextProps.slidesToShow,
- currentSlide: this.state.currentSlide
- });
- }
- if (nextProps.autoplay) {
- this.autoPlay("update");
- } else {
- this.pause("paused");
+ return (
+ setTrackStyle ||
+ React.Children.count(this.props.children) !==
+ React.Children.count(prevProps.children)
+ );
}
- });
- };
- componentDidUpdate = () => {
+
+ componentDidUpdate = prevProps => {
this.checkImagesLoad();
this.props.onReInit && this.props.onReInit();
if (this.props.lazyLoad) {
@@ -183,6 +169,32 @@ export class InnerSlider extends React.Component {
// this.props.onLazyLoad([leftMostSlide])
// }
this.adaptHeight();
+ let spec = {
+ listRef: this.list,
+ trackRef: this.track,
+ ...this.props,
+ ...this.state
+ };
+ const setTrackStyle = this.didPropsChange(prevProps);
+ setTrackStyle &&
+ this.updateState(spec, setTrackStyle, () => {
+ if (
+ this.state.currentSlide >= React.Children.count(this.props.children)
+ ) {
+ this.changeSlide({
+ message: "index",
+ index:
+ React.Children.count(this.props.children) -
+ this.props.slidesToShow,
+ currentSlide: this.state.currentSlide
+ });
+ }
+ if (this.props.autoplay) {
+ this.autoPlay("update");
+ } else {
+ this.pause("paused");
+ }
+ });
};
onWindowResized = setTrackStyle => {
if (this.debouncedResize) this.debouncedResize.cancel();
| 2 |
diff --git a/components/post.js b/components/post.js @@ -332,6 +332,53 @@ function Post({title, published_at, feature_image, html, backLink}) {
.kg-audio-player, .kg-audio-thumbnail {
display: none;
}
+
+ .kg-file-card-container {
+ display: flex;
+ align-items: stretch;
+ justify-content: space-between;
+ padding: 6px;
+ border: 1px solid rgb(124 139 154/25%);
+ border-radius: 3px;
+ transition: all ease-in-out .35s;
+ text-decoration: none;
+ width: 100%;
+ margin-bottom: 1em;
+ }
+
+ .kg-file-card-contents {
+ display: flex;
+ flex-direction: column;
+ justify-content: space-between;
+ margin: 4px 8px;
+ width: 100%;
+ }
+
+ .kg-file-card-metadata {
+ display: flex;
+ margin-top: 2px;
+ padding: 0 0 .5em .5em;
+ font-style: italic;
+ }
+
+ .kg-file-card-filesize {
+ margin-left: 1em;
+ }
+
+ .kg-file-card-icon svg {
+ height: 24px;
+ width: 24px;
+ }
+
+ .kg-file-card-icon {
+ position: relative;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ width: 80px;
+ min-width: 80px;
+ background-color: ${colors.lighterGrey}
+ }
`}</style>
</Section>
)
| 0 |
diff --git a/geometry-manager.js b/geometry-manager.js @@ -2299,6 +2299,9 @@ const geometryWorker = (() => {
);
allocator.freeAll();
};
+ w.removeGeometryPhysics = (physics, id) => {
+ moduleInstance.removeGeometryPhysics(physics, id);
+ };
/* w.earcut = (tracker, ps, holes, holeCounts, points, z, zs, objectId, position, quaternion) => {
const inPs = w.alloc(Float32Array, ps.length);
inPs.set(ps);
| 0 |
diff --git a/lib/shared/addon/components/cluster-driver/driver-gke/component.js b/lib/shared/addon/components/cluster-driver/driver-gke/component.js @@ -200,7 +200,13 @@ export default Component.extend(ClusterDriver, {
if (get(this, 'mode') === 'new') {
// set(this, 'config.serviceAccount', filter?.firstObject && filter.firstObject.uniqueId)
- set(this, 'config.network', networks?.firstObject && networks.firstObject.name)
+ const defaultNet = networks.findBy('name', 'default');
+
+ if (!isEmpty(defaultNet)) {
+ set(this, 'config.network', defaultNet?.name);
+ } else {
+ set(this, 'config.network', networks?.firstObject && networks.firstObject.name);
+ }
}
if (isEmpty(config.kubernetesVersion)) {
| 12 |
diff --git a/src/components/shapes/draw.js b/src/components/shapes/draw.js @@ -171,11 +171,7 @@ function drawOne(gd, index) {
);
}
- path.node().addEventListener('click', function() { return clickFn(path); });
- }
-
- function clickFn(path) {
- activateShape(gd, path);
+ path.node().addEventListener('click', function() { return activateShape(gd, path); });
}
}
| 2 |
diff --git a/src/instance/methods.js b/src/instance/methods.js @@ -67,10 +67,10 @@ Moon.prototype.destroy = function() {
Moon.prototype.build = function(vdom) {
for(var vnode in vdom) {
if(vnode !== undefined && !vnode.once) {
- if(child.nodeName === "#text") {
+ if(vnode.type === "#text") {
var valueOfVNode = "";
valueOfVNode = vnode.val(this.$data);
- child.textContent = valueOfVNode;
+ vnode.node.textContent = valueOfVNode;
} else if(vnode.props) {
for(var attr in vnode.props) {
var compiledProp = vnode.props[attr](this.$data);
| 12 |
diff --git a/backend/README.md b/backend/README.md @@ -67,14 +67,25 @@ Export key pair in base64 with no newlines:
gpg --armor --export KEY_ID | base64 -w0
gpg --armor --export-secret-key KEY_ID | base64 -w0
-## Migrations
+## Creating a new table in the database [Work in Progress]
-[Sequelize migrations docs](https://sequelize.org/master/manual/migrations.html)
+Reference: https://sequelize.org/master/manual/
-Add new migration:
+Checklist:
+- [ ] Determine the names of the columns in your table. Plan to include a `created_at` and an `updated_at` column with type `DATE` to prevent issues with the following steps.
+- [ ] Create a skeleton of the table by [adding a new migration](https://sequelize.org/master/manual/migrations.html):
npx sequelize migration:generate --name migrationName --migrations-path=./db/migrations
+ By convention, column names are written with snake case (e.g. `my_column`). After making changes to your migration file, you can commit the changes to the database using the command
+
+ npm run migrate
+
+- [ ] Navigate to the _models_ folder and [create a new file](https://sequelize.org/master/manual/model-instances.html) with an appropriate name.
+ **Note:** While it is common for column names in migration files to be written in snake case, column names in models are written in lower camel case (e.g. `myColumn`). To correctly instruct Sequelize to associate these columns with their couterparts in the DB, set the `underscored` option to `true` [See more](https://sequelize.org/master/manual/naming-strategies.html)
+
+- [ ] To be continued...
+
## Sync Repos
npm run build:dist
@@ -100,3 +111,5 @@ Then in another window:
env USE_RUNNING_SERVICES=true yarn run test
+
+
| 14 |
diff --git a/packages/bitcore-node/test/integration/wallet-benchmark.integration.ts b/packages/bitcore-node/test/integration/wallet-benchmark.integration.ts @@ -207,7 +207,7 @@ describe('Wallet Benchmark', function() {
{ [address1]: 0.1, [address2]: 0.1 }
]);
const fundedTx = await rpc.call('fundrawtransaction', [tx]);
- const signedTx = await rpc.call('signrawtransactionwithwallet', [fundedTx.hex]);
+ const signedTx = await rpc.signrawtx(fundedTx.hex);
await rpc.call('generatetoaddress', [100, anAddress]);
p2pWorker.sync();
| 1 |
diff --git a/src/helpers/assets.js b/src/helpers/assets.js @@ -19,8 +19,10 @@ class AssetComponent extends Component {
this.updateAsset(this.props);
}
componentWillReceiveProps(nextProps) {
+ if (nextProps.asset !== this.props.asset) {
this.updateAsset(nextProps);
}
+ }
updateAsset(props) {
const query = gql`
query GetAsset($assetKey: String!, $simulatorId: ID) {
| 7 |
diff --git a/packages/feature-flags/src/index.js b/packages/feature-flags/src/index.js @@ -4,7 +4,10 @@ function initFeatureFlags({ flagState, currentEnvironment, environments }) {
}
if (!Object.values(environments).includes(currentEnvironment)) {
- throw Error(`invalid environment: "${currentEnvironment}"`);
+ throw Error(`
+invalid environment "${currentEnvironment}", the NEAR_WALLET_ENV environment variable must be set to one of:
+${Object.values(environments).join(', ')}
+ `);
}
return new Proxy(flagState, {
| 1 |
diff --git a/lib/assets/javascripts/builder/editor/layers/layer-content-views/analyses/analyses-view.js b/lib/assets/javascripts/builder/editor/layers/layer-content-views/analyses/analyses-view.js @@ -88,12 +88,12 @@ module.exports = CoreView.extend({
type: 'alert',
title: _t('editor.messages.layer-hidden.title'),
body: _t('editor.messages.layer-hidden.body'),
- mainAction: {
+ action: {
label: _t('editor.messages.layer-hidden.show')
}
});
},
- mainAction: self._showHiddenLayer.bind(self)
+ onAction: self._showHiddenLayer.bind(self)
},
{
state: 'deleting-analysis',
@@ -102,17 +102,13 @@ module.exports = CoreView.extend({
type: 'alert',
title: _t('editor.messages.deleting-analysis.title'),
body: _t('editor.messages.deleting-analysis.body'),
- mainAction: {
- label: _t('editor.messages.deleting-analysis.cancel')
- },
- secondAction: {
- label: _t('editor.messages.deleting-analysis.delete'),
- type: 'secondary'
+ action: {
+ label: _t('editor.messages.deleting-analysis.delete')
}
});
},
- mainAction: self._resetDeletingAnalysis.bind(self),
- secondAction: self._deleteAnalysis.bind(self)
+ onClose: self._resetDeletingAnalysis.bind(self),
+ onAction: self._deleteAnalysis.bind(self)
}
];
| 4 |
diff --git a/vis/js/list.js b/vis/js/list.js @@ -140,7 +140,7 @@ list.drawList = function() {
}
window.clearTimeout(timer);
timer = window.setTimeout(function() {
- debounce(self.filterList(event.target.value.split(" ")), config.debounce);
+ debounce(self.filterList(event.target.value.split(" "), this.current_filter_param), config.debounce);
}, delay);
});
@@ -148,7 +148,7 @@ list.drawList = function() {
$("#searchclear").click(() => {
$("#filter_input").val('');
$("#searchclear").hide();
- debounce(this.filterList([""]), config.debounce);
+ debounce(this.filterList([""], this.current_filter_param), config.debounce);
});
// Add sort button options
@@ -326,6 +326,7 @@ list.addFilterOptionDropdownEntry = function (filter_option, first_item) {
}
newEntry.on("click", () => {
+ this.current_filter_param = filter_option;
this.filterList(undefined, filter_option)
$('#curr-filter-type').text(config.localization[config.language][filter_option])
$('.filter_entry').removeClass('active');
@@ -741,7 +742,7 @@ list.filterList = function(search_words, filter_param) {
}
if (filter_param === undefined) {
- filter_param = this.current_filter_param
+ filter_param = this.current_filter_param;
} else {
mediator.publish("record_action", filter_param, "List", "filter", config.user_id, "filter_list", null, "filter_param=" + filter_param);
}
| 1 |
diff --git a/assets/js/components/legacy-notifications/setup-incomplete.js b/assets/js/components/legacy-notifications/setup-incomplete.js @@ -41,8 +41,6 @@ export const getSetupIncompleteComponent = ( module, inGrid = false, fullWidth =
return ctaWrapper( cta, inGrid, fullWidth, createGrid );
};
-export default getSetupIncompleteComponent;
-
/**
* Creates a CTA component when module needs to be activated. Different wrapper HTML is needed depending on where the CTA gets output, which is determined by the inGrid, fullWidth, and createGrid parameters.
*
| 2 |
diff --git a/web3swift.podspec b/web3swift.podspec @@ -13,7 +13,7 @@ Pod::Spec.new do |spec|
spec.resource_bundle = { "Browser" => "Sources/web3swift/Browser/*.js" }
spec.swift_version = '5.0'
spec.frameworks = 'CoreImage'
- spec.dependency 'BigInt', '~> 5.2.1'
+ spec.dependency 'BigInt', '~> 5.2'
spec.dependency 'Starscream', '~> 4.0.4'
spec.dependency 'CryptoSwift', '~> 1.4.0'
spec.dependency 'secp256k1.c', '~> 0.1'
| 1 |
diff --git a/token-metadata/0x47eB79217f42f92dbd741ADd1B1a6783A2c873cf/metadata.json b/token-metadata/0x47eB79217f42f92dbd741ADd1B1a6783A2c873cf/metadata.json "symbol": "BAST",
"address": "0x47eB79217f42f92dbd741ADd1B1a6783A2c873cf",
"decimals": 18,
- "dharmaVerificationStatus": {
"dharmaVerificationStatus": "VERIFIED"
}
\ No newline at end of file
-}
\ No newline at end of file
| 3 |
diff --git a/.github/workflows/build-and-push.yml b/.github/workflows/build-and-push.yml @@ -15,12 +15,11 @@ on:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
- build:
+ build-and-push:
# The type of runner that the job will run on
runs-on: ubuntu-latest
env:
RELEASE_TAG: ${{ startsWith(github.ref, 'refs/tags/release') && 'latest' || 'dev' }}
- JEST_TIMEOUT: 100000
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
| 2 |
diff --git a/src/js/tools/drawing/Stroke.js b/src/js/tools/drawing/Stroke.js linePixels = pskl.PixelUtils.getLinePixels(col, this.startCol, row, this.startRow);
}
- pskl.PixelUtils.resizePixels(linePixels, penSize).forEach(function (point) {
- targetFrame.setPixel(point[0], point[1], color);
+ var bump = (penSize + 1) % 2;
+ for (var j = 0; j < penSize / 2; j++) {
+ for (var i = 0; i < penSize / 2; i++) {
+ if (i + j < penSize / 2) {
+ targetFrame.setPixel(linePixels[0].col + i,
+ linePixels[0].row + j, color);
+ targetFrame.setPixel(linePixels[0].col - bump - i,
+ linePixels[0].row + j, color);
+ targetFrame.setPixel(linePixels[0].col + i,
+ linePixels[0].row - bump - j, color);
+ targetFrame.setPixel(linePixels[0].col - bump - i,
+ linePixels[0].row - bump - j, color);
+ targetFrame.setPixel(linePixels[linePixels.length - 1].col + i,
+ linePixels[linePixels.length - 1].row + j, color);
+ targetFrame.setPixel(linePixels[linePixels.length - 1].col - bump - i,
+ linePixels[linePixels.length - 1].row + j, color);
+ targetFrame.setPixel(linePixels[linePixels.length - 1].col + i,
+ linePixels[linePixels.length - 1].row - bump - j, color);
+ targetFrame.setPixel(linePixels[linePixels.length - 1].col - bump - i,
+ linePixels[linePixels.length - 1].row - bump - j, color);
+ }
+ }
+ }
+
+ linePixels.forEach(function (point) {
+ for (var i = 0; i < penSize; i++) {
+ targetFrame.setPixel(point.col - Math.floor(penSize / 2) + i, point.row, color);
+ targetFrame.setPixel(point.col, point.row - Math.floor(penSize / 2) + i, color);
+ }
});
};
| 7 |
diff --git a/app/shared/actions/blockexplorers.js b/app/shared/actions/blockexplorers.js @@ -72,7 +72,7 @@ export function getBlockExplorers() {
{
name: 'explore.beos.world',
patterns: {
- account: 'https://explore.beos.world/account/{account}',
+ account: 'https://explore.beos.world/accounts/{account}',
txid: 'https://explore.beos.world/transactions/{txid}'
}
}
| 1 |
diff --git a/packages/e2e-tests/utils/account.js b/packages/e2e-tests/utils/account.js @@ -8,6 +8,11 @@ const getBankAccount = async () => {
return account;
};
+function generateTestAccountId() {
+ return `test-playwright-account-${Date.now()}-${Math.floor(Math.random() * 1000) % 1000}`;
+}
+
module.exports = {
- getBankAccount
+ getBankAccount,
+ generateTestAccountId
};
| 3 |
diff --git a/browsers/chrome/manifest.json b/browsers/chrome/manifest.json {
- "name": "DuckDuckGo Plus",
+ "name": "DuckDuckGo Privacy Essentials",
"version": "2017.11.9",
- "description": "DuckDuckGo Privacy Protection",
+ "description": "Privacy, simplified. Protect your data as you search and browse: tracker blocking, smarter encryption, private search, and more.",
"icons": {
"16": "img/icon_16.png",
"48": "img/icon_48.png",
| 3 |
diff --git a/packages/app/src/components/Admin/ImportData/GrowiArchive/ImportCollectionItem.jsx b/packages/app/src/components/Admin/ImportData/GrowiArchive/ImportCollectionItem.jsx import React from 'react';
+
import PropTypes from 'prop-types';
// eslint-disable-next-line no-unused-vars
-import { withTranslation } from 'react-i18next';
-
+import { useTranslation } from 'react-i18next';
import { Progress } from 'reactstrap';
import GrowiArchiveImportOption from '~/models/admin/growi-archive-import-option';
@@ -22,7 +22,7 @@ export const MODE_RESTRICTED_COLLECTION = {
users: ['insert', 'upsert'],
};
-export default class ImportCollectionItem extends React.Component {
+class ImportCollectionItem extends React.Component {
constructor(props) {
super(props);
@@ -249,3 +249,16 @@ ImportCollectionItem.defaultProps = {
modifiedCount: 0,
errorsCount: 0,
};
+
+const ImportCollectionItemWrapperFc = (props) => {
+ const { t } = useTranslation();
+
+ return <ImportCollectionItem t={t} {...props} />;
+};
+
+/**
+ * Wrapper component for using unstated
+ */
+const ImportCollectionItemWrapper = ImportCollectionItemWrapperFc;
+
+export default ImportCollectionItemWrapper;
| 14 |
diff --git a/README.md b/README.md @@ -18,7 +18,6 @@ Running it
* [Run a minimal image][mini]. This is the simple demo included in this repo.
* Or run [Etoys][etoys]. Everything except the image and template files is in this repo.
* Or similarly, [Scratch][scratch], also in here.
-* Go to the [SqueakJS debugger][debug] page with the Lively interface.
**Run your own Squeak image in the browser**
@@ -42,7 +41,7 @@ Running it
All modern browsers should work (Chrome, Safari, IE, FireFox), though Chrome performs best currently. Safari on iPad works somewhat. YMMV.
Fixes to improve browser compatibility are highly welcome!
-If your browser does not support ES6 modules try the full or headless SqueakJS VM as a single file (aka bundle) in the [dist][dist] directory.
+If your browser does not support ES6 modules try the full or headless SqueakJS VM as a single file (aka bundle) in the [Distribution][dist] directory.
Installing locally
@@ -59,6 +58,13 @@ Installing locally
Now Squeak should be running.
The reason for having to run from a web server is because the image is loaded with an XMLHttpRequest which does not work with a file URL. Alternatively, you could just open SqueakJS/run/index.html and drop in a local image.
+Using (self contained) bundled files
+------------------------------------
+* select your preferred type of interface (browser or headless)
+* use the appropriate file (`squeak_bundle.js` resp. `squeak_headless_bundle.js`) from the [Distribution][dist] directory
+* use the minified (ie file ending with `.min.js`) version if download/parsing speed is important
+* additionally use the source map (ie file ending with `.js.map`) together with minified file for debugging
+
How to modify it
----------------
* use any text editor
@@ -79,7 +85,7 @@ As for optimizing I think the way to go is an optimizing JIT compiler. The curre
To make SqueakJS useful beyond running existing Squeak images, we should use the JavaScript bridge to write a native HTML UI which would certainly be much faster than BitBlt.
-Better Networking would be interesting, too. The SocketPlugin currently only allows HTTP requests. How about implementing it more generally via WebSockets? Parallelize the VM with WebWorkers?
+Better Networking would be interesting, too. The SocketPlugin currently does allows HTTP(S) requests and WebSockets. How about implementing low level Socket support based on HTTP-tunneling? The VM can run in a WebWorker. How about parallelizing the VM with WebWorkers?
There's a gazillion exciting things to do :)
@@ -93,6 +99,8 @@ There's a gazillion exciting things to do :)
[mini]: http://bertfreudenberg.github.io/SqueakJS/demo/simple.html
[etoys]: http://bertfreudenberg.github.io/SqueakJS/etoys/
[scratch]: http://bertfreudenberg.github.io/SqueakJS/scratch/
+ [ws]: http://bertfreudenberg.github.io/SqueakJS/ws/
+ [dist]: http://bertfreudenberg.github.io/SqueakJS/dist/
[zip]: https://github.com/bertfreudenberg/SqueakJS/archive/master.zip
[pullreq]: https://help.github.com/articles/using-pull-requests
| 1 |
diff --git a/src/lib/gundb/__tests__/UserStorage.js b/src/lib/gundb/__tests__/UserStorage.js @@ -694,4 +694,21 @@ describe('users index', () => {
let addr = await userStorage.getUserAddress('[email protected]')
expect(addr).toBe(wallet)
})
+
+ it('isValidValue should return true', async () => {
+ const isValidValue = await userStorage.isValidValue('email', '[email protected]')
+ expect(isValidValue).toBeTruthy()
+ })
+
+ it('validateProfile should return isValid=true', async () => {
+ const { isValid, errors } = await userStorage.validateProfile({ email: '[email protected]' })
+ expect(isValid).toBeTruthy()
+ expect(errors).toEqual({})
+ })
+
+ it('validateProfile should return isValid=false when not profile provided', async () => {
+ const { isValid, errors } = await userStorage.validateProfile()
+ expect(isValid).toBeFalsy()
+ expect(errors).toEqual({})
+ })
})
| 0 |
diff --git a/src/image/roi/manager.js b/src/image/roi/manager.js @@ -290,7 +290,7 @@ export default class RoiManager {
minCommonBorderLength = 5
} = options;
let rois = this.getRois(opt);
- let toMerge = new Set();
+ let toMerge = [];
switch (algorithm.toLowerCase()) {
//Algorithms. We can add more algorithm to create other types of merging.
case 'commonborder' :
@@ -298,7 +298,7 @@ export default class RoiManager {
for (let k = 0; k < rois[i].borderIDs.length; k++) {
//If the length of wall of the current region and his neighbour is big enough, we join the rois.
if (rois[i].borderIDs[k] !== 0 && rois[i].borderIDs[k] < rois[i].id && rois[i].borderLengths[k] * minCommonBorderLength >= rois[i].border) {
- toMerge.add([rois[i].id, rois[i].borderIDs[k]]);
+ toMerge.push([rois[i].id, rois[i].borderIDs[k]]);
}
}
}
| 4 |
diff --git a/middleware/ApiKeyAuthMiddleware.php b/middleware/ApiKeyAuthMiddleware.php @@ -58,6 +58,7 @@ class ApiKeyAuthMiddleware extends AuthMiddleware
if ($request->getQueryParam('secret') !== null && $apiKeyService->IsValidApiKey($request->getQueryParam('secret'), ApiKeyService::API_KEY_TYPE_SPECIAL_PURPOSE_CALENDAR_ICAL))
{
$validApiKey = true;
+ $usedApiKey = $request->getQueryParam('secret');
}
}
}
| 1 |
diff --git a/packages/app/src/components/MaintenanceModeContent.tsx b/packages/app/src/components/MaintenanceModeContent.tsx @@ -31,9 +31,7 @@ const MaintenanceModeContent = () => {
<i className="icon-arrow-right"></i>
<a className="btn btn-link" href="/admin">{ t('maintenance_mode.admin_page') }</a>
</p>
- )
-
- }
+ )}
{currentUser != null
? (
<p>
| 7 |
diff --git a/Source/Core/GeographicTilingScheme.js b/Source/Core/GeographicTilingScheme.js /*global define*/
define([
+ './Check',
'./Cartesian2',
'./defaultValue',
'./defined',
'./defineProperties',
- './DeveloperError',
'./Ellipsoid',
'./GeographicProjection',
'./Math',
'./Rectangle'
], function(
+ Check,
Cartesian2,
defaultValue,
defined,
defineProperties,
- DeveloperError,
Ellipsoid,
GeographicProjection,
CesiumMath,
@@ -115,9 +115,7 @@ define([
*/
GeographicTilingScheme.prototype.rectangleToNativeRectangle = function(rectangle, result) {
//>>includeStart('debug', pragmas.debug);
- if (!defined(rectangle)) {
- throw new DeveloperError('rectangle is required.');
- }
+ Check.defined('rectangle', rectangle);
//>>includeEnd('debug');
var west = CesiumMath.toDegrees(rectangle.west);
| 3 |
diff --git a/src/browser/provider/built-in/chrome/cdp.js b/src/browser/provider/built-in/chrome/cdp.js @@ -29,10 +29,15 @@ async function setEmulation (runtimeInfo) {
await client.Network.setUserAgentOverride({ userAgent: config.userAgent });
if (config.touch !== void 0) {
- await client.Emulation.setTouchEmulationEnabled({
+ const touchConfig = {
enabled: config.touch,
configuration: config.mobile ? 'mobile' : 'desktop'
- });
+ };
+
+ if (client.Emulation.setEmitTouchEventsForMouse)
+ await client.Emulation.setEmitTouchEventsForMouse(touchConfig);
+ else if (client.Emulation.setTouchEmulationEnabled)
+ await client.Emulation.setTouchEmulationEnabled(touchConfig);
}
await resizeWindow({ width: config.width, height: config.height }, runtimeInfo);
| 4 |
diff --git a/test/subSuites/grpcTest.js b/test/subSuites/grpcTest.js @@ -59,20 +59,25 @@ module.exports = () => {
};
const requestSetup = async (index) => {
try {
- await sideBar.selectRequest.selectByIndex(index);
+ console.log('inside REQ setup');
+ await sideBar.openRequestDropdown.click();
+ const dropdown = await sideBar.selectRequest
+ console.log('dropdown', dropdown);
await sideBar.addRequestBtn.click();
await reqRes.sendBtn.click();
const res = await reqRes.jsonPretty.getText();
return res;
} catch(err) {
- console.error(err)
+ console.error('FROM requestSetup', err)
}
};
it("it should work on a unary request", async () => {
try {
await sideBarSetup();
- await sideBar.selectService.selectByIndex(1);
- const jsonPretty = await requestSetup(1);
+ await sideBar.openSelectServiceDropdown.click();
+ await sideBar.selectService.click();
+ const jsonPretty = await requestSetup(0);
+ console.log('reqSetUp pass')
await new Promise((resolve) =>
setTimeout(async () => {
expect(jsonPretty).to.include(`"message": "Hello string"`);
@@ -80,48 +85,48 @@ module.exports = () => {
}, 800)
);
} catch(err) {
- console.error(err)
- }
- });
- it("it should work on a nested unary request", async () => {
- try {
- const jsonPretty = await requestSetup(2);
- expect(jsonPretty).to.include(
- `{\n "serverMessage": [\n {\n "message": "Hello! string"\n },\n {\n "message": "Hello! string"\n }\n ]\n}`
- );
- } catch(err) {
- console.error(err)
- }
- });
- it("it should work on a server stream", async () => {
- try {
- const jsonPretty = await requestSetup(3);
- expect(jsonPretty).to.include(
- `{\n "response": [\n {\n "message": "You"\n },\n {\n "message": "Are"\n`
- );
- } catch(err) {
- console.error(err)
- }
- });
- it("it should work on a client stream", async () => {
- try {
- const jsonPretty = await requestSetup(4);
- expect(jsonPretty).to.include(
- `{\n "message": "received 1 messages"\n}`
- );
- } catch(err) {
- console.error(err)
- }
- });
- it("it should work on a bidirectional stream", async () => {
- try {
- const jsonPretty = await requestSetup(5);
- expect(jsonPretty).to.include(
- `{\n "message": "bidi stream: string"\n}`
- );
- } catch(err) {
- console.error(err)
+ console.error('FROM unary', err)
}
});
+ // it("it should work on a nested unary request", async () => {
+ // try {
+ // const jsonPretty = await requestSetup(2);
+ // expect(jsonPretty).to.include(
+ // `{\n "serverMessage": [\n {\n "message": "Hello! string"\n },\n {\n "message": "Hello! string"\n }\n ]\n}`
+ // );
+ // } catch(err) {
+ // console.error(err)
+ // }
+ // });
+ // it("it should work on a server stream", async () => {
+ // try {
+ // const jsonPretty = await requestSetup(3);
+ // expect(jsonPretty).to.include(
+ // `{\n "response": [\n {\n "message": "You"\n },\n {\n "message": "Are"\n`
+ // );
+ // } catch(err) {
+ // console.error(err)
+ // }
+ // });
+ // it("it should work on a client stream", async () => {
+ // try {
+ // const jsonPretty = await requestSetup(4);
+ // expect(jsonPretty).to.include(
+ // `{\n "message": "received 1 messages"\n}`
+ // );
+ // } catch(err) {
+ // console.error(err)
+ // }
+ // });
+ // it("it should work on a bidirectional stream", async () => {
+ // try {
+ // const jsonPretty = await requestSetup(5);
+ // expect(jsonPretty).to.include(
+ // `{\n "message": "bidi stream: string"\n}`
+ // );
+ // } catch(err) {
+ // console.error(err)
+ // }
+ // });
});
};
| 12 |
diff --git a/src/duration.js b/src/duration.js @@ -216,7 +216,7 @@ export default class Duration {
}
/**
- * Create a Duration from a JavaScript object with keys like 'years' and 'hours.
+ * Create a Duration from a JavaScript object with keys like 'years' and 'hours'.
* If this object is empty then a zero milliseconds duration is returned.
* @param {Object} obj - the object to create the DateTime from
* @param {number} obj.years
| 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.