build: add tailwind to webapp
This commit is contained in:
@@ -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;
|
|
||||||
}
|
|
||||||
} */
|
|
||||||
@@ -1,3 +1,24 @@
|
|||||||
@tailwind base;
|
@tailwind base;
|
||||||
@tailwind components;
|
@tailwind components;
|
||||||
@tailwind utilities;
|
@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;
|
||||||
|
}
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ const ContextMenu: FC<Props> = ({ items = [], hideMenu = null }) => {
|
|||||||
} = item;
|
} = item;
|
||||||
return (
|
return (
|
||||||
<li
|
<li
|
||||||
className={`item ${underline ? "underline" : ""} ${danger ? "danger" : ""}`}
|
className={`item ${underline ? "bottom_line" : ""} ${danger ? "danger" : ""}`}
|
||||||
key={title}
|
key={title}
|
||||||
onClick={(evt) => {
|
onClick={(evt) => {
|
||||||
evt.stopPropagation();
|
evt.stopPropagation();
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ const StyledMenu = styled.ul`
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
&.underline {
|
&.bottom_line {
|
||||||
margin-bottom: 9px;
|
margin-bottom: 9px;
|
||||||
&:before {
|
&:before {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ const Select: FC<Props> = ({ options = [], updateSelect = null, current = null }
|
|||||||
return (
|
return (
|
||||||
<li
|
<li
|
||||||
onClick={selected ? undefined : handleSelect.bind(null, { title, value })}
|
onClick={selected ? undefined : handleSelect.bind(null, { title, value })}
|
||||||
className={`item sb ${underline ? "underline" : ""}`}
|
className={`item sb ${underline ? "bottom_line" : ""}`}
|
||||||
data-disabled={selected}
|
data-disabled={selected}
|
||||||
key={value}
|
key={value}
|
||||||
>
|
>
|
||||||
|
|||||||
+1
-1
@@ -4,7 +4,7 @@ import toast, { Toaster } from "react-hot-toast";
|
|||||||
import { Reset } from "styled-reset";
|
import { Reset } from "styled-reset";
|
||||||
import { DndProvider } from "react-dnd";
|
import { DndProvider } from "react-dnd";
|
||||||
import { HTML5Backend } from "react-dnd-html5-backend";
|
import { HTML5Backend } from "react-dnd-html5-backend";
|
||||||
import "./assets/base.css";
|
import "./assets/index.css";
|
||||||
import "./common/DayjsSetting";
|
import "./common/DayjsSetting";
|
||||||
import "./common/TippySetting";
|
import "./common/TippySetting";
|
||||||
import { register } from "./serviceWorkerRegistration";
|
import { register } from "./serviceWorkerRegistration";
|
||||||
|
|||||||
@@ -1,20 +1,11 @@
|
|||||||
import { useRef, useEffect, FC } from "react";
|
import { useRef, useEffect, FC } from "react";
|
||||||
import styled from "styled-components";
|
|
||||||
import { Waveform } from "@uiball/loaders";
|
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 = {
|
type Props = {
|
||||||
pullUp: () => Promise<void> | null;
|
pullUp: () => Promise<void> | null;
|
||||||
};
|
};
|
||||||
const LoadMore: FC<Props> = ({ pullUp = null }) => {
|
const LoadMore: FC<Props> = ({ pullUp = null }) => {
|
||||||
const ref = useRef<HTMLDivElement>();
|
const ref = useRef<HTMLDivElement | null>(null);
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const observer = new IntersectionObserver(
|
const observer = new IntersectionObserver(
|
||||||
(entries) => {
|
(entries) => {
|
||||||
@@ -29,9 +20,12 @@ const LoadMore: FC<Props> = ({ pullUp = null }) => {
|
|||||||
},
|
},
|
||||||
{ threshold: 0 }
|
{ threshold: 0 }
|
||||||
);
|
);
|
||||||
const currEle = ref?.current;
|
let currEle: HTMLDivElement | null = null;
|
||||||
if (currEle) {
|
if (ref) {
|
||||||
observer.observe(currEle);
|
currEle = ref.current;
|
||||||
|
if (currEle) {
|
||||||
|
observer.observe(currEle);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return () => {
|
return () => {
|
||||||
if (currEle) {
|
if (currEle) {
|
||||||
@@ -40,9 +34,9 @@ const LoadMore: FC<Props> = ({ pullUp = null }) => {
|
|||||||
};
|
};
|
||||||
}, [ref, pullUp]);
|
}, [ref, pullUp]);
|
||||||
return (
|
return (
|
||||||
<Styled ref={ref}>
|
<div className="mt-20 flex justify-center items-center w-full py-7" ref={ref}>
|
||||||
<Waveform size={24} lineWeight={5} speed={1} color="#ccc" />
|
<Waveform size={24} lineWeight={5} speed={1} color="#ccc" />
|
||||||
</Styled>
|
</div>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
export default LoadMore;
|
export default LoadMore;
|
||||||
|
|||||||
@@ -25,6 +25,7 @@ const Styled = styled.ul`
|
|||||||
background-color: #eee;
|
background-color: #eee;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
img {
|
img {
|
||||||
|
max-width: unset;
|
||||||
width: 40px;
|
width: 40px;
|
||||||
height: 40px;
|
height: 40px;
|
||||||
&.channel_default {
|
&.channel_default {
|
||||||
@@ -42,6 +43,9 @@ const Styled = styled.ul`
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
.name {
|
.name {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 2px;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
line-height: 20px;
|
line-height: 20px;
|
||||||
|
|||||||
@@ -17,18 +17,6 @@ const StyledMenus = styled.ul`
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
gap: 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 = {};
|
type Props = {};
|
||||||
@@ -39,7 +27,7 @@ const Menu: FC<Props> = () => {
|
|||||||
<li className="menu link_navs">
|
<li className="menu link_navs">
|
||||||
<NavLink className="link" to={`/setting?f=${pathname}`}>
|
<NavLink className="link" to={`/setting?f=${pathname}`}>
|
||||||
<Tooltip placement="right" tip="Settings">
|
<Tooltip placement="right" tip="Settings">
|
||||||
<img src={settingIcon} alt="setting icon" className="icon" />
|
<img src={settingIcon} alt="setting icon" className="w-6 h-6 max-w-[unset]" />
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
</NavLink>
|
</NavLink>
|
||||||
</li>
|
</li>
|
||||||
|
|||||||
@@ -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() {
|
export default function EmailNextTip() {
|
||||||
return (
|
return (
|
||||||
<Styled>
|
<div className="flex flex-col items-center">
|
||||||
<div className="title">Magic link Sent</div>
|
<div className="font-bold text-3xl text-gray-800 mt-3">Magic link Sent</div>
|
||||||
<p className="desc">Login to your email client, and continue next step</p>
|
<p className="text-center text-gray-400 mb-6">Login to your email client, and continue next step</p>
|
||||||
<p className="desc">You can close this window now.</p>
|
<p className="text-center text-gray-400">You can close this window now.</p>
|
||||||
</Styled>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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() {
|
export default function ExpiredTip() {
|
||||||
return (
|
return (
|
||||||
<Styled>
|
<div className="flex flex-col items-center">
|
||||||
<div className="title">Magic link expired</div>
|
<div className="font-bold text-3xl text-gray-800 mt-3">Magic link expired</div>
|
||||||
<p className="desc">Go back to your original VoceChat tab and request a new magic link.</p>
|
<p className="text-center text-gray-400 mb-6">Go back to your original VoceChat tab and request a new magic link.</p>
|
||||||
<p className="desc">You can close this window now.</p>
|
<p className="text-center text-gray-400">You can close this window now.</p>
|
||||||
</Styled>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user