diff --git a/src/assets/base.css b/src/assets/base.css deleted file mode 100644 index 104c3b22..00000000 --- a/src/assets/base.css +++ /dev/null @@ -1,31 +0,0 @@ -::-webkit-scrollbar-thumb { - background: #ddd; - border-radius: 4px; -} - -::-webkit-scrollbar { - background: transparent; - width: 5px; - height: 5px; -} - -:root { - /* border radius */ - --br: 8px; - ---navs-bg: #e5e7eb; - ---body-bg: #f5f6f7; - ---chat-bg: #fff; - ---channel-text-color: #1c1c1e; - ---msg-text-color: #374151; -} - -/* @media (prefers-color-scheme: dark) { - :root{ - --br:8px; - ---navs-bg:#121926; - ---body-bg:#1F2A37; - ---chat-bg:#384250; - ---channel-text-color:#fff; - ---msg-text-color:#fff; - } - } */ diff --git a/src/assets/index.css b/src/assets/index.css index b5c61c95..d0ddce7c 100644 --- a/src/assets/index.css +++ b/src/assets/index.css @@ -1,3 +1,24 @@ @tailwind base; @tailwind components; @tailwind utilities; + +::-webkit-scrollbar-thumb { + background: #ddd; + border-radius: 4px; +} + +::-webkit-scrollbar { + background: transparent; + width: 5px; + height: 5px; +} + +:root { + /* border radius */ + --br: 8px; + ---navs-bg: #e5e7eb; + ---body-bg: #f5f6f7; + ---chat-bg: #fff; + ---channel-text-color: #1c1c1e; + ---msg-text-color: #374151; +} diff --git a/src/common/component/ContextMenu.tsx b/src/common/component/ContextMenu.tsx index 543d22a6..943caf82 100644 --- a/src/common/component/ContextMenu.tsx +++ b/src/common/component/ContextMenu.tsx @@ -33,7 +33,7 @@ const ContextMenu: FC = ({ items = [], hideMenu = null }) => { } = item; return (
  • { evt.stopPropagation(); diff --git a/src/common/component/styled/Menu.tsx b/src/common/component/styled/Menu.tsx index 573457ed..284a6f14 100644 --- a/src/common/component/styled/Menu.tsx +++ b/src/common/component/styled/Menu.tsx @@ -42,7 +42,7 @@ const StyledMenu = styled.ul` } } } - &.underline { + &.bottom_line { margin-bottom: 9px; &:before { position: absolute; diff --git a/src/common/component/styled/Select.tsx b/src/common/component/styled/Select.tsx index 69e555df..fbd88e8c 100644 --- a/src/common/component/styled/Select.tsx +++ b/src/common/component/styled/Select.tsx @@ -66,7 +66,7 @@ const Select: FC = ({ options = [], updateSelect = null, current = null } return (
  • diff --git a/src/index.tsx b/src/index.tsx index f55afa1a..7313cb60 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -4,7 +4,7 @@ import toast, { Toaster } from "react-hot-toast"; import { Reset } from "styled-reset"; import { DndProvider } from "react-dnd"; import { HTML5Backend } from "react-dnd-html5-backend"; -import "./assets/base.css"; +import "./assets/index.css"; import "./common/DayjsSetting"; import "./common/TippySetting"; import { register } from "./serviceWorkerRegistration"; diff --git a/src/routes/chat/LoadMore.tsx b/src/routes/chat/LoadMore.tsx index 995596eb..e45c01da 100644 --- a/src/routes/chat/LoadMore.tsx +++ b/src/routes/chat/LoadMore.tsx @@ -1,20 +1,11 @@ import { useRef, useEffect, FC } from "react"; -import styled from "styled-components"; import { Waveform } from "@uiball/loaders"; -const Styled = styled.div` - margin-top: 80px; - display: flex; - justify-content: center; - align-items: center; - width: 100%; - padding: 30px 0; -`; type Props = { pullUp: () => Promise | null; }; const LoadMore: FC = ({ pullUp = null }) => { - const ref = useRef(); + const ref = useRef(null); useEffect(() => { const observer = new IntersectionObserver( (entries) => { @@ -29,9 +20,12 @@ const LoadMore: FC = ({ pullUp = null }) => { }, { threshold: 0 } ); - const currEle = ref?.current; - if (currEle) { - observer.observe(currEle); + let currEle: HTMLDivElement | null = null; + if (ref) { + currEle = ref.current; + if (currEle) { + observer.observe(currEle); + } } return () => { if (currEle) { @@ -40,9 +34,9 @@ const LoadMore: FC = ({ pullUp = null }) => { }; }, [ref, pullUp]); return ( - +
    - +
    ); }; export default LoadMore; diff --git a/src/routes/chat/SessionList/styled.tsx b/src/routes/chat/SessionList/styled.tsx index 2b04cfaa..ba656f66 100644 --- a/src/routes/chat/SessionList/styled.tsx +++ b/src/routes/chat/SessionList/styled.tsx @@ -25,6 +25,7 @@ const Styled = styled.ul` background-color: #eee; border-radius: 50%; img { + max-width: unset; width: 40px; height: 40px; &.channel_default { @@ -42,6 +43,9 @@ const Styled = styled.ul` align-items: center; justify-content: space-between; .name { + display: flex; + align-items: center; + gap: 2px; font-weight: 600; font-size: 14px; line-height: 20px; diff --git a/src/routes/home/Menu.tsx b/src/routes/home/Menu.tsx index 7ab9dc78..23a95b7e 100644 --- a/src/routes/home/Menu.tsx +++ b/src/routes/home/Menu.tsx @@ -17,18 +17,6 @@ const StyledMenus = styled.ul` align-items: center; padding: 10px; gap: 10px; - .icon { - width: 24px; - height: 24px; - transition: all 0.5s ease; - } - .txt { - color: #4b5563; - font-style: normal; - font-weight: 600; - font-size: 14px; - line-height: 20px; - } } `; type Props = {}; @@ -39,7 +27,7 @@ const Menu: FC = () => {
  • - setting icon + setting icon
  • diff --git a/src/routes/reg/EmailNextStepTip.tsx b/src/routes/reg/EmailNextStepTip.tsx index 47b6ce3f..3caec27c 100644 --- a/src/routes/reg/EmailNextStepTip.tsx +++ b/src/routes/reg/EmailNextStepTip.tsx @@ -1,34 +1,10 @@ -import styled from "styled-components"; - -const Styled = styled.div` - display: flex; - flex-direction: column; - align-items: center; - .title { - font-weight: 600; - font-size: 30px; - line-height: 38px; - color: #101828; - margin-bottom: 12px; - } - .desc { - text-align: center; - font-weight: 400; - font-size: 16px; - line-height: 24px; - color: #667085; - &:not(:last-child) { - margin-bottom: 24px; - } - } -`; export default function EmailNextTip() { return ( - -
    Magic link Sent
    -

    Login to your email client, and continue next step

    -

    You can close this window now.

    -
    +
    +
    Magic link Sent
    +

    Login to your email client, and continue next step

    +

    You can close this window now.

    +
    ); } diff --git a/src/routes/reg/ExpiredTip.tsx b/src/routes/reg/ExpiredTip.tsx index ad8cea60..7a2d8ca7 100644 --- a/src/routes/reg/ExpiredTip.tsx +++ b/src/routes/reg/ExpiredTip.tsx @@ -1,34 +1,10 @@ -import styled from "styled-components"; - -const Styled = styled.div` - display: flex; - flex-direction: column; - align-items: center; - .title { - font-weight: 600; - font-size: 30px; - line-height: 38px; - color: #101828; - margin-bottom: 12px; - } - .desc { - text-align: center; - font-weight: 400; - font-size: 16px; - line-height: 24px; - color: #667085; - &:not(:last-child) { - margin-bottom: 24px; - } - } -`; export default function ExpiredTip() { return ( - -
    Magic link expired
    -

    Go back to your original VoceChat tab and request a new magic link.

    -

    You can close this window now.

    -
    +
    +
    Magic link expired
    +

    Go back to your original VoceChat tab and request a new magic link.

    +

    You can close this window now.

    +
    ); }