diff --git a/js/background.js b/js/background.js index ca64dca4d..7d08eee07 100644 --- a/js/background.js +++ b/js/background.js @@ -1085,6 +1085,7 @@ pubkey: userPubKey, avatarPath, avatarColor: conversation.getColor(), + isRss: conversation.isRss(), onStartConversation: () => { Whisper.events.trigger('showConversation', userPubKey); }, diff --git a/js/views/add_server_dialog_view_old.js b/js/views/add_server_dialog_view_old.js deleted file mode 100644 index ae05bb84e..000000000 --- a/js/views/add_server_dialog_view_old.js +++ /dev/null @@ -1,92 +0,0 @@ -/* global Whisper, i18n, _ */ - -// eslint-disable-next-line func-names -(function() { - 'use strict'; - - window.Whisper = window.Whisper || {}; - - Whisper.AddServerDialogView = Whisper.View.extend({ - templateName: 'add-server-template', - className: 'loki-dialog add-server modal', - initialize(options = {}) { - this.title = i18n('addServerDialogTitle'); - this.okText = options.okText || i18n('ok'); - this.cancelText = options.cancelText || i18n('cancel'); - this.$('input').focus(); - this.render(); - }, - events: { - keyup: 'onKeyup', - 'click .ok': 'confirm', - 'click .cancel': 'close', - }, - render_attributes() { - return { - title: this.title, - ok: this.okText, - cancel: this.cancelText, - }; - }, - confirm() { - // Remove error if there is one - this.showError(null); - const serverUrl = this.$('#server-url') - .val() - .toLowerCase(); - // TODO: Make this not hard coded - const channelId = 1; - const dialog = new Whisper.ConnectingToServerDialogView({ - serverUrl, - channelId, - }); - const dialogDelayTimer = setTimeout(() => { - this.el.append(dialog.el); - }, 200); - dialog.once('connectionResult', result => { - clearTimeout(dialogDelayTimer); - if (result.cancelled) { - this.showError(null); - return; - } - if (result.errorCode) { - this.showError(result.errorCode); - return; - } - window.pushToast({ - title: i18n('connectToServerSuccess'), - type: 'success', - id: 'connectToServerSuccess', - }); - this.close(); - }); - dialog.trigger('attemptConnection'); - }, - close() { - this.remove(); - }, - showError(message) { - if (_.isEmpty(message)) { - this.$('.error').text(''); - this.$('.error').hide(); - } else { - this.$('.error').text(`Error: ${message}`); - this.$('.error').show(); - } - this.$('input').focus(); - }, - onKeyup(event) { - switch (event.key) { - case 'Enter': - this.confirm(); - break; - case 'Escape': - case 'Esc': - this.close(); - break; - default: - break; - } - }, - }); -})(); diff --git a/js/views/device_pairing_dialog_view_old.js b/js/views/device_pairing_dialog_view_old.js deleted file mode 100644 index 80d6b4f61..000000000 --- a/js/views/device_pairing_dialog_view_old.js +++ /dev/null @@ -1,209 +0,0 @@ -/* global - Whisper, - i18n, - libloki, - textsecure, - ConversationController, - $, - QRCode, -*/ - -// eslint-disable-next-line func-names -(function() { - 'use strict'; - - window.Whisper = window.Whisper || {}; - - Whisper.DevicePairingDialogView = Whisper.View.extend({ - className: 'loki-dialog device-pairing-dialog modal', - templateName: 'device-pairing-dialog', - initialize() { - this.pubKeyRequests = []; - this.reset(); - this.render(); - this.showView(); - this.qr = new QRCode(this.$('#qr')[0], { - correctLevel: QRCode.CorrectLevel.L, - }); - this.qr.makeCode(textsecure.storage.user.getNumber()); - }, - reset() { - this.pubKey = null; - this.accepted = false; - this.isListening = false; - this.pubKeyToUnpair = null; - this.success = false; - }, - events: { - 'click #startPairing': 'startReceivingRequests', - 'click #close': 'close', - 'click .waitingForRequestView .cancel': 'stopReceivingRequests', - 'click .requestReceivedView .skip': 'skipDevice', - 'click #allowPairing': 'allowDevice', - 'click .requestAcceptedView .ok': 'stopReceivingRequests', - 'click .confirmUnpairView .cancel': 'stopReceivingRequests', - 'click .confirmUnpairView .unpairDevice': 'confirmUnpairDevice', - }, - render_attributes() { - return { - defaultTitle: i18n('pairedDevices'), - waitingForRequestTitle: i18n('waitingForDeviceToRegister'), - requestReceivedTitle: i18n('devicePairingReceived'), - requestAcceptedTitle: i18n('devicePairingAccepted'), - startPairingText: i18n('pairNewDevice'), - cancelText: i18n('cancel'), - unpairDevice: i18n('unpairDevice'), - closeText: i18n('close'), - skipText: i18n('skip'), - okText: i18n('ok'), - allowPairingText: i18n('allowPairing'), - confirmUnpairViewTitle: i18n('confirmUnpairingTitle'), - }; - }, - startReceivingRequests() { - this.trigger('startReceivingRequests'); - this.isListening = true; - this.showView(); - }, - stopReceivingRequests() { - if (this.success) { - const deviceAlias = this.$('#deviceAlias')[0].value.trim(); - const conv = ConversationController.get(this.pubKey); - if (conv) { - conv.setNickname(deviceAlias); - } - } - this.trigger('stopReceivingRequests'); - this.reset(); - this.showView(); - }, - requestReceived(secondaryDevicePubKey) { - // FIFO: push at the front of the array with unshift() - this.pubKeyRequests.unshift(secondaryDevicePubKey); - if (!this.pubKey) { - this.nextPubKey(); - this.showView('requestReceived'); - } - }, - allowDevice() { - this.accepted = true; - this.trigger('devicePairingRequestAccepted', this.pubKey, errors => - this.transmisssionCB(errors) - ); - this.showView(); - }, - transmisssionCB(errors) { - if (!errors) { - this.$('.transmissionStatus').text(i18n('provideDeviceAlias')); - this.$('#deviceAliasView').show(); - this.$('#deviceAlias').on('input', e => { - if (e.target.value.trim()) { - this.$('.requestAcceptedView .ok').removeAttr('disabled'); - } else { - this.$('.requestAcceptedView .ok').attr('disabled', true); - } - }); - this.$('.requestAcceptedView .ok').show(); - this.$('.requestAcceptedView .ok').attr('disabled', true); - this.success = true; - } else { - this.$('.transmissionStatus').text(errors); - this.$('.requestAcceptedView .ok').show(); - } - }, - skipDevice() { - this.trigger('devicePairingRequestRejected', this.pubKey); - this.nextPubKey(); - this.showView(); - }, - nextPubKey() { - // FIFO: pop at the back of the array using pop() - this.pubKey = this.pubKeyRequests.pop(); - }, - async confirmUnpairDevice() { - this.trigger('deviceUnpairingRequested', this.pubKeyToUnpair); - this.reset(); - this.showView(); - }, - requestUnpairDevice(pubKey) { - this.pubKeyToUnpair = pubKey; - this.showView(); - }, - getPubkeyName(pubKey) { - const secretWords = window.mnemonic.pubkey_to_secret_words(pubKey); - const conv = ConversationController.get(pubKey); - const deviceAlias = conv ? conv.getNickname() : 'Unnamed Device'; - return `${deviceAlias} (pairing secret: ${secretWords})`; - }, - async showView() { - const defaultView = this.$('.defaultView'); - const waitingForRequestView = this.$('.waitingForRequestView'); - const requestReceivedView = this.$('.requestReceivedView'); - const requestAcceptedView = this.$('.requestAcceptedView'); - const confirmUnpairView = this.$('.confirmUnpairView'); - if (this.pubKeyToUnpair) { - defaultView.hide(); - requestReceivedView.hide(); - waitingForRequestView.hide(); - requestAcceptedView.hide(); - confirmUnpairView.show(); - const name = this.getPubkeyName(this.pubKeyToUnpair); - this.$('.confirmUnpairView #pubkey').html(name); - } else if (!this.isListening) { - requestReceivedView.hide(); - waitingForRequestView.hide(); - requestAcceptedView.hide(); - confirmUnpairView.hide(); - - const ourPubKey = textsecure.storage.user.getNumber(); - defaultView.show(); - const pubKeys = await libloki.storage.getSecondaryDevicesFor(ourPubKey); - this.$('#pairedPubKeys').empty(); - if (pubKeys && pubKeys.length > 0) { - this.$('#startPairing').attr('disabled', true); - pubKeys.forEach(x => { - const name = this.getPubkeyName(x); - const li = $('
  • ').html(name); - if (window.lokiFeatureFlags.multiDeviceUnpairing) { - const link = $('') - .text('Unpair') - .attr('href', '#'); - link.on('click', () => this.requestUnpairDevice(x)); - li.append(' - '); - li.append(link); - } - this.$('#pairedPubKeys').append(li); - }); - } else { - this.$('#startPairing').removeAttr('disabled'); - this.$('#pairedPubKeys').append('
  • No paired devices
  • '); - } - } else if (this.accepted) { - defaultView.hide(); - requestReceivedView.hide(); - waitingForRequestView.hide(); - requestAcceptedView.show(); - } else if (this.pubKey) { - const secretWords = window.mnemonic.pubkey_to_secret_words(this.pubKey); - this.$('.secretWords').text(secretWords); - requestReceivedView.show(); - waitingForRequestView.hide(); - requestAcceptedView.hide(); - defaultView.hide(); - } else { - waitingForRequestView.show(); - requestReceivedView.hide(); - requestAcceptedView.hide(); - defaultView.hide(); - } - }, - close() { - this.remove(); - this.qr.clear(); - if (this.pubKey && !this.accepted) { - this.trigger('devicePairingRequestRejected', this.pubKey); - } - this.trigger('close'); - }, - }); -})(); diff --git a/js/views/user_details_dialog_view.js b/js/views/user_details_dialog_view.js index 7638639e4..98c164691 100644 --- a/js/views/user_details_dialog_view.js +++ b/js/views/user_details_dialog_view.js @@ -13,6 +13,7 @@ avatarPath, avatarColor, pubkey, + isRss, onOk, onStartConversation, }) { @@ -20,6 +21,7 @@ this.profileName = profileName; this.pubkey = pubkey; + this.isRss = isRss; this.avatarPath = avatarPath; this.avatarColor = avatarColor; this.onOk = onOk; @@ -38,6 +40,7 @@ onStartConversation: this.onStartConversation, profileName: this.profileName, pubkey: this.pubkey, + isRss: this.isRss, avatarPath: this.avatarPath, i18n, }, diff --git a/package.json b/package.json index 64272f249..a2305a59a 100644 --- a/package.json +++ b/package.json @@ -108,7 +108,6 @@ "react-portal": "^4.2.0", "react-qrcode": "^0.2.0", "react-redux": "6.0.1", - "react-spinners": "^0.7.2", "react-virtualized": "9.21.0", "read-last-lines": "1.3.0", "redux": "4.0.1", @@ -127,13 +126,6 @@ "uuid": "3.3.2", "websocket": "1.0.28" }, - "babel": { - "plugins": [ - "transform-react-jsx", - "babel-plugin-styled-components", - "babel-plugin-transform-object-rest-spread" - ] - }, "devDependencies": { "@types/chai": "4.1.2", "@types/classnames": "2.2.3", diff --git a/package_bak.json b/package_bak.json deleted file mode 100644 index ded7bb613..000000000 --- a/package_bak.json +++ /dev/null @@ -1,327 +0,0 @@ -{ - "name": "loki-messenger-desktop", - "productName": "Loki Messenger", - "description": "Private messaging from your desktop", - "repository": "https://github.com/loki-project/loki-messenger.git", - "version": "1.0.0-beta9", - "license": "GPL-3.0", - "author": { - "name": "Loki Project", - "email": "team@loki.network" - }, - "main": "main.js", - "scripts": { - "postinstall": - "electron-builder install-app-deps && rimraf node_modules/dtrace-provider", - "start": "electron .", - "start-multi": "NODE_APP_INSTANCE=1 electron .", - "start-multi2": "NODE_APP_INSTANCE=2 electron .", - "start-prod": - "NODE_ENV=production NODE_APP_INSTANCE=devprod LOKI_DEV=1 electron .", - "start-prod-multi": - "NODE_ENV=production NODE_APP_INSTANCE=devprod1 LOKI_DEV=1 electron .", - "grunt": "grunt", - "icon-gen": - "electron-icon-maker --input=images/icon_1024.png --output=./build", - "generate": "yarn icon-gen && yarn grunt", - "build": "electron-builder --config.extraMetadata.environment=$SIGNAL_ENV", - "build-release": - "export SIGNAL_ENV=production && npm run build -- --config.directories.output=release", - "sign-release": "node ts/updater/generateSignature.js", - "build-module-protobuf": - "pbjs --target static-module --wrap commonjs --out ts/protobuf/compiled.js protos/*.proto && pbts --out ts/protobuf/compiled.d.ts ts/protobuf/compiled.js", - "clean-module-protobuf": - "rm -f ts/protobuf/compiled.d.ts ts/protobuf/compiled.js", - "build-protobuf": "yarn build-module-protobuf", - "clean-protobuf": "yarn clean-module-protobuf", - "prepare-beta-build": "node prepare_beta_build.js", - "prepare-import-build": "node prepare_import_build.js", - "publish-to-apt": - "NAME=$npm_package_name VERSION=$npm_package_version ./aptly.sh", - "test": "yarn test-node && yarn test-electron", - "test-view": "NODE_ENV=test yarn run start", - "test-lib-view": "NODE_ENV=test-lib yarn run start", - "test-loki-view": "NODE_ENV=test-loki yarn run start", - "test-electron": "yarn grunt test", - "test-node": - "mocha --recursive --exit test/app test/modules ts/test libloki/test/node", - "test-node-coverage": - "nyc --reporter=lcov --reporter=text mocha --recursive test/app test/modules ts/test libloki/test/node", - "test-node-coverage-html": - "nyc --reporter=lcov --reporter=html mocha --recursive test/app test/modules ts/test libloki/test/node", - "eslint": "eslint .", - "lint": "yarn format --list-different && yarn lint-windows", - "dev-lint": "yarn format --list-different; yarn lint-windows", - "lint-windows": "yarn eslint && yarn tslint", - "lint-deps": "node ts/util/lint/linter.js", - "tslint": "tslint --format stylish --project .", - "format": - "prettier --write \"*.{css,js,json,md,scss,ts,tsx}\" \"./**/*.{css,js,json,md,scss,ts,tsx}\"", - "transpile": "tsc", - "clean-transpile": "rimraf ts/**/*.js && rimraf ts/*.js", - "open-coverage": "open coverage/lcov-report/index.html", - "styleguide": "styleguidist server", - "pow-metrics": "node metrics_app.js localhost 9000", - "ready": - "yarn clean-transpile && yarn grunt && yarn lint && yarn test-node && yarn test-electron && yarn lint-deps" - }, - "dependencies": { - "@journeyapps/sqlcipher": - "https://github.com/scottnonnenberg-signal/node-sqlcipher.git#2e28733b61640556b0272a3bfc78b0357daf71e6", - "@sindresorhus/is": "0.8.0", - "@types/dompurify": "^2.0.0", - "backbone": "1.3.3", - "blob-util": "1.3.0", - "blueimp-canvas-to-blob": "3.14.0", - "blueimp-load-image": "2.18.0", - "buffer-crc32": "0.2.13", - "bunyan": "1.8.12", - "classnames": "2.2.5", - "color": "^3.1.2", - "config": "1.28.1", - "dompurify": "^2.0.7", - "electron-context-menu": "^0.15.0", - "electron-editor-context-menu": "1.1.1", - "electron-is-dev": "0.3.0", - "emoji-datasource": "4.0.0", - "emoji-datasource-apple": "4.0.0", - "emoji-js": "3.4.0", - "emoji-panel": - "https://github.com/scottnonnenberg-signal/emoji-panel.git#v0.5.5", - "filesize": "3.6.1", - "firstline": "1.2.1", - "form-data": "2.3.2", - "fs-extra": "5.0.0", - "glob": "7.1.2", - "google-libphonenumber": "3.2.2", - "got": "8.2.0", - "he": "1.2.0", - "intl-tel-input": "12.1.15", - "jquery": "3.3.1", - "js-sha512": "0.8.0", - "js-yaml": "3.13.0", - "jsbn": "1.1.0", - "libsodium-wrappers": "^0.7.4", - "linkify-it": "2.0.3", - "lodash": "4.17.11", - "mixpanel": "^0.10.2", - "mkdirp": "0.5.1", - "moment": "2.21.0", - "mustache": "2.3.0", - "nat-upnp": "^1.1.1", - "node-fetch": "2.3.0", - "node-gyp": "3.8.0", - "node-sass": "4.9.3", - "os-locale": "2.1.0", - "pify": "3.0.0", - "protobufjs": "6.8.6", - "proxy-agent": "3.0.3", - "qrcode": "^1.4.4", - "react": "16.8.3", - "react-contextmenu": "2.11.0", - "react-dom": "16.8.3", - "react-portal": "^4.2.0", - "react-qrcode": "^0.2.0", - "react-redux": "6.0.1", - "react-virtualized": "9.21.0", - "read-last-lines": "1.3.0", - "redux": "4.0.1", - "redux-logger": "3.0.6", - "redux-promise-middleware": "6.1.0", - "reselect": "4.0.0", - "rimraf": "2.6.2", - "selfsigned": "^1.10.4", - "semver": "5.4.1", - "spellchecker": "3.5.1", - "tar": "4.4.8", - "testcheck": "1.0.0-rc.2", - "tmp": "0.0.33", - "to-arraybuffer": "1.0.1", - "underscore": "1.9.0", - "uuid": "3.3.2", - "websocket": "1.0.28" - }, - "devDependencies": { - "@types/chai": "4.1.2", - "@types/classnames": "2.2.3", - "@types/color": "^3.0.0", - "@types/config": "0.0.34", - "@types/filesize": "3.6.0", - "@types/fs-extra": "5.0.5", - "@types/google-libphonenumber": "7.4.14", - "@types/got": "9.4.1", - "@types/jquery": "3.3.29", - "@types/js-yaml": "3.12.0", - "@types/linkify-it": "2.0.3", - "@types/lodash": "4.14.106", - "@types/mkdirp": "0.5.2", - "@types/mocha": "5.0.0", - "@types/pify": "3.0.2", - "@types/qs": "6.5.1", - "@types/react": "16.8.5", - "@types/react-dom": "16.8.2", - "@types/react-portal": "^4.0.2", - "@types/react-redux": "7.0.1", - "@types/react-virtualized": "9.18.12", - "@types/redux-logger": "3.0.7", - "@types/rimraf": "2.0.2", - "@types/semver": "5.5.0", - "@types/sinon": "4.3.1", - "@types/uuid": "3.4.4", - "arraybuffer-loader": "1.0.3", - "asar": "0.14.0", - "axios": "0.18.0", - "bower": "1.8.2", - "chai": "4.1.2", - "dashdash": "1.14.1", - "electron": "4.1.2", - "electron-builder": "21.2.0", - "electron-icon-maker": "0.0.3", - "electron-notarize": "^0.2.0", - "eslint": "4.14.0", - "eslint-config-airbnb-base": "12.1.0", - "eslint-config-prettier": "2.9.0", - "eslint-plugin-import": "2.8.0", - "eslint-plugin-mocha": "4.12.1", - "eslint-plugin-more": "0.3.1", - "extract-zip": "1.6.6", - "grunt": "1.0.1", - "grunt-cli": "1.2.0", - "grunt-contrib-concat": "1.0.1", - "grunt-contrib-copy": "1.0.0", - "grunt-contrib-watch": "1.0.0", - "grunt-exec": "3.0.0", - "grunt-gitinfo": "0.1.7", - "grunt-sass": "3.0.1", - "mocha": "4.1.0", - "mocha-testcheck": "1.0.0-rc.0", - "node-sass-import-once": "1.2.0", - "nyc": "11.4.1", - "prettier": "1.12.0", - "qs": "6.5.1", - "react-docgen-typescript": "1.2.6", - "react-styleguidist": "7.0.1", - "sinon": "4.4.2", - "spectron": "5.0.0", - "ts-loader": "4.1.0", - "tslint": "5.13.0", - "tslint-microsoft-contrib": "6.0.0", - "tslint-react": "3.6.0", - "typescript": "3.3.3333", - "webpack": "4.4.1" - }, - "engines": { - "node": "10.13.0" - }, - "build": { - "appId": "com.loki-project.messenger-desktop", - "afterSign": "build/notarize.js", - "mac": { - "artifactName": "${name}-mac-${version}.${ext}", - "category": "public.app-category.social-networking", - "icon": "build/icons/mac/icon.icns", - "target": ["dmg"], - "bundleVersion": "1", - "hardenedRuntime": true, - "gatekeeperAssess": false, - "entitlements": "build/entitlements.mac.plist", - "entitlementsInherit": "build/entitlements.mac.plist" - }, - "dmg": { - "sign": false - }, - "win": { - "asarUnpack": "node_modules/spellchecker/vendor/hunspell_dictionaries", - "artifactName": "${name}-win-${version}.${ext}", - "publisherName": "Loki Project", - "icon": "build/icons/win/icon.ico", - "publish": [ - { - "provider": "generic", - "url": "https://updates.signal.org/desktop" - } - ], - "target": ["nsis"] - }, - "nsis": { - "deleteAppDataOnUninstall": true - }, - "linux": { - "category": "Network", - "desktop": { - "StartupWMClass": "Loki Messenger" - }, - "asarUnpack": "node_modules/spellchecker/vendor/hunspell_dictionaries", - "target": ["deb"], - "icon": "build/icons/png" - }, - "deb": { - "depends": [ - "libnotify4", - "libappindicator1", - "libxtst6", - "libnss3", - "libasound2", - "libxss1" - ] - }, - "files": [ - "package.json", - "config/default.json", - "config/${env.SIGNAL_ENV}.json", - "config/local-${env.SIGNAL_ENV}.json", - "background.html", - "about.html", - "settings.html", - "password.html", - "permissions_popup.html", - "debug_log.html", - "_locales/**", - "libloki/modules/*.js", - "mnemonic_languages/**", - "protos/*", - "js/**", - "ts/**/*.js", - "ts/*.js", - "stylesheets/*.css", - "!js/register.js", - "js/views/standalone_registration_view.js", - "app/*", - "preload.js", - "about_preload.js", - "settings_preload.js", - "permissions_popup_preload.js", - "debug_log_preload.js", - "password_preload.js", - "main.js", - "images/**", - "fonts/*", - "build/assets", - "node_modules/**", - "!node_modules/emoji-panel/dist/*", - "!node_modules/emoji-panel/lib/emoji-panel-emojione-*.css", - "!node_modules/emoji-panel/lib/emoji-panel-google-*.css", - "!node_modules/emoji-panel/lib/emoji-panel-twitter-*.css", - "!node_modules/emoji-panel/lib/emoji-panel-apple-{16,20,64}.css", - "!node_modules/emoji-datasource/emoji_pretty.json", - "!node_modules/emoji-datasource/*.png", - "!node_modules/emoji-datasource-apple/emoji_pretty.json", - "!node_modules/emoji-datasource-apple/img/apple/{sheets-128,sheets-256}/*.png", - "!node_modules/emoji-datasource-apple/img/apple/sheets/{16,20,32}.png", - "!node_modules/spellchecker/vendor/hunspell/**/*", - "!**/node_modules/*/{CHANGELOG.md,README.md,README,readme.md,readme,test,__tests__,tests,powered-test,example,examples,*.d.ts}", - "!**/node_modules/.bin", - "!**/node_modules/*/build/**", - "!**/*.{o,hprof,orig,pyc,pyo,rbc}", - "!**/._*", - "!**/{.DS_Store,.git,.hg,.svn,CVS,RCS,SCCS,__pycache__,thumbs.db,.gitignore,.gitattributes,.editorconfig,.flowconfig,.yarn-metadata.json,.idea,appveyor.yml,.travis.yml,circle.yml,npm-debug.log,.nyc_output,yarn.lock,.yarn-integrity}", - "node_modules/spellchecker/build/Release/*.node", - "node_modules/websocket/build/Release/*.node", - "node_modules/socks/build/*.js", - "node_modules/socks/build/common/*.js", - "node_modules/socks/build/client/*.js", - "node_modules/smart-buffer/build/*.js", - "!node_modules/@journeyapps/sqlcipher/deps/*" - ] - } -} diff --git a/ts/components/AddServerDialog.tsx b/ts/components/AddServerDialog.tsx index 8be8d4c51..b6373455f 100644 --- a/ts/components/AddServerDialog.tsx +++ b/ts/components/AddServerDialog.tsx @@ -15,7 +15,7 @@ interface State { connecting: boolean; success: boolean; view: 'connecting' | 'default'; - serverUrl: string; + serverURL: string; } export class AddServerDialog extends React.Component { @@ -28,7 +28,7 @@ export class AddServerDialog extends React.Component { connecting: false, success: false, view: 'default', - serverUrl: '', + serverURL: '', }; this.showError = this.showError.bind(this); @@ -48,15 +48,15 @@ export class AddServerDialog extends React.Component { onOk={() => null} onClose={this.closeDialog} > - {this.state.view === 'default' ? ( + {this.state.view === 'default' && ( <>
    @@ -71,9 +71,9 @@ export class AddServerDialog extends React.Component {
    - ) : null} + )} - {this.state.view === 'connecting' ? ( + {this.state.view === 'connecting' && ( <>
    @@ -88,68 +88,66 @@ export class AddServerDialog extends React.Component { />
    - ) : null} + )} ); } - private showView(view: 'default' | 'connecting') { + private showView(view: 'default' | 'connecting', error?: string) { const { i18n } = this.props; - if (view === 'default') { + const isDefaultView = view === 'default'; + const isConnectingView = view === 'connecting'; + + if (isDefaultView) { this.setState({ title: i18n('addServerDialogTitle'), - error: null, + error: error || null, view: 'default', connecting: false, success: false, }); + + return true; } - if (view === 'connecting') { + if (isConnectingView) { // TODO: Make this not hard coded const channelId = 1; - const serverUrl = String( + const serverURL = String( $('.session-modal #server-url').val() ).toLowerCase(); - this.setState({ - error: null, - serverUrl: serverUrl, - }); + const serverURLExists = serverURL.length > 0; - if (serverUrl.length == 0) { + if (!serverURLExists) { this.setState({ - error: i18n('noServerUrl'), + error: i18n('noServerURL'), view: 'default', }); - return; + return false; } this.setState({ title: i18n('connectingLoad'), + serverURL: serverURL, view: 'connecting', connecting: true, + error: null, }); - const connectionResult = this.attemptConnection(serverUrl, channelId); + const connectionResult = this.attemptConnection(serverURL, channelId); // Give 5s maximum for promise to revole. Else, throw error. - const max_connection_duration = 5000; + const maxConnectionDuration = 5000; const connectionTimeout = setTimeout(() => { if (!this.state.success) { - this.showView('default'); - - this.setState({ - connecting: false, - success: false, - error: i18n('connectToServerFail'), - }); + this.showView('default', i18n('connectToServerFail')); return; } - }, max_connection_duration); + }, maxConnectionDuration); connectionResult .then(() => { @@ -167,45 +165,36 @@ export class AddServerDialog extends React.Component { this.closeDialog(); } }) - .catch(error => { + .catch((connectionError: string) => { clearTimeout(connectionTimeout); + this.showView('default', connectionError); - this.showView('default'); - this.setState({ - connecting: false, - success: false, - error: error, - }); + return false; }); } + + return true; } private showError() { const message = this.state.error; + return ( <> - {message ? ( + {message && ( <>
    {message}
    - ) : null} + )} ); - // if (_.isEmpty(message)) { - // this.$('.error').text(''); - // this.$('.error').hide(); - // } else { - // this.$('.error').text(`Error: ${message}`); - // this.$('.error').show(); - // } - // $('input').focus(); } private onKeyUp(event: any) { switch (event.key) { case 'Enter': - if (this.state.view == 'default') { + if (this.state.view === 'default') { this.showView('connecting'); } break; @@ -222,37 +211,31 @@ export class AddServerDialog extends React.Component { this.props.onClose(); } - private async attemptConnection(serverUrl: string, channelId: number) { + private async attemptConnection(serverURL: string, channelId: number) { const { i18n } = this.props; - const rawServerUrl = serverUrl + const rawserverURL = serverURL .replace(/^https?:\/\//i, '') .replace(/[/\\]+$/i, ''); - const sslServerUrl = `https://${rawServerUrl}`; - const conversationId = `publicChat:${channelId}@${rawServerUrl}`; + const sslserverURL = `https://${rawserverURL}`; + const conversationId = `publicChat:${channelId}@${rawserverURL}`; const conversationExists = window.ConversationController.get( conversationId ); if (conversationExists) { // We are already a member of this public chat - return new Promise((resolve, reject) => { - if (false) { - resolve(); - } + return new Promise((_resolve, reject) => { reject(i18n('publicChatExists')); }); } const serverAPI = await window.lokiPublicChatAPI.findOrCreateServer( - sslServerUrl + sslserverURL ); if (!serverAPI) { // Url incorrect or server not compatible - return new Promise((resolve, reject) => { - if (false) { - resolve(); - } + return new Promise((_resolve, reject) => { reject(i18n('connectToServerFail')); }); } @@ -263,7 +246,7 @@ export class AddServerDialog extends React.Component { ); await serverAPI.findOrCreateChannel(channelId, conversationId); - await conversation.setPublicSource(sslServerUrl, channelId); + await conversation.setPublicSource(sslserverURL, channelId); await conversation.setFriendRequestStatus( window.friends.friendRequestStatusEnum.friends ); diff --git a/ts/components/DevicePairingDialog.tsx b/ts/components/DevicePairingDialog.tsx index b188f9f5b..e855c7374 100644 --- a/ts/components/DevicePairingDialog.tsx +++ b/ts/components/DevicePairingDialog.tsx @@ -49,42 +49,43 @@ export class DevicePairingDialog extends React.Component { }; } - componentDidMount() { + public componentDidMount() { this.getSecondaryDevices(); } - private async getSecondaryDevices() { - const secondaryDevices = await window.libloki.storage.getSecondaryDevicesFor( - this.state.currentPubKey - ); - this.setState({ - data: secondaryDevices, - loading: false, - }); - } - public render() { const { i18n } = this.props; - const newData = [ - '053e18835c106a5f9f463a44a9d7ff9a26281d529285a047bd969cfc59d4ab8607', - '053e18835c106a5f9f463a44a9d7ff9a26281d529285a047bd969cfc59d4ab8604', - ]; - setTimeout(() => { - this.setState({ - data: newData, - }); - }, 2000); + const waitingForRequest = this.state.view === 'waitingForRequest'; + const nothingPaired = this.state.data.length === 0; + + const renderPairedDevices = this.state.data.map((pubKey: any) => { + const pubKeyInfo = this.getPubkeyName(pubKey); + const isFinalItem = + this.state.data[this.state.data.length - 1] === pubKey; + + return ( +
    +

    + {pubKeyInfo.deviceAlias} +
    + Pairing Secret:{' '} + {pubKeyInfo.secretWords} +

    + {!isFinalItem ?
    : null} +
    + ); + }); return ( <> - {!this.state.loading ? ( + {!this.state.loading && ( null} onClose={this.closeDialog} > - {this.state.view === 'waitingForRequest' ? ( + {waitingForRequest ? (

    {i18n('waitingForDeviceToRegister')}

    @@ -106,33 +107,13 @@ export class DevicePairingDialog extends React.Component {
    ) : ( <> - {this.state.data.length == 0 ? ( + {nothingPaired ? (
    {i18n('noPairedDevices')}
    ) : (
    - {this.state.data.map((pubKey: any) => { - const pubKeyInfo = this.getPubkeyName(pubKey); - const isFinalItem = - this.state.data[this.state.data.length - 1] === pubKey; - - return ( -
    -

    - {pubKeyInfo.deviceAlias} -
    - - Pairing Secret: - {' '} - {pubKeyInfo.secretWords} -

    - {!isFinalItem ? ( -
    - ) : null} -
    - ); - })} + {renderPairedDevices}
    )} @@ -146,7 +127,7 @@ export class DevicePairingDialog extends React.Component { )}
    - ) : null} + )} ); } @@ -167,25 +148,30 @@ export class DevicePairingDialog extends React.Component { return; } + if (view === 'waitingForRequest') { + this.setState({ + view, + isListening: true, + }); + + return; + } this.setState({ view }); } - private startReceivingRequests() { - this.setState({ - isListening: true, - }); + private getSecondaryDevices() { + const secondaryDevices = window.libloki.storage + .getSecondaryDevicesFor(this.state.currentPubKey) + .then(() => { + this.setState({ + data: secondaryDevices, + loading: false, + }); + }); + } + private startReceivingRequests() { this.showView('waitingForRequest'); - - //TESTING - //TESTING - //TESTING - setTimeout(() => { - this.setState({ - accepted: true, - success: true, - }); - }, 3000); } private getPubkeyName(pubKey: string | null) { @@ -196,14 +182,17 @@ export class DevicePairingDialog extends React.Component { const secretWords = window.mnemonic.pubkey_to_secret_words(pubKey); const conv = window.ConversationController.get(this.state.currentPubKey); const deviceAlias = conv ? conv.getNickname() : 'Unnamed Device'; + return { deviceAlias, secretWords }; } private stopReceivingRequests() { if (this.state.success) { + const aliasKey = 'deviceAlias'; const deviceAlias = this.getPubkeyName(this.state.currentPubKey)[ - 'deviceAlias' + aliasKey ]; + const conv = window.ConversationController.get(this.state.currentPubKey); if (conv) { conv.setNickname(deviceAlias); @@ -223,42 +212,33 @@ export class DevicePairingDialog extends React.Component { } } - allowDevice() { + private allowDevice() { this.setState({ accepted: true, }); window.Whisper.trigger( 'devicePairingRequestAccepted', this.state.currentPubKey, - (errors: any) => this.transmisssionCB(errors) + (errors: any) => { + this.transmisssionCB(errors); + + return true; + } ); this.showView(); } - transmisssionCB(errors: any) { + private transmisssionCB(errors: any) { if (!errors) { - // this.$('.transmissionStatus').text(i18n('provideDeviceAlias')); - // this.$('#deviceAliasView').show(); - // this.$('#deviceAlias').on('input', e => { - // if (e.target.value.trim()) { - // this.$('.requestAcceptedView .ok').removeAttr('disabled'); - // } else { - // this.$('.requestAcceptedView .ok').attr('disabled', true); - // } - // }); - // this.$('.requestAcceptedView .ok').show(); - // this.$('.requestAcceptedView .ok').attr('disabled', true); - this.setState({ success: true, }); } else { - // this.$('.transmissionStatus').text(errors); - // this.$('.requestAcceptedView .ok').show(); + return; } } - skipDevice() { + private skipDevice() { window.Whisper.trigger( 'devicePairingRequestRejected', this.state.currentPubKey @@ -267,7 +247,7 @@ export class DevicePairingDialog extends React.Component { this.showView(); } - nextPubKey() { + private nextPubKey() { // FIFO: pop at the back of the array using pop() const pubKeyRequests = this.state.pubKeyRequests; this.setState({ diff --git a/ts/components/UserDetailsDialog.tsx b/ts/components/UserDetailsDialog.tsx index affdb351f..7a1ea4856 100644 --- a/ts/components/UserDetailsDialog.tsx +++ b/ts/components/UserDetailsDialog.tsx @@ -7,10 +7,10 @@ import { SessionButtonColor, SessionButtonType, } from './session/SessionButton'; -import { SessionConfirm } from './session/SessionConfirm'; interface Props { i18n: any; + isRss: boolean; profileName: string; avatarPath: string; avatarColor: string; @@ -30,10 +30,7 @@ export class UserDetailsDialog extends React.Component { } public render() { - const i18n = this.props.i18n; - const isRss = - window.ConversationController.get(this.props.pubkey).attributes.type === - 'group'; + const { i18n, isRss } = this.props; return ( {
    {this.props.pubkey}
    - {!isRss ? ( + {!isRss && ( - ) : null} + )}
    ); diff --git a/ts/components/session/SessionConfirm.tsx b/ts/components/session/SessionConfirm.tsx index 6c554f297..b473e6d34 100644 --- a/ts/components/session/SessionConfirm.tsx +++ b/ts/components/session/SessionConfirm.tsx @@ -39,7 +39,7 @@ export class SessionConfirm extends React.Component { showExitIcon={false} showHeader={showHeader} > - {showHeader ? null :
    } + {!showHeader &&
    }
    {message} @@ -50,7 +50,7 @@ export class SessionConfirm extends React.Component {
    - {hideCancel ? null : ( + {!hideCancel && ( )}
    diff --git a/yarn.lock b/yarn.lock index ca9ebc331..9a1347020 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7,29 +7,6 @@ resolved "https://registry.yarnpkg.com/7zip-bin/-/7zip-bin-5.0.3.tgz#bc5b5532ecafd923a61f2fb097e3b108c0106a3f" integrity sha512-GLyWIFBbGvpKPGo55JyRZAo4lVbnBiD52cKlw/0Vt+wnmKvWJkpZvsjVoaIolyBXDeAQKSicRtqFNPem9w0WYA== -"@babel/code-frame@^7.0.0": - version "7.5.5" - resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.5.5.tgz#bc0782f6d69f7b7d49531219699b988f669a8f9d" - integrity sha512-27d4lZoomVyo51VegxI20xZPuSHusqbQag/ztrBC7wegWoQ1nLREPVSKSW8byhTlzTKyNE4ifaTA6lCp7JjpFw== - dependencies: - "@babel/highlight" "^7.0.0" - -"@babel/helper-module-imports@^7.0.0": - version "7.7.4" - resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.7.4.tgz#e5a92529f8888bf319a6376abfbd1cebc491ad91" - integrity sha512-dGcrX6K9l8258WFjyDLJwuVKxR4XZfU0/vTUgOQYWEnRD8mgr+p4d6fCUMq/ys0h4CCt/S5JhbvtyErjWouAUQ== - dependencies: - "@babel/types" "^7.7.4" - -"@babel/highlight@^7.0.0": - version "7.5.0" - resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.5.0.tgz#56d11312bd9248fa619591d02472be6e8cb32540" - integrity sha512-7dV4eu9gBxoM0dAnj/BCFDW9LFU0zvTrkq0ugM7pnHEgguOEeOz1so2ZghEdzviYzQEED0r4EAgpsBChKy1TRQ== - dependencies: - chalk "^2.0.0" - esutils "^2.0.2" - js-tokens "^4.0.0" - "@babel/runtime@^7.1.2", "@babel/runtime@^7.3.1": version "7.3.1" resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.3.1.tgz#574b03e8e8a9898eaf4a872a92ea20b7846f6f2a" @@ -37,22 +14,6 @@ dependencies: regenerator-runtime "^0.12.0" -"@babel/runtime@^7.5.5", "@babel/runtime@^7.6.3", "@babel/runtime@^7.7.2": - version "7.7.7" - resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.7.7.tgz#194769ca8d6d7790ec23605af9ee3e42a0aa79cf" - integrity sha512-uCnC2JEVAu8AKB5do1WRIsvrdJ0flYx/A/9f/6chdacnEZ7LmavjdsDXr5ksYBegxtuTPR5Va9/+13QF/kFkCA== - dependencies: - regenerator-runtime "^0.13.2" - -"@babel/types@^7.7.4": - version "7.7.4" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.7.4.tgz#516570d539e44ddf308c07569c258ff94fde9193" - integrity sha512-cz5Ji23KCi4T+YIE/BolWosrJuSmoZeN1EFnRtBwF+KKLi8GG/Z2c2hOJJeCXPk4mwk4QFvTmwIodJowXgttRA== - dependencies: - esutils "^2.0.2" - lodash "^4.17.13" - to-fast-properties "^2.0.0" - "@develar/schema-utils@~2.1.0": version "2.1.0" resolved "https://registry.yarnpkg.com/@develar/schema-utils/-/schema-utils-2.1.0.tgz#eceb1695bfbed6f6bb84666d5d3abe5e1fd54e17" @@ -61,83 +22,6 @@ ajv "^6.1.0" ajv-keywords "^3.1.0" -"@emotion/cache@^10.0.27": - version "10.0.27" - resolved "https://registry.yarnpkg.com/@emotion/cache/-/cache-10.0.27.tgz#7895db204e2c1a991ae33d51262a3a44f6737303" - integrity sha512-Zp8BEpbMunFsTcqAK4D7YTm3MvCp1SekflSLJH8lze2fCcSZ/yMkXHo8kb3t1/1Tdd3hAqf3Fb7z9VZ+FMiC9w== - dependencies: - "@emotion/sheet" "0.9.4" - "@emotion/stylis" "0.8.5" - "@emotion/utils" "0.11.3" - "@emotion/weak-memoize" "0.2.5" - -"@emotion/core@^10.0.15": - version "10.0.27" - resolved "https://registry.yarnpkg.com/@emotion/core/-/core-10.0.27.tgz#7c3f78be681ab2273f3bf11ca3e2edc4a9dd1fdc" - integrity sha512-XbD5R36pVbohQMnKfajHv43g8EbN4NHdF6Zh9zg/C0nr0jqwOw3gYnC07Xj3yG43OYSRyrGsoQ5qPwc8ycvLZw== - dependencies: - "@babel/runtime" "^7.5.5" - "@emotion/cache" "^10.0.27" - "@emotion/css" "^10.0.27" - "@emotion/serialize" "^0.11.15" - "@emotion/sheet" "0.9.4" - "@emotion/utils" "0.11.3" - -"@emotion/css@^10.0.27": - version "10.0.27" - resolved "https://registry.yarnpkg.com/@emotion/css/-/css-10.0.27.tgz#3a7458198fbbebb53b01b2b87f64e5e21241e14c" - integrity sha512-6wZjsvYeBhyZQYNrGoR5yPMYbMBNEnanDrqmsqS1mzDm1cOTu12shvl2j4QHNS36UaTE0USIJawCH9C8oW34Zw== - dependencies: - "@emotion/serialize" "^0.11.15" - "@emotion/utils" "0.11.3" - babel-plugin-emotion "^10.0.27" - -"@emotion/hash@0.7.4": - version "0.7.4" - resolved "https://registry.yarnpkg.com/@emotion/hash/-/hash-0.7.4.tgz#f14932887422c9056b15a8d222a9074a7dfa2831" - integrity sha512-fxfMSBMX3tlIbKUdtGKxqB1fyrH6gVrX39Gsv3y8lRYKUqlgDt3UMqQyGnR1bQMa2B8aGnhLZokZgg8vT0Le+A== - -"@emotion/memoize@0.7.4": - version "0.7.4" - resolved "https://registry.yarnpkg.com/@emotion/memoize/-/memoize-0.7.4.tgz#19bf0f5af19149111c40d98bb0cf82119f5d9eeb" - integrity sha512-Ja/Vfqe3HpuzRsG1oBtWTHk2PGZ7GR+2Vz5iYGelAw8dx32K0y7PjVuxK6z1nMpZOqAFsRUPCkK1YjJ56qJlgw== - -"@emotion/serialize@^0.11.15": - version "0.11.15" - resolved "https://registry.yarnpkg.com/@emotion/serialize/-/serialize-0.11.15.tgz#9a0f5873fb458d87d4f23e034413c12ed60a705a" - integrity sha512-YE+qnrmGwyR+XB5j7Bi+0GT1JWsdcjM/d4POu+TXkcnrRs4RFCCsi3d/Ebf+wSStHqAlTT2+dfd+b9N9EO2KBg== - dependencies: - "@emotion/hash" "0.7.4" - "@emotion/memoize" "0.7.4" - "@emotion/unitless" "0.7.5" - "@emotion/utils" "0.11.3" - csstype "^2.5.7" - -"@emotion/sheet@0.9.4": - version "0.9.4" - resolved "https://registry.yarnpkg.com/@emotion/sheet/-/sheet-0.9.4.tgz#894374bea39ec30f489bbfc3438192b9774d32e5" - integrity sha512-zM9PFmgVSqBw4zL101Q0HrBVTGmpAxFZH/pYx/cjJT5advXguvcgjHFTCaIO3enL/xr89vK2bh0Mfyj9aa0ANA== - -"@emotion/stylis@0.8.5": - version "0.8.5" - resolved "https://registry.yarnpkg.com/@emotion/stylis/-/stylis-0.8.5.tgz#deacb389bd6ee77d1e7fcaccce9e16c5c7e78e04" - integrity sha512-h6KtPihKFn3T9fuIrwvXXUOwlx3rfUvfZIcP5a6rh8Y7zjE3O06hT5Ss4S/YI1AYhuZ1kjaE/5EaOOI2NqSylQ== - -"@emotion/unitless@0.7.5": - version "0.7.5" - resolved "https://registry.yarnpkg.com/@emotion/unitless/-/unitless-0.7.5.tgz#77211291c1900a700b8a78cfafda3160d76949ed" - integrity sha512-OWORNpfjMsSSUBVrRBVGECkhWcULOAJz9ZW8uK9qgxD+87M7jHRcvh/A96XXNhXTLmKcoYSQtBEX7lHMO7YRwg== - -"@emotion/utils@0.11.3": - version "0.11.3" - resolved "https://registry.yarnpkg.com/@emotion/utils/-/utils-0.11.3.tgz#a759863867befa7e583400d322652a3f44820924" - integrity sha512-0o4l6pZC+hI88+bzuaX/6BgOvQVhbt2PfmxauVaYOGgbsAw14wdKyvMCZXnsnsHys94iadcF+RG/wZyx6+ZZBw== - -"@emotion/weak-memoize@0.2.5": - version "0.2.5" - resolved "https://registry.yarnpkg.com/@emotion/weak-memoize/-/weak-memoize-0.2.5.tgz#8eed982e2ee6f7f4e44c253e12962980791efd46" - integrity sha512-6U71C2Wp7r5XtFtQzYrW5iKFT67OixrSxjI4MptCHzdSVlgabczzqLe0ZSgnub/5Kp4hSbpDB1tMytZY9pwxxA== - "@journeyapps/sqlcipher@https://github.com/scottnonnenberg-signal/node-sqlcipher.git#2e28733b61640556b0272a3bfc78b0357daf71e6": version "3.2.1" resolved "https://github.com/scottnonnenberg-signal/node-sqlcipher.git#2e28733b61640556b0272a3bfc78b0357daf71e6" @@ -255,9 +139,9 @@ integrity sha512-Q1y515GcOdTHgagaVFhHnIFQ38ygs/kmxdNpvpou+raI9UO3YZcHDngBSYKQklcKlvA7iuQlmIKbzvmxcOE9CQ== "@types/dompurify@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@types/dompurify/-/dompurify-2.0.0.tgz#9616caa5bf2569aea2e4889d4f929d968c081b40" - integrity sha512-g/ilp+Bo6Ljy60i5LnjkGw00X7EIoFjoPGlxqZhV8TJ9fWEzXheioU1O+U/UzCzUA7pUDy/JNMytTQDJctpUHg== + version "2.0.1" + resolved "https://registry.yarnpkg.com/@types/dompurify/-/dompurify-2.0.1.tgz#0bf3a9f8ee21d81adb20b8c374ab034d6a74dbf7" + integrity sha512-OQ16dECrRv/I//woKkVUxyVGYR94W3qp3Wy//B63awHVe3h/1/URFqP5a/V2m4k01DEvWs1+z7FWW3xfM1lH3Q== dependencies: "@types/trusted-types" "*" @@ -359,11 +243,6 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-8.10.40.tgz#4314888d5cd537945d73e9ce165c04cc550144a4" integrity sha512-RRSjdwz63kS4u7edIwJUn8NqKLLQ6LyqF/X4+4jp38MBT3Vwetewi2N4dgJEshLbDwNgOJXNYoOwzVZUSSLhkQ== -"@types/parse-json@^4.0.0": - version "4.0.0" - resolved "https://registry.yarnpkg.com/@types/parse-json/-/parse-json-4.0.0.tgz#2f8bb441434d163b35fb8ffdccd7138927ffb8c0" - integrity sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA== - "@types/pify@3.0.2": version "3.0.2" resolved "https://registry.yarnpkg.com/@types/pify/-/pify-3.0.2.tgz#1bc75dac43e31dba981c37e0a08edddc1b49cd39" @@ -1001,36 +880,6 @@ babel-messages@^6.23.0: dependencies: babel-runtime "^6.22.0" -babel-plugin-emotion@^10.0.27: - version "10.0.27" - resolved "https://registry.yarnpkg.com/babel-plugin-emotion/-/babel-plugin-emotion-10.0.27.tgz#59001cf5de847c1d61f2079cd906a90a00d3184f" - integrity sha512-SUNYcT4FqhOqvwv0z1oeYhqgheU8qrceLojuHyX17ngo7WtWqN5I9l3IGHzf21Xraj465CVzF4IvOlAF+3ed0A== - dependencies: - "@babel/helper-module-imports" "^7.0.0" - "@emotion/hash" "0.7.4" - "@emotion/memoize" "0.7.4" - "@emotion/serialize" "^0.11.15" - babel-plugin-macros "^2.0.0" - babel-plugin-syntax-jsx "^6.18.0" - convert-source-map "^1.5.0" - escape-string-regexp "^1.0.5" - find-root "^1.1.0" - source-map "^0.5.7" - -babel-plugin-macros@^2.0.0: - version "2.8.0" - resolved "https://registry.yarnpkg.com/babel-plugin-macros/-/babel-plugin-macros-2.8.0.tgz#0f958a7cc6556b1e65344465d99111a1e5e10138" - integrity sha512-SEP5kJpfGYqYKpBrj5XU3ahw5p5GOHJ0U5ssOSQ/WBVdwkD2Dzlce95exQTs3jOVWPPKLBN2rlEWkCK7dSmLvg== - dependencies: - "@babel/runtime" "^7.7.2" - cosmiconfig "^6.0.0" - resolve "^1.12.0" - -babel-plugin-syntax-jsx@^6.18.0: - version "6.18.0" - resolved "https://registry.yarnpkg.com/babel-plugin-syntax-jsx/-/babel-plugin-syntax-jsx-6.18.0.tgz#0af32a9a6e13ca7a3fd5069e62d7b0f58d0d8946" - integrity sha1-CvMqmm4Tyno/1QaeYtew9Y0NiUY= - babel-runtime@^6.22.0, babel-runtime@^6.26.0: version "6.26.0" resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.26.0.tgz#965c7058668e82b55d7bfe04ff2337bc8b5647fe" @@ -1590,11 +1439,6 @@ callsites@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/callsites/-/callsites-0.2.0.tgz#afab96262910a7f33c19a5775825c69f34e350ca" -callsites@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73" - integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ== - camelcase-keys@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/camelcase-keys/-/camelcase-keys-2.1.0.tgz#308beeaffdf28119051efa1d932213c91b8f92e7" @@ -2165,13 +2009,6 @@ convert-source-map@^1.3.0: version "1.5.1" resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.5.1.tgz#b8278097b9bc229365de5c62cf5fcaed8b5599e5" -convert-source-map@^1.5.0: - version "1.7.0" - resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.7.0.tgz#17a2cb882d7f77d3490585e2ce6c524424a3a442" - integrity sha512-4FJkXzKXEDB1snCFZlLP4gpC3JILicCpGbzG9f9G7tGqGCzETQ2hWPrcinA9oU4wtf2biUaEH5065UnMeR33oA== - dependencies: - safe-buffer "~5.1.1" - cookie-signature@1.0.6: version "1.0.6" resolved "https://registry.yarnpkg.com/cookie-signature/-/cookie-signature-1.0.6.tgz#e303a882b342cc3ee8ca513a79999734dab3ae2c" @@ -2224,17 +2061,6 @@ core-util-is@~1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" -cosmiconfig@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-6.0.0.tgz#da4fee853c52f6b1e6935f41c1a2fc50bd4a9982" - integrity sha512-xb3ZL6+L8b9JLLCx3ZdoZy4+2ECphCMo2PwqgP1tlfVq6M6YReyzBJtvWWtbDSpNr9hn96pkCiZqUcFEc+54Qg== - dependencies: - "@types/parse-json" "^4.0.0" - import-fresh "^3.1.0" - parse-json "^5.0.0" - path-type "^4.0.0" - yaml "^1.7.2" - crc32-stream@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/crc32-stream/-/crc32-stream-2.0.0.tgz#e3cdd3b4df3168dd74e3de3fbbcb7b297fe908f4" @@ -2440,11 +2266,6 @@ csstype@^2.2.0: resolved "https://registry.yarnpkg.com/csstype/-/csstype-2.6.2.tgz#3043d5e065454579afc7478a18de41909c8a2f01" integrity sha512-Rl7PvTae0pflc1YtxtKbiSqq20Ts6vpIYOD5WBafl4y123DyHUeLrRdQP66sQW8/6gmX8jrYJLXwNeMqYVJcow== -csstype@^2.5.7: - version "2.6.8" - resolved "https://registry.yarnpkg.com/csstype/-/csstype-2.6.8.tgz#0fb6fc2417ffd2816a418c9336da74d7f07db431" - integrity sha512-msVS9qTuMT5zwAGCVm4mxfrZ18BNc6Csd0oJAtiFMZ1FAx1CCvy2+5MDmYoix63LM/6NDbNtodCiGYGmFgO0dA== - cuint@^0.2.1: version "0.2.2" resolved "https://registry.yarnpkg.com/cuint/-/cuint-0.2.2.tgz#408086d409550c2631155619e9fa7bcadc3b991b" @@ -3092,13 +2913,6 @@ error-ex@^1.2.0: dependencies: is-arrayish "^0.2.1" -error-ex@^1.3.1: - version "1.3.2" - resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz#b4ac40648107fdcdcfae242f428bea8a14d4f1bf" - integrity sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g== - dependencies: - is-arrayish "^0.2.1" - es-abstract@^1.7.0: version "1.11.0" resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.11.0.tgz#cce87d518f0496893b1a30cd8461835535480681" @@ -3664,11 +3478,6 @@ find-cache-dir@^1.0.0: make-dir "^1.0.0" pkg-dir "^2.0.0" -find-root@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/find-root/-/find-root-1.1.0.tgz#abcfc8ba76f708c42a97b3d685b7e9450bfb9ce4" - integrity sha512-NKfW6bec6GfKc0SGx1e07QZY9PE99u0Bft/0rzSD5k3sO/vwkVUpDUKVm5Gpp5Ue3YfShPFTX2070tDs5kB9Ng== - find-up@^1.0.0: version "1.1.2" resolved "https://registry.yarnpkg.com/find-up/-/find-up-1.1.2.tgz#6b2e9822b1a2ce0a60ab64d610eccad53cb24d0f" @@ -4745,14 +4554,6 @@ immediate@~3.0.5: version "3.0.6" resolved "https://registry.yarnpkg.com/immediate/-/immediate-3.0.6.tgz#9db1dbd0faf8de6fbe0f5dd5e56bb606280de69b" -import-fresh@^3.1.0: - version "3.2.1" - resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.2.1.tgz#633ff618506e793af5ac91bf48b72677e15cbe66" - integrity sha512-6e1q1cnWP2RXD9/keSkxHScg508CdXqXWgWBaETNhyuBFz+kUZlKboh+ISK+bU++DmbHimVBrOz/zzPe0sZ3sQ== - dependencies: - parent-module "^1.0.0" - resolve-from "^4.0.0" - import-lazy@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/import-lazy/-/import-lazy-2.1.0.tgz#05698e3d45c88e8d7e9d92cb0584e77f096f3e43" @@ -5362,7 +5163,7 @@ js-tokens@^3.0.0, js-tokens@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b" -"js-tokens@^3.0.0 || ^4.0.0", js-tokens@^4.0.0: +"js-tokens@^3.0.0 || ^4.0.0": version "4.0.0" resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== @@ -5433,11 +5234,6 @@ json-buffer@3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/json-buffer/-/json-buffer-3.0.0.tgz#5b1f397afc75d677bde8bcfc0e47e1f9a3d9a898" -json-parse-better-errors@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz#bb867cfb3450e69107c131d1c514bab3dc8bcaa9" - integrity sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw== - json-schema-traverse@^0.3.0: version "0.3.1" resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz#349a6d44c53a51de89b40805c5d5e59b417d3340" @@ -5652,11 +5448,6 @@ lie@*: dependencies: immediate "~3.0.5" -lines-and-columns@^1.1.6: - version "1.1.6" - resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.1.6.tgz#1c00c743b433cd0a4e80758f7b64a57440d9ff00" - integrity sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA= - linkify-it@2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/linkify-it/-/linkify-it-2.0.3.tgz#d94a4648f9b1c179d64fa97291268bdb6ce9434f" @@ -5799,11 +5590,6 @@ lodash@^3.10.1, lodash@~3.10.1: version "3.10.1" resolved "https://registry.yarnpkg.com/lodash/-/lodash-3.10.1.tgz#5bf45e8e49ba4189e17d482789dfd15bd140b7b6" -lodash@^4.17.13: - version "4.17.15" - resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.15.tgz#b447f6670a0455bbfeedd11392eff330ea097548" - integrity sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A== - lodash@^4.17.2, lodash@^4.17.5: version "4.17.5" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.5.tgz#99a92d65c0272debe8c96b6057bc8fbfa3bed511" @@ -6995,13 +6781,6 @@ parallel-transform@^1.1.0: inherits "^2.0.3" readable-stream "^2.1.5" -parent-module@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/parent-module/-/parent-module-1.0.1.tgz#691d2709e78c79fae3a156622452d00762caaaa2" - integrity sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g== - dependencies: - callsites "^3.0.0" - parse-asn1@^5.0.0: version "5.1.0" resolved "https://registry.yarnpkg.com/parse-asn1/-/parse-asn1-5.1.0.tgz#37c4f9b7ed3ab65c74817b5f2480937fbf97c712" @@ -7060,16 +6839,6 @@ parse-json@^2.2.0: dependencies: error-ex "^1.2.0" -parse-json@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-5.0.0.tgz#73e5114c986d143efa3712d4ea24db9a4266f60f" - integrity sha512-OOY5b7PAEFV0E2Fir1KOkxchnZNCdowAJgQ5NuxjpBKTRP3pQhwkrkxqQjeoKJ+fO7bCpmIZaogI4eZGDMEGOw== - dependencies: - "@babel/code-frame" "^7.0.0" - error-ex "^1.3.1" - json-parse-better-errors "^1.0.1" - lines-and-columns "^1.1.6" - parse-passwd@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/parse-passwd/-/parse-passwd-1.0.0.tgz#6d5b934a456993b23d37f40a382d6f1666a8e5c6" @@ -7155,11 +6924,6 @@ path-type@^3.0.0: dependencies: pify "^3.0.0" -path-type@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/path-type/-/path-type-4.0.0.tgz#84ed01c0a7ba380afe09d90a8c180dcd9d03043b" - integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw== - pathval@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/pathval/-/pathval-1.1.0.tgz#b942e6d4bde653005ef6b71361def8727d0645e0" @@ -8011,13 +7775,6 @@ react-redux@6.0.1: prop-types "^15.7.2" react-is "^16.8.2" -react-spinners@^0.7.2: - version "0.7.2" - resolved "https://registry.yarnpkg.com/react-spinners/-/react-spinners-0.7.2.tgz#0c3481c6d1c333b74a0a5b9a0d5dc4f80dc11094" - integrity sha512-5OR0UHczOAIn8VMDv6oeBEAgeVHQ9edxlCWkIdooNDS5pZD40+ulQwD+xyz9xhNQcfmse6N4F/XVs7sM6YW4rw== - dependencies: - "@emotion/core" "^10.0.15" - react-styleguidist@7.0.1: version "7.0.1" resolved "https://registry.yarnpkg.com/react-styleguidist/-/react-styleguidist-7.0.1.tgz#7042bf19519363ec147836bfe17e1ced682a43b5" @@ -8316,11 +8073,6 @@ regenerator-runtime@^0.12.0: resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.12.1.tgz#fa1a71544764c036f8c49b13a08b2594c9f8a0de" integrity sha512-odxIc1/vDlo4iZcfXqRYFj0vpXFNoGdKMAUieAlFYO6m/nl5e9KR/beGf41z4a1FI+aQgtjhuaSlDxQ0hmkrHg== -regenerator-runtime@^0.13.2: - version "0.13.3" - resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.3.tgz#7cf6a77d8f5c6f60eb73c5fc1955b2ceb01e6bf5" - integrity sha512-naKIZz2GQ8JWh///G7L3X6LaQUAMp2lvb1rvwwsURe/VXwD6VMfr+/1NuNw3ag8v2kY1aQ/go5SNn79O9JU7yw== - regex-cache@^0.4.2: version "0.4.4" resolved "https://registry.yarnpkg.com/regex-cache/-/regex-cache-0.4.4.tgz#75bdc58a2a1496cec48a12835bc54c8d562336dd" @@ -8602,11 +8354,6 @@ resolve-from@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-3.0.0.tgz#b22c7af7d9d6881bc8b6e653335eebcb0a188748" -resolve-from@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6" - integrity sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g== - resolve-url@^0.2.1, resolve-url@~0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a" @@ -8618,13 +8365,6 @@ resolve@^1.10.0: dependencies: path-parse "^1.0.6" -resolve@^1.12.0: - version "1.14.1" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.14.1.tgz#9e018c540fcf0c427d678b9931cbf45e984bcaff" - integrity sha512-fn5Wobh4cxbLzuHaE+nphztHy43/b++4M6SsGFC2gB8uYwf0C8LcarfCz1un7UTW8OFQg9iNjZ4xpcFVGebDPg== - dependencies: - path-parse "^1.0.6" - resolve@^1.2.0: version "1.5.0" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.5.0.tgz#1f09acce796c9a762579f31b2c1cc4c3cddf9f36" @@ -9143,14 +8883,14 @@ source-map@^0.5.3, source-map@^0.5.6: version "0.5.6" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.6.tgz#75ce38f52bf0733c5a7f0c118d81334a2bb5f412" -source-map@^0.5.7, source-map@~0.5.0, source-map@~0.5.1, source-map@~0.5.6: - version "0.5.7" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" - source-map@^0.6.0, source-map@^0.6.1, source-map@~0.6.1: version "0.6.1" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" +source-map@~0.5.0, source-map@~0.5.1, source-map@~0.5.6: + version "0.5.7" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" + sparkles@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/sparkles/-/sparkles-1.0.0.tgz#1acbbfb592436d10bbe8f785b7cc6f82815012c3" @@ -9740,11 +9480,6 @@ to-fast-properties@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-1.0.3.tgz#b83571fa4d8c25b82e231b06e3a3055de4ca1a47" -to-fast-properties@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-2.0.0.tgz#dc5e698cbd079265bc73e0377681a4e4e83f616e" - integrity sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4= - to-object-path@^0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/to-object-path/-/to-object-path-0.3.0.tgz#297588b7b0e7e0ac08e04e672f85c1f4999e17af" @@ -10641,13 +10376,6 @@ yallist@^3.0.0, yallist@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.0.2.tgz#8452b4bb7e83c7c188d8041c1a837c773d6d8bb9" -yaml@^1.7.2: - version "1.7.2" - resolved "https://registry.yarnpkg.com/yaml/-/yaml-1.7.2.tgz#f26aabf738590ab61efaca502358e48dc9f348b2" - integrity sha512-qXROVp90sb83XtAoqE8bP9RwAkTTZbugRUTm5YeFCBfNRPEp2YzTeqWiz7m5OORHzEvrA/qcGS8hp/E+MMROYw== - dependencies: - "@babel/runtime" "^7.6.3" - yargs-parser@^13.1.1: version "13.1.1" resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-13.1.1.tgz#d26058532aa06d365fe091f6a1fc06b2f7e5eca0"