Fixed frontend to work yay

This commit is contained in:
Frikky
2024-05-22 02:32:46 +02:00
parent 9bec820b46
commit 13b5e85e62
2 changed files with 5 additions and 46 deletions
+4 -4
View File
@@ -15273,10 +15273,6 @@ const AngularWorkflow = (defaultprops) => {
}
}, [executeWorkflow, executionText, workflow, lastSaved, executionRequestStarted])
if (isMobile) {
return null
}
useEffect(() => {
const handleKeyDown = (event) => {
if ((event.metaKey || event.ctrlKey) && event.key === '/') {
@@ -15330,6 +15326,10 @@ const AngularWorkflow = (defaultprops) => {
};
}, [executeWorkflow, executionText, workflow, lastSaved, executionRequestStarted]);
if (isMobile) {
return null
}
return (
<div
style={{
+1 -42
View File
@@ -20,11 +20,6 @@ import IconButton from "@mui/material/IconButton";
import { Tooltip } from "@mui/material";
import CloseIcon from "@mui/icons-material/Close";
import { FileCopy, Visibility, VisibilityOff } from "@mui/icons-material";
import IconButton from "@mui/material/IconButton";
import { Tooltip } from "@mui/material";
const Settings = (props) => {
const { globalUrl, isLoaded, userdata, setUserData } = props;
//const alert = useAlert();
@@ -66,42 +61,6 @@ const Settings = (props) => {
}, 2000);
}
const [showApiKey, setShowApiKey] = useState(false);
const [apiKeyCopied, setApiKeyCopied] = useState(false);
const handleCopyApiKey = () => {
navigator.clipboard.writeText(userSettings.apikey);
setApiKeyCopied(true);
setTimeout(() => {
setApiKeyCopied(false);
}, 2000);
}
/*
const [userdata.eth_info, setEthInfo] = useState(userdata.eth_info !== undefined && userdata.eth_info.account !== undefined && userdata.eth_info.account.length > 0 ? userdata.eth_info : {
"account": "",
"balance": "",
})
*/
/*
console.log(userdata.eth_info)
if (userdata.eth_info.account.length === 0 && userdata.eth_info !== undefined && userdata.eth_info.account !== undefined && userdata.eth_info.account.length > 0) {
setEthInfo(userdata.eth_info)
} else if (userdata.eth_info.balance.length > 0 && userdata.eth_info.parsed_balance === undefined) {
//console.log(window.ethereum)
//console.log(window.ethereum.utils.formatEther(userdata.eth_info.balance))
const parsed_balance = parseInt(userdata.eth_info.balance, 16)/1000000000000000000
console.log("Parsed balance: ", parsed_balance)
userdata.eth_info.parsed_balance = parsed_balance
userdata.eth_info.parsed_balance = parsed_balance
setEthInfo(userdata.eth_info)
} else if (userdata.eth_info !== undefined && userdata.eth_info.balance !== userdata.eth_info.balance) {
console.log("Updating balance: ", userdata.eth_info)
setEthInfo(userdata.eth_info)
}
*/
//Returns the value from a storage position at a given address.
const isCloud =
window.location.host === "localhost:3002" ||
@@ -1210,4 +1169,4 @@ const Settings = (props) => {
return <div>{loadedCheck}</div>;
};
export default Settings;
export default Settings;