From 81aa70b20cfd9bd66e45f87cb2d09ad9fd42e893 Mon Sep 17 00:00:00 2001 From: master1lan <278457198@qq.com> Date: Wed, 18 Jan 2023 17:25:05 +0800 Subject: [PATCH] version 0.01 --- src/components/image/image.module.less | 6 ++- src/routers/layout/index.tsx | 16 ++++-- src/routers/layout/layout.module.less | 31 ++++++++---- src/routers/layout/logo.tsx | 35 +++++++++++-- src/routers/layout/nav/index.tsx | 69 ++++++++++++++------------ src/routers/layout/nav/nav.module.less | 2 +- src/routers/layout/nav/tools.ts | 10 ++-- src/routers/video/index.tsx | 3 +- src/routers/video/masonry.tsx | 14 ++++-- src/routers/video/tools.ts | 2 +- src/store/index.ts | 2 + src/store/loading/index.ts | 41 +++++++++++++++ src/utils/fetch/index.ts | 2 +- 13 files changed, 169 insertions(+), 64 deletions(-) create mode 100644 src/store/loading/index.ts diff --git a/src/components/image/image.module.less b/src/components/image/image.module.less index 48f3088..33ed9ed 100644 --- a/src/components/image/image.module.less +++ b/src/components/image/image.module.less @@ -5,6 +5,7 @@ outline: 0.5px solid rgba(0, 0, 0, .05); height: 100%; + &>img { width: 100%; height: 100%; @@ -14,6 +15,9 @@ transition: transform .3s linear; aspect-ratio: 16/9; - &:hover {} + &:hover { + transition: filter .3s ease-in-out; + filter: brightness(.8); + } } } \ No newline at end of file diff --git a/src/routers/layout/index.tsx b/src/routers/layout/index.tsx index 843dfd8..3f5ab14 100644 --- a/src/routers/layout/index.tsx +++ b/src/routers/layout/index.tsx @@ -17,12 +17,20 @@ export default function Layout() { decisionData={showed} spring={"veryGentle"} className={styles["container"]} + staggerConfig={{ + default: { + reverse: false, + speed: 0.8, + }, + }} >
- - + + + +
a:only-child { - display: block; + display: flex; position: relative; + flex-flow: row-reverse nowrap; + align-items: center; + padding: 5px 0; h1 { - position: absolute; - top: 50%; - left: 50%; - transform: translate(-50%, -50%); + margin: 0; white-space: nowrap; button { @@ -50,14 +57,16 @@ padding: 15px 10px; max-width: 400px; width: 90%; - max-height: 400px; - overflow-y: auto; - overflow-x: hidden; - //todo 优化fq + + + ul { display: flex; flex-flow: column nowrap; + max-height: 60vh; + overflow-y: auto; + overflow-x: hidden; } li { @@ -67,7 +76,7 @@ &>p:not(:last-of-type) { margin-bottom: 12px; - + color: grey; } &>p { diff --git a/src/routers/layout/logo.tsx b/src/routers/layout/logo.tsx index a5c3f40..b7e1f59 100644 --- a/src/routers/layout/logo.tsx +++ b/src/routers/layout/logo.tsx @@ -1,4 +1,4 @@ -import { Button, Modal } from "@mui/material"; +import { Button, Modal, styled } from "@mui/material"; import { FC, useState } from "react"; import { Link } from "react-router-dom"; import styles from "./layout.module.less"; @@ -9,7 +9,7 @@ export default function LOGO() { return (
-

+

EOEfans-web端

- - + + ); } +const H1 = styled("h1")(({ theme }) => ({ + fontSize: "24px", + [theme.breakpoints.down("sm")]: { + fontSize: "15px", + }, +})); //todo 修改logo diff --git a/src/routers/layout/nav/index.tsx b/src/routers/layout/nav/index.tsx index 8cbeaa7..d17645d 100644 --- a/src/routers/layout/nav/index.tsx +++ b/src/routers/layout/nav/index.tsx @@ -1,4 +1,5 @@ -import { Button, Stack } from "@mui/material"; +import { Stack } from "@mui/material"; +import Button from "@mui/lab/LoadingButton"; import { useInView } from "react-intersection-observer"; import SegmentIcon from "@mui/icons-material/Segment"; import CloseFullscreenIcon from "@mui/icons-material/CloseFullscreen"; @@ -17,11 +18,11 @@ import { restrictToParentElement } from "@dnd-kit/modifiers"; import styles from "./nav.module.less"; import { FC, useMemo, memo } from "react"; import { Flipped } from "react-flip-toolkit"; -import { NavQueryItemType, useNavList } from "./tools"; -import { NavStorage } from "./tools"; +import { NavQueryItemType, useNavList, NavStorage } from "./tools"; import { useAppSelector, useAppDispatch } from "@store/hooks"; import { changeNavMoreShowed, selectNavMoreShowed } from "@store/device/index"; -import { getVersion } from "../../../utils/index"; +import { getVersion } from "@utils/index"; +import { selectVideoLoadingState } from "@store/loading/index"; import { handerAddTag, handerDeleteTag, @@ -75,31 +76,29 @@ export default function Header_Nav() { [navLists] ); return ( - -
- - - - {ComRes} - - - - -
-
+
+ + + + {ComRes} + + + + +
); } @@ -145,7 +144,7 @@ const NavItem: FC = memo((props) => { transition, }; return ( - +
@@ -165,18 +164,24 @@ const NavTagChipItem: FC = memo((props) => { dispatch(handerAddTag(props)); } }, + isVideoFetching = useAppSelector(selectVideoLoadingState), //@ts-ignore color = nameToColor[props.query] || "info"; - //todo 修改颜色,我感觉这个颜色应该会蛮难写的 return (