From 3b724e4678e2fd1c349f7b6c1ae2983686dc070a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Liu=20=E5=AE=87=E9=98=B3?= Date: Sat, 9 Nov 2024 20:17:20 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=A7=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Header/index.tsx | 90 +++++++++---------- src/components/RouteList/index.tsx | 2 - src/components/Sidebar/index.tsx | 24 +---- .../components/NewOldVisitors/ChartTwo.tsx | 0 .../components/NewOldVisitors/chart.d.ts | 0 .../Stats/components/NewOldVisitors/index.tsx | 0 .../components/VisitorsStatisChat/index.tsx | 0 .../components/VisitorsStatisChat/type.d.ts | 0 .../components}/Stats/index.tsx | 0 .../components}/Stats/type.d.ts | 0 src/pages/Dashboard/index.tsx | 5 +- tailwind.config.cjs | 1 + 12 files changed, 48 insertions(+), 74 deletions(-) rename src/pages/{ => Dashboard/components}/Stats/components/NewOldVisitors/ChartTwo.tsx (100%) rename src/pages/{ => Dashboard/components}/Stats/components/NewOldVisitors/chart.d.ts (100%) rename src/pages/{ => Dashboard/components}/Stats/components/NewOldVisitors/index.tsx (100%) rename src/pages/{ => Dashboard/components}/Stats/components/VisitorsStatisChat/index.tsx (100%) rename src/pages/{ => Dashboard/components}/Stats/components/VisitorsStatisChat/type.d.ts (100%) rename src/pages/{ => Dashboard/components}/Stats/index.tsx (100%) rename src/pages/{ => Dashboard/components}/Stats/type.d.ts (100%) diff --git a/src/components/Header/index.tsx b/src/components/Header/index.tsx index 0656284..b0d12fb 100644 --- a/src/components/Header/index.tsx +++ b/src/components/Header/index.tsx @@ -1,9 +1,7 @@ import { Link } from 'react-router-dom'; -import DropdownMessage from './DropdownComment'; -import DropdownNotification from './DropdownNotification'; import DropdownUser from './DropdownUser'; -import LogoIcon from '../../images/logo/logo-icon.svg'; import DarkModeSwitcher from './DarkModeSwitcher'; +import logo from '@/images/logo/logo.png' const Header = (props: { sidebarOpen: string | boolean | undefined; @@ -12,55 +10,55 @@ const Header = (props: { return (
-
- {/* */} - - {/* */} + - - Logo - + + logo + +
+ +
再渺小的星光,也有属于他的光芒!
-
再渺小的星光,也有属于他的光芒!
-
    -
  • +
  • 开源不易,赏个Star吧!!!
  • diff --git a/src/components/RouteList/index.tsx b/src/components/RouteList/index.tsx index d1cfde0..a6eb126 100644 --- a/src/components/RouteList/index.tsx +++ b/src/components/RouteList/index.tsx @@ -15,7 +15,6 @@ import Footprint from '@/pages/Footprint'; import Setup from '@/pages/Setup'; import Rss from '@/pages/Rss'; import File from "@/pages/File"; -import Stats from '@/pages/Stats'; import Iterative from '@/pages/Iterative'; import Page from '@/pages/Route'; import Role from '@/pages/Role'; @@ -51,7 +50,6 @@ export default () => { { path: "/role", title: "角色管理", component: }, { path: "/rss", title: "订阅中心", component: }, { path: "/file", title: "文件管理", component: }, - { path: "/stats", title: "数据可视化", component: }, { path: "/iter", title: "项目更新记录", component: }, { path: "/work", title: "工作台", component: }, ]; diff --git a/src/components/Sidebar/index.tsx b/src/components/Sidebar/index.tsx index 5c25e00..4a2835b 100644 --- a/src/components/Sidebar/index.tsx +++ b/src/components/Sidebar/index.tsx @@ -30,7 +30,6 @@ const Sidebar = ({ sidebarOpen, setSidebarOpen }: SidebarProps) => { storedSidebarExpanded === null ? false : storedSidebarExpanded === 'true' ); - // close on click outside useEffect(() => { const clickHandler = ({ target }: MouseEvent) => { if (!sidebar.current || !trigger.current) return; @@ -46,7 +45,6 @@ const Sidebar = ({ sidebarOpen, setSidebarOpen }: SidebarProps) => { return () => document.removeEventListener('click', clickHandler); }); - // close if the esc key is pressed useEffect(() => { const keyHandler = ({ keyCode }: KeyboardEvent) => { if (!sidebarOpen || keyCode !== 27) return; @@ -206,12 +204,6 @@ const Sidebar = ({ sidebarOpen, setSidebarOpen }: SidebarProps) => { icon: , name: "文件系统" }, - { - to: "/stats", - path: "stats", - icon: , - name: "数据可视化" - }, { to: "/iter", path: "iter", @@ -268,21 +260,7 @@ const Sidebar = ({ sidebarOpen, setSidebarOpen }: SidebarProps) => { aria-controls="sidebar" aria-expanded={sidebarOpen} className="block lg:hidden" - > - - - - + />
diff --git a/src/pages/Stats/components/NewOldVisitors/ChartTwo.tsx b/src/pages/Dashboard/components/Stats/components/NewOldVisitors/ChartTwo.tsx similarity index 100% rename from src/pages/Stats/components/NewOldVisitors/ChartTwo.tsx rename to src/pages/Dashboard/components/Stats/components/NewOldVisitors/ChartTwo.tsx diff --git a/src/pages/Stats/components/NewOldVisitors/chart.d.ts b/src/pages/Dashboard/components/Stats/components/NewOldVisitors/chart.d.ts similarity index 100% rename from src/pages/Stats/components/NewOldVisitors/chart.d.ts rename to src/pages/Dashboard/components/Stats/components/NewOldVisitors/chart.d.ts diff --git a/src/pages/Stats/components/NewOldVisitors/index.tsx b/src/pages/Dashboard/components/Stats/components/NewOldVisitors/index.tsx similarity index 100% rename from src/pages/Stats/components/NewOldVisitors/index.tsx rename to src/pages/Dashboard/components/Stats/components/NewOldVisitors/index.tsx diff --git a/src/pages/Stats/components/VisitorsStatisChat/index.tsx b/src/pages/Dashboard/components/Stats/components/VisitorsStatisChat/index.tsx similarity index 100% rename from src/pages/Stats/components/VisitorsStatisChat/index.tsx rename to src/pages/Dashboard/components/Stats/components/VisitorsStatisChat/index.tsx diff --git a/src/pages/Stats/components/VisitorsStatisChat/type.d.ts b/src/pages/Dashboard/components/Stats/components/VisitorsStatisChat/type.d.ts similarity index 100% rename from src/pages/Stats/components/VisitorsStatisChat/type.d.ts rename to src/pages/Dashboard/components/Stats/components/VisitorsStatisChat/type.d.ts diff --git a/src/pages/Stats/index.tsx b/src/pages/Dashboard/components/Stats/index.tsx similarity index 100% rename from src/pages/Stats/index.tsx rename to src/pages/Dashboard/components/Stats/index.tsx diff --git a/src/pages/Stats/type.d.ts b/src/pages/Dashboard/components/Stats/type.d.ts similarity index 100% rename from src/pages/Stats/type.d.ts rename to src/pages/Dashboard/components/Stats/type.d.ts diff --git a/src/pages/Dashboard/index.tsx b/src/pages/Dashboard/index.tsx index 91b84d8..68aea68 100644 --- a/src/pages/Dashboard/index.tsx +++ b/src/pages/Dashboard/index.tsx @@ -1,5 +1,6 @@ import { Card } from 'antd'; import HeaderInfo from './components/HeaderInfo'; +import Stats from './components/Stats'; const Home = () => { return ( @@ -8,9 +9,7 @@ const Home = () => { - - 暂时没有灵感,先空着 - + ); }; diff --git a/tailwind.config.cjs b/tailwind.config.cjs index cffb95b..8419dd0 100644 --- a/tailwind.config.cjs +++ b/tailwind.config.cjs @@ -15,6 +15,7 @@ module.exports = { screens: { '2xsm': '375px', xsm: '425px', + xs: '550px', '3xl': '2000px', ...defaultTheme.screens, },