Skip to content

Commit

Permalink
improve: ui 改进若干
Browse files Browse the repository at this point in the history
  • Loading branch information
Mmx233 committed Aug 8, 2023
1 parent 895227d commit 0ec329c
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 9 deletions.
23 changes: 15 additions & 8 deletions web/src/components/user/MfaCodeDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,19 +38,22 @@ export const MfaCodeDialog: FC = () => {
}

useEffect(() => {
if (callback) setCode("");
if (callback) {
setCode("");
}
}, [callback]);

return (
<Dialog open={Boolean(callback)} onClose={() => setCallback(null)}>
<Dialog
open={Boolean(callback)}
onAnimationStart={() => {
if (callback) inputEl.current?.focus();
}}
onClose={() => setCallback(null)}
>
<DialogTitle>双因素认证校验</DialogTitle>
<DialogContent
sx={{
width: "20rem",
}}
>
<DialogContent>
<TextField
autoFocus
fullWidth
margin="dense"
inputRef={inputEl}
Expand All @@ -61,6 +64,10 @@ export const MfaCodeDialog: FC = () => {
if (!Number(e.target.value) && e.target.value != "") return;
setCode(e.target.value);
}}
sx={{
width: "16rem",
maxWidth: "100%",
}}
/>
</DialogContent>
<DialogActions>
Expand Down
2 changes: 1 addition & 1 deletion web/src/pages/User/pages/Dev/ssh/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ const Ssh: FC = () => {
<Stack
alignItems={"center"}
justifyContent={"center"}
height={"10rem"}
height={"15rem"}
>
<Stack
justifyContent={"center"}
Expand Down
1 change: 1 addition & 0 deletions web/src/pages/User/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
min-height: 100%;
display: flex;
flex-direction: column;
padding-bottom: 1rem;
}

#user .MuiContainer-root > .MuiBox-root {
Expand Down

0 comments on commit 0ec329c

Please sign in to comment.