diff --git a/src/assets/icons/add.emoji.svg b/src/assets/icons/add.emoji.svg new file mode 100644 index 00000000..a3bf35fc --- /dev/null +++ b/src/assets/icons/add.emoji.svg @@ -0,0 +1,4 @@ + + + + diff --git a/src/assets/icons/add.person.svg b/src/assets/icons/add.person.svg new file mode 100644 index 00000000..9a2dc86d --- /dev/null +++ b/src/assets/icons/add.person.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/assets/icons/add.svg b/src/assets/icons/add.svg new file mode 100644 index 00000000..77ae124a --- /dev/null +++ b/src/assets/icons/add.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/assets/icons/alert.svg b/src/assets/icons/alert.svg new file mode 100644 index 00000000..70ef4270 --- /dev/null +++ b/src/assets/icons/alert.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/assets/icons/arrow.left.svg b/src/assets/icons/arrow.left.svg new file mode 100644 index 00000000..ce7bcbd5 --- /dev/null +++ b/src/assets/icons/arrow.left.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/assets/icons/call.svg b/src/assets/icons/call.svg new file mode 100644 index 00000000..09a6006e --- /dev/null +++ b/src/assets/icons/call.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/assets/icons/channel.private.svg b/src/assets/icons/channel.private.svg new file mode 100644 index 00000000..3ffc1de1 --- /dev/null +++ b/src/assets/icons/channel.private.svg @@ -0,0 +1,4 @@ + + + + diff --git a/src/assets/icons/channel.svg b/src/assets/icons/channel.svg new file mode 100644 index 00000000..4d1aec1c --- /dev/null +++ b/src/assets/icons/channel.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/assets/icons/chat.svg b/src/assets/icons/chat.svg index d433a271..16b22dcd 100644 --- a/src/assets/icons/chat.svg +++ b/src/assets/icons/chat.svg @@ -1,4 +1,4 @@ - + diff --git a/src/assets/icons/close.svg b/src/assets/icons/close.svg new file mode 100644 index 00000000..76004bbd --- /dev/null +++ b/src/assets/icons/close.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/assets/icons/edit.svg b/src/assets/icons/edit.svg new file mode 100644 index 00000000..86f0c2ec --- /dev/null +++ b/src/assets/icons/edit.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/assets/icons/fold.svg b/src/assets/icons/fold.svg new file mode 100644 index 00000000..e2daa633 --- /dev/null +++ b/src/assets/icons/fold.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/assets/icons/google.svg b/src/assets/icons/google.svg new file mode 100644 index 00000000..bcab10d9 --- /dev/null +++ b/src/assets/icons/google.svg @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/src/assets/icons/mail.svg b/src/assets/icons/mail.svg new file mode 100644 index 00000000..834939db --- /dev/null +++ b/src/assets/icons/mail.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/assets/icons/metamask.svg b/src/assets/icons/metamask.svg new file mode 100644 index 00000000..d203e0d4 --- /dev/null +++ b/src/assets/icons/metamask.svg @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/src/assets/icons/mic.on.svg b/src/assets/icons/mic.on.svg new file mode 100644 index 00000000..f39cdf89 --- /dev/null +++ b/src/assets/icons/mic.on.svg @@ -0,0 +1,4 @@ + + + + diff --git a/src/assets/icons/more.svg b/src/assets/icons/more.svg new file mode 100644 index 00000000..2f7d3184 --- /dev/null +++ b/src/assets/icons/more.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/assets/icons/people.svg b/src/assets/icons/people.svg new file mode 100644 index 00000000..20456026 --- /dev/null +++ b/src/assets/icons/people.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/assets/icons/pin.svg b/src/assets/icons/pin.svg new file mode 100644 index 00000000..1bb79fb6 --- /dev/null +++ b/src/assets/icons/pin.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/assets/icons/reaction.svg b/src/assets/icons/reaction.svg new file mode 100644 index 00000000..bbe34f58 --- /dev/null +++ b/src/assets/icons/reaction.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/assets/icons/reply.svg b/src/assets/icons/reply.svg new file mode 100644 index 00000000..b6fcfcd0 --- /dev/null +++ b/src/assets/icons/reply.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/assets/icons/search.svg b/src/assets/icons/search.svg new file mode 100644 index 00000000..eff826c8 --- /dev/null +++ b/src/assets/icons/search.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/assets/icons/setting.svg b/src/assets/icons/setting.svg new file mode 100644 index 00000000..f5ef234e --- /dev/null +++ b/src/assets/icons/setting.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/assets/icons/solid.svg b/src/assets/icons/solid.svg new file mode 100644 index 00000000..b9a97e5f --- /dev/null +++ b/src/assets/icons/solid.svg @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/src/assets/icons/sound.on.svg b/src/assets/icons/sound.on.svg new file mode 100644 index 00000000..1a76f1b9 --- /dev/null +++ b/src/assets/icons/sound.on.svg @@ -0,0 +1,4 @@ + + + + diff --git a/src/assets/icons/unfold.svg b/src/assets/icons/unfold.svg new file mode 100644 index 00000000..d6550a30 --- /dev/null +++ b/src/assets/icons/unfold.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/assets/icons/upload.image.svg b/src/assets/icons/upload.image.svg new file mode 100644 index 00000000..94036f7f --- /dev/null +++ b/src/assets/icons/upload.image.svg @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/assets/icons/video.svg b/src/assets/icons/video.svg new file mode 100644 index 00000000..c97d9036 --- /dev/null +++ b/src/assets/icons/video.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/common/component/AvatarUploader.js b/src/common/component/AvatarUploader.js index 86d5cfa4..ac023d6b 100644 --- a/src/common/component/AvatarUploader.js +++ b/src/common/component/AvatarUploader.js @@ -1,5 +1,6 @@ import { useState, useEffect } from "react"; import styled from "styled-components"; +import uploadIcon from "../../assets/icons/upload.image.svg?url"; import { getInitials, getInitialsAvatar } from "../utils"; const StyledWrapper = styled.div` width: 96px; @@ -101,13 +102,7 @@ export default function AvatarUploader({ )} - {!disabled && ( - icon - )} + {!disabled && icon} ); } diff --git a/src/common/component/ChannelIcon.js b/src/common/component/ChannelIcon.js index b02096ea..1a337635 100644 --- a/src/common/component/ChannelIcon.js +++ b/src/common/component/ChannelIcon.js @@ -1,49 +1,12 @@ // import React from 'react'; -const HashIcon = ({ size = 20, color = "#616161", ...rest }) => { +import hashIcon from "../../assets/icons/channel.svg?url"; +import lockHashIcon from "../../assets/icons/channel.private.svg?url"; +export default function ChannelIcon({ personal = false, ...rest }) { return ( - - - - ); -}; -const PrivateHashIcon = ({ size = 20, color = "#616161", ...rest }) => { - return ( - - - - - ); -}; -export default function ChannelIcon({ - personal = false, - size = 20, - color = "#616161", - ...rest -}) { - return personal ? ( - - ) : ( - + /> ); } diff --git a/src/common/component/ChannelSetting/Overview.js b/src/common/component/ChannelSetting/Overview.js index 82b367a0..55df168b 100644 --- a/src/common/component/ChannelSetting/Overview.js +++ b/src/common/component/ChannelSetting/Overview.js @@ -9,6 +9,7 @@ import Input from "../styled/Input"; import Label from "../styled/Label"; import Textarea from "../styled/Textarea"; import SaveTip from "../SaveTip"; +import channelIcon from "../../../assets/icons/channel.svg?url"; const StyledWrapper = styled.div` position: relative; width: 512px; @@ -29,7 +30,7 @@ const StyledWrapper = styled.div` gap: 8px; .name { padding-left: 36px; - background: url(https://static.nicegoodthings.com/project/rustchat/icon.hash.svg); + background: url(${channelIcon}); background-size: 20px; background-position-x: 8px; background-position-y: 8px; diff --git a/src/common/component/ManageMembers.js b/src/common/component/ManageMembers.js index 3b3f5373..3e0e1068 100644 --- a/src/common/component/ManageMembers.js +++ b/src/common/component/ManageMembers.js @@ -7,6 +7,8 @@ import useCopy from "../hook/useCopy"; import { useLazyDeleteContactQuery } from "../../app/services/contact"; import Contact from "./Contact"; import StyledMenu from "./StyledMenu"; +import InviteLink from "./InviteLink"; +import moreIcon from "../../assets/icons/more.svg?url"; const StyledWrapper = styled.section` display: flex; flex-direction: column; @@ -116,6 +118,7 @@ export default function ManageMembers({ members = [] }) { const uids = !members || members.length == 0 ? contacts.ids : members; return ( +

Manage Members

@@ -142,7 +145,7 @@ export default function ManageMembers({ members = [] }) { data-uid={uid} onClick={toggleMenu} className="dots" - src="https://static.nicegoodthings.com/project/rustchat/icon.dots.svg" + src={moreIcon} alt="dots icon" /> {menuVisible == uid && ( diff --git a/src/common/component/Message/Commands.js b/src/common/component/Message/Commands.js index 13241b00..e54084d2 100644 --- a/src/common/component/Message/Commands.js +++ b/src/common/component/Message/Commands.js @@ -7,7 +7,12 @@ import { addReplyingMessage } from "../../../app/slices/message"; import StyledMenu from "../StyledMenu"; import DeleteMessageConfirm from "./DeleteMessageConfirm"; import EmojiPicker from "./EmojiPicker"; +import replyIcon from "../../../assets/icons/reply.svg?url"; +import reactIcon from "../../../assets/icons/reaction.svg?url"; +import editIcon from "../../../assets/icons/edit.svg?url"; +import moreIcon from "../../../assets/icons/more.svg?url"; const StyledCmds = styled.ul` + z-index: 9999; position: absolute; right: 10px; top: 0; @@ -33,6 +38,12 @@ const StyledCmds = styled.ul` height: 24px; } } + > .picker { + position: absolute; + left: -10px; + top: 0; + transform: translateX(-100%); + } .menu { position: absolute; top: 0; @@ -70,34 +81,24 @@ export default function Commands({ return (

  • - icon emoji + icon emoji
  • {emojiPopVisible && ( - +
    + +
    )} {currUid == from_uid ? (
  • - icon edit + icon edit
  • ) : (
  • - icon reply + icon reply
  • )}
  • - icon emoji + icon emoji
  • {menuVisible && ( diff --git a/src/routes/chat/styled.js b/src/routes/chat/styled.js index ab0632f4..c24f7f43 100644 --- a/src/routes/chat/styled.js +++ b/src/routes/chat/styled.js @@ -1,4 +1,5 @@ import styled from "styled-components"; +import settingIcon from "../../assets/icons/setting.svg?url"; const StyledWrapper = styled.div` display: flex; height: 100%; @@ -68,7 +69,8 @@ const StyledWrapper = styled.div` display: flex; width: 16px; height: 16px; - background-image: url("https://static.nicegoodthings.com/project/rustchat/icon.setting.svg"); + background-image: url(${settingIcon}); + background-size: 16px; } > .badge { color: #fff; @@ -161,6 +163,12 @@ const StyledWrapper = styled.div` font-weight: 900; font-size: 10px; line-height: 10px; + &.dot { + min-width: unset; + width: 6px; + height: 6px; + padding: 0; + } &.mute { background: #bfbfbf; } diff --git a/src/routes/home/Menu.js b/src/routes/home/Menu.js index 022321a3..9a60649e 100644 --- a/src/routes/home/Menu.js +++ b/src/routes/home/Menu.js @@ -1,6 +1,9 @@ // import React from 'react' import { useDispatch } from "react-redux"; import { toggleSetting } from "../../app/slices/ui"; +import settingIcon from "../../assets/icons/setting.svg?url"; +import foldIcon from "../../assets/icons/fold.svg?url"; +import unfoldIcon from "../../assets/icons/unfold.svg?url"; import styled from "styled-components"; const StyledMenus = styled.ul` display: flex; @@ -38,11 +41,7 @@ export default function Menu({ toggle, expand = true }) { return (
  • - setting icon + setting icon {expand && ( Settings @@ -51,11 +50,7 @@ export default function Menu({ toggle, expand = true }) {
  • expand icon diff --git a/src/routes/home/index.js b/src/routes/home/index.js index 3420341f..0589093c 100644 --- a/src/routes/home/index.js +++ b/src/routes/home/index.js @@ -12,8 +12,8 @@ import usePreload from "./usePreload"; import SettingModal from "../../common/component/Setting"; import ChannelSettingModal from "../../common/component/ChannelSetting"; -import ChatIcon from "../../assets/icons/chat.svg"; -import ContactIcon from "../../assets/icons/contact.svg"; +import ChatIcon from "../../assets/icons/chat.svg?url"; +import ContactIcon from "../../assets/icons/contact.svg?url"; // import NotificationHub from "../../common/component/NotificationHub"; export default function HomePage() { @@ -29,7 +29,7 @@ export default function HomePage() { const toggleExpand = () => { dispatch(toggleMenuExpand()); }; - console.log("index loading", loading, ready); + // console.log("index loading", loading, ready); if (loading || !ready) { return ; } diff --git a/src/routes/invite/index.js b/src/routes/invite/index.js index a1ee6698..57768d80 100644 --- a/src/routes/invite/index.js +++ b/src/routes/invite/index.js @@ -1,168 +1,177 @@ -import { useState, useEffect } from 'react'; -import StyledWrapper from './styled'; -import { useNavigate } from 'react-router-dom'; -import toast from 'react-hot-toast'; - -import { useRegisterMutation } from '../../app/services/contact'; -import { useCheckInviteTokenValidMutation } from '../../app/services/auth'; +import { useState, useEffect } from "react"; +import StyledWrapper from "./styled"; +import { useNavigate } from "react-router-dom"; +import toast from "react-hot-toast"; +import BASE_URL from "../../app/config"; +import { useRegisterMutation } from "../../app/services/contact"; +import { useCheckInviteTokenValidMutation } from "../../app/services/auth"; export default function InvitePage() { - const [secondPwd, setSecondPwd] = useState(''); - const [samePwd, setSamePwd] = useState(true); - const [token, setToken] = useState(''); - const [valid, setValid] = useState(false); - // const [sp] = useSearchParams(); - const navigateTo = useNavigate(); - const [register, { data, isLoading, isSuccess, isError, error }] = useRegisterMutation(); - const [checkToken, { data: isValid, isLoading: checkLoading, isSuccess: checkSuccess }] = - useCheckInviteTokenValidMutation(); - useEffect(() => { - // console.log(search); - const query = new URLSearchParams(location.search); - setToken(query.get('token')); - }, []); - useEffect(() => { - if (token) { - checkToken(token); - } - }, [token]); - useEffect(() => { - if (checkSuccess) { - console.log({ isValid }); - setValid(isValid); - } else { - setValid(false); - } - }, [checkSuccess, isValid]); - - const [input, setInput] = useState({ - name: '', - email: '', - password: '' - }); - - const handleReg = (evt) => { - evt.preventDefault(); - if (!samePwd) { - toast.error('two passwords not same'); - return; - } - console.log('wtf', input); - register({ - ...input, - magic_token: token, - gender: 1 - }); - }; - const handleInput = (evt) => { - const { type } = evt.target.dataset; - const { value } = evt.target; - console.log(type, value); - setInput((prev) => { - prev[type] = value; - return { ...prev }; - }); - }; - const handleSecondPwdInput = (evt) => { - const { value } = evt.target; - setSecondPwd(value); - }; - const handlePwdCheck = () => { - if (secondPwd) { - setSamePwd(secondPwd == input.password); - } - }; - useEffect(() => { - if (!samePwd) { - toast.error('two passwords not same'); - } - }, [samePwd]); - - useEffect(() => { - if (isSuccess && data) { - // 去登录 - toast.success('register success, login please'); - setTimeout(() => { - navigateTo('/login'); - }, 500); - } else if (isError) { - console.log('register failed', error); - switch (error.status) { - case 412: - toast.error('register failed: invalid token or expired'); - break; - case 409: { - const tips = { - email_conflict: 'email conflict', - name_conflict: 'name conflict' - }; - toast.error(`register failed: ${tips[error.data?.reason]}`); - break; + const [secondPwd, setSecondPwd] = useState(""); + const [samePwd, setSamePwd] = useState(true); + const [token, setToken] = useState(""); + const [valid, setValid] = useState(false); + // const [sp] = useSearchParams(); + const navigateTo = useNavigate(); + const [ + register, + { data, isLoading, isSuccess, isError, error }, + ] = useRegisterMutation(); + const [ + checkToken, + { data: isValid, isLoading: checkLoading, isSuccess: checkSuccess }, + ] = useCheckInviteTokenValidMutation(); + useEffect(() => { + // console.log(search); + const query = new URLSearchParams(location.search); + setToken(query.get("token")); + }, []); + useEffect(() => { + if (token) { + checkToken(token); } - default: - toast.error('register failed'); - break; - } - } - }, [data, isSuccess, isError, error]); + }, [token]); + useEffect(() => { + if (checkSuccess) { + console.log({ isValid }); + setValid(isValid); + } else { + setValid(false); + } + }, [checkSuccess, isValid]); - const { email, password, name } = input; - if (!token) return 'token not found'; - if (checkLoading) return 'checking token valid'; - if (!valid) return 'invite token expires or invalid'; - return ( - -
    -
    - logo -

    Sign Up to Rustchat

    - Please enter your details. -
    -
    - - - - - -
    -
    -
    - ); + const [input, setInput] = useState({ + name: "", + email: "", + password: "", + }); + + const handleReg = (evt) => { + evt.preventDefault(); + if (!samePwd) { + toast.error("two passwords not same"); + return; + } + console.log("wtf", input); + register({ + ...input, + magic_token: token, + gender: 1, + }); + }; + const handleInput = (evt) => { + const { type } = evt.target.dataset; + const { value } = evt.target; + console.log(type, value); + setInput((prev) => { + prev[type] = value; + return { ...prev }; + }); + }; + const handleSecondPwdInput = (evt) => { + const { value } = evt.target; + setSecondPwd(value); + }; + const handlePwdCheck = () => { + if (secondPwd) { + setSamePwd(secondPwd == input.password); + } + }; + useEffect(() => { + if (!samePwd) { + toast.error("two passwords not same"); + } + }, [samePwd]); + + useEffect(() => { + if (isSuccess && data) { + // 去登录 + toast.success("register success, login please"); + setTimeout(() => { + navigateTo("/login"); + }, 500); + } else if (isError) { + console.log("register failed", error); + switch (error.status) { + case 412: + toast.error("register failed: invalid token or expired"); + break; + case 409: { + const tips = { + email_conflict: "email conflict", + name_conflict: "name conflict", + }; + toast.error(`register failed: ${tips[error.data?.reason]}`); + break; + } + default: + toast.error("register failed"); + break; + } + } + }, [data, isSuccess, isError, error]); + + const { email, password, name } = input; + if (!token) return "token not found"; + if (checkLoading) return "checking token valid"; + if (!valid) return "invite token expires or invalid"; + return ( + +
    +
    + logo +

    Sign Up to Rustchat

    + Please enter your details. +
    +
    + + + + + +
    +
    +
    + ); } diff --git a/src/routes/login/GoogleLoginButton.js b/src/routes/login/GoogleLoginButton.js index 1a1415c8..ba4ac753 100644 --- a/src/routes/login/GoogleLoginButton.js +++ b/src/routes/login/GoogleLoginButton.js @@ -1,31 +1,34 @@ // import { useState, useEffect } from "react"; -import { useGoogleLogin } from 'react-google-login'; -import { googleClientID } from '../../app/config'; +import { useGoogleLogin } from "react-google-login"; +import { googleClientID } from "../../app/config"; +import googleSvg from "../../assets/icons/google.svg?url"; + export default function GoogleLoginButton({ login }) { - const { signIn, loaded } = useGoogleLogin({ - clientId: googleClientID, - onSuccess: ({ tokenId, ...rest }) => { - console.log('success', tokenId, rest); - login({ - id_token: tokenId, - type: 'google' - }); - }, - onFailure: (wtf) => { - console.log('failure', wtf); - } - }); - const handleGoogleLogin = () => { - signIn(); - }; - return ( - - ); + const { signIn, loaded } = useGoogleLogin({ + clientId: googleClientID, + onSuccess: ({ tokenId, ...rest }) => { + console.log("success", tokenId, rest); + login({ + id_token: tokenId, + type: "google", + }); + }, + onFailure: (wtf) => { + console.log("failure", wtf); + }, + }); + const handleGoogleLogin = () => { + signIn(); + }; + return ( + + ); } diff --git a/src/routes/login/MetamaskLoginButton.js b/src/routes/login/MetamaskLoginButton.js index a47c97da..af85f97f 100644 --- a/src/routes/login/MetamaskLoginButton.js +++ b/src/routes/login/MetamaskLoginButton.js @@ -2,6 +2,7 @@ import { useState, useEffect, useRef } from "react"; import MetaMaskOnboarding from "@metamask/onboarding"; import { useLazyGetMetamaskNonceQuery } from "../../app/services/auth"; +import metamaskSvg from "../../assets/icons/metamask.svg?url"; export default function MetamaskLoginButton({ login }) { const [requesting, setRequesting] = useState(false); const [getNonce] = useLazyGetMetamaskNonceQuery(); @@ -48,11 +49,7 @@ export default function MetamaskLoginButton({ login }) { href="#" className="btn social" > - meta mask icon + meta mask icon Sign in with MetaMask ); diff --git a/src/routes/login/SolidLoginButton.js b/src/routes/login/SolidLoginButton.js index abbe057f..c97e68d1 100644 --- a/src/routes/login/SolidLoginButton.js +++ b/src/routes/login/SolidLoginButton.js @@ -1,6 +1,7 @@ /* eslint-disable no-undef */ import { useEffect } from "react"; import { useGetOpenidMutation } from "../../app/services/auth"; +import solidSvg from "../../assets/icons/solid.svg?url"; export default function SolidLoginButton() { const [getOpenId, { data, isLoading, isSuccess }] = useGetOpenidMutation(); @@ -26,11 +27,7 @@ export default function SolidLoginButton() { href="#" className="btn social" > - solid logo icon + solid icon {isLoading ? `Redirecting...` : `Sign in with Solid`} ); diff --git a/src/routes/login/index.js b/src/routes/login/index.js index 94983a04..fa15122c 100644 --- a/src/routes/login/index.js +++ b/src/routes/login/index.js @@ -1,11 +1,11 @@ /* eslint-disable no-undef */ import { useState, useEffect } from "react"; -import StyledWrapper from "./styled"; import { useDispatch } from "react-redux"; import { useNavigate } from "react-router-dom"; import toast from "react-hot-toast"; - +import BASE_URL from "../../app/config"; // import web3 from "web3"; +import StyledWrapper from "./styled"; import MetamaskLoginButton from "./MetamaskLoginButton"; import SolidLoginButton from "./SolidLoginButton"; @@ -88,7 +88,7 @@ export default function LoginPage() {
    logo diff --git a/src/routes/login/styled.js b/src/routes/login/styled.js index 643f3c6a..561167ff 100644 --- a/src/routes/login/styled.js +++ b/src/routes/login/styled.js @@ -1,103 +1,105 @@ -import styled from 'styled-components'; +import styled from "styled-components"; const StyledWrapper = styled.div` - display: flex; - justify-content: center; - align-items: center; - height: 100vh; - .form { - padding: 36px 40px 32px 40px; - /* border: 1px solid #eee; */ - box-shadow: 0px 4px 8px -2px rgba(16, 24, 40, 0.1), 0px 2px 4px -2px rgba(16, 24, 40, 0.06); - border-radius: 12px; - .tips { - display: flex; - flex-direction: column; - align-items: center; - padding-bottom: 24px; - .logo { - width: 56px; - height: 56px; - margin-bottom: 28px; - } - .title { - font-weight: 600; - font-size: 24px; - line-height: 32px; - color: #101828; - margin-bottom: 8px; - } - } - .desc { - font-weight: normal; - font-size: 16px; - line-height: 24px; - color: #667085; - } - form { - display: flex; - flex-direction: column; - gap: 20px; - input { - width: 360px; - background: #ffffff; - border: 1px solid #d0d5dd; - box-shadow: 0px 1px 2px rgba(16, 24, 40, 0.05); - border-radius: 8px; - padding: 10px 14px; - font-weight: normal; - font-size: 16px; - line-height: 24px; - color: #667085; - } - } - .or { - border: none; - position: relative; - height: 1px; - background-color: #e4e7ec; - margin: 26px 0; - &:after { - padding: 4px; - background-color: #fff; - content: 'OR'; - position: absolute; - left: 50%; - top: 50%; - transform: translate3d(-50%, -50%, 0); - font-size: 14px; - line-height: 20px; - color: #667085; - } - } - .btn { - display: inline-block; - text-align: center; - width: 100%; - font-weight: 500; - font-size: 16px; - line-height: 24px; - color: #ffffff; - padding: 10px; - background: #1fe1f9; - border: 1px solid #1fe1f9; - box-shadow: 0px 1px 2px rgba(16, 24, 40, 0.05); - border-radius: 8px; - &.social { - margin-bottom: 16px; - display: flex; - align-items: center; - justify-content: center; - gap: 12px; - color: #344054; - border-color: #d0d5dd; - background: none; - .icon { - width: 24px; - height: 24px; + display: flex; + justify-content: center; + align-items: center; + height: 100vh; + .form { + padding: 36px 40px 32px 40px; + /* border: 1px solid #eee; */ + box-shadow: 0px 4px 8px -2px rgba(16, 24, 40, 0.1), + 0px 2px 4px -2px rgba(16, 24, 40, 0.06); + border-radius: 12px; + .tips { + display: flex; + flex-direction: column; + align-items: center; + padding-bottom: 24px; + .logo { + width: 56px; + height: 56px; + margin-bottom: 28px; + border-radius: 50%; + } + .title { + font-weight: 600; + font-size: 24px; + line-height: 32px; + color: #101828; + margin-bottom: 8px; + } + } + .desc { + font-weight: normal; + font-size: 16px; + line-height: 24px; + color: #667085; + } + form { + display: flex; + flex-direction: column; + gap: 20px; + input { + width: 360px; + background: #ffffff; + border: 1px solid #d0d5dd; + box-shadow: 0px 1px 2px rgba(16, 24, 40, 0.05); + border-radius: 8px; + padding: 10px 14px; + font-weight: normal; + font-size: 16px; + line-height: 24px; + color: #667085; + } + } + .or { + border: none; + position: relative; + height: 1px; + background-color: #e4e7ec; + margin: 26px 0; + &:after { + padding: 4px; + background-color: #fff; + content: "OR"; + position: absolute; + left: 50%; + top: 50%; + transform: translate3d(-50%, -50%, 0); + font-size: 14px; + line-height: 20px; + color: #667085; + } + } + .btn { + display: inline-block; + text-align: center; + width: 100%; + font-weight: 500; + font-size: 16px; + line-height: 24px; + color: #ffffff; + padding: 10px; + background: #1fe1f9; + border: 1px solid #1fe1f9; + box-shadow: 0px 1px 2px rgba(16, 24, 40, 0.05); + border-radius: 8px; + &.social { + margin-bottom: 16px; + display: flex; + align-items: center; + justify-content: center; + gap: 12px; + color: #344054; + border-color: #d0d5dd; + background: none; + .icon { + width: 24px; + height: 24px; + } + } } - } } - } `; export default StyledWrapper;