This commit is contained in:
PhilReact 2025-03-05 00:08:26 +02:00
parent 74cdd3e34d
commit 1b94584375
6 changed files with 30 additions and 28 deletions

View File

@ -796,14 +796,18 @@ function App() {
balanceSetIntervalRef.current = setInterval(async () => {
if (isCalling) return;
isCalling = true;
chrome?.runtime?.sendMessage({ action: "balance" }, (response) => {
window
.sendMessage("balance")
.then((response) => {
if (!response?.error && !isNaN(+response)) {
setBalance(response);
}
isCalling = false
isCalling = false;
})
.catch((error) => {
console.error("Failed to get balance:", error);
isCalling = false;
});
}, 40000);
} catch (error) {
console.error(error)
@ -819,12 +823,13 @@ function App() {
setBalance(response);
}
setQortBalanceLoading(false);
balanceSetInterval()
})
.catch((error) => {
console.error("Failed to get balance:", error);
setQortBalanceLoading(false);
});
balanceSetInterval()
};
const getLtcBalanceFunc = () => {
setLtcBalanceLoading(true);

View File

@ -64,8 +64,7 @@ export const BuyQortInformation = ({balance}) => {
<DialogContent>
<Box
sx={{
width: "400px",
maxWidth: '90vw',
width: "100%",
height: "400px",
maxHeight: '90vh',
display: "flex",

View File

@ -169,7 +169,11 @@ export const Home = ({
<ListOfGroupPromotions />
<Divider
</>
)}
<Divider
color="secondary"
sx={{
width: "100%",
@ -197,9 +201,6 @@ export const Home = ({
</Box>
</Divider>
<Explore setMobileViewMode={setMobileViewMode} />
</>
)}
</Box>
)}

View File

@ -12,6 +12,7 @@ import { Box, Typography } from "@mui/material";
import { Spacer } from "../../common/Spacer";
import { isMobile } from "../../App";
import { QMailMessages } from "./QMailMessages";
import { executeEvent } from "../../utils/events";
export const ThingsToDoInitial = ({ myAddress, name, hasGroups, balance , userInfo}) => {
const [checked1, setChecked1] = React.useState(false);
@ -94,7 +95,6 @@ return null
<Box
sx={{
width: "322px",
minHeight: isMobile ? "165px" : "250px",
display: "flex",
flexDirection: "column",
bgcolor: "background.paper",
@ -125,6 +125,9 @@ return null
disableRipple
role={undefined}
dense
onClick={()=> {
executeEvent("openBuyQortInfo", {})
}}
>
<ListItemText
sx={{
@ -182,7 +185,9 @@ return null
// }
disablePadding
>
<ListItemButton sx={{
<ListItemButton onClick={() => {
executeEvent('openRegisterName', {})
}} sx={{
padding: "0px",
}} disableRipple role={undefined} dense>
@ -207,16 +212,7 @@ return null
</ListItemIcon>
</ListItemButton>
</ListItem>
<ListItem
// secondaryAction={
// <IconButton edge="end" aria-label="comments">
// <InfoIcon
// sx={{
// color: "white",
// }}
// />
// </IconButton>
// }
{/* <ListItem
disablePadding
>
<ListItemButton sx={{
@ -243,7 +239,7 @@ return null
/>
</ListItemIcon>
</ListItemButton>
</ListItem>
</ListItem> */}
</List>
</Box>
</Box>

View File

@ -178,6 +178,7 @@ export const RegisterName = ({setOpenSnack, setInfoSnack, userInfo, show, setTxL
open={isOpen}
aria-labelledby="alert-dialog-title"
aria-describedby="alert-dialog-description"
fullWidth
>
<DialogTitle id="alert-dialog-title">
{"Register name"}
@ -185,8 +186,7 @@ export const RegisterName = ({setOpenSnack, setInfoSnack, userInfo, show, setTxL
<DialogContent>
<Box
sx={{
width: "400px",
maxWidth: '90vw',
width: "100%",
height: "500px",
maxHeight: '90vh',
display: "flex",
@ -198,6 +198,7 @@ export const RegisterName = ({setOpenSnack, setInfoSnack, userInfo, show, setTxL
>
<Label>Choose a name</Label>
<TextField
size="small"
autoComplete='off'
autoFocus
onChange={(e) => setRegisterNameValue(e.target.value)}
@ -299,7 +300,7 @@ export const RegisterName = ({setOpenSnack, setInfoSnack, userInfo, show, setTxL
Close
</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"
onClick={registerName}
autoFocus

View File

@ -23,7 +23,7 @@ export const CustomizedSnackbars = ({open, setOpen, info, setInfo, duration}) =
return (
<div>
<Snackbar sx={{
zIndex: 15
zIndex: 10015
}} anchorOrigin={{ vertical: 'bottom', horizontal: 'center' }} open={open} autoHideDuration={info?.duration === null ? null : (duration || 6000)} onClose={handleClose}>
<Alert