From 5417cf3ade04bd44301c67c628dd68d0c7b904e1 Mon Sep 17 00:00:00 2001 From: master1lan <278457198@qq.com> Date: Mon, 16 Jan 2023 21:30:04 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=A2=9C=E8=89=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/proview/themePreview.tsx | 39 +++++++++++++++ src/routers/layout/header.tsx | 22 +++------ src/routers/layout/index.tsx | 8 +-- src/routers/layout/layout.module.less | 31 ++++++++++-- src/routers/layout/logo.tsx | 66 +++++++++++++++++++++---- src/routers/layout/nav/index.tsx | 15 +++++- src/routers/layout/nav/nav.module.less | 1 + src/routers/layout/nav/tools.ts | 4 ++ src/routers/video/masonry.tsx | 31 ++---------- src/routers/video/tools.ts | 46 +++++++++++++++++ src/routers/video/video.module.less | 11 +++++ src/utils/fetch/fetchtype.ts | 2 +- src/utils/fetch/index.ts | 2 +- 13 files changed, 212 insertions(+), 66 deletions(-) create mode 100644 src/routers/video/tools.ts diff --git a/src/components/proview/themePreview.tsx b/src/components/proview/themePreview.tsx index 5040725..eddd857 100644 --- a/src/components/proview/themePreview.tsx +++ b/src/components/proview/themePreview.tsx @@ -1,10 +1,49 @@ +//@ts-nocheck import React from "react"; import { ThemeProvider, createTheme } from "@mui/material/styles"; import { ReactChildrenType } from "./type"; +declare module "@mui/material/styles" { + interface Palette { + palette: { + luzao: Palette["primary"]; + minuo: Palette["primary"]; + waner: Palette["primary"]; + yumo: Palette["primary"]; + youen: Palette["primary"]; + yituo: Palette["primary"]; + }; + } + interface PaletteOptions { + luzao: Palette["primary"]; + minuo: Palette["primary"]; + waner: Palette["primary"]; + yumo: Palette["primary"]; + youen: Palette["primary"]; + yituo: Palette["primary"]; + } +} +declare module "@mui/material/Button" { + interface ButtonPropsColorOverrides { + luzao: true; + minuo: true; + waner: true; + yumo: true; + youen: true; + yituo: true; + } +} const theme = createTheme({ typography: { fontFamily: "Proxima Soft", }, + palette: { + luzao: { main: "#3dff9e", contrastText: "#fff" }, + minuo: { main: "#f068B0", contrastText: "#fff" }, + waner: { main: "#1eafe4", contrastText: "#fff" }, + yumo: { main: "#b77fdd", contrastText: "#fff" }, + youen: { main: "#EB6346", contrastText: "#fff" }, + yituo: { main: "#49d4ba", contrastText: "#fff" }, + }, }); const MUIThemePreview = ({ children }: ReactChildrenType) => { diff --git a/src/routers/layout/header.tsx b/src/routers/layout/header.tsx index 3f6ba06..e9f5052 100644 --- a/src/routers/layout/header.tsx +++ b/src/routers/layout/header.tsx @@ -5,21 +5,15 @@ import LOGO from "./logo"; import RightSide from "./rightSide"; import Search from "./search"; export default function Header() { - const { focused } = useSearchFocus(); + // const { focused } = useSearchFocus(); return ( - -
- {!focused && } + // +
+ {/* {!focused && } - {!focused && } -
-
+ {!focused && } */} + +
+ //
); } -//todo 换掉header diff --git a/src/routers/layout/index.tsx b/src/routers/layout/index.tsx index 20d8952..843dfd8 100644 --- a/src/routers/layout/index.tsx +++ b/src/routers/layout/index.tsx @@ -9,6 +9,7 @@ import styles from "./layout.module.less"; export default function Layout() { const showed = useAppSelector(selectNavMoreShowed), { focused } = useSearchFocus(); + return ( <>
-