From f91f0bcd17648703b38a45c2b04b2281b3b58e2e Mon Sep 17 00:00:00 2001 From: Kevin Yue Date: Mon, 26 Jun 2023 15:07:55 +0800 Subject: [PATCH] refactor: refine the drag --- gpgui/index.html | 5 +++-- gpgui/src/components/ConnectForm/PortalForm.tsx | 2 +- gpgui/src/components/ConnectionStatus/StatusIcon.tsx | 6 ------ gpgui/src/components/ConnectionStatus/StatusText.tsx | 1 - gpgui/src/components/ConnectionStatus/index.tsx | 3 ++- gpgui/src/components/Feedback/index.tsx | 7 ++++++- gpgui/src/components/MainMenu/index.tsx | 2 ++ gpgui/src/components/Notification/index.tsx | 9 ++++++++- 8 files changed, 22 insertions(+), 13 deletions(-) diff --git a/gpgui/index.html b/gpgui/index.html index 3901673..fcdeb15 100644 --- a/gpgui/index.html +++ b/gpgui/index.html @@ -4,12 +4,13 @@ - Vite + React + TS + GlobalProtect
diff --git a/gpgui/src/components/ConnectForm/PortalForm.tsx b/gpgui/src/components/ConnectForm/PortalForm.tsx index 14a97ef..807fd52 100644 --- a/gpgui/src/components/ConnectForm/PortalForm.tsx +++ b/gpgui/src/components/ConnectForm/PortalForm.tsx @@ -35,7 +35,7 @@ export default function PortalForm() { } return ( -
+ ; } -const DragRegion = styled(Box)(({ theme }) => ({ - position: "absolute", - inset: 0, -})); - export default function StatusIcon() { return ( - ); } diff --git a/gpgui/src/components/ConnectionStatus/StatusText.tsx b/gpgui/src/components/ConnectionStatus/StatusText.tsx index 3382724..d2e06dd 100644 --- a/gpgui/src/components/ConnectionStatus/StatusText.tsx +++ b/gpgui/src/components/ConnectionStatus/StatusText.tsx @@ -7,7 +7,6 @@ export default function StatusText() { return ( + + ); } diff --git a/gpgui/src/components/Feedback/index.tsx b/gpgui/src/components/Feedback/index.tsx index d4731a4..e00393d 100644 --- a/gpgui/src/components/Feedback/index.tsx +++ b/gpgui/src/components/Feedback/index.tsx @@ -15,7 +15,12 @@ const LinkChip = (props: ChipProps<"a">) => ( export default function Feedback() { return ( - + } label="Feedback" diff --git a/gpgui/src/components/MainMenu/index.tsx b/gpgui/src/components/MainMenu/index.tsx index f3b5e34..941e9e2 100644 --- a/gpgui/src/components/MainMenu/index.tsx +++ b/gpgui/src/components/MainMenu/index.tsx @@ -16,6 +16,7 @@ import { isProcessingAtom, statusAtom } from "../../atoms/status"; const MenuContainer = styled(Box)(({ theme }) => ({ position: "absolute", + zIndex: 1, left: theme.spacing(1), top: theme.spacing(1), })); @@ -100,6 +101,7 @@ export default function MainMenu() { target="_blank" sx={{ position: "absolute", + zIndex: 1, right: (theme) => theme.spacing(1), top: (theme) => theme.spacing(1), }} diff --git a/gpgui/src/components/Notification/index.tsx b/gpgui/src/components/Notification/index.tsx index 32e7c57..ef26d3c 100644 --- a/gpgui/src/components/Notification/index.tsx +++ b/gpgui/src/components/Notification/index.tsx @@ -1,4 +1,11 @@ -import { Alert, AlertTitle, Box, Slide, SlideProps, Snackbar } from "@mui/material"; +import { + Alert, + AlertTitle, + Box, + Slide, + SlideProps, + Snackbar, +} from "@mui/material"; import { useAtom, useAtomValue } from "jotai"; import { closeNotificationAtom,