You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

61 lines
1.7 KiB

  1. import React, {
  2. // useEffect,
  3. // useState
  4. } from 'react';
  5. // material-ui
  6. import {
  7. Button,
  8. // Link,
  9. Stack,
  10. Typography,
  11. Dialog,
  12. DialogActions,
  13. DialogContent,
  14. DialogContentText,
  15. DialogTitle
  16. } from '@mui/material';
  17. import CancelOutlinedIcon from '@mui/icons-material/CancelOutlined';
  18. const PasswordAlertDialog = (props) => {
  19. return (
  20. <Dialog
  21. open={props.open}
  22. onClose={props.handleClose}
  23. aria-labelledby="alert-dialog-title"
  24. aria-describedby="alert-dialog-description"
  25. >
  26. <DialogTitle id="alert-dialog-title">
  27. <Stack mt={1} mr={4} direction="row" justifyContent="flex-start" alignItems="center" spacing={2}>
  28. <CancelOutlinedIcon color="error" sx={{width:"35px",height:"40px"}}/>
  29. {props.errorMassage==='ACCOUNT_LOCKED_ERROR'?
  30. <Stack direction="column">
  31. <Typography display="inline">
  32. 帳戶將被封鎖
  33. </Typography>
  34. <Typography display="inline">
  35. 帳戶連續五次登入錯誤,請與系統管理員聯絡
  36. </Typography>
  37. </Stack>:
  38. <Typography display="inline">
  39. 用戶名或密碼錯誤
  40. </Typography>
  41. }
  42. </Stack>
  43. </DialogTitle>
  44. <DialogContent>
  45. <DialogContentText id="alert-dialog-description">
  46. {""}
  47. </DialogContentText>
  48. </DialogContent>
  49. <DialogActions>
  50. <Button variant="contained" color="error" onClick={props.handleClose} autoFocus>
  51. 關閉
  52. </Button>
  53. </DialogActions>
  54. </Dialog>
  55. );
  56. };
  57. export default PasswordAlertDialog;