code
stringlengths
122
4.99k
label
int64
0
14
diff --git a/src/js/controllers/buy-bitcoin/home.controller.js b/src/js/controllers/buy-bitcoin/home.controller.js @@ -22,10 +22,6 @@ angular // Functions vm.onBuyInstantly = onBuyInstantly; - // Functions - Short because the appear in translatable strings - vm.onPp = onPrivacyPolicy; - vm.onTos = onTermsOfService; - function _initVariables() { vm.monthlyLimit = '-'; vm.monthlyPurchased = '-';
1
diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml @@ -37,6 +37,7 @@ jobs: echo "APPCENTER_NAME=GoodDollar/GoodDollar-Android-development" >> $GITHUB_ENV echo "APPCENTER_TOKEN=${{ secrets.APPCENTER_ANDROID_DEV }}" >> $GITHUB_ENV echo "APPCENTER_CODEPUSH_TOKEN=${{ secrets.APPCENTER_CODEPUSH_DEV }}" >> $GITHUB_ENV + echo "APPCENTER_CODEPUSH_FLAGS=debug" >> $GITHUB_ENV - name: Pre-checks - Env is QA if: ${{ endsWith(github.ref, '/staging') }} run: | @@ -53,6 +54,7 @@ jobs: echo "APPCENTER_NAME=GoodDollar/GoodDollar-Android-production" >> $GITHUB_ENV echo "APPCENTER_TOKEN=${{ secrets.APPCENTER_ANDROID_PROD }}" >> $GITHUB_ENV echo "APPCENTER_CODEPUSH_TOKEN=${{ secrets.APPCENTER_CODEPUSH_PROD }}" >> $GITHUB_ENV + echo "APPCENTER_CODEPUSH_FLAGS=''" >> $GITHUB_ENV - uses: actions/checkout@v3 - uses: actions/setup-node@v1 with: @@ -80,7 +82,7 @@ jobs: echo Code push release target version $BUILD_NUMBER yarn lingui:compile BUILD_VERSION=`node -pe "require('./package.json')['version']"` - npx appcenter codepush release-react --token ${{ env.APPCENTER_TOKEN }} -a ${{ env.APPCENTER_NAME }} -d Production -t ${BUILD_VERSION} + npx appcenter codepush ${{ env.APPCENTER_CODEPUSH_FLAGS }} release-react --token ${{ env.APPCENTER_TOKEN }} -a ${{ env.APPCENTER_NAME }} -d Production -t ${BUILD_VERSION} build: name: Build
0
diff --git a/src/abstract-ops/array-objects.mjs b/src/abstract-ops/array-objects.mjs @@ -46,10 +46,6 @@ export function ArrayCreate(length, proto) { proto = surroundingAgent.intrinsic('%ArrayPrototype%'); } const A = new ArrayExoticObjectValue(); - - // Set A's essential internal methods except for [[DefineOwnProperty]] - // to the default ordinary object definitions specified in 9.1. - A.Prototype = proto; A.Extensible = Value.true;
2
diff --git a/app/i18n.js b/app/i18n.js const zhLocaleData = require('react-intl/locale-data/zh'); const koLocaleData = require('react-intl/locale-data/ko'); const viLocaleData = require('react-intl/locale-data/vi'); + const ruLocaleData = require('react-intl/locale-data/ru'); const enTranslationMessages = require('./translations/en.json'); const zhTranslationMessages = require('./translations/zh.json'); const koTranslationMessages = require('./translations/ko.json'); const viTranslationMessages = require('./translations/vi.json'); + const ruTranslationMessages = require('./translations/ru.json'); addLocaleData(enLocaleData); addLocaleData(zhLocaleData); addLocaleData(koLocaleData); addLocaleData(viLocaleData); + addLocaleData(ruLocaleData); const DEFAULT_LOCALE = 'en'; 'ko', 'zh', 'vi', + 'ru', ]; const formatTranslationMessages = (locale, messages) => { zh: formatTranslationMessages('zh', zhTranslationMessages), ko: formatTranslationMessages('ko', koTranslationMessages), vi: formatTranslationMessages('vi', viTranslationMessages), + ru: formatTranslationMessages('ru', ruTranslationMessages), }; exports.appLocales = appLocales;
0
diff --git a/src/js/controllers/walletSelectorController.js b/src/js/controllers/walletSelectorController.js @@ -17,7 +17,7 @@ angular.module('copayApp.controllers').controller('walletSelectorController', fu sendFlowService.popState(); } - $scope.params = sendFlowService.getState(); + var stateParams = sendFlowService.getState(); var config = configService.getSync().wallet.settings; priceDisplayAsFiat = config.priceDisplay === 'fiat'; @@ -29,17 +29,18 @@ angular.module('copayApp.controllers').controller('walletSelectorController', fu $scope.sendFlowTitle = gettextCatalog.getString('Wallet to Wallet Transfer'); break; case 'tabs.send.destination': - if ($scope.params.fromWalletId) { + if (stateParams.fromWalletId) { $scope.sendFlowTitle = gettextCatalog.getString('Wallet to Wallet Transfer'); } break; default: - if (!$scope.params.thirdParty) { + if (!stateParams.thirdParty) { $scope.sendFlowTitle = gettextCatalog.getString('Send'); } // nop } + $scope.params = sendFlowService; $scope.coin = false; // Wallets to show (for destination screen or contacts) $scope.type = $scope.params['fromWalletId'] ? 'destination' : 'origin'; // origin || destination fromWalletId = $scope.params['fromWalletId'];
13
diff --git a/docs/development.md b/docs/development.md @@ -7,17 +7,17 @@ git clone https://github.com/r-spacex/SpaceX-API.git && cd SpaceX-API 2. Install dependencies ```bash -yarn install +npm install ``` 3. Run ESlint and all tests ```bash -yarn test +npm test ``` 4. Start the app ```bash -yarn start +npm start ``` ### With Docker
3
diff --git a/src/botPage/view/blockly/blocks/trade/tradeOptions.js b/src/botPage/view/blockly/blocks/trade/tradeOptions.js @@ -95,11 +95,14 @@ export default () => { } return 'BARRIEROFFSETTYPE_LIST'; }; - const otherBarrierList = this.getInput(otherBarrierListName()); + const otherBarrierList = this.getField(otherBarrierListName()); if (otherBarrierList) { if (ev.newValue === 'absolute') { otherBarrierList.setValue(ev.newValue); - } else { + } else if ( + config.barrierTypes.findIndex(type => type[1] === otherBarrierList.getValue()) === + -1 + ) { const value = config.barrierTypes.find(type => type[1] !== ev.newValue); otherBarrierList.setValue(value[1]); } @@ -194,6 +197,7 @@ export default () => { }; const barrierOffsetNames = ['BARRIEROFFSET', 'SECONDBARRIEROFFSET']; + const barrierLabels = [translate('High barrier'), translate('Low barrier')]; const removeInput = inputName => tradeOptionsBlock.removeInput(inputName); const updateList = (list, options, selected = null) => { list.menuGenerator_ = options; // eslint-disable-line no-underscore-dangle, no-param-reassign @@ -209,32 +213,28 @@ export default () => { barriers.values.forEach((barrierValue, index) => { const typeList = tradeOptionsBlock.getField(`${barrierOffsetNames[index]}TYPE_LIST`); const typeInput = tradeOptionsBlock.getInput(barrierOffsetNames[index]); - const absoluteLabels = [translate('High barrier'), translate('Low barrier')]; if (barriers.allowBothTypes || selectedDuration === 'd') { const absoluteType = [[translate('Absolute'), 'absolute']]; if (selectedDuration === 'd') { updateList(typeList, absoluteType, 'absolute'); - if (barriers.values.length === 2) { - typeInput.fieldRow[0].setText(`${absoluteLabels[index]}:`); - } else { - typeInput.fieldRow[0].setText(`${translate('Barrier')}:`); - } } else { updateList( typeList, config.barrierTypes.concat(absoluteType), config.barrierTypes[index][1] ); - typeInput.fieldRow[0].setText(`${translate('Barrier')} ${index + 1}:`); } - revealBarrierBlock(barrierValue, barrierOffsetNames[index]); } else { updateList(typeList, config.barrierTypes, config.barrierTypes[index][1]); - typeInput.fieldRow[0].setText(`${translate('Barrier')} ${index + 1}:`); - revealBarrierBlock(barrierValue, barrierOffsetNames[index]); } + if (barriers.values.length === 1) { + typeInput.fieldRow[0].setText(`${translate('Barrier')}:`); + } else { + typeInput.fieldRow[0].setText(`${barrierLabels[index]}:`); + } + revealBarrierBlock(barrierValue, barrierOffsetNames[index]); }); barrierOffsetNames.slice(barriers.values.length).forEach(removeInput); });
11
diff --git a/src/bundler/bundle.imba b/src/bundler/bundle.imba @@ -235,6 +235,7 @@ export default class Bundle < Component stdin: o.stdin minify: o.minify ?? program.minify incremental: !!watcher + charset: 'utf8' loader: Object.assign({ ".png": "file", ".apng": "file",
12
diff --git a/README.md b/README.md @@ -23,7 +23,6 @@ The code here will be under continual audit and improvement as the project progr - https://mintr.synthetix.io - https://synthetix.exchange - https://dashboard.synthetix.io -- https://swappr.io ## Branching
2
diff --git a/assets/js/googlesitekit/datastore/modules/index.js b/assets/js/googlesitekit/datastore/modules/index.js * Internal dependencies */ import Data from 'googlesitekit-data'; -import { createNotificationsStore } from '../../data/create-notifications-store'; import modules from './modules'; -const notifications = createNotificationsStore( 'core', 'modules', 'notifications' ); - export const INITIAL_STATE = Data.collectState( modules.INITIAL_STATE, - notifications.INITIAL_STATE, ); import { STORE_NAME } from './constants'; @@ -37,27 +33,23 @@ export const actions = Data.addInitializeAction( Data.collectActions( Data.commonActions, modules.actions, - notifications.actions, ) ); export const controls = Data.collectControls( Data.commonControls, modules.controls, - notifications.controls, ); export const reducer = Data.addInitializeReducer( INITIAL_STATE, Data.collectReducers( modules.reducer, - notifications.reducer, ) ); export const resolvers = Data.collectResolvers( modules.resolvers, - notifications.resolvers, ); export const selectors = Data.collectSelectors(
2
diff --git a/config/sidebar.yml b/config/sidebar.yml @@ -14,32 +14,76 @@ articles: - title: Developer Videos url: /videos + children: + + - title: Developer Overview + url: /videos/developer-overview + + - title: Rules + url: /videos/rules + + - title: Session & Cookies + url: /videos/session-and-cookies - title: Architecture Scenarios url: /architecture-scenarios + children: + - title: Server Client + API + url: /architecture-scenarios/application/server-api + + - title: SSO for Regular Web Apps + url: /architecture-scenarios/application/web-app-sso + + - title: SPA + API + url: /architecture-scenarios/application/spa-api + + - title: Mobile + API + url: /architecture-scenarios/application/mobile-api + + - title: SAML for Regular Web Apps + url: /architecture-scenarios/application/web-saml + + - title: B2B + B2E + url: /architecture-scenarios/business/b2b-b2e + + - title: B2B + url: /architecture-scenarios/business/b2b + + - title: B2C + url: /architecture-scenarios/business/b2c + + - title: B2E + url: /architecture-scenarios/business/b2e - title: Pre-launch Tips url: /prelaunch-tips - title: "Clients" url: "/clients" + children: + + - title: Overview + url: /clients + + - title: Connections + url: /clients/connections - title: "APIs" - url: "/api-auth/intro" + url: "/apis" children: + - title: "Overview" + url: "/apis" + + - title: "Authorization API Index" + url: "/api-auth" + - title: "OIDC Conformant Authentication" url: "/api-auth/intro" - - title: "Adoption Guide" + - title: "OIDC Adoption Guide" url: "/api-auth/tutorials/adoption" - - title: "Docs Index" - url: "/api-auth" - - - title: "APIs Overview" - url: "/apis" - - title: "Which OAuth Flow to Use" url: "/api-auth/which-oauth-flow-to-use" @@ -67,23 +111,24 @@ articles: - title: "Connections" url: "/connections" children: - - title: "Username/Password Connection" + - title: "Overview" + url: "/connections" + + - title: "Username/Password" url: "/connections/database" - - title: "Social / Enterprise Connections" + - title: "Social/Enterprise" url: "/identityproviders" children: - title: "Custom Social Extensions" url: "/extensions/custom-social-extensions" - - title: "Custom Database Connections" + - title: "Custom Database" url: "/connections/database/mysql" - title: "Passwordless Authentication" url: "/connections/passwordless" children: - - title: "Overview" - url: "/connections/passwordless" - title: "Using Email" url: "/connections/passwordless/email" @@ -117,9 +162,12 @@ articles: url: "/hooks" children: - - title: "Overview" + - title: "Index" url: "/hooks" + - title: "Overview" + url: "/hooks/overview" + - title: "Extensibility Points" url: "/hooks/extensibility-points" @@ -141,6 +189,15 @@ articles: - title: "Customizing Your Emails" url: "/email/templates" + - title: "Use your own SMTP Email Provider" + url: "/email/providers" + + - title: "Liquid Syntax in Email Templates" + url: "/email/liquid-syntax" + + - title: "Set up a Test SMTP Provider" + url: "/email/testing" + - title: "Password Policies" url: "/connections/database/password-options" children:
0
diff --git a/src/js/views/commandViews.js b/src/js/views/commandViews.js @@ -70,12 +70,17 @@ var CommandPromptView = Backbone.View.extend({ var el = e.target; const shadowEl = document.querySelector('#shadow'); - const uc = el.value.replace(/ {2,}/g, ' '); + + const currentValue = el.value; + const allCommand = currentValue.split(';'); + const lastCommand = allCommand[allCommand.length - 1] + .replace(/\s\s+/g, ' ').replace(/^\s/, ''); + shadowEl.innerHTML = ''; - if(uc.length){ + if (lastCommand.length) { for (const c of allCommandsSorted) { - if(c.indexOf(uc) === 0){ - shadowEl.innerHTML = c; + if (c.startsWith(lastCommand)) { + shadowEl.innerHTML = (currentValue + c.replace(lastCommand, '')).replace(/ /g, '&nbsp;'); break; } } @@ -83,7 +88,7 @@ var CommandPromptView = Backbone.View.extend({ if (e.keyCode === 9) { e.preventDefault(); - el.value = shadowEl.innerHTML; + el.value = shadowEl.innerHTML.replace(/&nbsp;/g, ' '); } this.updatePrompt(el);
1
diff --git a/src/scripts/interactive-video.js b/src/scripts/interactive-video.js @@ -2854,7 +2854,8 @@ var getxAPIDefinition = function () { * @return {boolean} */ const isSameElementOrChild = ($parent, $child) => { - return $parent !== undefined && $parent.is($child) || $.contains($parent.get(0), $child.get(0)); + return $parent !== undefined && $child !== undefined + && ($parent.is($child) || $.contains($parent.get(0), $child.get(0))); }; /**
0
diff --git a/src/connectors/vk.js b/src/connectors/vk.js @@ -5,7 +5,7 @@ let isPlaying = false; const vkFilter = new MetadataFilter({ all: MetadataFilter.decodeHtmlEntities -}); +}).extend(MetadataFilter.getRemasteredFilter()); Connector.isPlaying = () => isPlaying;
7
diff --git a/.github/PULL_REQUEST_TEMPLATE b/.github/PULL_REQUEST_TEMPLATE <!-- -We appreciate the effort for this pull request but before that please make sure you read the contribution guidelines given above, then fill out the blanks below. +Please explain WHAT you changed and WHY. +The title should be descriptive, for example: -Please enter each Issue number you are resolving in your PR after one of the following words [Fixes, Closes, Resolves]. This will auto-link these issues and close them when this PR is merged! -e.g. -Fixes #1 -Closes #2 ---> -# Fixes # +* *Fixed a typo in the apikeypermissions.md page* +* *Added the maximum number of domain whitelabels you can create to domains.md* +* *Fixing the number of days a batch id is valid in scheduling_parameters.md* -### Checklist -- [ ] I have made a material change to the repo (functionality, testing, spelling, grammar) -- [ ] I have read the [Contribution Guide] and my PR follows them. -- [ ] I updated my branch with the master branch. -- [ ] I have added tests that prove my fix is effective or that my feature works -- [ ] I have added necessary documentation about the functionality in the appropriate .md file -- [ ] I have added in line documentation to the code I modified +Fill out this form in the body: +--> -### Short description of what this PR does: -- -- +**Description of the change**: +**Reason for the change**: +**Link to original source**: +<!-- +If this pull request closes an issue, add in the issue number here +--> +Closes # -If you have questions, please send an email to [Sendgrid](mailto:[email protected]), or file a Github Issue in this repository.
13
diff --git a/test/server/integration/lobby.spec.js b/test/server/integration/lobby.spec.js const Lobby = require('../../../server/lobby.js'); const _ = require('underscore'); -xdescribe('lobby', function() { +describe('lobby', function() { beforeEach(function() { this.socketSpy = jasmine.createSpyObj('socket', ['joinChannel', 'send']); this.ioSpy = jasmine.createSpyObj('io', ['set', 'use', 'on', 'emit']); @@ -10,7 +10,7 @@ xdescribe('lobby', function() { this.socketSpy.user = { username: 'test'}; this.socketSpy.id = 'socket1'; - this.lobby = new Lobby({}, { io: this.ioSpy, messageRepository: {}, deckRepository: {}, router: this.routerSpy, config: {} }); + this.lobby = new Lobby({}, { io: this.ioSpy, cardService: {}, messageRepository: {}, deckRepository: {}, router: this.routerSpy, config: {} }); this.lobby.sockets[this.socketSpy.id] = this.socketSpy; });
1
diff --git a/metaversefile-api.js b/metaversefile-api.js @@ -55,6 +55,7 @@ import dropManager from './drop-manager.js'; import hitManager from './character-hitter.js'; import dcWorkerManager from './dc-worker-manager.js'; import cardsManager from './cards-manager.js'; +import * as geometryAllocators from './geometry-allocator.js'; const localVector2D = new THREE.Vector2(); @@ -1178,6 +1179,9 @@ export default () => { useGeometries() { return geometries; }, + useGeometryAllocators() { + return geometryAllocators; + }, useMaterials() { return materials; },
0
diff --git a/app/hotels/src/map/MapView.js b/app/hotels/src/map/MapView.js @@ -35,10 +35,12 @@ type MarkerPressEvent = {| |}; type LatLng = {| - latitude: number, longitude: number, + latitude: number, |}; +const NO_OF_MARKERS_IN_REGION = 15; + const styles = StyleSheet.create({ map: StyleSheet.absoluteFillObject, }); @@ -104,7 +106,9 @@ export class Map extends React.Component<Props, State> { (distances[lowMiddle].distance + distances[highMiddle].distance) / 2; const validDistances = distances.length > 2 - ? distances.filter(({ distance }) => median * 1.5 > distance) + ? distances + .filter(({ distance }) => median * 1.5 > distance) + .slice(0, NO_OF_MARKERS_IN_REGION) : distances; const coordsByDistance = validDistances
12
diff --git a/lib/carto/connector/context.rb b/lib/carto/connector/context.rb @@ -47,29 +47,28 @@ module Carto # Commands with no results (e.g. UPDATE, etc.) will return an empty array (`[]`). # Result rows are returned as hashes with indifferent access. def execute_in_user_database(command, *args) - statement_timeout = args.first.delete :statement_timeout + # FIXME: consider using ::User#transaction_with_timeout or in_database_direct_connection + + statement_timeout = args.first.delete :statement_timeout if args.firsts data = nil @user.in_database(*args) do |db| db.transaction do unless statement_timeout.nil? old_timeout = db.fetch("SHOW statement_timeout;").first[:statement_timeout] - db.run("SET statement_timeout TO '#{statement_timeout}';") - end - - case db - when Sequel::Database - data = db.fetch(command).all - else - data = db.execute command + exec_sql(db, "SET statement_timeout TO '#{statement_timeout}'") end + begin + data = exec_sql(db, command) + ensure unless statement_timeout.nil? - db.run("SET statement_timeout TO '#{old_timeout}';") + exec_sql(db, "SET statement_timeout TO '#{old_timeout}';") end end end - data.map(&:with_indifferent_access) + end + data end def username @@ -81,6 +80,16 @@ module Carto end attr_reader :user + + private + def exec_sql(db, sql) + case db + when Sequel::Database + db.fetch(command).all + else + db.execute command + end.map(&:with_indifferent_access) + end end end end
1
diff --git a/components/notification.js b/components/notification.js @@ -7,10 +7,10 @@ import Button from './button' function Notification({message, type, style, isFullWidth, onClose, children}) { return ( <div style={style} className={`notification ${type || ''} ${onClose ? 'closable' : ''} ${isFullWidth ? 'full-width' : ''}`}> - {children || message} {onClose && ( <Button className='close' aria-label='Fermer' onClick={onClose}><X /></Button> )} + {children || message} </div > ) }
5
diff --git a/app/pages/lab/social-links-editor.jsx b/app/pages/lab/social-links-editor.jsx @@ -4,6 +4,8 @@ import DragReorderable from 'drag-reorderable'; import AutoSave from '../../components/auto-save.coffee'; import SOCIAL_ICONS from '../../lib/social-icons'; +const ROUTE_BEFORE_DOMAIN = ['wordpress']; + export default class SocialLinksEditor extends React.Component { constructor(props) { super(props); @@ -37,6 +39,10 @@ export default class SocialLinksEditor extends React.Component { handleNewLink(site, e) { let index = this.indexFinder(this.props.project.urls, site); if (index < 0) { index = this.props.project.urls.length; } + let url = `https://${site}${e.target.value}`; + if (ROUTE_BEFORE_DOMAIN.some(el => site.indexOf(el) >= 0)) { + url = `https://${e.target.value}.${site}`; + } if (e.target.value) { const changes = { @@ -44,7 +50,7 @@ export default class SocialLinksEditor extends React.Component { label: '', path: e.target.value, site, - url: `https://${site}${e.target.value}` + url } }; this.props.project.update(changes); @@ -86,10 +92,13 @@ export default class SocialLinksEditor extends React.Component { renderRow(site, i) { const index = this.indexFinder(this.props.project.urls, site); const value = index >= 0 ? this.props.project.urls[index].path : ''; + const precedeSiteName = ROUTE_BEFORE_DOMAIN.some(el => site.indexOf(el) >= 0); return ( <tr key={i}> + {!precedeSiteName && ( <td>{site}</td> + )} <AutoSave tag="td" resource={this.props.project}> <input type="text" @@ -100,6 +109,9 @@ export default class SocialLinksEditor extends React.Component { onMouseUp={this.handleEnableDrag} /> </AutoSave> + {precedeSiteName && ( + <td>.{site}</td> + )} <td> <button type="button" onClick={this.handleRemoveLink.bind(this, site)}> <i className="fa fa-remove" />
9
diff --git a/src/main/java/de/uniwue/web/io/PageXMLWriter.java b/src/main/java/de/uniwue/web/io/PageXMLWriter.java @@ -151,8 +151,10 @@ public class PageXMLWriter { xmlReadingOrder.getRoot().setOrdered(true); List<String> readingOrder = result.getReadingOrder(); for (String regionID : readingOrder) { + if (idMap.get(regionID) != null){ xmlReadingOrder.getRoot().addRegionRef(idMap.get(regionID).toString()); } + } // Write as Document ByteArrayOutputStream os = new ByteArrayOutputStream();
11
diff --git a/node/lib/util/write_repo_ast_util.js b/node/lib/util/write_repo_ast_util.js @@ -77,12 +77,10 @@ const configRepo = co.wrap(function *(repo) { * Return the tree and a map of associated subtrees corresponding to the * specified `changes` in the specified `repo`, and based on the optionally * specified `parent`. Use the specified `shaMap` to resolve logical shas to - * actual written shas (such as for submodule heads). Use the specified `db` - * to write objects. + * actual written shas (such as for submodule heads). * * @async * @param {NodeGit.Repository} repo - * @param {NodeGit.Odb} db * @param {Object} shaMap maps logical to physical ID * @param {Object} changes map of changes * @param {Object} [parent]
2
diff --git a/src/pages/EnablePayments/IdologyQuestions.js b/src/pages/EnablePayments/IdologyQuestions.js @@ -35,6 +35,8 @@ const propTypes = { additionalDetails: PropTypes.shape({ isLoading: PropTypes.bool, + errors: PropTypes.arrayOf(PropTypes.string), + errorCode: PropTypes.string, }), }; @@ -43,6 +45,8 @@ const defaultProps = { idNumber: '', additionalDetails: { isLoading: false, + errors: [], + errorCode: '', }, }; @@ -160,12 +164,12 @@ class IdologyQuestions extends React.Component { </View> <FormAlertWithSubmitButton - isAlertVisible={Boolean(this.state.errorMessage)} + isAlertVisible={Boolean(this.state.errorMessage || this.props.additionalDetails.errorCode)} onSubmit={this.submitAnswers} onFixTheErrorsLinkPressed={() => { this.form.scrollTo({y: 0, animated: true}); }} - message={this.state.errorMessage} + message={_.isEmpty(this.props.additionalDetails.errors) ? this.props.additionalDetails.errors.find(x=>x!==undefined) : this.state.errorMessage : } isLoading={this.props.additionalDetails.isLoading} buttonText={this.props.translate('common.saveAndContinue')} />
4
diff --git a/src/components/explorer/builder/LoggedInQueryContainer.js b/src/components/explorer/builder/LoggedInQueryContainer.js @@ -4,18 +4,17 @@ import { connect } from 'react-redux'; import { push } from 'react-router-redux'; import * as d3 from 'd3'; import { selectQuery, selectBySearchId, selectBySearchParams, fetchSampleSearches, fetchQuerySourcesByIds, fetchQueryCollectionsByIds, resetSelected, resetQueries, resetSentenceCounts, resetSamples, resetStoryCounts, resetGeo } from '../../../actions/explorerActions'; - +import { addNotice } from '../../../actions/appActions'; import QueryBuilderContainer from './QueryBuilderContainer'; import QueryResultsContainer from './QueryResultsContainer'; // import { notEmptyString } from '../../../lib/formValidators'; import { getUserRoles, hasPermissions, PERMISSION_LOGGED_IN } from '../../../lib/auth'; -import { getPastTwoWeeksDateRange } from '../../../lib/dateUtil'; -import { DEFAULT_COLLECTION, DEFAULT_COLLECTION_OBJECT } from '../../../lib/explorerUtil'; +import { DEFAULT_COLLECTION_OBJECT } from '../../../lib/explorerUtil'; +import { LEVEL_ERROR } from '../../common/Notice'; -/* const localMessages = { - querySearch: { id: 'explorer.queryBuilder.advanced', defaultMessage: 'Search For' }, - searchHint: { id: 'explorer.queryBuilder.hint', defaultMessage: 'Search for ' }, -}; */ +const localMessages = { + errorInURLParams: { id: 'explorer.queryBuilder.urlParams', defaultMessage: 'Your URL query is incomplete. Check the URL and make sure the keyword(s), start and end dates, and collection(s) are properly specified.' }, +}; const MAX_COLORS = 20; @@ -36,20 +35,24 @@ class LoggedInQueryContainer extends React.Component { resetExplorerData(); } checkPropsAndDispatch(whichProps) { - const { user, samples, selected, selectSearchQueriesById, selectQueriesByURLParams, setSelectedQuery, loadSampleSearches } = this.props; + const { user, samples, selected, addAppNotice, selectSearchQueriesById, selectQueriesByURLParams, setSelectedQuery, loadSampleSearches } = this.props; + const { formatMessage } = this.props.intl; const url = whichProps.location.pathname; let currentIndexOrQuery = url.slice(url.lastIndexOf('/') + 1, url.length); + // for Logged In users, we expect the URL to have query, start/end dates and at least one collection. Throw an error if this is missing if (hasPermissions(getUserRoles(user), PERMISSION_LOGGED_IN)) { if (whichProps.location.pathname.includes('/queries/search')) { // parse query params // for demo mode, whatever the user enters in the homepage field is interpreted only as a keyword(s) - const parsedObjectArray = this.parseJSONParams(currentIndexOrQuery); - /* const currentQuery = parsedObjectArray.map(q => q.q); - let isNewQuerySet = null; - if (whichProps && whichProps.selected) { - isNewQuerySet = (currentQuery.findIndex(q => q.includes(whichProps.selected.q)) < 0); // this is true even if a new query is beign entered - } */ + let parsedObjectArray = null; + try { + parsedObjectArray = this.parseJSONParams(currentIndexOrQuery); + } catch (e) { + addAppNotice({ level: LEVEL_ERROR, message: formatMessage(localMessages.errorInURLParams) }); + return; + } + if (this.props.location.pathname !== whichProps.location.pathname) { // TODO how to keep current selection if this is just an *updated* set of queries selectQueriesByURLParams(parsedObjectArray); @@ -88,18 +91,9 @@ class LoggedInQueryContainer extends React.Component { if (q.index === undefined) { defaultObjVals.index = idx; // the backend won't use these values, but this is for the QueryPicker display } - if (q.sources === undefined) { - defaultObjVals.sources = []; - } - if (q.collections === undefined) { - defaultObjVals.collections = [DEFAULT_COLLECTION]; - } - const dateObj = getPastTwoWeeksDateRange(); - if (q.startDate === undefined) { - defaultObjVals.startDate = dateObj.start; - } - if (q.endDate === undefined) { - defaultObjVals.endDate = dateObj.end; + if (q.q === undefined || q.collections === undefined || q.startDate === undefined || q.endDate === undefined) { + // this means an error + throw new Error(); } return Object.assign({}, q, defaultObjVals); }); @@ -141,6 +135,7 @@ LoggedInQueryContainer.propTypes = { // from state location: React.PropTypes.object, user: React.PropTypes.object.isRequired, + addAppNotice: React.PropTypes.func.isRequired, selected: React.PropTypes.object, queries: React.PropTypes.array, sourcesResults: React.PropTypes.array, @@ -171,6 +166,9 @@ const mapStateToProps = (state, ownProps) => ({ // push any updates (including selected) into queries in state, will trigger async load in sub sections const mapDispatchToProps = dispatch => ({ + addAppNotice: (info) => { + dispatch(addNotice(info)); + }, setSelectedQuery: (queryObj) => { dispatch(selectQuery(queryObj)); },
9
diff --git a/brands/amenity/fuel.json b/brands/amenity/fuel.json } }, "amenity/fuel|Auchan": { - "locationSet": {"include": ["001"]}, + "locationSet": { + "include": ["039", "151", "155", "cn"] + }, "nomatch": ["shop/supermarket|Auchan"], "tags": { "amenity": "fuel",
14
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md @@ -18,7 +18,7 @@ Bower is a large community project with many different developers contributing a ## Team Meetings -We communicate through a channel on slack: https://gitter.im/bower +We communicate through a channel on Discord https://discord.gg/0fFM7QF0KpZRh2cY If you'd like to attend the meetings, please fill the [support form](http://goo.gl/forms/P1ndzCNoiG), and you'll get an invite. @@ -29,9 +29,9 @@ The issue tracker is the preferred channel for [bug reports](#bugs), requests](#pull-requests), but please respect the following restrictions: * Please **do not** use the issue tracker for personal support requests. Use - [Stack Overflow](http://stackoverflow.com/questions/tagged/bower) - [Gitter Channel](https://gitter.im/bower/bower) - [Mailing List](http://groups.google.com/group/twitter-bower) + [Stack Overflow](http://stackoverflow.com/questions/tagged/bower), + [Discord Channel](https://discordapp.com/channels/119103197720739842/123728452816732160), + [Mailing List](http://groups.google.com/group/twitter-bower), ([email protected]), or [#bower](http://webchat.freenode.net/?channels=bower) on Freenode.
14
diff --git a/src/components/viewscreens/Communications/index.js b/src/components/viewscreens/Communications/index.js @@ -5,7 +5,6 @@ import { Container, Row, Col } from "reactstrap"; import gql from "graphql-tag"; import { graphql, withApollo } from "react-apollo"; import tinycolor from "tinycolor2"; -import { Asset } from "../../../helpers/assets"; import SubscriptionHelper from "../../../helpers/subscriptionHelper"; import "./style.scss"; @@ -202,14 +201,19 @@ class Communications extends Component { }) } /> - <Container> + <Container fluid> <Row className="justify-content-center"> {comms.length > 0 ? ( comms.map(c => ( <Col key={c.id} className="comm-container"> - <Asset asset={`/Comm Images/${c.image}`}> - {({ src }) => <img alt="comm" src={src} />} - </Asset> + <img + alt="comm" + src={`/assets${ + c.image.indexOf("Comm Images") === -1 + ? "/Comm Images/" + : "" + }${c.image}`} + /> <h2> {c.name} - {Math.round(c.frequency * 37700 + 37700) / 100} MHz
1
diff --git a/stories/module-pagespeed-insights-components.stories.js b/stories/module-pagespeed-insights-components.stories.js @@ -26,10 +26,6 @@ import { storiesOf } from '@storybook/react'; */ import DashboardPageSpeedWidget from '../assets/js/modules/pagespeed-insights/components/dashboard/DashboardPageSpeedWidget'; import { CORE_SITE } from '../assets/js/googlesitekit/datastore/site/constants'; -import { - CORE_USER, - PERMISSION_MANAGE_OPTIONS, -} from '../assets/js/googlesitekit/datastore/user/constants'; import { CORE_MODULES } from '../assets/js/googlesitekit/modules/datastore/constants'; import * as fixtures from '../assets/js/modules/pagespeed-insights/datastore/__fixtures__'; import { @@ -260,28 +256,4 @@ storiesOf( 'PageSpeed Insights Module/Components', module ) <DashboardPageSpeedWidget { ...widgetComponentProps } /> </WithTestRegistry> ); - } ) - .add( 'Dashboard widget (CTA)', () => { - const url = fixtures.pagespeedMobile.loadingExperience.id; - const setupRegistry = ( { dispatch } ) => { - dispatch( CORE_SITE ).receiveSiteInfo( { - referenceSiteURL: url, - currentEntityURL: null, - } ); - dispatch( CORE_USER ).receiveCapabilities( { - [ PERMISSION_MANAGE_OPTIONS ]: true, - } ); - dispatch( CORE_MODULES ).receiveGetModules( [ - { - slug: 'pagespeed-insights', - active: false, - connected: false, - }, - ] ); - }; - return ( - <WithTestRegistry callback={ setupRegistry }> - <DashboardPageSpeedWidget { ...widgetComponentProps } /> - </WithTestRegistry> - ); } );
2
diff --git a/src/pages/strategy/tabs/mstship/mstship.js b/src/pages/strategy/tabs/mstship/mstship.js // TODO: for all following `.single || .multiple`, should merge them instead of OR, and show a 'one-time' indicator bonusStats = bonus.single || bonus.multiple; totalStats = addObjects(totalStats, bonusStats); - if (bonus.synergy) { synergyGear.push(bonus.synergy); } + } else { + starBonus[bonus.minStars] = {}; } - else { starBonus[bonus.minStars] = {}; } } + if (bonus.synergy) { synergyGear.push(bonus.synergy); } } }); // Improvement bonuses if (!shipBonus.minStars) { bonusStats = shipBonus.single || shipBonus.multiple; totalStats = addObjects(totalStats, bonusStats); - if (shipBonus.synergy) { synergyGear.push(shipBonus.synergy); } + } else { + starBonus[shipBonus.minStars] = {}; } - else { starBonus[shipBonus.minStars] = {}; } + if (shipBonus.synergy) { synergyGear.push(shipBonus.synergy); } }); // Improvement bonuses if (list.length) {
1
diff --git a/public/javascripts/SVLabel/css/svl-context-menu.css b/public/javascripts/SVLabel/css/svl-context-menu.css .severity-level .severity-icon svg { fill: white; +} + +/* We should add transition only when the cursor is on the context menu. */ +/* Otherwise, it causes a delay when the context menu is closed and re-opened. */ +#context-menu-holder:hover .severity-level .severity-icon svg { transition: fill 0.3s; }
1
diff --git a/README.md b/README.md @@ -256,6 +256,60 @@ Example response velocity template: }, ``` +### Request body validation + +[AWS doc](https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-method-request-validation.html) + +You can enable request body validation against a request model for lambda-proxy integration type. Instructions are: + +* Define a validator resource with ```ValidateRequestBody``` set to true +* Link the validator to an http event via ```reqValidatorName``` +* Define a model +* Link the model to the http event via ```documentation.requestModels``` + +In case of an invalid request body, the server will respond 400. + +Example serverless.yml: + +``` +custom: + documentation: + models: + - + name: HelloModel + contentType: application/json + schema: + type: object + properties: + message: + type: string + minLength: 2 + required: + - message +functions: + helloWorld: + handler: handler.helloWorld + events: + - http: + path: hello-world + method: post + cors: true + reqValidatorName: myValidator + documentation: + requestModels: + "application/json": HelloModel +resources: + Resources: + myValidator: + Type: "AWS::ApiGateway::RequestValidator" + Properties: + Name: 'my-validator' + RestApiId: + Ref: ApiGatewayRestApi + ValidateRequestBody: true + ValidateRequestParameters: false +``` + ## Usage with Webpack Use [serverless-webpack](https://github.com/serverless-heaven/serverless-webpack) to compile and bundle your ES-next code
0
diff --git a/app/src/pages/admin/allUsersPage/allUsersGrid/allUsersGrid.jsx b/app/src/pages/admin/allUsersPage/allUsersGrid/allUsersGrid.jsx @@ -64,7 +64,7 @@ const LastLoginColumn = ({ className, value }) => ( <span className={cx('mobile-label', 'last-login-label')}> <FormattedMessage id={'AllUsersGrid.loginCol'} defaultMessage={'Login'} /> </span> - <AbsRelTime startTime={Date.parse(value.metadata.last_login)} /> + <AbsRelTime startTime={value.metadata.last_login} /> </div> ); LastLoginColumn.propTypes = {
1
diff --git a/token-metadata/0xd559f20296FF4895da39b5bd9ADd54b442596a61/metadata.json b/token-metadata/0xd559f20296FF4895da39b5bd9ADd54b442596a61/metadata.json "symbol": "FTX", "address": "0xd559f20296FF4895da39b5bd9ADd54b442596a61", "decimals": 18, - "dharmaVerificationStatus": { "dharmaVerificationStatus": "VERIFIED" } \ No newline at end of file -} \ No newline at end of file
3
diff --git a/assets/js/components/setup/SetupUsingProxy.js b/assets/js/components/setup/SetupUsingProxy.js @@ -81,6 +81,7 @@ function SetupUsingProxy() { const onButtonClick = useCallback( async ( event ) => { event.preventDefault(); + if ( proxySetupURL ) { await trackEvent( VIEW_CONTEXT_DASHBOARD_SPLASH, @@ -88,6 +89,7 @@ function SetupUsingProxy() { 'proxy' ); } + if ( proxySetupURL && ! isConnected ) { await trackEvent( VIEW_CONTEXT_DASHBOARD_SPLASH, @@ -95,10 +97,7 @@ function SetupUsingProxy() { 'proxy' ); } - await trackEvent( - 'plugin_setup', - 'proxy_start_setup_landing_page' - ); + navigateTo( proxySetupURL ); }, [ proxySetupURL, navigateTo, isConnected ]
2
diff --git a/src/containers/ApplicationIndex.js b/src/containers/ApplicationIndex.js @@ -77,14 +77,19 @@ const ApplicationCard = props => { <CustomCard> <p> Welcome to your Hack Club application. You should fill this out with - the group of people you'll be leading your club with. Once you submit - your application you'll get a confirmation and hear back from us with - our decision in 3 days. + the group of people you'll be leading your club with. After submitting + your application you'll get a confirmation email. Within 3 days we'll + send you our decision. </p> <p> If you're accepted, we'll schedule a training call to show you the tricks to leading a fantastic coding club and give you access to our - resources. + resources. We provide curriculum, a template for club structure, and + access to our online community of club leaders. + </p> + <p> + Once you start holding meetings we'll check in with you weekly to make + sure everything is going well. </p> <p> If you have any questions while applying, contact us at{' '}
7
diff --git a/src/renderer/layer/ImageGLRenderable.js b/src/renderer/layer/ImageGLRenderable.js @@ -64,6 +64,8 @@ const ImageGLRenderable = Base => { const x2 = x + w; const y1 = y; const y2 = y + h; + gl.bindBuffer(gl.ARRAY_BUFFER, this.posBuffer); + this.enableVertexAttrib(['a_position', 3]); gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([ x1, y1, 0.0, //0 x2, y1, 0.0, //1 @@ -79,26 +81,26 @@ const ImageGLRenderable = Base => { * Draw the tile image as tins * @param {HtmlElement} image * @param {Array} vertices - tin vertices + * @param {Array} texCoords - texture coords * @param {Array} indices - element indexes - * @param {Number} x - x at map's gl zoom - * @param {Number} y - y at map's gl zoom * @param {number} opacity */ - drawGLTin(image, vertices, indices, x, y, opacity) { + drawTinImage(image, vertices, texCoords, indices, opacity) { const gl = this.gl; this.loadTexture(image); gl.uniformMatrix4fv(this.program['u_matrix'], false, this.getProjViewMatrix()); gl.uniform1f(this.program['u_opacity'], opacity); - // - const arr = []; - // - for (let i = 0, len = vertices.length; i < len; i++) { - arr.push(x + vertices[i][0]); - arr.push(y + vertices[i][1]); - arr.push(vertices[i][2]); - } + //bufferdata vertices - gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(arr), gl.DYNAMIC_DRAW); + gl.bindBuffer(gl.ARRAY_BUFFER, this.posBuffer); + this.enableVertexAttrib(['a_position', 3]); + gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(vertices), gl.DYNAMIC_DRAW); + + //bufferdata tex coords + gl.bindBuffer(gl.ARRAY_BUFFER, this.texBuffer); + this.enableVertexAttrib(['a_texCoord', 2]); + gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(texCoords), gl.DYNAMIC_DRAW); + //bufferdata indices gl.bufferData(gl.ELEMENT_ARRAY_BUFFER, new Uint16Array(indices), gl.DYNAMIC_DRAW); //draw @@ -132,8 +134,8 @@ const ImageGLRenderable = Base => { this.useProgram(this.program); // input texture vec data - const texBuffer = this.createBuffer(); - gl.bindBuffer(gl.ARRAY_BUFFER, texBuffer); + this.texBuffer = this.createBuffer(); + gl.bindBuffer(gl.ARRAY_BUFFER, this.texBuffer); this.enableVertexAttrib(['a_texCoord', 2]); gl.bufferData(gl.ARRAY_BUFFER, this.copy12([ 0.0, 0.0,
10
diff --git a/tests/backstop/scenarios.js b/tests/backstop/scenarios.js @@ -47,7 +47,7 @@ const storyFiles = flatten( .map( ( storiesPattern ) => path.resolve( storybookDir, storiesPattern ) ) - .map( ( absGlob ) => glob.sync( absGlob, { cwd: storybookDir } ) ) + .map( ( absGlob ) => glob.sync( absGlob ) ) ); const csfScenarios = [];
2
diff --git a/assets/js/modules/adsense/index.js b/assets/js/modules/adsense/index.js /** * WordPress dependencies */ -import { addFilter } from '@wordpress/hooks'; import { __ } from '@wordpress/i18n'; /** * Internal dependencies */ import { AREA_DASHBOARD_EARNINGS } from '../../googlesitekit/widgets/default-areas'; -import { fillFilterWithComponent } from '../../util'; import { SetupMain } from './components/setup'; import { SettingsEdit, @@ -34,7 +32,6 @@ import { SettingsView, } from './components/settings'; import { - DashboardZeroData, DashboardSummaryWidget, DashboardTopEarningPagesWidget, } from './components/dashboard'; @@ -43,18 +40,12 @@ import { ModuleOverviewWidget } from './components/module'; import AdSenseIcon from '../../../svg/adsense.svg'; import { MODULES_ADSENSE } from './datastore/constants'; import { - ERROR_CODE_ADBLOCKER_ACTIVE, - CONTEXT_MODULE_ADSENSE, AREA_MODULE_ADSENSE_MAIN, + CONTEXT_MODULE_ADSENSE, + ERROR_CODE_ADBLOCKER_ACTIVE, } from './constants'; import { WIDGET_AREA_STYLES } from '../../googlesitekit/widgets/datastore/constants'; -addFilter( - 'googlesitekit.AdSenseDashboardZeroData', - 'googlesitekit.AdSenseDashboardZeroDataRefactored', - fillFilterWithComponent( DashboardZeroData ) -); - export { registerStore } from './datastore'; export const registerModule = ( modules ) => {
2
diff --git a/src/react/table/plugins/footer-row.js b/src/react/table/plugins/footer-row.js @@ -6,7 +6,7 @@ import {TablePlugin} from '../table-plugin'; export function withFooterRow(Table) { return class TableWithFooterRow extends TablePlugin { - static propTypes = {footerRow: PropTypes.node}; + static propTypes = {footerRow: PropTypes.any}; render() { const {footerRow, ...props} = this.props;
11
diff --git a/hyperapp.d.ts b/hyperapp.d.ts @@ -75,7 +75,7 @@ export type ActionsType<State, Actions> = { * @memberOf [App] */ export interface View<State, Actions> { - (state: State, actions: Actions): VNode<object> + (state: State, actions: Actions): VNode<object> | null } /** The app() call creates and renders a new application.
11
diff --git a/src/components/wallet/Wallet.js b/src/components/wallet/Wallet.js @@ -212,7 +212,7 @@ export function Wallet() { <div className='split'> <div className='left'> <NearWithBackgroundIcon/> - <h1><Balance amount={balance.total} symbol={false}/></h1> + <h1><Balance amount={balance?.total} symbol={false}/></h1> <div className='sub-title'><Translate id='wallet.balanceTitle' /></div> <div className='buttons'> <FormButton
9
diff --git a/apps/ha/custom.html b/apps/ha/custom.html <link rel="stylesheet" href="../../css/spectre.min.css"> </head> <body> - <h3>Upload Tiggers</h3> - <p>You must upload a list of json objects -- an example is given below</p> + <h3>Upload Tigger</h3> + <p>Status: </p><p id="status"></p></p> <p><textarea id="triggers" style="width:500px; height:300px"> [ {"display": "Open", "trigger": "OPEN_DOOR", "icon":"door"}, <script src="../../core/lib/customize.js"></script> <script> + /* + * Load trigger from BangleJs + */ + document.getElementById("status").innerHTML = "Loading trigger from BangleJs..."; + try { Puck.eval(`require("Storage").read(${JSON.stringify("ha.trigger.json")})`,data=>{ - console.log(data); + document.getElementById("triggers").innerHTML = data; + document.getElementById("status").innerHTML = "Loaded trigger from BangleJs."; }); + } catch(ex) { + document.getElementById("status").innerHTML = "Could not load trigger from BangleJs."; + } - - // When the 'upload' button is clicked... + /* + * Upload trigger to BangleJs + */ document.getElementById("upload").addEventListener("click", function() { // get the text to add var text = document.getElementById("triggers").value;
7
diff --git a/includes/Core/Storage/Encrypted_Options.php b/includes/Core/Storage/Encrypted_Options.php @@ -70,7 +70,6 @@ final class Encrypted_Options implements Options_Interface { * Sets the value for a option. * * @since 1.0.0 - * @since n.e.x.t Added autoload parameter. * * @param string $option Option name. * @param mixed $value Option value. Must be serializable if non-scalar.
2
diff --git a/app/components/DepositWithdraw/blocktrades/BlockTradesBridgeDepositRequest.jsx b/app/components/DepositWithdraw/blocktrades/BlockTradesBridgeDepositRequest.jsx @@ -25,6 +25,8 @@ let oidcStorage = new ls( "oidc.user:https://blocktrades.us/:10ecf048-b982-467b-9965-0b0926330869" ); +const POST_LOGOUT_REDIRECT_URI = "https://192.168.6.139:9051/deposit-withdraw"; + class ButtonConversion extends React.Component { static propTypes = { balance: ChainTypes.ChainObject, @@ -1109,7 +1111,8 @@ class BlockTradesBridgeDepositRequest extends React.Component { automaticSilentRenew, userStore: new WebStorageStateStore({ store: window.localStorage - }) + }), + post_logout_redirect_uri: POST_LOGOUT_REDIRECT_URI }); this.setState({ retrievingDataFromOauthApi: false @@ -1160,6 +1163,13 @@ class BlockTradesBridgeDepositRequest extends React.Component { this.urlConnectionInit(); } + + // checks the url and finishes logout flow + try { + this.manager.signoutRedirectCallback(location.href); + } catch (error) { + // here error will occure when there is no good state value + } } componentDidMount() { @@ -1954,8 +1964,17 @@ class BlockTradesBridgeDepositRequest extends React.Component { this.manager.signinRedirect(); } - onLogout() { - this.manager.signoutRedirect(); + async onLogout() { + try { + const {id_token} = await this.manager.getUser(); + const response = await this.manager.signoutRedirect({ + id_token_hint: id_token, + state: "logout", + post_logout_redirect_uri: POST_LOGOUT_REDIRECT_URI + }); + } catch (err) { + throw err; + } } render() {
9
diff --git a/js/site.js b/js/site.js @@ -24,8 +24,9 @@ settings.ready().then(() => { const siteScores = ['A', 'B', 'C', 'D'] -// percent of the top 500 sites a major tracking network is seen on -const pagesSeenOn = {'google':55,'amazon':23,'facebook':20,'comscore':19,'twitter':11,'criteo':9,'quantcast':9,'adobe':8,'newrelic':7,'appnexus':7} +// percent of the top 1 million sites a tracking network has been seen on. +// see: https://webtransparency.cs.princeton.edu/webcensus/ +const pagesSeenOn = {'google':84,'facebook':36,'twitter':14,'amazon':14,'appnexus':10,'oracle':10,'mediamath':9,'yahoo':9,'maxcdn':7,'automattic':7} const pagesSeenOnRegexList = Object.keys(pagesSeenOn).map(x => new RegExp(`${x}\\.`)) const tosdrClassMap = {'A': -1, 'B': 0, 'C': 0, 'D': 1, 'E': 2} // map tosdr class rankings to increase/decrease in grade
3
diff --git a/src/lib/wallet/GoodWalletClass.js b/src/lib/wallet/GoodWalletClass.js @@ -1490,11 +1490,8 @@ export class GoodWallet { const lcAddress = address.toLowerCase() const checksum = this.wallet.utils.toChecksumAddress(address) const findByKey = contracts => findKey(contracts, key => [lcAddress, checksum].includes(key)) - const [fullName] = filter(values(ContractsAddress).map(findByKey)) - if (fullName) { - return { fullName } - } + return filter(values(ContractsAddress).map(findByKey)) } }
0
diff --git a/app/components/Exchange/MyOpenOrders.jsx b/app/components/Exchange/MyOpenOrders.jsx @@ -436,56 +436,57 @@ class MyOpenOrders extends React.Component { } _getOrders() { - const {currentAccount, feedPrice} = this.props; + const {currentAccount, base, quote, feedPrice} = this.props; const orders = currentAccount.get("orders"), call_orders = currentAccount.get("call_orders"); - - const getOrderData = order => { - let orderObj = ChainStore.getObject(order).toJS(); - if (!orderObj) return null; - let base = ChainStore.getAsset(orderObj.sell_price.base.asset_id); - let quote = ChainStore.getAsset(orderObj.sell_price.quote.asset_id); const baseID = base.get("id"), quoteID = quote.get("id"); const assets = { [base.get("id")]: {precision: base.get("precision")}, [quote.get("id")]: {precision: quote.get("precision")} }; - let sellBase = orderObj.sell_price.base.asset_id, - sellQuote = orderObj.sell_price.quote.asset_id; + let limitOrders = orders + .toArray() + .map(order => { + let o = ChainStore.getObject(order); + if (!o) return null; + let sellBase = o.getIn(["sell_price", "base", "asset_id"]), + sellQuote = o.getIn(["sell_price", "quote", "asset_id"]); if ( (sellBase === baseID && sellQuote === quoteID) || (sellBase === quoteID && sellQuote === baseID) ) { - return {orderObj, assets, id: [quote.get("id")]}; - } - return {}; - }; - const limitOrders = orders - .toArray() - .map(order => { - try { - const {orderObj, assets, id} = getOrderData(order); - if (orderObj) { - return new LimitOrder(orderObj, assets, id); - } - } catch (e) { - console.error(e); - return null; + return new LimitOrder(o.toJS(), assets, quote.get("id")); } }) .filter(a => !!a); - const callOrders = call_orders + let callOrders = call_orders .toArray() .map(order => { try { - const {orderObj, assets, id} = getOrderData(order); - if (orderObj && feedPrice) { - return new CallOrder(orderObj, assets, id, feedPrice); + let o = ChainStore.getObject(order); + if (!o) return null; + let sellBase = o.getIn(["call_price", "base", "asset_id"]), + sellQuote = o.getIn([ + "call_price", + "quote", + "asset_id" + ]); + if ( + (sellBase === baseID && sellQuote === quoteID) || + (sellBase === quoteID && sellQuote === baseID) + ) { + return feedPrice + ? new CallOrder( + o.toJS(), + assets, + quote.get("id"), + feedPrice + ) + : null; } } catch (e) { - console.error(e); return null; } })
13
diff --git a/articles/users/search/v3/migrate-search-v2-v3.md b/articles/users/search/v3/migrate-search-v2-v3.md @@ -11,7 +11,7 @@ useCase: --- # Migrate from Search v2 to v3 -The user search engine v2 has been deprecated as of **June 6th 2018** and was removed from service on **November 13th 2018**. We highly recommend migrating user search functionality to search engine v3 (`search_engine=v3`) as soon as possible. +The user search engine v2 has been deprecated as of **June 6th 2018**. We highly recommend migrating user search functionality to search engine v3 (`search_engine=v3`) as soon as possible. ## Migration considerations
2
diff --git a/src/commands/clone.js b/src/commands/clone.js @@ -7,7 +7,14 @@ const Feed = require('../structs/db/Feed.js') const Subscriber = require('../structs/db/Subscriber.js') const Translator = require('../structs/Translator.js') -const properties = [`format`, `filters`, `misc-options`, `subscribers`, 'all'] +const properties = [ + `format`, + `filters`, + `misc-options`, + `subscribers`, + 'comparisons', + 'all' +] async function destSelectorFn (m, data) { const { feed, selectedFeeds, locale } = data @@ -16,6 +23,7 @@ async function destSelectorFn (m, data) { if (data.cloneFilters) cloned.push('filters') if (data.cloneMiscOptions) cloned.push('misc-options') if (data.cloneSubscribers) cloned.push('subscribers') + if (data.cloneComparisons) cloned.push('comparisons') return { ...data, @@ -88,12 +96,14 @@ module.exports = async (bot, message, command) => { const cloneMiscOptions = cloneAll || args.includes('misc-options') const cloneFormat = cloneAll || args.includes('format') const cloneSubscribers = cloneAll || args.includes('subscribers') + const cloneComparisons = cloneAll || args.includes('comparisons') const data = await new MenuUtils.MenuSeries(message, [sourceSelector, destSelector, confirm], { cloneFormat, cloneFilters, cloneMiscOptions, cloneSubscribers, + cloneComparisons, locale: guildLocale }).start() @@ -118,7 +128,6 @@ module.exports = async (bot, message, command) => { // Misc Options if (cloneMiscOptions) { - selected.checkTitles = feed.checkTitles selected.checkDates = feed.checkDates selected.formatTables = feed.formatTables selected.imgLinksExistence = feed.imgLinksExistence @@ -134,6 +143,13 @@ module.exports = async (bot, message, command) => { updateSelected = true } + // Comparisons + if (cloneComparisons) { + selected.ncomparisons = feed.ncomparisons + selected.pcomparisons = feed.pcomparisons + updateSelected = true + } + if (updateSelected) { await selected.save() }
14
diff --git a/react/src/base/inputs/Date.stories.js b/react/src/base/inputs/Date.stories.js @@ -32,7 +32,7 @@ which you may need to remove before submitting the form. export const dateInput = () => ( <SprkInputContainer> - <SprkLabel htmlFor="date-1">Date</SprkLabel> + <SprkLabel htmlFor="date-1">Date Input (No Picker)</SprkLabel> <SprkInput id="date-1" placeholder="01/01/2021" /> </SprkInputContainer> ); @@ -46,7 +46,7 @@ dateInput.story = { export const invalidDateInput = () => ( <SprkInputContainer> - <SprkLabel htmlFor="date-2">Date</SprkLabel> + <SprkLabel htmlFor="date-2">Date Input (No Picker)</SprkLabel> <SprkInput id="date-2" placeholder="01/01/2021" @@ -80,7 +80,7 @@ invalidDateInput.story = { export const disabledDateInput = () => ( <SprkInputContainer> <SprkLabel htmlFor="date-3" isDisabled> - Date + Date Input (No Picker) </SprkLabel> <SprkInput id="date-3" placeholder="01/01/2021" isDisabled /> </SprkInputContainer>
3
diff --git a/public/app/js/basic.js b/public/app/js/basic.js @@ -3,7 +3,7 @@ var cbus = {}; navigator.getUserMedia = navigator.getUserMedia || navigator.webkitGetUserMedia; window.AudioContext = window.AudioContext || window.webkitAudioContext; -var parseURL = function(url) { +const parseURL = function(url) { var a = document.createElement("a"); a.href = url; @@ -22,7 +22,7 @@ var parseURL = function(url) { }; }; -var xhr = function(url, callback) { +const xhr = function(url, callback) { var oReq = new XMLHttpRequest(); oReq.onload = function(e){ callback(this.responseText, url, e); @@ -31,7 +31,7 @@ var xhr = function(url, callback) { oReq.send(); }; -var colonSeparateDuration = function(num) { // in seconds +const colonSeparateDuration = function(num) { // in seconds if (typeof num == "number" && !(Number.isNaN || isNaN)(num)) { var hours = Math.floor(num / 60 / 60); var minutes = Math.floor(num / 60) - hours * 60; @@ -42,13 +42,13 @@ var colonSeparateDuration = function(num) { // in seconds } }; -var zpad = function pad(n, width, z) { // by user Pointy on SO: stackoverflow.com/a/10073788 +const zpad = function pad(n, width, z) { // by user Pointy on SO: stackoverflow.com/a/10073788 z = z || "0"; n = n + ""; return n.length >= width ? n : new Array(width - n.length + 1).join(z) + n; }; -var mergeObjects = function(a, b){ +const mergeObjects = function(a, b){ var result = {}; for (var key in a) { @@ -61,7 +61,7 @@ var mergeObjects = function(a, b){ return result; }; -var arrayFindByKey = function(arr, pair) { +const arrayFindByKey = function(arr, pair) { var key = Object.keys(pair)[0]; var val = pair[key]; @@ -76,17 +76,17 @@ var arrayFindByKey = function(arr, pair) { return results; }; -var decodeHTML = function(html) { +const decodeHTML = function(html) { var elem = document.createElement("div"); elem.innerHTML = html; return elem.textContent; }; -var removeHTMLTags = function(html) { +const removeHTMLTags = function(html) { return html.replace(/(<([^>]+)>)/ig, ""); // css-tricks.com/snippets/javascript/strip-html-tags-in-javascript }; -var KEYCODES = { +const KEYCODES = { "0": 48, "1": 49, "2": 50,
14
diff --git a/src/services/milestones/milestones.hooks.js b/src/services/milestones/milestones.hooks.js @@ -13,21 +13,21 @@ import { updatedAt, createdAt } from '../../hooks/timestamps'; BigNumber.config({ DECIMAL_PLACES: 18 }); +const getMilestones = context => { + if (context.id) return context.service.get(context.id); + if (!context.id && context.params.query) return context.service.find(context.params.query); + return Promise.resolve(); +}; + const restrict = () => context => { // internal call are fine if (!context.params.provider) return context; - const { data, service } = context; + const { data } = context; const { user } = context.params; if (!user) throw new errors.NotAuthenticated(); - const getMilestones = () => { - if (context.id) return service.get(context.id); - if (!context.id && context.params.query) return service.find(context.params.query); - return undefined; - }; - const canUpdate = milestone => { if (!milestone) throw new errors.Forbidden(); @@ -102,7 +102,7 @@ const restrict = () => context => { } }; - return getMilestones().then( + return getMilestones(context).then( milestones => Array.isArray(milestones) ? milestones.forEach(canUpdate) : canUpdate(milestones), ); @@ -286,7 +286,7 @@ const checkMilestoneDates = () => context => { const timestamp = Math.round(date) / 1000; if (todaysTimestamp - timestamp < 0) { - throw new errors.Forbidden('Future items are not allowd'); + throw new errors.Forbidden('Future items are not allowed'); } }; @@ -306,6 +306,22 @@ const address = [ }), ]; +const canDelete = () => context => { + const isDeletable = milestone => { + if (!milestone) throw new errors.NotFound(); + + if (milestone.status !== 'proposed') { + throw new errors.Forbidden('only proposed milestones can be removed'); + } + }; + + return getMilestones(context).then(milestones => { + if (Array.isArray(milestones)) milestones.forEach(isDeletable); + else isDeletable(milestones); + return context; + }); +}; + const schema = { include: [ { @@ -381,7 +397,7 @@ module.exports = { sanitizeHtml('description'), updatedAt, ], - remove: [commons.disallow()], + remove: [canDelete()], }, after: {
11
diff --git a/lib/util/timer.js b/lib/util/timer.js @@ -62,7 +62,7 @@ shaka.util.Timer = class { } /** - * Have the timer call |onTick| after |seconds| has elasped unless |stop| is + * Have the timer call |onTick| after |seconds| has elapsed unless |stop| is * called first. * * @param {number} seconds
1
diff --git a/includes/Modules/Thank_With_Google.php b/includes/Modules/Thank_With_Google.php @@ -310,11 +310,9 @@ final class Thank_With_Google extends Module function( $publication ) { return ( ( - // phpcs:ignore WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase isset( $publication['paymentOptions']['thankStickers'] ) && $publication['paymentOptions']['thankStickers'] ) && ( - // phpcs:ignore WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase isset( $publication['publicationPredicates']['businessPredicates']['supportsSiteKit'] ) && $publication['publicationPredicates']['businessPredicates']['supportsSiteKit'] ) );
2
diff --git a/src/ui/UIComponent.js b/src/ui/UIComponent.js @@ -578,6 +578,7 @@ class UIComponent extends Eventable(Class) { const events = {}; if (this._owner && (this._owner instanceof Geometry)) { events.positionchange = this.onGeometryPositionChange; + events.symbolchange = this.onGeometryPositionChange; } if (this.getOwnerEvents) { extend(events, this.getOwnerEvents());
3
diff --git a/token-metadata/0xF4134146AF2d511Dd5EA8cDB1C4AC88C57D60404/metadata.json b/token-metadata/0xF4134146AF2d511Dd5EA8cDB1C4AC88C57D60404/metadata.json "symbol": "SNC", "address": "0xF4134146AF2d511Dd5EA8cDB1C4AC88C57D60404", "decimals": 18, - "dharmaVerificationStatus": { "dharmaVerificationStatus": "VERIFIED" } \ No newline at end of file -} \ No newline at end of file
3
diff --git a/src/app/Http/Middleware/CheckIfAdmin.php b/src/app/Http/Middleware/CheckIfAdmin.php @@ -22,8 +22,8 @@ class CheckIfAdmin * does not have a '/home' route, use something you've built for your users * (again - users, not admins). * - * @param [type] $user [description] - * @return bool [description] + * @param \Illuminate\Contracts\Auth\Authenticatable|null $user + * @return bool */ private function checkIfUserIsAdmin($user) { @@ -34,8 +34,8 @@ class CheckIfAdmin /** * Answer to unauthorized access request. * - * @param [type] $request [description] - * @return [type] [description] + * @param \Illuminate\Http\Request $request + * @return \Illuminate\Http\Response|\Illuminate\Http\RedirectResponse */ private function respondToUnauthorizedRequest($request) {
7
diff --git a/src/map/Map.Camera.js b/src/map/Map.Camera.js @@ -312,8 +312,7 @@ Map.include(/** @lends Map.prototype */{ _calcMatrices: function () { // closure matrixes to reuse const m0 = Browser.ie9 ? null : createMat4(), - m1 = Browser.ie9 ? null : createMat4(), - minusY = [1, -1, 1]; + m1 = Browser.ie9 ? null : createMat4(); return function () { // get pixel size of map if (Browser.ie9) { @@ -331,7 +330,6 @@ Map.include(/** @lends Map.prototype */{ // camera projection matrix const projMatrix = this.projMatrix || createMat4(); mat4.perspective(projMatrix, fov, w / h, 0.1, farZ); - mat4.scale(projMatrix, projMatrix, minusY); this.projMatrix = projMatrix; // camera world matrix const worldMatrix = this._getCameraWorldMatrix(); @@ -347,10 +345,12 @@ Map.include(/** @lends Map.prototype */{ _calcDomMatrix: function () { const m = Browser.ie9 ? null : createMat4(), + minusY = [1, -1, 1], arr = [0, 0, 0]; return function () { const cameraToCenterDistance = 0.5 / Math.tan(this._fov / 2) * this.height; - mat4.translate(m, this.projMatrix, set(arr, 0, 0, -cameraToCenterDistance));//[0, 0, cameraToCenterDistance] + mat4.scale(m, this.projMatrix, minusY); + mat4.translate(m, m, set(arr, 0, 0, -cameraToCenterDistance));//[0, 0, cameraToCenterDistance] if (this._pitch) { mat4.rotateX(m, m, this._pitch); } @@ -364,7 +364,8 @@ Map.include(/** @lends Map.prototype */{ }(), _getCameraWorldMatrix: function () { - const q = {}; + const q = {}, + minusY = [1, -1, 1]; return function () { const targetZ = this.getGLZoom(); @@ -392,7 +393,7 @@ Map.include(/** @lends Map.prototype */{ // up.rotateZ(target,radians); const d = dist || 1; const up = this.cameraUp = set(this.cameraUp || [0, 0, 0], Math.sin(bearing) * d, Math.cos(bearing) * d, 0); - const m = this.cameraWorldMatrix || createMat4(); + const m = this.cameraWorldMatrix = this.cameraWorldMatrix || createMat4(); lookAt(m, this.cameraPosition, this.cameraLookAt, up); const cameraForward = this.cameraForward || [0, 0, 0]; @@ -403,7 +404,7 @@ Map.include(/** @lends Map.prototype */{ matrixToQuaternion(q, m); quaternionToMatrix(m, q); setPosition(m, this.cameraPosition); - + mat4.scale(m, m, minusY); return m; }; }(),
3
diff --git a/docs/docs/api/model.md b/docs/docs/api/model.md @@ -99,6 +99,6 @@ quill.setText('Hello\nGood\nWorld!'); quill.formatLine(1, 1, 'list', 'bullet'); let lines = quill.getLines(2, 5); -// array witha a ListItem and Block Blot, +// array with a ListItem and Block Blot, // representing the first two lines ```
1
diff --git a/app/lib/RoomClient.js b/app/lib/RoomClient.js @@ -48,6 +48,9 @@ export default class RoomClient // Redux store getState function. this._getState = getState; + // This device + this._device = device; + // My peer name. this._peerName = peerName; @@ -459,6 +462,16 @@ export default class RoomClient logger.debug('changeWebcam() | calling getUserMedia()'); + if (this._device.flag !== 'chrome') + return navigator.mediaDevices.getUserMedia( + { + video : + { + deviceId : { exact: device.deviceId }, + width : { ideal: 3840 } + } + }); + else return navigator.mediaDevices.getUserMedia( { video : @@ -550,6 +563,16 @@ export default class RoomClient logger.debug('changeWebcamResolution() | calling getUserMedia()'); + if (this._device.flag !== 'chrome') + return navigator.mediaDevices.getUserMedia( + { + video : + { + deviceId : { exact: device.deviceId }, + width : { ideal: 3840 } + } + }); + else return navigator.mediaDevices.getUserMedia( { video : @@ -1473,6 +1496,16 @@ export default class RoomClient logger.debug('_setWebcamProducer() | calling getUserMedia()'); + if (this._device.flag !== 'chrome') + return navigator.mediaDevices.getUserMedia( + { + video : + { + deviceId : { exact: device.deviceId }, + width : { ideal: 3840 } + } + }); + else return navigator.mediaDevices.getUserMedia( { video :
3
diff --git a/packages/vulcan-lib/lib/server/mutations.js b/packages/vulcan-lib/lib/server/mutations.js @@ -65,7 +65,7 @@ export const newMutation = ({ collection, document, currentUser, validate, conte // run onInsert step _.keys(schema).forEach(fieldName => { - if (!newDocument[fieldName] && schema[fieldName].onInsert) { + if (schema[fieldName].onInsert) { const autoValue = schema[fieldName].onInsert(newDocument, currentUser); if (autoValue) { newDocument[fieldName] = autoValue; @@ -136,12 +136,18 @@ export const editMutation = ({ collection, documentId, set, unset, currentUser, // run onEdit step _.keys(schema).forEach(fieldName => { - if (!document[fieldName] && schema[fieldName].onEdit) { + + if (schema[fieldName].onEdit) { const autoValue = schema[fieldName].onEdit(modifier, document, currentUser); - if (autoValue) { + if (typeof autoValue !== 'undefined') { + if (autoValue === null) { + // if any autoValue returns null, then unset the field + modifier.$unset[fieldName] = true; + } else { modifier.$set[fieldName] = autoValue; } } + } }); // run sync callbacks (on mongo modifier) @@ -194,7 +200,7 @@ export const removeMutation = ({ collection, documentId, currentUser, validate, // run onRemove step _.keys(schema).forEach(fieldName => { - if (!document[fieldName] && schema[fieldName].onRemove) { + if (schema[fieldName].onRemove) { schema[fieldName].onRemove(document, currentUser); } });
7
diff --git a/src/lib/gundb/UserStorage.js b/src/lib/gundb/UserStorage.js @@ -383,7 +383,7 @@ class UserStorage { async getStandardizedFeed(amount: number, reset: boolean): Promise<Array<StandardFeed>> { const feed = await this.getAllFeed() logger.info({ feed }) - return feed.map(this.standardizeFeed) + return feed.filter(feedItem => feedItem.data).map(this.standardizeFeed) // TODO: Use proper pagination // return (await this.getFeedPage(amount, true)).map(this.standardizeFeed) } @@ -391,23 +391,19 @@ class UserStorage { standardizeFeed(feed: FeedEvent): StandardFeed { const avatar = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAkCAIAAAB0Xu9BAAAABGdBTUEAALGPC/xhBQAAAuNJREFUWEetmD1WHDEQhDdxRMYlnBFyBIccgdQhKVcgJeQMpE5JSTd2uqnvIGpVUqmm9TPrffD0eLMzUn+qVnXPwiFd/PP6eLh47v7EaazbmxsOxjhTT88z9hV7GoNF1cUCvN7TTPv/gf/+uQPm862MWTL6fff4HfDx4S79/oVAlAUwqOmYR0rnazuFnhfOy/ErMKkcBFOr1vOjUi2MFn4nuMil6OPh5eGANLhW3y6u3aH7ijEDCxgCvzFmimvc95TekZLyMSeJC68Bkw0kqUy1K87FlpGZqsGFCyqEtQNDdFUtFctTiuhnPKNysid/WFEFLE2O102XJdEE+8IgeuGsjeJyGHm/xHvQ3JtKVsGGp85g9rK6xMHtvHO9+WACYjk5vkVM6XQ6OZubCJvTfPicYPeHO2AKFl5NuF5UK1VDUbeLxh2BcRGKTQE3irHm3+vPj6cfCod50Eqv5QxtwBQUGhZhbrGVuRia1B4MNp6edwBxld2sl1splfHCwfsvCZfrCQyWmX10djjOlWJSSy3VQlS6LmfrgNvaieRWx1LZ6s9co+P0DLsy3OdLU3lWRclQsVcHJBcUQ0k9/WVVrmpRzYQzpgAdQcAXxZzUnFX3proannrYH+Vq6KkLi+UkarH09mC8YPr2RMWOlEqFkQClsykGEv7CqCUbXcG8+SaGvJ4a8d4y6epND+pEhxoN0vWUu5ntXlFb5/JT7JfJJqoTdy9u9qc7ax3xJRHqJLADWEl23cFWl4K9fvoaCJ2BHpmJ3s3z+O0U/DmzdMjB9alWZtg4e3yxzPa7lUR7nkvxLHO9+tvJX3mtSDpwX8GajB283I8R8a7D2MhUZr1iNWdny256yYLd52DwRYBtRMvE7rsmtxIUE+zLKQCDO4jlxB6CZ8M17GhuY+XTE8vNhQiIiSE82ZsGwk1pht4ZSpT0YVpon6EvevOXXH8JxVR78QzNuamupW/7UB7wO/+7sG5V4ekXb4cL5Lyv+4IAAAAASUVORK5CYII=' - - const data = feed.data - ? { + const stdFeed = { + id: feed.id, + date: new Date(feed.date).getTime(), + type: feed.type, + data: { endpoint: { - // address: feed.data.sender, + address: feed.data.sender, fullName: 'Misao Matimbo', avatar: avatar }, amount: feed.data.amount, message: feed.data.reason } - : { endpoint: {} } - const stdFeed = { - id: feed.id, - date: new Date(feed.date).getTime(), - type: feed.type, - data } return stdFeed }
0
diff --git a/lib/assets/javascripts/cartodb/dashboard/views/filters.jst.ejs b/lib/assets/javascripts/cartodb/dashboard/views/filters.jst.ejs <% } %> </li> <% } %> - <% if (shared !== "only" && shared !== "yes" && !library && hasCreateDatasetsFeature) { %> + <% if (!library && hasCreateDatasetsFeature) { %> <% if (selectedItemsCount === 1 && !liked) { %> <li class="Filters-actionsItem"> <a class="Filters-actionsLink CDB-Text CDB-Size-medium js-privacy" href="#/change-privacy">Change privacy...</a>
2
diff --git a/components/Discussion/NotificationOptions.js b/components/Discussion/NotificationOptions.js @@ -266,6 +266,12 @@ class NotificationOptions extends PureComponent { <A {...styles.link} href='/konto#benachrichtigungen' onClick={(e) => { + if (e.currentTarget.nodeName === 'A' && + (e.metaKey || e.ctrlKey || e.shiftKey || (e.nativeEvent && e.nativeEvent.which === 2))) { + // ignore click for new tab / new window behavior + return + } + e.preventDefault() Router.pushRoute('/konto#benachrichtigungen') .then(() => {
8
diff --git a/_plugins/add-variables-to-files.rb b/_plugins/add-variables-to-files.rb @@ -9,10 +9,10 @@ module AddVariablesToFiles def generate(site) @site = site - @site.pages.each do |page| - pageURL = "#{page.url}" - page.data["file_name"] = pageURL.split('/').last - end + # @site.pages.each do |page| + # pageURL = "#{page.url}" + # page.data["file_name"] = pageURL.split('/').last + # end @site.documents.each do |doc| @@ -21,6 +21,13 @@ module AddVariablesToFiles doc.data["file_name"] = docURL.split('/').last docDir = "#{doc.relative_path}" + # now = Date.now + # if doc.data["end-date"] + # endDate = Date.parse(doc.data["end-date"]) + # doc.data["project"] = "inactive" + # elsif + # doc.data["project"] = "active" + # end if docDir.include? "_projects" doc.data["project"] = true @@ -54,6 +61,10 @@ module AddVariablesToFiles doc.data["other"] = true end +# if docDir.include? "_NEW_COLLECTION(s)" +# doc.data["NEW_COLLECTION"] = true +# end + regex = /\[.+?\]/ if doc.data["hosts"] @@ -80,7 +91,6 @@ module AddVariablesToFiles end # end if data if doc.data["partners"] - doc.data["partnersExist"] = true partnersString = "#{doc.data["partners"]}" partnersClean = partnersString.delete('"[]') partnersSplit = partnersClean.split(',')
2
diff --git a/templates/index.html b/templates/index.html <script src="{{ STATIC_URL }}js/highcharts/js/highcharts.js"></script> <script src="{{ STATIC_URL }}js/highcharts/js/modules/exporting.js"></script> +<script src="{{ STATIC_URL }}js/select2.min.js"></script> <script> +$(document).ready(function() { + $('#sectors').select2({placeholder: 'Select sectors...', allowClear: true}); +}); + $(function () { $('#container').highcharts({ chart: { @@ -505,10 +510,17 @@ $(function () { <div class="form-group"> <label for="sectors">Sectors</label> - <select name="sectors" id="sectors" class="form-control" multiple="true"> + <select name="sectors" id="sectors" class="form-control" style="width: 100%" multiple="true"> <option value="">A</option> <option value="">B</option> <option value="">C</option> + <option value="">C</option> + <option value="">C</option> + <option value="">C</option> + <option value="">C</option> + <option value="">C</option> + <option value="">C</option> + <option value="">C</option> </select> </div>
3
diff --git a/src/reducers/__snapshots__/route.test.js.snap b/src/reducers/__snapshots__/route.test.js.snap exports[`Router reducer NAVIGATE action stores the current route 1`] = `"somewhere"`; +exports[`Router reducer NAVIGATION action stores the current route 1`] = `"somewhere"`; + exports[`Router reducer initialises with default state 1`] = `""`;
0
diff --git a/scripts/buildDebian.js b/scripts/buildDebian.js @@ -18,17 +18,6 @@ function toArch (platform) { } } -function toFpm (platform) { - switch (platform) { - case 'armhf': - return ['--architecture', 'armhf'] - case 'arm64': - return ['--architecture', 'aarch64'] - default: - return null - } -} - require('./createPackage.js')('linux', { arch: toArch(platform) }).then(function (path) { var installerOptions = { artifactName: 'min-${version}-${arch}.deb', @@ -58,8 +47,7 @@ require('./createPackage.js')('linux', { arch: toArch(platform) }).then(function 'xdg-utils' ], afterInstall: 'resources/postinst_script', - afterRemove: 'resources/prerm_script', - fpm: toFpm(platform) + afterRemove: 'resources/prerm_script' } console.log('Creating package (this may take a while)')
2
diff --git a/ui/component/channelThumbnail/view.jsx b/ui/component/channelThumbnail/view.jsx @@ -50,6 +50,7 @@ function ChannelThumbnail(props: Props) { setThumbUploadError, ThumbUploadError, } = props; + const [retries, setRetries] = React.useState(3); const [thumbLoadError, setThumbLoadError] = React.useState(ThumbUploadError); const shouldResolve = !isResolving && claim === undefined; const thumbnail = rawThumbnail && rawThumbnail.trim().replace(/^http:\/\//i, 'https://'); @@ -58,6 +59,15 @@ function ChannelThumbnail(props: Props) { const channelThumbnail = thumbnailPreview || thumbnail || defaultAvatar; const isGif = channelThumbnail && channelThumbnail.endsWith('gif'); const showThumb = (!obscure && !!thumbnail) || thumbnailPreview; + const avatarSrc = React.useMemo(() => { + if (retries <= 0) { + return defaultAvatar; + } + if (!thumbLoadError) { + return channelThumbnail; + } + return defaultAvatar; + }, [retries, thumbLoadError, channelThumbnail, defaultAvatar]); // Generate a random color class based on the first letter of the channel name const { channelName } = parseURI(uri); @@ -100,9 +110,10 @@ function ChannelThumbnail(props: Props) { <OptimizedImage alt={__('Channel profile picture')} className={!channelThumbnail ? 'channel-thumbnail__default' : 'channel-thumbnail__custom'} - src={(!thumbLoadError && channelThumbnail) || defaultAvatar} + src={avatarSrc} loading={noLazyLoad ? undefined : 'lazy'} onError={() => { + setRetries((retries) => retries - 1); if (setThumbUploadError) { setThumbUploadError(true); } else {
4
diff --git a/src/components/workshops/Carousel.js b/src/components/workshops/Carousel.js @@ -253,16 +253,18 @@ class Carousel extends Component { { ...exampleData }, { ...exampleData }, ] + } + + componentDidMount() { + const self = this + const { slug } = this.props api.get(`v1/workshops/${slug}/projects`).then(projects => { - this.setState({ + self.setState({ projects, }) }) - } - componentDidMount() { - const self = this api .get(`v1/users/current`) .then(response => {
5
diff --git a/src/index.js b/src/index.js @@ -111,6 +111,7 @@ const setLang = (lng) => { // Don't set the lang if it's not the supported languages. if (SUPPORTED_LANGS.includes(proposedLng)) { LANG = proposedLng; + document.cookie = `i18next=${LANG};`; } }
12
diff --git a/articles/connections/database/mysql.md b/articles/connections/database/mysql.md @@ -4,6 +4,7 @@ connection: MySQL image: /media/connections/mysql.svg seo_alias: mysql description: How to authenticate users with username and password using a Custom Database. +toc: true --- # Authenticate Users with Username and Password using a Custom Database
0
diff --git a/src/editors/table.js b/src/editors/table.js @@ -350,10 +350,10 @@ export class TableEditor extends ArrayEditor { self.rows[i].copy_button.classList.add('copy', 'json-editor-btntype-copy') self.rows[i].copy_button.setAttribute('data-i', i) self.rows[i].copy_button.addEventListener('click', function (e) { - const value = self.getValue() e.preventDefault() e.stopPropagation() const i = this.getAttribute('data-i') * 1 + const value = self.getValue() each(value, (j, row) => { if (j === i) { @@ -400,6 +400,7 @@ export class TableEditor extends ArrayEditor { const i = e.currentTarget.getAttribute('data-i') * 1 const rows = this.getValue() if (i >= rows.length - 1) return + const tmp = rows[i + 1] rows[i + 1] = rows[i] rows[i] = tmp
7
diff --git a/package.json b/package.json "awsEc2ImageId": "ami-0f8cb80387454c1ff", "awsKeyName": "natmap-kring", "awsS3ServerConfigOverridePath": "s3://nationalmap-apps/nationalmap/privateserverconfig-2018-07-14.json", - "awsS3ClientConfigOverridePath": "s3://nationalmap-apps/nationalmap/privateclientconfig-2020-09-03.json" + "awsS3ClientConfigOverridePath": "s3://nationalmap-apps/nationalmap/privateclientconfig-2021-02-04.json" }, "devDependencies": { "@babel/core": "^7.3.3",
4
diff --git a/tests/old-unit/support/ServerlessBuilder.js b/tests/old-unit/support/ServerlessBuilder.js @@ -34,9 +34,6 @@ export default class ServerlessBuilder { } this.serverless = { ...serverless, ...serverlessDefaults } - this.serverless.service.getFunction = this.serverless.service.getFunction.bind( - this.serverless.service, - ) } addApiKeys(keys) {
2
diff --git a/token-metadata/0x3597bfD533a99c9aa083587B074434E61Eb0A258/metadata.json b/token-metadata/0x3597bfD533a99c9aa083587B074434E61Eb0A258/metadata.json "symbol": "DENT", "address": "0x3597bfD533a99c9aa083587B074434E61Eb0A258", "decimals": 8, - "dharmaVerificationStatus": { "dharmaVerificationStatus": "VERIFIED" } \ No newline at end of file -} \ No newline at end of file
3
diff --git a/docs/introduction/best-practices.md b/docs/introduction/best-practices.md @@ -247,7 +247,7 @@ performance code because they will be run 90 times per second. ## VR Design -[oculus]: https://developer.oculus.com/documentation/intro-vr/latest/concepts/bp_intro/ +[oculus]: https://developer.oculus.com/design/latest/concepts/book-bp/ Designing for VR is different than designing for flat experiences. As a new medium, there are new sets of best practices to follow, especially to maintain
1
diff --git a/regl.d.ts b/regl.d.ts @@ -947,7 +947,7 @@ declare namespace REGL { interface Texture extends Resource { readonly stats: { - /** Size of the texture, in bytes. */ + /** Size of the texture in bytes. */ size: number; } @@ -970,53 +970,95 @@ declare namespace REGL { } type TextureFormatType = + /* `gl.ALPHA`; channels: 1; types: 'uint8', 'half float', 'float' */ "alpha" | + /* `gl.LUMINANCE`; channels: 1; types: 'uint8', 'half float', 'float' */ "luminance" | + /* `gl.LUMINANCE_ALPHA`; channels: 2; types: 'uint8', 'half float', 'float' */ "luminance alpha" | + /* `gl.RGB`; channels: 3; types: 'uint8', 'half float', 'float' */ "rgb" | + /* `gl.RGBA`; channels: 4; types: 'uint8', 'half float', 'float' */ "rgba" | + /* `gl.RGBA4`; channels: 4; types: 'rgba4' */ "rgba4" | + /* `gl.RGB5_A1`; channels: 4; types: 'rgba5 a1' */ "rgb5 a1" | + /* `gl.RGB565`; channels: 3; types: 'rgb565' */ "rgb565" | + /* `ext.SRGB`; channels: 3; types: 'uint8', 'half float', 'float' */ "srgb" | + /* `ext.RGBA`; channels: 4; types: 'uint8', 'half float', 'float' */ "srgba" | + /* `gl.DEPTH_COMPONENT`; channels: 1; types: 'uint16', 'uint32' */ "depth" | + /* `gl.DEPTH_STENCIL`; channels: 2; 'depth stencil' */ "depth stencil" | + /* `ext.COMPRESSED_RGB_S3TC_DXT1_EXT`; channels: 3; types: 'uint8' */ "rgb s3tc dxt1" | + /* `ext.COMPRESSED_RGBA_S3TC_DXT1_EXT`; channels: 4; types: 'uint8' */ "rgba s3tc dxt1" | + /* `ext.COMPRESSED_RGBA_S3TC_DXT3_EXT`; channels: 4; types: 'uint8' */ "rgba s3tc dxt3" | + /* `ext.COMPRESSED_RGBA_S3TC_DXT5_EXT`; channels: 4; types: 'uint8' */ "rgba s3tc dxt5" | + /* `ext.COMPRESSED_RGB_ATC_WEBGL`; channels: 3; types: 'uint8' */ "rgb atc" | + /* `ext.COMPRESSED_RGBA_ATC_EXPLICIT_ALPHA_WEBGL`; channels: 4; types: 'uint8' */ "rgba atc explicit alpha" | + /* `ext.COMPRESSED_RGBA_ATC_INTERPOLATED_ALPHA_WEBGL`; channels: 4; types: 'uint8' */ "rgba atc interpolated alpha" | + /* `ext.COMPRESSED_RGB_PVRTC_4BPPV1_IMG`; channels: 3; types: 'uint8' */ "rgb pvrtc 4bppv1" | + /* `ext.COMPRESSED_RGB_PVRTC_2BPPV1_IMG`; channels: 3; types: 'uint8' */ "rgb pvrtc 2bppv1" | + /* `ext.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG`; channels: 4; types: 'uint8' */ "rgba pvrtc 4bppv1" | + /* `ext.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG`; channels: 4; types: 'uint8' */ "rgba pvrtc 2bppv1" | + /* `ext.COMPRESSED_RGB_ETC1_WEBGL`; channels: 3; types: 'uint8' */ "rgb etc1"; type TextureDataType = + /* `gl.UNSIGNED_BYTE` */ "uint8" | + /* `gl.UNSIGNED_SHORT` */ "uint16" | + /* `gl.UNSIGNED_INT` */ "uint32" | - "float" | - "half float"; + /* `gl.FLOAT` */ + "float" | "float32" | + /* `ext.HALF_FLOAT_OES` */ + "half float" | "float16"; + /* Related WebGL API: `gl.MAG_FILTER` */ type TextureMagFilterType = + /* `gl.NEAREST` */ "nearest" | + /* `gl.LINEAR` */ "linear"; + /* Related WebGL API: `gl.MIN_FILTER` */ type TextureMinFilterType = + /* `gl.NEAREST` */ "nearest" | + /* `gl.LINEAR` */ "linear" | + /* `gl.LINEAR_MIPMAP_LINEAR` */ "linear mipmap linear" | "mipmap" | + /* `gl.NEAREST_MIPMAP_LINEAR` */ "nearest mipmap linear" | + /* `gl.LINEAR_MIPMAP_NEAREST` */ "linear mipmap nearest" | + /* `gl.NEAREST_MIPMAP_NEAREST` */ "nearest mipmap nearest"; type TextureWrapModeType = + /* `gl.REPEAT` */ "repeat" | + /* `gl.CLAMP_TO_EDGE` */ "clamp" | + /* `gl.MIRRORED_REPEAT` */ "mirror"; interface Texture2D extends Texture { @@ -1064,16 +1106,31 @@ declare namespace REGL { } type TextureMipmapHintType = + /* `gl.DONT_CARE` */ "don't care" | "dont care" | + /* `gl.NICEST` */ "nice" | + /* `gl.FASTEST` */ "fast"; type TextureColorSpaceType = - "none" | "browser"; + /* `gl.NONE` */ + "none" | + /* gl.BROWSER_DEFAULT_WEBGL` */ + "browser"; type TextureChannelsType = 1 | 2 | 3 | 4; - type TextureUnpackAlignmentType = 1 | 2 | 4 | 8; + /* Related WebGL API: `gl.pixelStorei` */ + type TextureUnpackAlignmentType = + /* byte-alignment */ + 1 | + /* rows aligned to even-numbered bytes */ + 2 | + /* word-alignment */ + 4 | + /* rows start on double-word boundaries */ + 8; interface TextureCube extends Texture { resize(): void;
7
diff --git a/package.json b/package.json "babel-polyfill": "^6.26.0", "core-js": "^3.1.4", "formiojs": "^4.0.0-rc.23", + "eventemitter2": "^5.0.1", "lodash": "^4.17.15", "prop-types": "^15.7.2", "recompose": "^0.30.0"
0
diff --git a/core/server/api/v3/email-preview.js b/core/server/api/v3/email-preview.js const models = require('../../models'); -const i18n = require('../../../shared/i18n'); +const tpl = require('@tryghost/tpl'); const errors = require('@tryghost/errors'); const mega = require('../../services/mega'); +const messages = { + postNotFound: 'Post not found.' +}; + const emailPreview = new mega.EmailPreview({ apiVersion: 'v3' }); @@ -32,7 +36,7 @@ module.exports = { if (!model) { throw new errors.NotFoundError({ - message: i18n.t('errors.api.posts.postNotFound') + message: tpl(messages.postNotFound) }); } @@ -59,7 +63,7 @@ module.exports = { if (!model) { throw new errors.NotFoundError({ - message: i18n.t('errors.api.posts.postNotFound') + message: tpl(messages.postNotFound) }); }
14
diff --git a/assets/js/googlesitekit/data/create-error-store.test.js b/assets/js/googlesitekit/data/create-error-store.test.js @@ -171,21 +171,19 @@ describe( 'createErrorStore store', () => { describe( 'selectors', () => { describe( 'getErrorForSelector', () => { - const baseNameParam = 'selectorName'; - - it( `requires a \`${ baseNameParam }\` param`, () => { + it( 'requires a `selectorName` param', () => { expect( () => { select.getErrorForSelector(); - } ).toThrow( `${ baseNameParam } is required.` ); + } ).toThrow( 'selectorName is required.' ); } ); - it( `returns \`undefined\` when no has been received error for the given \`${ baseNameParam }\``, () => { + it( 'returns `undefined` when no has been received error for the given `selectorName`', () => { expect( select.getErrorForSelector( 'nonExistentBaseName' ) ).toBeUndefined(); } ); - it( `returns the error for the given \`${ baseNameParam }\` with empty \`args\` or none`, () => { + it( 'returns the error for the given `selectorName` with empty `args` or none', () => { dispatch.receiveError( errorForbidden, baseName, [] ); expect( select.getErrorForSelector( baseName ) ).toEqual( { @@ -208,10 +206,10 @@ describe( 'createErrorStore store', () => { it.each( [ [ - `returns the error received for the given \`${ baseNameParam }\` and \`args\``, + 'returns the error received for the given `selectorName` and `args`', ], [ - `\`selectorData\` matches the selector name for the given \`${ baseNameParam }\` and \`args\``, + '`selectorData` matches the selector name for the given `selectorName` and `args`', ], ] )( '%s', () => { dispatch.receiveError( errorNotFound, baseName, [] ); @@ -231,21 +229,19 @@ describe( 'createErrorStore store', () => { } ); describe( 'getErrorForAction', () => { - const baseNameParam = 'actionName'; - - it( `requires a \`${ baseNameParam }\` param`, () => { + it( 'requires a `actionName` param', () => { expect( () => { select.getErrorForAction(); - } ).toThrow( `${ baseNameParam } is required.` ); + } ).toThrow( 'actionName is required.' ); } ); - it( `returns \`undefined\` when no has been received error for the given \`${ baseNameParam }\``, () => { + it( 'returns `undefined` when no has been received error for the given `actionName`', () => { expect( select.getErrorForAction( 'nonExistentBaseName' ) ).toBeUndefined(); } ); - it( `returns the error for the given \`${ baseNameParam }\` with empty \`args\` or none`, () => { + it( 'returns the error for the given `actionName` with empty `args` or none', () => { dispatch.receiveError( errorForbidden, baseName, [] ); expect( select.getErrorForAction( baseName ) ).toEqual( @@ -256,7 +252,7 @@ describe( 'createErrorStore store', () => { ); } ); - it( `returns the error received for the given \`${ baseNameParam }\` and \`args\``, () => { + it( 'returns the error received for the given `actionName` and `args`', () => { dispatch.receiveError( errorNotFound, baseName, [] ); dispatch.receiveError( errorForbidden, baseName, args );
2
diff --git a/userscript.user.js b/userscript.user.js @@ -25970,6 +25970,11 @@ var $$IMU_EXPORT$$; if (!data) cb(null); + if (!("imageinfo" in data)) { + console_error("Unable to find imageinfo in", data); + return cb(null); + } + var imageinfo = data.imageinfo; if (!("album_images" in imageinfo)) { console_error("Unable to find album_images in", data);
1
diff --git a/generators/server/templates/build.gradle.ejs b/generators/server/templates/build.gradle.ejs @@ -504,8 +504,7 @@ dependencies { <%_ } _%> <%_ if (databaseType === 'couchbase') { _%> implementation "com.github.differentway:couchmove" - implementation group: 'com.couchbase.client', name: 'java-client', version: '3.1.4' - implementation group: 'com.couchbase.client', name: 'encryption', version: '2.0.1' + implementation "com.couchbase.client:java-client" <%_ } _%> implementation ("io.springfox:springfox-oas") implementation ("io.springfox:springfox-swagger2")
2
diff --git a/token-metadata/0x4575f41308EC1483f3d399aa9a2826d74Da13Deb/metadata.json b/token-metadata/0x4575f41308EC1483f3d399aa9a2826d74Da13Deb/metadata.json "symbol": "OXT", "address": "0x4575f41308EC1483f3d399aa9a2826d74Da13Deb", "decimals": 18, - "dharmaVerificationStatus": { "dharmaVerificationStatus": "VERIFIED" } \ No newline at end of file -} \ No newline at end of file
3
diff --git a/token-metadata/0x491604c0FDF08347Dd1fa4Ee062a822A5DD06B5D/metadata.json b/token-metadata/0x491604c0FDF08347Dd1fa4Ee062a822A5DD06B5D/metadata.json "symbol": "CTSI", "address": "0x491604c0FDF08347Dd1fa4Ee062a822A5DD06B5D", "decimals": 18, - "dharmaVerificationStatus": { "dharmaVerificationStatus": "VERIFIED" } \ No newline at end of file -} \ No newline at end of file
3
diff --git a/src/generators/border-widths.less b/src/generators/border-widths.less .generate-border-width-utilities(@border-width-scale; @border-color; @i + 1); } -.generate-screen-border-width-utility(@variant; 0; @border-color; @screen-name; @screen-width) { +.generate-screen-border-width-utility(@variant; 0; @border-color; @screen-name) { @prefix: ~"@{screen-name}\:"; .generate-utility-variant(~"@{prefix}border"; @variant; { border: 0; }); .generate-utility-variant(~"@{prefix}border-l"; @variant; { border-left: 0; }); } -.generate-screen-border-width-utility(@variant; @border-width; @border-color; @screen-name; @screen-width) when not (@border-width = 0) { +.generate-screen-border-width-utility(@variant; @border-width; @border-color; @screen-name) when not (@border-width = 0) { @prefix: ~"@{screen-name}\:"; .generate-utility-variant(~"@{prefix}border"; @variant; { }); } -.generate-screen-border-width-utilities(@border-width-scale; @border-color; @screen-name; @screen-width; @i: 1) when (@i <= length(@border-width-scale)) { +.generate-screen-border-width-utilities(@border-width-scale; @border-color; @screen-name; @i: 1) when (@i <= length(@border-width-scale)) { @variant: extract(@border-width-scale, @i); @border-width: extract(@variant, 2); - .generate-screen-border-width-utility(@variant; @border-width; @border-color; @screen-name; @screen-width); - .generate-screen-border-width-utilities(@border-width-scale; @border-color; @screen-name; @screen-width; (@i + 1)); + .generate-screen-border-width-utility(@variant; @border-width; @border-color; @screen-name); + .generate-screen-border-width-utilities(@border-width-scale; @border-color; @screen-name; (@i + 1)); } .generate-responsive-border-width-utilities(@border-width-scale; @border-color; @i: 1) when (@i <= length(@screens)) { @screen-width: extract(@screen, 2); @media (min-width: @screen-width) { - .generate-screen-border-width-utilities(@border-width-scale; @border-color; @screen-name; @screen-width); + .generate-screen-border-width-utilities(@border-width-scale; @border-color; @screen-name); } + .generate-responsive-border-width-utilities(@border-width-scale; @border-color; @i + 1); }
2
diff --git a/contribs/gmf/src/query/windowComponent.js b/contribs/gmf/src/query/windowComponent.js @@ -309,6 +309,7 @@ QueryWindowController.prototype.$onInit = function() { containment: this.draggableContainment }); windowContainer.resizable({ + handles: 'all', minHeight: 240, minWidth: 240 });
4
diff --git a/src/components/sidemenu/SideMenuPanel.js b/src/components/sidemenu/SideMenuPanel.js @@ -34,26 +34,26 @@ const getMenuItems = ({ API, hideSidemenu, showDialog, hideDialog, navigation }) hideSidemenu() } }, - { - icon: 'person', - name: 'Profile Privacy' - }, - { - icon: 'notifications', - name: 'Notification Settings' - }, - { - icon: 'person', - name: 'Send Feedback' - }, - { - icon: 'comment', - name: 'FAQ' - }, - { - icon: 'question-answer', - name: 'About' - }, + // { + // icon: 'person', + // name: 'Profile Privacy' + // }, + // { + // icon: 'notifications', + // name: 'Notification Settings' + // }, + // { + // icon: 'person', + // name: 'Send Feedback' + // }, + // { + // icon: 'comment', + // name: 'FAQ' + // }, + // { + // icon: 'question-answer', + // name: 'About' + // }, { icon: 'delete', name: 'Delete Account', @@ -61,7 +61,7 @@ const getMenuItems = ({ API, hideSidemenu, showDialog, hideDialog, navigation }) showDialog({ title: 'Delete Account', message: 'Are you sure?', - dismissText: 'YES', + dismissText: 'DELETE', onCancel: () => hideDialog(), onDismiss: async () => { await userStorage.deleteAccount()
0
diff --git a/assets/js/googlesitekit/datastore/user/surveys.test.js b/assets/js/googlesitekit/datastore/user/surveys.test.js @@ -23,9 +23,6 @@ import { createTestRegistry, muteFetch, } from '../../../../../tests/js/utils'; -import { - act, -} from '../../../../../tests/js/test-utils'; import { STORE_NAME } from './constants'; describe( 'core/user surveys', () => { @@ -73,7 +70,7 @@ describe( 'core/user surveys', () => { it( 'makes network requests to endpoints', async () => { muteFetch( surveyTriggerEndpoint, [] ); - await act( () => registry.dispatch( STORE_NAME ).triggerSurvey( 'optimizeSurvey', { ttl: 1 } ) ); + await registry.dispatch( STORE_NAME ).triggerSurvey( 'optimizeSurvey', { ttl: 1 } ); expect( fetchMock ).toHaveFetched( surveyTriggerEndpoint, { body: { @@ -109,9 +106,9 @@ describe( 'core/user surveys', () => { muteFetch( surveyEventEndpoint, {} ); // Trigger a survey to appear. - await act( () => registry.dispatch( STORE_NAME ).triggerSurvey( 'optimizeSurvey', { ttl: 1 } ) ); + await registry.dispatch( STORE_NAME ).triggerSurvey( 'optimizeSurvey', { ttl: 1 } ); // Send a survey event. - await act( () => registry.dispatch( STORE_NAME ).sendSurveyEvent( 'answer_question', { foo: 'bar' } ) ); + await registry.dispatch( STORE_NAME ).sendSurveyEvent( 'answer_question', { foo: 'bar' } ); expect( fetchMock ).toHaveFetched( surveyEventEndpoint, { body: { @@ -133,7 +130,7 @@ describe( 'core/user surveys', () => { it( 'returns the current survey when it is set', async () => { muteFetch( surveyTriggerEndpoint, survey ); - await act( () => registry.dispatch( STORE_NAME ).triggerSurvey( 'optimizeSurvey', { ttl: 1 } ) ); + await registry.dispatch( STORE_NAME ).triggerSurvey( 'optimizeSurvey', { ttl: 1 } ); expect( registry.select( STORE_NAME ).getCurrentSurvey() @@ -157,7 +154,7 @@ describe( 'core/user surveys', () => { it( 'returns the error once set', async () => { muteFetch( surveyTriggerEndpoint, survey ); - await act( () => registry.dispatch( STORE_NAME ).triggerSurvey( 'optimizeSurvey', { ttl: 1 } ) ); + await registry.dispatch( STORE_NAME ).triggerSurvey( 'optimizeSurvey', { ttl: 1 } ); expect( registry.select( STORE_NAME ).getCurrentSurveySession()
2
diff --git a/app/public/config/config.example.js b/app/public/config/config.example.js @@ -145,7 +145,8 @@ var config = maxLastN : 5, // If truthy, users can NOT change number of speakers visible lockLastN : false, - // Show logo if not null, else show title + // Show logo if "logo" is not null, else show title + // Set logo file name using logo.* pattern like "logo.png" to not track it by git logo : 'images/logo.example.png', title : 'edumeet', // Service & Support URL
7
diff --git a/edit.js b/edit.js @@ -1273,6 +1273,7 @@ const _makeChunkMesh = (seedString, parcelSize, subparcelSize) => { const texture = await new Promise((accept, reject) => { basisLoader.load('ground-texture.basis', texture => { // console.timeEnd('basis texture load'); + texture.minFilter = THREE.LinearFilter; accept(texture); }, () => { // console.log('onProgress');
4
diff --git a/tests/e2e/specs/auth-flow.test.js b/tests/e2e/specs/auth-flow.test.js @@ -35,7 +35,7 @@ function stubGoogleSignIn( request ) { } } -describe( 'authenticating with Google', () => { +describe( 'Site Kit set up flow for the first time', () => { beforeAll( async() => { await deactivateAllOtherPlugins();
3
diff --git a/includes/Modules/Analytics.php b/includes/Modules/Analytics.php @@ -1419,12 +1419,11 @@ final class Analytics extends Module $dimension_filter->setOperator( 'EXACT' ); $args['page'] = str_replace( trim( $this->context->get_reference_site_url(), '/' ), '', esc_url_raw( $args['page'] ) ); $dimension_filter->setExpressions( array( rawurldecode( $args['page'] ) ) ); - $dimension_filters_clauses[] = $dimension_filter; } if ( ! empty( $dimension_filters_clauses ) ) { $dimension_filter_clause = new Google_Service_AnalyticsReporting_DimensionFilterClause(); - $dimension_filter_clause->setFilters( $dimension_filters_clauses ); + $dimension_filter_clause->setFilters( array( $dimension_filter ) ); $request->setDimensionFilterClauses( $dimension_filters_clauses ); }
2
diff --git a/index.js b/index.js @@ -290,6 +290,10 @@ function update() { data.hero_tile_pos_x = parseInt(data.hero.x/maps[data.map_name].sprite.tileWidth); data.hero_tile_pos_y = parseInt(data.hero.y/maps[data.map_name].sprite.tileHeight); + if (data.wating_to_step) { + do_step(data); + } + //check if the actual tile has an event if ((data.hero_tile_pos_x + "_" + data.hero_tile_pos_y) in maps[data.map_name].events) { event_triggering(); @@ -297,10 +301,6 @@ function update() { data.extra_speed = 0; } - if (data.wating_to_step) { - do_step(data); - } - physics.set_speed_factors(data); set_actual_action(); //chooses which sprite the hero shall assume data.delta_time = game.time.elapsedMS/numbers.DELTA_TIME_FACTOR; @@ -361,6 +361,10 @@ function render() { let y_pos = data.hero_tile_pos_y*tile_height; game.debug.geom(new Phaser.Rectangle(x_pos, y_pos, tile_width, tile_height), 'rgba(255,0,0,0.5)'); game.debug.geom(new Phaser.Circle(data.hero.x, data.hero.y, 5), 'rgba(20,75,0,1.0)'); + for (let point in maps[data.map_name].events) { + let pos = point.split('_'); + game.debug.geom(new Phaser.Rectangle(pos[0]*tile_width, pos[1]*tile_height, tile_width, tile_height), 'rgba(255,255,60,0.7)'); + } } }
7
diff --git a/packages/vulcan-forms/lib/components/FormComponent.jsx b/packages/vulcan-forms/lib/components/FormComponent.jsx @@ -73,7 +73,9 @@ class FormComponent extends PureComponent { } else { if (typeof documentValue === 'object' || typeof currentValue === 'object') { // for object, use lodash's merge - value = merge(documentValue, currentValue); + // if one of the two values is an array, use [] as merge seed to force result to be an array as well + const mergeSeed = Array.isArray(documentValue) || Array.isArray(currentValue) ? [] : {}; + value = merge(mergeSeed, documentValue, currentValue); } else { // note: value has to default to '' to make component controlled value = currentValue || documentValue || '';
9
diff --git a/test/onboarding.e2e.js b/test/onboarding.e2e.js @@ -7,10 +7,10 @@ describe('Onboarding Story 1', () => { beforeAll(async () => { app = await startApp() await resetData(app) + await app.restart() }) afterAll(async () => { - await resetData(app) await stopApp(app) }) @@ -174,6 +174,8 @@ describe('Onboarding Story 2', () => { beforeAll(async () => { app = await startApp() + await resetData(app) + await app.restart() }) afterAll(async () => {
9
diff --git a/test/integration/batch/job-queue.test.js b/test/integration/batch/job-queue.test.js @@ -95,7 +95,7 @@ describe('job queue', function () { } assert.equal(queuesFromScan.length, 1); - assert.equal(queuesFromScan[0], 'vizzuality'); + assert.ok(queuesFromScan.indexOf(data.user) >= 0); self.jobQueue.getQueues(function (err, queuesFromIndex) { if (err) { @@ -103,8 +103,7 @@ describe('job queue', function () { } assert.equal(queuesFromIndex.length, 1); - assert.equal(queuesFromIndex[0], 'vizzuality'); - assert.deepEqual(queuesFromIndex, queuesFromScan); + assert.ok(queuesFromIndex.indexOf(data.user) >= 0); redisUtils.clean('batch:*', done); }); @@ -113,7 +112,7 @@ describe('job queue', function () { }); }); - it('.scanQueues() should feed queue index', function (done) { + it('.scanQueues() should feed queue index with two users', function (done) { var self = this; var jobVizzuality = { @@ -144,6 +143,8 @@ describe('job queue', function () { } assert.equal(queuesFromScan.length, 2); + assert.ok(queuesFromScan.indexOf(jobVizzuality.user) >= 0); + assert.ok(queuesFromScan.indexOf(jobWadus.user) >= 0); self.jobQueue.getQueues(function (err, queuesFromIndex) { if (err) { @@ -151,7 +152,8 @@ describe('job queue', function () { } assert.equal(queuesFromIndex.length, 2); - assert.deepEqual(queuesFromIndex, queuesFromScan); + assert.ok(queuesFromIndex.indexOf(jobVizzuality.user) >= 0); + assert.ok(queuesFromIndex.indexOf(jobWadus.user) >= 0); redisUtils.clean('batch:*', done); });
7
diff --git a/mip-fh-ad/mip-fh-ad.js b/mip-fh-ad/mip-fh-ad.js @@ -24,7 +24,10 @@ define(function (require) { var loadBdAd = function () { var html = ['<div class="fh-ad-1">', '<span class="btn-fh-ad-1" on="tap:fh-ad-1.close"></span>', '</div>']; - html = html.concat(['<mip-ad type="ad-qwang" ', 'cpro_psid="u2355234"', '></mip-ad>']); + html = html.concat(['<mip-ad type="baidu-wm-ext" ', + ,'domain="1.feihua.com" token="dy3a1ecf96f3cef331db4c3e8da4f73ffa54acde0b36"' + ,'>' + ,'<div id="dy3a1ecf96f3cef331db4c3e8da4f73ffa54acde0b36"></div>', '</mip-ad>']); html = html.join(''); return html;
14
diff --git a/src/client/js/components/Admin/SlackIntegration/SlackIntegration.jsx b/src/client/js/components/Admin/SlackIntegration/SlackIntegration.jsx @@ -117,26 +117,23 @@ const SlackIntegration = (props) => { officialBot: { name: t('admin:slack_integration.selecting_bot_types.official_bot'), level: t('admin:slack_integration.selecting_bot_types.for_beginners'), - // setUp: t('admin:slack_integration.selecting_bot_types.easy'), setUp: 'easy', - multiWSIntegration: t('admin:slack_integration.selecting_bot_types.possible'), - securityControl: t('admin:slack_integration.selecting_bot_types.impossible'), + multiWSIntegration: 'possible', + securityControl: 'impossible', }, customBotWithProxy: { name: t('admin:slack_integration.selecting_bot_types.without_proxy'), level: t('admin:slack_integration.selecting_bot_types.for_intermediate'), - // setUp: t('admin:slack_integration.selecting_bot_types.normal'), setUp: 'normal', - multiWSIntegration: t('admin:slack_integration.selecting_bot_types.impossible'), - securityControl: t('admin:slack_integration.selecting_bot_types.possible'), + multiWSIntegration: 'impossible', + securityControl: 'possible', }, customBotWithoutProxy: { name: t('admin:slack_integration.selecting_bot_types.with_proxy'), level: t('admin:slack_integration.selecting_bot_types.for_advanced'), - // setUp: t('admin:slack_integration.selecting_bot_types.hard'), setUp: 'hard', - multiWSIntegration: t('admin:slack_integration.selecting_bot_types.possible'), - securityControl: t('admin:slack_integration.selecting_bot_types.impossible'), + multiWSIntegration: 'possible', + securityControl: 'impossible', }, }; @@ -204,17 +201,19 @@ const SlackIntegration = (props) => { <div className="my-4"> <div className="d-flex justify-content-between mb-2"> {showBotTypeLabel('set_up')} - {/* <span>{value.setUp}</span> */} <span className={`bot-type-disc-${value.setUp}`}>{t(`admin:slack_integration.selecting_bot_types.${value.setUp}`)}</span> </div> <div className="d-flex justify-content-between mb-2"> {showBotTypeLabel('multiple_workspaces_integration')} - <span>{value.multiWSIntegration}</span> - + <span className={`bot-type-disc-${value.multiWSIntegration}`}> + {t(`admin:slack_integration.selecting_bot_types.${value.multiWSIntegration}`)} + </span> </div> <div className="d-flex justify-content-between"> {showBotTypeLabel('security_control')} - <span>{value.securityControl}</span> + <span className={`bot-type-disc-${value.securityControl}`}> + {t(`admin:slack_integration.selecting_bot_types.${value.securityControl}`)} + </span> </div> </div> </p>
7