From d1692d7993f9cea0ea43f45352511d3746790ef1 Mon Sep 17 00:00:00 2001 From: Maria Rushkova <66270386+mrushkova@users.noreply.github.com> Date: Tue, 11 Jan 2022 10:44:53 +0100 Subject: [PATCH] Add agreement modal (#180) --- ...aptcha-npm-1.0.0-5c4fe0ed10-7c7c9062a5.zip | Bin 0 -> 12622 bytes ...aptcha-npm-0.1.5-992a1fe069-d36e546bda.zip | Bin 0 -> 3361 bytes packages/react-chat/package.json | 2 + packages/react-chat/src/components/Chat.tsx | 2 + .../src/components/Modals/AgreementModal.tsx | 156 ++++++++++++++++++ .../src/components/Modals/Modal.tsx | 2 +- .../src/components/Modals/ProfileModal.tsx | 5 +- .../components/Modals/UserCreationModal.tsx | 3 + yarn.lock | 21 +++ 9 files changed, 186 insertions(+), 5 deletions(-) create mode 100644 .yarn/cache/@hcaptcha-react-hcaptcha-npm-1.0.0-5c4fe0ed10-7c7c9062a5.zip create mode 100644 .yarn/cache/@types-hcaptcha__react-hcaptcha-npm-0.1.5-992a1fe069-d36e546bda.zip create mode 100644 packages/react-chat/src/components/Modals/AgreementModal.tsx diff --git a/.yarn/cache/@hcaptcha-react-hcaptcha-npm-1.0.0-5c4fe0ed10-7c7c9062a5.zip b/.yarn/cache/@hcaptcha-react-hcaptcha-npm-1.0.0-5c4fe0ed10-7c7c9062a5.zip new file mode 100644 index 0000000000000000000000000000000000000000..36bdba00a900954326d5bfb618b8a028d3076704 GIT binary patch literal 12622 zcmb7rRd5|k5~Y~QVrFJ$W=4zIVrI!=ij21I9TFlH^znSsQjyK+fCvU{< z{^&ZDU6mD;b@H^L3@8{X&|fB4F%R{Rn}7Ym|Ge7T8JpaBj{_Ud}zdtHy zZe(chY-DcuUmB7BeIrK`LnCLp-!MRcp#I@wH`Yv;BM1->6&Mf@-5+DfN{NWctBC0; z%fu`*B6U2gM{=G@Pu)3`c(8O{LS~;* z2JQ=ln-R_KcaVdnzh(XH3s7fF6wcb`KnN{VLryHueCRi%$}wYyrT}uVjTVTzV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#ut9L>pBI-lGB55Fh>+eo?^DYSa%E!veG;FehGE_aKu_qqHi8DJsEMiz6k8jPC*wLP z**ItlY#4dAOaca;AkDHHU(%{}l!V1fp>(V~^l==&A;FAI?B*EZy%NApLKf#c-ILat za-+x*qDV&^hT&vNayZiN;p>PzP)wxS{kSJQvt=KCrB zPq@GP{cAFRC*%K(@9;C|{wzTLG2*`{;9mpttApQ3<$reogY~B!{53FthyOcW`)_=t zp8|wGdx8I#y#3w(--*0`1@im12Y>BfzwA_~jp|Rqf9+=f88^T0 nXTOm1{UCmZ=bsJBKau~vyD7?mL;Qt<@bkC!bDz}yhs*y5(v5W( literal 0 HcmV?d00001 diff --git a/.yarn/cache/@types-hcaptcha__react-hcaptcha-npm-0.1.5-992a1fe069-d36e546bda.zip b/.yarn/cache/@types-hcaptcha__react-hcaptcha-npm-0.1.5-992a1fe069-d36e546bda.zip new file mode 100644 index 0000000000000000000000000000000000000000..3ecf87599e514a15abdd87d29111b83e6751bce0 GIT binary patch literal 3361 zcmb7H2{@EnA0G{7493t{$L&UCAK8jj7uok+F(Lah!;HpKBMO7EWM4wEhRBw+LK0c7 z-S})7WY@?VC49O!w=d7veIDn1p7)&dJm>%W{m=9M{^$H&Jxw4r9Pq8l7xshy8hn2- z?)9!%TRTe^tgQ#e4u4wjmrK6^{Ipcw{U+{TBapv{aI~?)x!X8eSz2DVv$AnV?$5uI z9|3^>%JWLFl)TRo0KkJ90FXK?l$N@pvW}s$xk0<@gcz)LLr^8fOmL{?V>`8Bf%ZhR zxZSy+H?X2hVVGyR*g8pQnRB*Uci7Ap0s%;ab3uk52qxz67w~u`cwu!Fi8G5d8pAi) zN5rkkmMPdwkKTxzrDu0Aimzw~00GO>OHh8YPWKuoca8Yi{Vv9*at|0X0z3)9q03ZM zi!jvr!8vNAdu}4wO%|%AOsMQfP_K0bjmZx4@~;)XNNtD5(8&ySQ{T8B;HQjN6|soc z!w!jy57Etjbz_i5fV{%TwC|33zKI#vleX|)S&=zL85}hRr}i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n~;x>)1c+}sZf!&4)uI8<7V{FmI4+}?&T`-;jRql}(0 zyOGDhhC-!FBn!GllvBhmhS~(4;i`?PvgzR?2j}=)gzly;AdgA8&bzb+*LD-7nMD$W zt494L8X&$3Xce^hJ8qm(yb6bB&)2T^>h}xO9U9cEQ5m0^46?OGpK!~0sbv|S#&lK_ zWlM72jJwn6>@KCey7I)B6)X(%Mqr7%{f~Qf-m=mrtXD;r6I`=bt(kOL#{5KZvi+m#-33h&w50R&?$-FZOw*&pTor zki9^}J!ocAr*BXY{Mz&simc&>46o0KEcSN_E{={ytwMXYAMzmaxm`{0I1ST#4;EY# zwa_0TCA>Z&WSTvb0(Nd_LdT}n)W#NfPuhja^DvMn+(@SCrfMBHq^4->0_n>7;6`Q4 z4l**fzchY$MG<2f+M`Oka6Xftedc;nngi9#_Z)9NrGxO^===_5$?cCuiBLzNu)r8$ z0VW@n)*Tbax)fzXVoDM=tuA1ESLrP7*YV+8Dc$4rdYV*6v#|S(qF}x^{E7TK!oGq1KZf>i=zR}x(9-?` z?U#F4=>fmL-U literal 0 HcmV?d00001 diff --git a/packages/react-chat/package.json b/packages/react-chat/package.json index 70f52941..d29ee629 100644 --- a/packages/react-chat/package.json +++ b/packages/react-chat/package.json @@ -22,8 +22,10 @@ "proto:build": "buf generate" }, "devDependencies": { + "@hcaptcha/react-hcaptcha": "^1.0.0", "@types/chai": "^4.2.21", "@types/emoji-mart": "^3.0.6", + "@types/hcaptcha__react-hcaptcha": "^0.1.5", "@types/mocha": "^9.0.0", "@types/node": "^16.9.6", "@types/qrcode.react": "^1.0.2", diff --git a/packages/react-chat/src/components/Chat.tsx b/packages/react-chat/src/components/Chat.tsx index e6ec4c97..80f4df69 100644 --- a/packages/react-chat/src/components/Chat.tsx +++ b/packages/react-chat/src/components/Chat.tsx @@ -9,6 +9,7 @@ import { ChatBody } from "./Chat/ChatBody"; import { ChatCreation } from "./Chat/ChatCreation"; import { Community } from "./Community"; import { Members } from "./Members/Members"; +import { AgreementModal } from "./Modals/AgreementModal"; import { CoinbaseModal } from "./Modals/CoinbaseModal"; import { CommunityModal } from "./Modals/CommunityModal"; import { EditModal } from "./Modals/EditModal"; @@ -32,6 +33,7 @@ function Modals() { + ); } diff --git a/packages/react-chat/src/components/Modals/AgreementModal.tsx b/packages/react-chat/src/components/Modals/AgreementModal.tsx new file mode 100644 index 00000000..a542d451 --- /dev/null +++ b/packages/react-chat/src/components/Modals/AgreementModal.tsx @@ -0,0 +1,156 @@ +import HCaptcha from "@hcaptcha/react-hcaptcha"; +import React, { useState } from "react"; +import styled, { useTheme } from "styled-components"; + +import { useMessengerContext } from "../../contexts/messengerProvider"; +import { useModal } from "../../contexts/modalProvider"; +import { lightTheme, Theme } from "../../styles/themes"; +import { Logo } from "../CommunityIdentity"; +import { textMediumStyles } from "../Text"; + +import { Modal } from "./Modal"; +import { Btn, ButtonSection, Heading, Section, Text } from "./ModalStyle"; + +export const AgreementModalName = "AgreementModal"; + +export function AgreementModal() { + const theme = useTheme() as Theme; + const { communityData } = useMessengerContext(); + const { setModal } = useModal(AgreementModalName); + + const [checked, setChecked] = useState(false); + const [token, setToken] = useState(""); + + return ( + +
+ Welcome to {communityData?.name} +
+
+ + + {" "} + {communityData?.icon === undefined && + communityData?.name.slice(0, 1).toUpperCase()} + + + + {communityData?.description} + + + + setChecked(e.target.checked)} + required + /> + I agree with the above + + +
+ + +
+
+ + { + setModal(false); + }} + disabled={!token || !checked} + > + Join {communityData?.name} + + +
+ ); +} + +const LogoWrapper = styled.div` + display: flex; + justify-content: center; + margin-bottom: 24px; +`; + +const CommunityLogo = styled(Logo)` + width: 64px; + height: 64px; +`; + +const AgreementSection = styled.div` + margin-bottom: 24px; +`; + +const Agreements = styled.div` + display: flex; + justify-content: center; + align-items: center; +`; + +const Agreement = styled.label` + display: flex; + align-items: center; + position: relative; + color: ${({ theme }) => theme.primary}; + padding-left: 26px; + margin-right: 48px; + + ${textMediumStyles} + + & input:checked ~ span { + background-color: ${({ theme }) => theme.tertiary}; + border: 1px solid ${({ theme }) => theme.tertiary}; + border-radius: 2px; + } + + & input:checked ~ span:after { + display: block; + } +`; + +const AgreementInput = styled.input` + position: absolute; + opacity: 0; + height: 0; + width: 0; +`; + +const Checkmark = styled.span` + position: absolute; + top: 2px; + left: 0; + width: 18px; + height: 18px; + + background-color: ${({ theme }) => theme.inputColor}; + border: 1px solid ${({ theme }) => theme.inputColor}; + border-radius: 2px; + margin: 0 8px 0 0; + + &:after { + content: ""; + position: absolute; + display: none; + + left: 5px; + top: 1px; + width: 4px; + height: 9px; + border: solid ${({ theme }) => theme.bodyBackgroundColor}; + border-width: 0 2px 2px 0; + transform: rotate(45deg); + } +`; diff --git a/packages/react-chat/src/components/Modals/Modal.tsx b/packages/react-chat/src/components/Modals/Modal.tsx index 1b098fdb..e86d07f4 100644 --- a/packages/react-chat/src/components/Modals/Modal.tsx +++ b/packages/react-chat/src/components/Modals/Modal.tsx @@ -83,7 +83,7 @@ const ModalBody = styled.div` border-radius: 0; } - &.profile { + &.wide { max-width: 640px; } `; diff --git a/packages/react-chat/src/components/Modals/ProfileModal.tsx b/packages/react-chat/src/components/Modals/ProfileModal.tsx index 4bff8941..04e9ab5b 100644 --- a/packages/react-chat/src/components/Modals/ProfileModal.tsx +++ b/packages/react-chat/src/components/Modals/ProfileModal.tsx @@ -86,10 +86,7 @@ export const ProfileModal = () => { if (!contact) return null; return ( - +
{contact.trueName}’s Profile
diff --git a/packages/react-chat/src/components/Modals/UserCreationModal.tsx b/packages/react-chat/src/components/Modals/UserCreationModal.tsx index ffb673ea..92829007 100644 --- a/packages/react-chat/src/components/Modals/UserCreationModal.tsx +++ b/packages/react-chat/src/components/Modals/UserCreationModal.tsx @@ -24,6 +24,7 @@ import { ClearSvgFull } from "../Icons/ClearIconFull"; import { LeftIconSvg } from "../Icons/LeftIcon"; import { UserLogo } from "../Members/UserLogo"; +import { AgreementModalName } from "./AgreementModal"; import { Modal } from "./Modal"; import { AddWrapper, @@ -51,6 +52,7 @@ export function UserCreationModal() { const error = useNameError(customNameInput); const [nextStep, setNextStep] = useState(false); const { setModal } = useModal(UserCreationModalName); + const { setModal: setAgreementModal } = useModal(AgreementModalName); return ( @@ -158,6 +160,7 @@ export function UserCreationModal() { onClick={() => { if (nextStep) { setModal(false); + setAgreementModal(true); } else { const identity = walletIdentity || Identity.generate(); setNickname(customNameInput); diff --git a/yarn.lock b/yarn.lock index c7c77882..0e33f95c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -275,8 +275,10 @@ __metadata: version: 0.0.0-use.local resolution: "@dappconnect/react-chat@workspace:packages/react-chat" dependencies: + "@hcaptcha/react-hcaptcha": ^1.0.0 "@types/chai": ^4.2.21 "@types/emoji-mart": ^3.0.6 + "@types/hcaptcha__react-hcaptcha": ^0.1.5 "@types/mocha": ^9.0.0 "@types/node": ^16.9.6 "@types/qrcode.react": ^1.0.2 @@ -369,6 +371,16 @@ __metadata: languageName: node linkType: hard +"@hcaptcha/react-hcaptcha@npm:^1.0.0": + version: 1.0.0 + resolution: "@hcaptcha/react-hcaptcha@npm:1.0.0" + peerDependencies: + react: ">= 16.3.0" + react-dom: ">= 16.3.0" + checksum: 7c7c9062a5aa43f83b46d5d6028215830fe496b032652004d006460f579cf728f711d782fccede99751e0c2579d50cf0637d1908334b9f4ffcf9c92de55f7666 + languageName: node + linkType: hard + "@humanwhocodes/config-array@npm:^0.5.0": version: 0.5.0 resolution: "@humanwhocodes/config-array@npm:0.5.0" @@ -833,6 +845,15 @@ __metadata: languageName: node linkType: hard +"@types/hcaptcha__react-hcaptcha@npm:^0.1.5": + version: 0.1.5 + resolution: "@types/hcaptcha__react-hcaptcha@npm:0.1.5" + dependencies: + "@types/react": "*" + checksum: d36e546bdad097a1e9ae209e22d7ddef2fceb2e9c41ee93d10aa7f0ee03c5cf512b56581518517c20e231333cdc63374e6a8cde7da5398f0e5e747fd34e9157a + languageName: node + linkType: hard + "@types/history@npm:*": version: 4.7.9 resolution: "@types/history@npm:4.7.9"