fix dev mode input

This commit is contained in:
PhilReact 2024-11-02 08:48:52 +02:00
parent 5e5c076c60
commit d50f928520
2 changed files with 16 additions and 76 deletions

View File

@ -59,11 +59,11 @@ export const AppsDevModeHome = ({
}); });
return; return;
} }
await show({ const {portVal, domainVal} = await show({
message: "", message: "",
publishFee: "", publishFee: "",
}); });
const framework = domain + ":" + port; const framework = domainVal + ":" + portVal;
const response = await fetch( const response = await fetch(
`${getBaseApiReact()}/developer/proxy/start`, `${getBaseApiReact()}/developer/proxy/start`,
{ {
@ -170,7 +170,7 @@ export const AppsDevModeHome = ({
<Button <Button
disabled={!domain || !port} disabled={!domain || !port}
variant="contained" variant="contained"
onClick={onOk} onClick={()=> onOk({portVal: port, domainVal: domain})}
autoFocus autoFocus
> >
Add Add

View File

@ -186,87 +186,27 @@ export const AppsDevModeNavBar = () => {
src={NavAdd} src={NavAdd}
/> />
</ButtonBase> </ButtonBase>
<ButtonBase <ButtonBase
onClick={(e) => { onClick={(e) => {
if (!selectedTab) return; executeEvent("refreshApp", {
handleClick(e); tabId: selectedTab?.tabId,
});
}} }}
> >
<img <RefreshIcon
style={{
height: "34px", sx={{
width: "34px", color: "rgba(250, 250, 250, 0.5)",
}} width: '40px',
src={NavMoreMenu} height: 'auto'
/> }}
/>
</ButtonBase> </ButtonBase>
</AppsNavBarRight> </AppsNavBarRight>
)} )}
<Menu
id="navbar-more-mobile"
anchorEl={anchorEl}
open={open}
onClose={handleClose}
MenuListProps={{
"aria-labelledby": "basic-button",
}}
anchorOrigin={{
vertical: "bottom",
horizontal: "center",
}}
transformOrigin={{
vertical: "top",
horizontal: "center",
}}
slotProps={{
paper: {
sx: {
backgroundColor: "var(--bg-primary)",
color: "#fff",
width: "148px",
borderRadius: "5px",
},
},
}}
sx={{
marginTop: "10px",
}}
>
<MenuItem
onClick={() => {
executeEvent("refreshApp", {
tabId: selectedTab?.tabId,
});
handleClose();
}}
>
<ListItemIcon
sx={{
minWidth: "24px !important",
marginRight: "5px",
}}
>
<RefreshIcon
height={20}
sx={{
color: "rgba(250, 250, 250, 0.5)",
}}
/>
</ListItemIcon>
<ListItemText
sx={{
"& .MuiTypography-root": {
fontSize: "12px",
fontWeight: 600,
color: "rgba(250, 250, 250, 0.5)",
},
}}
primary="Refresh"
/>
</MenuItem>
</Menu>
</AppsNavBarParent> </AppsNavBarParent>
); );
}; };