mirror of
https://github.com/Qortal/qortal-mobile.git
synced 2025-06-15 04:21:21 +00:00
fix loading
This commit is contained in:
parent
cc5a6d9f33
commit
156e0d10a3
@ -266,7 +266,9 @@ export const AttachmentCard = ({
|
|||||||
<CardContent>
|
<CardContent>
|
||||||
{resourceData?.fileName && (
|
{resourceData?.fileName && (
|
||||||
<>
|
<>
|
||||||
<Typography>{resourceDetails?.status?.status === 'DOWNLOADED' ? 'BUILDING' : resourceDetails?.status?.status}</Typography>
|
<Typography sx={{
|
||||||
|
fontSize: '14px'
|
||||||
|
}}>{resourceData?.fileName}</Typography>
|
||||||
<Spacer height="10px" />
|
<Spacer height="10px" />
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
@ -286,6 +288,8 @@ export const AttachmentCard = ({
|
|||||||
}}>
|
}}>
|
||||||
|
|
||||||
<FileAttachmentContainer >
|
<FileAttachmentContainer >
|
||||||
|
<Typography>{resourceDetails?.status?.status === 'DOWNLOADED' ? 'BUILDING' : resourceDetails?.status?.status}</Typography>
|
||||||
|
|
||||||
{!resourceDetails && (
|
{!resourceDetails && (
|
||||||
<>
|
<>
|
||||||
<DownloadIcon />
|
<DownloadIcon />
|
||||||
@ -319,9 +323,7 @@ export const AttachmentCard = ({
|
|||||||
|
|
||||||
</FileAttachmentContainer>
|
</FileAttachmentContainer>
|
||||||
</ButtonBase>
|
</ButtonBase>
|
||||||
<Typography sx={{
|
|
||||||
fontSize: '14px'
|
|
||||||
}}>{resourceDetails?.status?.status}</Typography>
|
|
||||||
</CardContent>
|
</CardContent>
|
||||||
</Box>
|
</Box>
|
||||||
</Card>
|
</Card>
|
||||||
|
@ -2730,6 +2730,8 @@ export const Group = ({
|
|||||||
</AuthenticatedContainerInnerRight>
|
</AuthenticatedContainerInnerRight>
|
||||||
<LoadingSnackbar
|
<LoadingSnackbar
|
||||||
open={isLoadingGroup}
|
open={isLoadingGroup}
|
||||||
|
close={()=>setIsLoadingGroup(false)}
|
||||||
|
|
||||||
info={{
|
info={{
|
||||||
message:
|
message:
|
||||||
isLoadingGroupMessage || "Setting up group... please wait.",
|
isLoadingGroupMessage || "Setting up group... please wait.",
|
||||||
@ -2738,6 +2740,7 @@ export const Group = ({
|
|||||||
|
|
||||||
<LoadingSnackbar
|
<LoadingSnackbar
|
||||||
open={isLoadingGroups}
|
open={isLoadingGroups}
|
||||||
|
close={()=>setIsLoadingGroup(false)}
|
||||||
info={{
|
info={{
|
||||||
message: "Setting up groups... please wait.",
|
message: "Setting up groups... please wait.",
|
||||||
}}
|
}}
|
||||||
|
@ -3,12 +3,29 @@ import Button from '@mui/material/Button';
|
|||||||
import Snackbar, { SnackbarCloseReason } from '@mui/material/Snackbar';
|
import Snackbar, { SnackbarCloseReason } from '@mui/material/Snackbar';
|
||||||
import Alert from '@mui/material/Alert';
|
import Alert from '@mui/material/Alert';
|
||||||
|
|
||||||
export const LoadingSnackbar = ({open, info}) => {
|
export const LoadingSnackbar = ({open, info, close, setInfo}) => {
|
||||||
|
|
||||||
|
const handleClose = (
|
||||||
|
event?: React.SyntheticEvent | Event,
|
||||||
|
reason?: SnackbarCloseReason,
|
||||||
|
) => {
|
||||||
|
if (reason === 'clickaway') {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if(close){
|
||||||
|
close();
|
||||||
|
|
||||||
|
}
|
||||||
|
if(setInfo){
|
||||||
|
setInfo(null)
|
||||||
|
}
|
||||||
|
|
||||||
|
};
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<Snackbar anchorOrigin={{ vertical: 'bottom', horizontal: 'center' }} open={open}>
|
<Snackbar anchorOrigin={{ vertical: 'bottom', horizontal: 'center' }} onClose={handleClose} open={open}>
|
||||||
<Alert
|
<Alert
|
||||||
|
onClose={handleClose}
|
||||||
severity="info"
|
severity="info"
|
||||||
variant="filled"
|
variant="filled"
|
||||||
sx={{ width: '100%' }}
|
sx={{ width: '100%' }}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user