From 51f004408aff6d083e5c4270ea6bf8e0c957154f Mon Sep 17 00:00:00 2001 From: jihongyu Date: Mon, 11 Sep 2023 21:35:09 +0800 Subject: [PATCH] feat: double-click title to toggle window maximization --- src/pages/_layout.tsx | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/src/pages/_layout.tsx b/src/pages/_layout.tsx index 27ef9b0..d966fd7 100644 --- a/src/pages/_layout.tsx +++ b/src/pages/_layout.tsx @@ -1,26 +1,26 @@ -import dayjs from "dayjs"; -import i18next from "i18next"; -import relativeTime from "dayjs/plugin/relativeTime"; -import { SWRConfig, mutate } from "swr"; -import { useEffect } from "react"; -import { useTranslation } from "react-i18next"; -import { Route, Routes } from "react-router-dom"; -import { alpha, List, Paper, ThemeProvider } from "@mui/material"; -import { listen } from "@tauri-apps/api/event"; -import { appWindow } from "@tauri-apps/api/window"; -import { routers } from "./_routers"; -import { getAxios } from "@/services/api"; -import { useVerge } from "@/hooks/use-verge"; import { ReactComponent as LogoSvg } from "@/assets/image/logo.svg"; import { BaseErrorBoundary, Notice } from "@/components/base"; -import { LayoutItem } from "@/components/layout/layout-item"; import { LayoutControl } from "@/components/layout/layout-control"; +import { LayoutItem } from "@/components/layout/layout-item"; import { LayoutTraffic } from "@/components/layout/layout-traffic"; import { UpdateButton } from "@/components/layout/update-button"; import { useCustomTheme } from "@/components/layout/use-custom-theme"; +import { useVerge } from "@/hooks/use-verge"; +import { getAxios } from "@/services/api"; import getSystem from "@/utils/get-system"; +import { List, Paper, ThemeProvider, alpha } from "@mui/material"; +import { listen } from "@tauri-apps/api/event"; +import { appWindow } from "@tauri-apps/api/window"; +import dayjs from "dayjs"; import "dayjs/locale/ru"; import "dayjs/locale/zh-cn"; +import relativeTime from "dayjs/plugin/relativeTime"; +import i18next from "i18next"; +import { useEffect } from "react"; +import { useTranslation } from "react-i18next"; +import { Route, Routes } from "react-router-dom"; +import { SWRConfig, mutate } from "swr"; +import { routers } from "./_routers"; dayjs.extend(relativeTime); @@ -107,7 +107,7 @@ const Layout = () => { }), ]} > -
+
@@ -129,7 +129,7 @@ const Layout = () => {
-
+
{OS === "windows" && (