chore: fix tiny UIs
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<svg width="16" height="12" viewBox="0 0 16 12" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<svg width="16" height="12" viewBox="0 0 16 12" fill="#78787C" xmlns="http://www.w3.org/2000/svg">
|
||||
<g clip-path="url(#clip0_9046_23916)">
|
||||
<path d="M4.93942 9.69781L1.62578 6.38648C1.25336 6.01431 0.651746 6.01431 0.27932 6.38648C-0.0931066 6.75865 -0.0931066 7.35984 0.27932 7.73201L4.27096 11.7209C4.64339 12.093 5.245 12.093 5.61743 11.7209L15.7207 1.62465C16.0931 1.25248 16.0931 0.651292 15.7207 0.279125C15.3483 -0.0930417 14.7466 -0.0930417 14.3742 0.279125L4.93942 9.69781Z" fill="#78787C"/>
|
||||
<path d="M4.93942 9.69781L1.62578 6.38648C1.25336 6.01431 0.651746 6.01431 0.27932 6.38648C-0.0931066 6.75865 -0.0931066 7.35984 0.27932 7.73201L4.27096 11.7209C4.64339 12.093 5.245 12.093 5.61743 11.7209L15.7207 1.62465C16.0931 1.25248 16.0931 0.651292 15.7207 0.279125C15.3483 -0.0930417 14.7466 -0.0930417 14.3742 0.279125L4.93942 9.69781Z"/>
|
||||
</g>
|
||||
<defs>
|
||||
<clipPath id="clip0_9046_23916">
|
||||
|
||||
|
Before Width: | Height: | Size: 612 B After Width: | Height: | Size: 600 B |
@@ -96,7 +96,7 @@ const MemberList: FC<Props> = ({ cid }) => {
|
||||
})}
|
||||
>
|
||||
{t("admin")}
|
||||
{is_admin && <IconCheck className="icon" />}
|
||||
{is_admin && <IconCheck className="icon dark:fill-white" />}
|
||||
</li>
|
||||
<li
|
||||
className="item sb"
|
||||
@@ -107,7 +107,7 @@ const MemberList: FC<Props> = ({ cid }) => {
|
||||
})}
|
||||
>
|
||||
{t("user")}
|
||||
{!is_admin && <IconCheck className="icon" />}
|
||||
{!is_admin && <IconCheck className="icon dark:fill-white" />}
|
||||
</li>
|
||||
</ul>
|
||||
}
|
||||
|
||||
@@ -24,9 +24,9 @@ const UsersModal: FC<Props> = ({ closeModal }) => {
|
||||
|
||||
return (
|
||||
<Modal>
|
||||
<div className="flex flex-col w-80 md:w-[440px] max-h-[402px] bg-white drop-shadow rounded-lg" ref={wrapperRef}>
|
||||
<div className="flex flex-col w-80 md:w-[440px] max-h-[402px] bg-white dark:bg-gray-900 drop-shadow rounded-lg" ref={wrapperRef}>
|
||||
<div className="shadow-md p-2">
|
||||
<input className=" p-2 text-sm" value={input} onChange={handleSearch} placeholder={t("search_user_placeholder")} />
|
||||
<input className="p-2 text-sm bg-transparent dark:text-white" value={input} onChange={handleSearch} placeholder={t("search_user_placeholder")} />
|
||||
</div>
|
||||
{users && (
|
||||
<ul className="flex flex-col overflow-y-scroll h-[260px] py-4">
|
||||
|
||||
@@ -59,7 +59,7 @@ const Select: FC<Props> = ({ options = [], updateSelect = null, current = null }
|
||||
}
|
||||
>
|
||||
<div className="select-none border border-solid border-slate-200 p-2 flex items-center gap-2" onClick={toggleVisible}>
|
||||
<span className="text-sm text-gray-500 min-w-[76px]">{(current !== null ? current : curr)?.title || t("action.select")}</span>
|
||||
<span className="text-sm text-gray-500 dark:text-gray-200 min-w-[76px]">{(current !== null ? current : curr)?.title || t("action.select")}</span>
|
||||
<IconArrow className="!w-5 !h-5" />
|
||||
</div>
|
||||
</Tippy>
|
||||
|
||||
@@ -37,7 +37,6 @@ const getQueryString = (params: { [key: string]: string }) => {
|
||||
};
|
||||
|
||||
let SSE: EventSource | undefined;
|
||||
// let connectionIsOpen = false;
|
||||
// let opened = false; //标识SSE打开过
|
||||
let aliveInter: number | ReturnType<typeof setTimeout> = 0;
|
||||
export default function useStreaming() {
|
||||
@@ -59,7 +58,7 @@ export default function useStreaming() {
|
||||
console.info("debug SSE: clear prev timeout", aliveInter);
|
||||
aliveInter = setTimeout(() => {
|
||||
console.info("debug SSE: start reconnect");
|
||||
// 有网的情况再试
|
||||
// 判断有网再试
|
||||
if (navigator.onLine) {
|
||||
console.info("debug SSE: start reconnect onLine");
|
||||
// 重启连接
|
||||
@@ -71,10 +70,6 @@ export default function useStreaming() {
|
||||
console.info("debug SSE: start new timeout", aliveInter);
|
||||
};
|
||||
const startStreaming = useCallback(async () => {
|
||||
// if (connectionIsOpen) {
|
||||
// console.log("connection is open, return");
|
||||
// return;
|
||||
// };
|
||||
console.info("debug SSE: clear timeout at startStreaming", aliveInter);
|
||||
clearTimeout(aliveInter);
|
||||
if (SSE && (SSE.readyState === EventSource.OPEN || SSE.readyState === EventSource.CONNECTING)) {
|
||||
|
||||
@@ -33,6 +33,7 @@ export default function Register() {
|
||||
|
||||
// const navigateTo = useNavigate();
|
||||
const [input, setInput] = useState<AuthForm>({
|
||||
name: "",
|
||||
email: "",
|
||||
password: "",
|
||||
confirmPassword: ""
|
||||
|
||||
@@ -29,7 +29,7 @@ export default function Overview() {
|
||||
const isAdmin = loginUser?.is_admin;
|
||||
|
||||
return (
|
||||
<div className="relative w-full md:w-[512px] h-full flex flex-col gap-6">
|
||||
<div className="relative w-full md:w-[512px] flex flex-col gap-6">
|
||||
<Server />
|
||||
{isAdmin && (
|
||||
<>
|
||||
|
||||
Reference in New Issue
Block a user