From f093221805c25ab641db029b31777d73408f91e4 Mon Sep 17 00:00:00 2001 From: zerosoul Date: Mon, 23 May 2022 10:29:25 +0800 Subject: [PATCH] chore: updates --- package.json | 13 ++-- src/common/component/styled/Button.js | 2 +- src/routes/chat/ChannelList/NavItem.js | 1 + src/routes/login/MagicLinkLogin.js | 2 +- src/routes/login/SolidLoginButton.js | 50 ++++++++-------- yarn.lock | 82 ++++++++++++++------------ 6 files changed, 79 insertions(+), 71 deletions(-) diff --git a/package.json b/package.json index 1dcf8487..3c1bcc07 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ "@emoji-mart/data": "^1.0.1", "@metamask/onboarding": "^1.0.1", "@microsoft/fetch-event-source": "^2.0.1", - "@pmmmwh/react-refresh-webpack-plugin": "^0.5.6", + "@pmmmwh/react-refresh-webpack-plugin": "^0.5.7", "@reduxjs/toolkit": "^1.8.1", "@svgr/webpack": "^6.2.1", "@tippyjs/react": "^4.2.6", @@ -23,7 +23,6 @@ "babel-preset-react-app": "^10.0.1", "bfj": "^7.0.2", "browserslist": "^4.20.3", - "camelcase": "^6.3.0", "case-sensitive-paths-webpack-plugin": "^2.4.0", "copy-image-clipboard": "^2.1.2", "css-loader": "^6.7.1", @@ -32,12 +31,11 @@ "dotenv": "^16.0.1", "dotenv-expand": "^8.0.3", "emoji-mart": "3.0.1", - "eslint": "^8.15.0", + "eslint": "^8.16.0", "file-loader": "^6.2.0", "firebase": "^9.8.1", "fs-extra": "^10.1.0", "html-webpack-plugin": "^5.5.0", - "interactjs": "^1.10.11", "linkify-it": "3.0.3", "linkify-plugin-mention": "^3.0.4", "linkifyjs": "^3.0.5", @@ -58,14 +56,14 @@ "react-icons": "^4.3.1", "react-linkify": "^1.0.0-alpha", "react-pdf": "^5.7.2", - "react-redux": "^8.0.1", + "react-redux": "^8.0.2", "react-refresh": "0.13.0", "react-router-dom": "6", "react-string-replace": "^1.1.0", "react-textarea-autosize": "^8.3.4", "react-window": "^1.8.7", "resolve": "^1.22.0", - "rooks": "^5.11.0", + "rooks": "^5.11.2", "semver": "^7.3.7", "slate": "^0.78.0", "slate-auto-replace": "^0.12.1", @@ -137,6 +135,7 @@ "lint-staged": "^12.4.1", "patch-package": "^6.4.7", "postinstall-postinstall": "^2.1.0", - "prettier": "^2.6.2" + "prettier": "^2.6.2", + "redux-immutable-state-invariant": "^2.1.0" } } diff --git a/src/common/component/styled/Button.js b/src/common/component/styled/Button.js index d34e7f96..51636f76 100644 --- a/src/common/component/styled/Button.js +++ b/src/common/component/styled/Button.js @@ -1,7 +1,7 @@ import styled from "styled-components"; const StyledButton = styled.button` cursor: pointer; - padding: 8px 14px; + padding: 10px 14px; border: none; box-sizing: border-box; box-shadow: 0px 1px 2px rgba(16, 24, 40, 0.05); diff --git a/src/routes/chat/ChannelList/NavItem.js b/src/routes/chat/ChannelList/NavItem.js index 6f388dc4..7ab35ee3 100644 --- a/src/routes/chat/ChannelList/NavItem.js +++ b/src/routes/chat/ChannelList/NavItem.js @@ -153,6 +153,7 @@ const NavItem = ({ id, setFiles, toggleRemoveConfirm }) => { className={`link ${isActive ? "drop_over" : ""} ${ muted ? "muted" : "" }`} + activeClassName="link_active" to={`/chat/channel/${id}`} >
diff --git a/src/routes/login/MagicLinkLogin.js b/src/routes/login/MagicLinkLogin.js index d38c5380..b08bf5c2 100644 --- a/src/routes/login/MagicLinkLogin.js +++ b/src/routes/login/MagicLinkLogin.js @@ -13,7 +13,7 @@ export default function MagicLinkLogin() { // signIn(); }; return ( - + Sign in with Magic Link ); diff --git a/src/routes/login/SolidLoginButton.js b/src/routes/login/SolidLoginButton.js index 0fa43eed..ba86cff3 100644 --- a/src/routes/login/SolidLoginButton.js +++ b/src/routes/login/SolidLoginButton.js @@ -1,31 +1,31 @@ /* eslint-disable no-undef */ -import { useEffect } from 'react'; -import { useGetOpenidMutation } from '../../app/services/auth'; -import solidSvg from '../../assets/icons/solid.svg?url'; -import { StyledSocialButton } from './styled'; +import { useEffect } from "react"; +import { useGetOpenidMutation } from "../../app/services/auth"; +import solidSvg from "../../assets/icons/solid.svg?url"; +import { StyledSocialButton } from "./styled"; export default function SolidLoginButton({ issuers }) { - const [getOpenId, { data, isLoading, isSuccess }] = useGetOpenidMutation(); + const [getOpenId, { data, isLoading, isSuccess }] = useGetOpenidMutation(); - const handleSolidLogin = () => { - getOpenId({ - // issuer: "solidweb.org", - issuer: issuers[0], - redirect_uri: `${location.origin}/#/login` - }); - }; - useEffect(() => { - if (isSuccess) { - console.log('wtf', data); - const { url } = data; - location.href = url; - } - }, [data, isSuccess]); + const handleSolidLogin = () => { + getOpenId({ + // issuer: "solidweb.org", + issuer: issuers[0], + redirect_uri: `${location.origin}/#/login`, + }); + }; + useEffect(() => { + if (isSuccess) { + console.log("wtf", data); + const { url } = data; + location.href = url; + } + }, [data, isSuccess]); - return ( - - solid icon - {isLoading ? `Redirecting...` : `Sign in with Solid`} - - ); + return ( + + solid icon + {isLoading ? `Redirecting...` : `Sign in with Solid`} + + ); } diff --git a/yarn.lock b/yarn.lock index f22c6a9d..4edc5cb7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1228,15 +1228,15 @@ resolved "http://mirrors.cloud.tencent.com/npm/@emotion%2funitless/-/unitless-0.7.5.tgz#77211291c1900a700b8a78cfafda3160d76949ed" integrity sha512-OWORNpfjMsSSUBVrRBVGECkhWcULOAJz9ZW8uK9qgxD+87M7jHRcvh/A96XXNhXTLmKcoYSQtBEX7lHMO7YRwg== -"@eslint/eslintrc@^1.2.3": - version "1.2.3" - resolved "http://mirrors.cloud.tencent.com/npm/@eslint%2feslintrc/-/eslintrc-1.2.3.tgz#fcaa2bcef39e13d6e9e7f6271f4cc7cae1174886" - integrity sha512-uGo44hIwoLGNyduRpjdEpovcbMdd+Nv7amtmJxnKmI8xj6yd5LncmSwDa5NgX/41lIFJtkjD6YdVfgEzPfJ5UA== +"@eslint/eslintrc@^1.3.0": + version "1.3.0" + resolved "http://mirrors.cloud.tencent.com/npm/@eslint%2feslintrc/-/eslintrc-1.3.0.tgz#29f92c30bb3e771e4a2048c95fa6855392dfac4f" + integrity sha512-UWW0TMTmk2d7hLcWD1/e2g5HDM/HQ3csaLSqXCfqwh4uNDuNqlaKWXmEsL4Cs41Z0KnILNvwbHAah3C2yt06kw== dependencies: ajv "^6.12.4" debug "^4.3.2" espree "^9.3.2" - globals "^13.9.0" + globals "^13.15.0" ignore "^5.2.0" import-fresh "^3.2.1" js-yaml "^4.1.0" @@ -1643,11 +1643,6 @@ resolved "http://mirrors.cloud.tencent.com/npm/@humanwhocodes%2fobject-schema/-/object-schema-1.2.1.tgz#b520529ec21d8e5945a1851dfd1c32e94e39ff45" integrity sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA== -"@interactjs/types@1.10.11": - version "1.10.11" - resolved "http://mirrors.cloud.tencent.com/npm/@interactjs%2ftypes/-/types-1.10.11.tgz#29be25d503f9c7842df062fa3cda5b044a47cf2a" - integrity sha512-YRsVFWjL8Gkkvlx3qnjeaxW4fnibSJ9791g8BA7Pv5ANByI64WmtR1vU7A2rXcrOn8XvyCEfY0ss1s8NhZP+MA== - "@jridgewell/gen-mapping@^0.1.0": version "0.1.1" resolved "https://mirrors.tencent.com/npm/@jridgewell%2fgen-mapping/-/gen-mapping-0.1.1.tgz#e5d2e450306a9491e3bd77e323e38d7aff315996" @@ -1726,10 +1721,10 @@ "@nodelib/fs.scandir" "2.1.5" fastq "^1.6.0" -"@pmmmwh/react-refresh-webpack-plugin@^0.5.6": - version "0.5.6" - resolved "http://mirrors.cloud.tencent.com/npm/@pmmmwh%2freact-refresh-webpack-plugin/-/react-refresh-webpack-plugin-0.5.6.tgz#9ced74cb23dae31ab385f775e237ce4c50422a1d" - integrity sha512-IIWxofIYt/AbMwoeBgj+O2aAXLrlCQVg+A4a2zfpXFNHgP8o8rvi3v+oe5t787Lj+KXlKOh8BAiUp9bhuELXhg== +"@pmmmwh/react-refresh-webpack-plugin@^0.5.7": + version "0.5.7" + resolved "http://mirrors.cloud.tencent.com/npm/@pmmmwh%2freact-refresh-webpack-plugin/-/react-refresh-webpack-plugin-0.5.7.tgz#58f8217ba70069cc6a73f5d7e05e85b458c150e2" + integrity sha512-bcKCAzF0DV2IIROp9ZHkRJa6O4jy7NlnHdWL3GmcUxYWNjLXkK5kfELELwEfSP5hXPfVL/qOGMAROuMQb9GG8Q== dependencies: ansi-html-community "^0.0.8" common-path-prefix "^3.0.0" @@ -3537,7 +3532,7 @@ camelcase@^5.3.1: resolved "https://mirrors.tencent.com/npm/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== -camelcase@^6.2.0, camelcase@^6.3.0: +camelcase@^6.2.0: version "6.3.0" resolved "https://mirrors.tencent.com/npm/camelcase/-/camelcase-6.3.0.tgz#5685b95eb209ac9c0c177467778c9c84df58ba9a" integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA== @@ -4645,12 +4640,12 @@ eslint-visitor-keys@^3.3.0: resolved "https://mirrors.tencent.com/npm/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz#f6480fa6b1f30efe2d1968aa8ac745b862469826" integrity sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA== -eslint@^8.15.0: - version "8.15.0" - resolved "https://mirrors.tencent.com/npm/eslint/-/eslint-8.15.0.tgz#fea1d55a7062da48d82600d2e0974c55612a11e9" - integrity sha512-GG5USZ1jhCu8HJkzGgeK8/+RGnHaNYZGrGDzUtigK3BsGESW/rs2az23XqE0WVwDxy1VRvvjSSGu5nB0Bu+6SA== +eslint@^8.16.0: + version "8.16.0" + resolved "https://mirrors.tencent.com/npm/eslint/-/eslint-8.16.0.tgz#6d936e2d524599f2a86c708483b4c372c5d3bbae" + integrity sha512-MBndsoXY/PeVTDJeWsYj7kLZ5hQpJOfMYLsF6LicLHQWbRDG19lK5jOix4DPl8yY4SUFcE3txy86OzFLWT+yoA== dependencies: - "@eslint/eslintrc" "^1.2.3" + "@eslint/eslintrc" "^1.3.0" "@humanwhocodes/config-array" "^0.9.2" ajv "^6.10.0" chalk "^4.0.0" @@ -4668,7 +4663,7 @@ eslint@^8.15.0: file-entry-cache "^6.0.1" functional-red-black-tree "^1.0.1" glob-parent "^6.0.1" - globals "^13.6.0" + globals "^13.15.0" ignore "^5.2.0" import-fresh "^3.0.0" imurmurhash "^0.1.4" @@ -5261,7 +5256,7 @@ globals@^11.1.0: resolved "https://mirrors.tencent.com/npm/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e" integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA== -globals@^13.6.0, globals@^13.9.0: +globals@^13.15.0: version "13.15.0" resolved "https://mirrors.tencent.com/npm/globals/-/globals-13.15.0.tgz#38113218c907d2f7e98658af246cef8b77e90bac" integrity sha512-bpzcOlgDhMG070Av0Vy5Owklpv1I6+j96GhUI7Rh7IzDCKLzboflLrrfqMu8NquDbiR4EOQk7XzJwqVJxicxog== @@ -5612,13 +5607,6 @@ inline-style-prefixer@^6.0.0: dependencies: css-in-js-utils "^2.0.0" -interactjs@^1.10.11: - version "1.10.11" - resolved "http://mirrors.cloud.tencent.com/npm/interactjs/-/interactjs-1.10.11.tgz#0b9eabe37f1f82fff68e22faad51269b8f2038ea" - integrity sha512-VPUWsGAOPmrZe1YF7Fq/4AIBBZ+3FikZRS8bpzT6VsAfUuhxl/CKJY73IAiZHd3fz9p174CXErn0Qs81XEFICA== - dependencies: - "@interactjs/types" "1.10.11" - internal-slot@^1.0.3: version "1.0.3" resolved "https://mirrors.tencent.com/npm/internal-slot/-/internal-slot-1.0.3.tgz#7347e307deeea2faac2ac6205d4bc7d34967f59c" @@ -5628,6 +5616,13 @@ internal-slot@^1.0.3: has "^1.0.3" side-channel "^1.0.4" +invariant@^2.1.0: + version "2.2.4" + resolved "http://mirrors.cloud.tencent.com/npm/invariant/-/invariant-2.2.4.tgz#610f3c92c9359ce1db616e538008d23ff35158e6" + integrity sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA== + dependencies: + loose-envify "^1.0.0" + ipaddr.js@1.9.1: version "1.9.1" resolved "https://mirrors.tencent.com/npm/ipaddr.js/-/ipaddr.js-1.9.1.tgz#bff38543eeb8984825079ff3a2a8e6cbd46781b3" @@ -5973,6 +5968,11 @@ json-stable-stringify-without-jsonify@^1.0.1: resolved "https://mirrors.tencent.com/npm/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651" integrity sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE= +json-stringify-safe@^5.0.1: + version "5.0.1" + resolved "https://mirrors.tencent.com/npm/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" + integrity sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus= + json5@^1.0.1: version "1.0.1" resolved "https://mirrors.tencent.com/npm/json5/-/json5-1.0.1.tgz#779fb0018604fa854eacbf6252180d83543e3dbe" @@ -7706,10 +7706,10 @@ react-popper@^2.3.0: react-fast-compare "^3.0.1" warning "^4.0.2" -react-redux@^8.0.1: - version "8.0.1" - resolved "https://mirrors.tencent.com/npm/react-redux/-/react-redux-8.0.1.tgz#2bc029f5ada9b443107914c373a2750f6bc0f40c" - integrity sha512-LMZMsPY4DYdZfLJgd7i79n5Kps5N9XVLCJJeWAaPYTV+Eah2zTuBjTxKtNEbjiyitbq80/eIkm55CYSLqAub3w== +react-redux@^8.0.2: + version "8.0.2" + resolved "http://mirrors.cloud.tencent.com/npm/react-redux/-/react-redux-8.0.2.tgz#bc2a304bb21e79c6808e3e47c50fe1caf62f7aad" + integrity sha512-nBwiscMw3NoP59NFCXFf02f8xdo+vSHT/uZ1ldDwF7XaTpzm+Phk97VT4urYBl5TYAPNVaFm12UHAEyzkpNzRA== dependencies: "@babel/runtime" "^7.12.1" "@types/hoist-non-react-statics" "^3.3.1" @@ -7868,6 +7868,14 @@ redent@^3.0.0: indent-string "^4.0.0" strip-indent "^3.0.0" +redux-immutable-state-invariant@^2.1.0: + version "2.1.0" + resolved "http://mirrors.cloud.tencent.com/npm/redux-immutable-state-invariant/-/redux-immutable-state-invariant-2.1.0.tgz#308fd3cc7415a0e7f11f51ec997b6379c7055ce1" + integrity sha512-3czbDKs35FwiBRsx/3KabUk5zSOoTXC+cgVofGkpBNv3jQcqIe5JrHcF5AmVt7B/4hyJ8MijBIpCJ8cife6yJg== + dependencies: + invariant "^2.1.0" + json-stringify-safe "^5.0.1" + redux-thunk@^2.4.1: version "2.4.1" resolved "http://mirrors.cloud.tencent.com/npm/redux-thunk/-/redux-thunk-2.4.1.tgz#0dd8042cf47868f4b29699941de03c9301a75714" @@ -8086,10 +8094,10 @@ rollup@^2.43.1: optionalDependencies: fsevents "~2.3.2" -rooks@^5.11.0: - version "5.11.0" - resolved "http://mirrors.cloud.tencent.com/npm/rooks/-/rooks-5.11.0.tgz#7543af7bf57eead840a2f32b68eb95f0fbc5a041" - integrity sha512-acyTuaYbB021hhHAN6uiU6QUUSuGucK9YOU16nOUM0oypqpckYm7nX5v9xnopoX4pNtrxzIM/mtjC8O7fF3/8A== +rooks@^5.11.2: + version "5.11.2" + resolved "http://mirrors.cloud.tencent.com/npm/rooks/-/rooks-5.11.2.tgz#f7ba3a758c512c7cc807af38615f3052439578b8" + integrity sha512-kOVYjNW/0Emq9NN3DbmC41xcltK25gVV2PMGw+Et9vC5UiIKrwWYRYmMid2/WRGQ0oodOeksCkrqGwJcV2buuQ== dependencies: lodash.debounce "^4.0.8" raf "^3.4.1"