mirror of
https://github.com/Qortal/qortal-mobile.git
synced 2025-04-01 18:15:54 +00:00
fixes
This commit is contained in:
parent
74cdd3e34d
commit
1b94584375
15
src/App.tsx
15
src/App.tsx
@ -796,14 +796,18 @@ function App() {
|
|||||||
balanceSetIntervalRef.current = setInterval(async () => {
|
balanceSetIntervalRef.current = setInterval(async () => {
|
||||||
if (isCalling) return;
|
if (isCalling) return;
|
||||||
isCalling = true;
|
isCalling = true;
|
||||||
chrome?.runtime?.sendMessage({ action: "balance" }, (response) => {
|
window
|
||||||
|
.sendMessage("balance")
|
||||||
|
.then((response) => {
|
||||||
if (!response?.error && !isNaN(+response)) {
|
if (!response?.error && !isNaN(+response)) {
|
||||||
setBalance(response);
|
setBalance(response);
|
||||||
}
|
}
|
||||||
|
isCalling = false;
|
||||||
isCalling = false
|
})
|
||||||
|
.catch((error) => {
|
||||||
|
console.error("Failed to get balance:", error);
|
||||||
|
isCalling = false;
|
||||||
});
|
});
|
||||||
|
|
||||||
}, 40000);
|
}, 40000);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(error)
|
console.error(error)
|
||||||
@ -819,12 +823,13 @@ function App() {
|
|||||||
setBalance(response);
|
setBalance(response);
|
||||||
}
|
}
|
||||||
setQortBalanceLoading(false);
|
setQortBalanceLoading(false);
|
||||||
balanceSetInterval()
|
|
||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
console.error("Failed to get balance:", error);
|
console.error("Failed to get balance:", error);
|
||||||
setQortBalanceLoading(false);
|
setQortBalanceLoading(false);
|
||||||
});
|
});
|
||||||
|
balanceSetInterval()
|
||||||
};
|
};
|
||||||
const getLtcBalanceFunc = () => {
|
const getLtcBalanceFunc = () => {
|
||||||
setLtcBalanceLoading(true);
|
setLtcBalanceLoading(true);
|
||||||
|
@ -64,8 +64,7 @@ export const BuyQortInformation = ({balance}) => {
|
|||||||
<DialogContent>
|
<DialogContent>
|
||||||
<Box
|
<Box
|
||||||
sx={{
|
sx={{
|
||||||
width: "400px",
|
width: "100%",
|
||||||
maxWidth: '90vw',
|
|
||||||
height: "400px",
|
height: "400px",
|
||||||
maxHeight: '90vh',
|
maxHeight: '90vh',
|
||||||
display: "flex",
|
display: "flex",
|
||||||
|
@ -169,7 +169,11 @@ export const Home = ({
|
|||||||
|
|
||||||
<ListOfGroupPromotions />
|
<ListOfGroupPromotions />
|
||||||
|
|
||||||
<Divider
|
|
||||||
|
|
||||||
|
</>
|
||||||
|
)}
|
||||||
|
<Divider
|
||||||
color="secondary"
|
color="secondary"
|
||||||
sx={{
|
sx={{
|
||||||
width: "100%",
|
width: "100%",
|
||||||
@ -197,9 +201,6 @@ export const Home = ({
|
|||||||
</Box>
|
</Box>
|
||||||
</Divider>
|
</Divider>
|
||||||
<Explore setMobileViewMode={setMobileViewMode} />
|
<Explore setMobileViewMode={setMobileViewMode} />
|
||||||
|
|
||||||
</>
|
|
||||||
)}
|
|
||||||
</Box>
|
</Box>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
@ -12,6 +12,7 @@ import { Box, Typography } from "@mui/material";
|
|||||||
import { Spacer } from "../../common/Spacer";
|
import { Spacer } from "../../common/Spacer";
|
||||||
import { isMobile } from "../../App";
|
import { isMobile } from "../../App";
|
||||||
import { QMailMessages } from "./QMailMessages";
|
import { QMailMessages } from "./QMailMessages";
|
||||||
|
import { executeEvent } from "../../utils/events";
|
||||||
|
|
||||||
export const ThingsToDoInitial = ({ myAddress, name, hasGroups, balance , userInfo}) => {
|
export const ThingsToDoInitial = ({ myAddress, name, hasGroups, balance , userInfo}) => {
|
||||||
const [checked1, setChecked1] = React.useState(false);
|
const [checked1, setChecked1] = React.useState(false);
|
||||||
@ -94,7 +95,6 @@ return null
|
|||||||
<Box
|
<Box
|
||||||
sx={{
|
sx={{
|
||||||
width: "322px",
|
width: "322px",
|
||||||
minHeight: isMobile ? "165px" : "250px",
|
|
||||||
display: "flex",
|
display: "flex",
|
||||||
flexDirection: "column",
|
flexDirection: "column",
|
||||||
bgcolor: "background.paper",
|
bgcolor: "background.paper",
|
||||||
@ -125,6 +125,9 @@ return null
|
|||||||
disableRipple
|
disableRipple
|
||||||
role={undefined}
|
role={undefined}
|
||||||
dense
|
dense
|
||||||
|
onClick={()=> {
|
||||||
|
executeEvent("openBuyQortInfo", {})
|
||||||
|
}}
|
||||||
>
|
>
|
||||||
<ListItemText
|
<ListItemText
|
||||||
sx={{
|
sx={{
|
||||||
@ -182,7 +185,9 @@ return null
|
|||||||
// }
|
// }
|
||||||
disablePadding
|
disablePadding
|
||||||
>
|
>
|
||||||
<ListItemButton sx={{
|
<ListItemButton onClick={() => {
|
||||||
|
executeEvent('openRegisterName', {})
|
||||||
|
}} sx={{
|
||||||
padding: "0px",
|
padding: "0px",
|
||||||
}} disableRipple role={undefined} dense>
|
}} disableRipple role={undefined} dense>
|
||||||
|
|
||||||
@ -207,16 +212,7 @@ return null
|
|||||||
</ListItemIcon>
|
</ListItemIcon>
|
||||||
</ListItemButton>
|
</ListItemButton>
|
||||||
</ListItem>
|
</ListItem>
|
||||||
<ListItem
|
{/* <ListItem
|
||||||
// secondaryAction={
|
|
||||||
// <IconButton edge="end" aria-label="comments">
|
|
||||||
// <InfoIcon
|
|
||||||
// sx={{
|
|
||||||
// color: "white",
|
|
||||||
// }}
|
|
||||||
// />
|
|
||||||
// </IconButton>
|
|
||||||
// }
|
|
||||||
disablePadding
|
disablePadding
|
||||||
>
|
>
|
||||||
<ListItemButton sx={{
|
<ListItemButton sx={{
|
||||||
@ -243,7 +239,7 @@ return null
|
|||||||
/>
|
/>
|
||||||
</ListItemIcon>
|
</ListItemIcon>
|
||||||
</ListItemButton>
|
</ListItemButton>
|
||||||
</ListItem>
|
</ListItem> */}
|
||||||
</List>
|
</List>
|
||||||
</Box>
|
</Box>
|
||||||
</Box>
|
</Box>
|
||||||
|
@ -178,6 +178,7 @@ export const RegisterName = ({setOpenSnack, setInfoSnack, userInfo, show, setTxL
|
|||||||
open={isOpen}
|
open={isOpen}
|
||||||
aria-labelledby="alert-dialog-title"
|
aria-labelledby="alert-dialog-title"
|
||||||
aria-describedby="alert-dialog-description"
|
aria-describedby="alert-dialog-description"
|
||||||
|
fullWidth
|
||||||
>
|
>
|
||||||
<DialogTitle id="alert-dialog-title">
|
<DialogTitle id="alert-dialog-title">
|
||||||
{"Register name"}
|
{"Register name"}
|
||||||
@ -185,8 +186,7 @@ export const RegisterName = ({setOpenSnack, setInfoSnack, userInfo, show, setTxL
|
|||||||
<DialogContent>
|
<DialogContent>
|
||||||
<Box
|
<Box
|
||||||
sx={{
|
sx={{
|
||||||
width: "400px",
|
width: "100%",
|
||||||
maxWidth: '90vw',
|
|
||||||
height: "500px",
|
height: "500px",
|
||||||
maxHeight: '90vh',
|
maxHeight: '90vh',
|
||||||
display: "flex",
|
display: "flex",
|
||||||
@ -198,6 +198,7 @@ export const RegisterName = ({setOpenSnack, setInfoSnack, userInfo, show, setTxL
|
|||||||
>
|
>
|
||||||
<Label>Choose a name</Label>
|
<Label>Choose a name</Label>
|
||||||
<TextField
|
<TextField
|
||||||
|
size="small"
|
||||||
autoComplete='off'
|
autoComplete='off'
|
||||||
autoFocus
|
autoFocus
|
||||||
onChange={(e) => setRegisterNameValue(e.target.value)}
|
onChange={(e) => setRegisterNameValue(e.target.value)}
|
||||||
@ -299,7 +300,7 @@ export const RegisterName = ({setOpenSnack, setInfoSnack, userInfo, show, setTxL
|
|||||||
Close
|
Close
|
||||||
</Button>
|
</Button>
|
||||||
<Button
|
<Button
|
||||||
disabled={!registerNameValue.trim() ||isLoadingRegisterName || isNameAvailable !== Availability.AVAILABLE || !balance || ((balance && nameFee) && +balance < +nameFee)}
|
// disabled={!registerNameValue.trim() ||isLoadingRegisterName || isNameAvailable !== Availability.AVAILABLE || !balance || ((balance && nameFee) && +balance < +nameFee)}
|
||||||
variant="contained"
|
variant="contained"
|
||||||
onClick={registerName}
|
onClick={registerName}
|
||||||
autoFocus
|
autoFocus
|
||||||
|
@ -23,7 +23,7 @@ export const CustomizedSnackbars = ({open, setOpen, info, setInfo, duration}) =
|
|||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<Snackbar sx={{
|
<Snackbar sx={{
|
||||||
zIndex: 15
|
zIndex: 10015
|
||||||
}} anchorOrigin={{ vertical: 'bottom', horizontal: 'center' }} open={open} autoHideDuration={info?.duration === null ? null : (duration || 6000)} onClose={handleClose}>
|
}} anchorOrigin={{ vertical: 'bottom', horizontal: 'center' }} open={open} autoHideDuration={info?.duration === null ? null : (duration || 6000)} onClose={handleClose}>
|
||||||
<Alert
|
<Alert
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user