Added basic reloading UX fixes
This commit is contained in:
@@ -11998,6 +11998,7 @@ const AngularWorkflow = (defaultprops) => {
|
|||||||
<Button
|
<Button
|
||||||
style={{ borderRadius: "0px" }}
|
style={{ borderRadius: "0px" }}
|
||||||
disabled={newVariableName.length === 0}
|
disabled={newVariableName.length === 0}
|
||||||
|
variant="contained"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
console.log("VARIABLES! ", newVariableName);
|
console.log("VARIABLES! ", newVariableName);
|
||||||
if (
|
if (
|
||||||
|
|||||||
@@ -25,7 +25,9 @@ import {
|
|||||||
DialogActions,
|
DialogActions,
|
||||||
DialogContent,
|
DialogContent,
|
||||||
CircularProgress,
|
CircularProgress,
|
||||||
|
Zoom,
|
||||||
} from "@material-ui/core";
|
} from "@material-ui/core";
|
||||||
|
|
||||||
import {
|
import {
|
||||||
LockOpen as LockOpenIcon,
|
LockOpen as LockOpenIcon,
|
||||||
OpenInNew as OpenInNewIcon,
|
OpenInNew as OpenInNewIcon,
|
||||||
@@ -201,6 +203,7 @@ const Apps = (props) => {
|
|||||||
|
|
||||||
const [isDropzone, setIsDropzone] = React.useState(false);
|
const [isDropzone, setIsDropzone] = React.useState(false);
|
||||||
const upload = React.useRef(null);
|
const upload = React.useRef(null);
|
||||||
|
const [firstLoad, setFirstLoad] = React.useState(true);
|
||||||
const isCloud =
|
const isCloud =
|
||||||
window.location.host === "localhost:3002" ||
|
window.location.host === "localhost:3002" ||
|
||||||
window.location.host === "shuffler.io"
|
window.location.host === "shuffler.io"
|
||||||
@@ -343,7 +346,9 @@ const Apps = (props) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//runAppSearch("")
|
//setTimeout(() => {
|
||||||
|
// setFirstLoad(false)
|
||||||
|
//}, 5000)
|
||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
alert.error(error.toString());
|
alert.error(error.toString());
|
||||||
@@ -435,7 +440,10 @@ const Apps = (props) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// dropdown with copy etc I guess
|
// dropdown with copy etc I guess
|
||||||
const appPaper = (data) => {
|
const AppPaper = (props) => {
|
||||||
|
const { app } = props
|
||||||
|
const data = app
|
||||||
|
|
||||||
if (data.name === "" && data.id === "") {
|
if (data.name === "" && data.id === "") {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
@@ -1376,6 +1384,7 @@ const Apps = (props) => {
|
|||||||
}
|
}
|
||||||
}, [appValidation, isDropzone]);
|
}, [appValidation, isDropzone]);
|
||||||
|
|
||||||
|
var appDelay = -75
|
||||||
const appView = isLoggedIn ? (
|
const appView = isLoggedIn ? (
|
||||||
<Dropzone
|
<Dropzone
|
||||||
style={{ width: viewWidth * 2 + 20, margin: "auto", padding: 20 }}
|
style={{ width: viewWidth * 2 + 20, margin: "auto", padding: 20 }}
|
||||||
@@ -1504,13 +1513,28 @@ const Apps = (props) => {
|
|||||||
{apps.length > 0 ? (
|
{apps.length > 0 ? (
|
||||||
filteredApps.length > 0 ? (
|
filteredApps.length > 0 ? (
|
||||||
<div style={{ height: "75vh", overflowY: "auto" }}>
|
<div style={{ height: "75vh", overflowY: "auto" }}>
|
||||||
{filteredApps.map((app) => {
|
{filteredApps.map((app, index) => {
|
||||||
return appPaper(app);
|
if (firstLoad) {
|
||||||
|
appDelay += 75
|
||||||
|
} else {
|
||||||
|
//return returnData
|
||||||
|
return <AppPaper app={app} />
|
||||||
|
}
|
||||||
|
|
||||||
|
return (
|
||||||
|
<Zoom key={index} in={true} style={{ transitionDelay: `${appDelay}ms` }}>
|
||||||
|
<span>
|
||||||
|
<AppPaper app={app} />
|
||||||
|
</span>
|
||||||
|
</Zoom>
|
||||||
|
)
|
||||||
})}
|
})}
|
||||||
{cursearch.length > 0
|
{cursearch.length > 0
|
||||||
? null
|
? null
|
||||||
: searchableApps.map((app) => {
|
: searchableApps.map((app, index) => {
|
||||||
return appPaper(app);
|
return (
|
||||||
|
<AppPaper app={app} />
|
||||||
|
)
|
||||||
})}
|
})}
|
||||||
</div>
|
</div>
|
||||||
) : (
|
) : (
|
||||||
|
|||||||
@@ -727,6 +727,19 @@ const Settings = (props) => {
|
|||||||
<Divider style={{ marginTop: "40px" }} />
|
<Divider style={{ marginTop: "40px" }} />
|
||||||
<h2>Platform Earnings</h2>
|
<h2>Platform Earnings</h2>
|
||||||
<div style={{ display: runFlex ? "flex" : "", width: "100%" }}>
|
<div style={{ display: runFlex ? "flex" : "", width: "100%" }}>
|
||||||
|
<div>
|
||||||
|
<Button
|
||||||
|
style={{ height: 40, marginTop: 10 }}
|
||||||
|
variant="outlined"
|
||||||
|
color="primary"
|
||||||
|
fullWidth={true}
|
||||||
|
onClick={() => {
|
||||||
|
handleEthereumConnection();
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
Connect to Github
|
||||||
|
</Button>
|
||||||
|
</div>
|
||||||
<div style={{ flex: 1, display: "flex" }}>
|
<div style={{ flex: 1, display: "flex" }}>
|
||||||
<div>
|
<div>
|
||||||
{userdata.eth_info !== undefined &&
|
{userdata.eth_info !== undefined &&
|
||||||
|
|||||||
@@ -2605,7 +2605,6 @@ const Workflows = (props) => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div style={viewStyle}>
|
<div style={viewStyle}>
|
||||||
|
|
||||||
<div style={workflowViewStyle}>
|
<div style={workflowViewStyle}>
|
||||||
<div style={{ display: "flex" }}>
|
<div style={{ display: "flex" }}>
|
||||||
<div style={{ flex: 3 }}>
|
<div style={{ flex: 3 }}>
|
||||||
@@ -2724,71 +2723,75 @@ const Workflows = (props) => {
|
|||||||
data.large_image = theme.palette.defaultImage;
|
data.large_image = theme.palette.defaultImage;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const returnData =
|
||||||
|
<span key={index} style={{ zIndex: 10 }}>
|
||||||
|
<IconButton
|
||||||
|
style={{
|
||||||
|
backgroundColor: "transparent",
|
||||||
|
margin: 0,
|
||||||
|
padding: 12,
|
||||||
|
}}
|
||||||
|
onClick={() => {
|
||||||
|
console.log("FILTER: ", data);
|
||||||
|
addFilter(data.app_name);
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<Tooltip
|
||||||
|
title={`Filter by ${data.app_name}`}
|
||||||
|
placement="top"
|
||||||
|
>
|
||||||
|
<Badge
|
||||||
|
badgeContent={0}
|
||||||
|
color="secondary"
|
||||||
|
style={{ fontSize: 10 }}
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
style={{
|
||||||
|
height: imgSize,
|
||||||
|
width: imgSize,
|
||||||
|
position: "relative",
|
||||||
|
filter: "brightness(0.6)",
|
||||||
|
backgroundColor: "#000",
|
||||||
|
borderRadius: imgSize / 2,
|
||||||
|
zIndex: 100,
|
||||||
|
overflow: "hidden",
|
||||||
|
display: "flex",
|
||||||
|
justifyContent: "center",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<img
|
||||||
|
style={{
|
||||||
|
height: imgSize,
|
||||||
|
width: imgSize,
|
||||||
|
position: "absolute",
|
||||||
|
top: -2,
|
||||||
|
left: -2,
|
||||||
|
cursor: "pointer",
|
||||||
|
zIndex: 99,
|
||||||
|
border: "2px solid rgba(255,255,255,0.7)",
|
||||||
|
}}
|
||||||
|
alt={data.app_name}
|
||||||
|
src={data.large_image}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</Badge>
|
||||||
|
</Tooltip>
|
||||||
|
</IconButton>
|
||||||
|
</span>
|
||||||
|
|
||||||
if (firstLoad) {
|
if (firstLoad) {
|
||||||
appDelay += 75
|
appDelay += 75
|
||||||
} else {
|
} else {
|
||||||
appDelay = 0
|
//appDelay = 0
|
||||||
|
return returnData
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Zoom key={index} in={true} style={{ transitionDelay: `${appDelay}ms` }}>
|
<Zoom key={index} in={true} style={{ transitionDelay: `${appDelay}ms` }}>
|
||||||
<span key={index} style={{ zIndex: 10 }}>
|
{returnData}
|
||||||
<IconButton
|
|
||||||
style={{
|
|
||||||
backgroundColor: "transparent",
|
|
||||||
margin: 0,
|
|
||||||
padding: 12,
|
|
||||||
}}
|
|
||||||
onClick={() => {
|
|
||||||
console.log("FILTER: ", data);
|
|
||||||
addFilter(data.app_name);
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<Tooltip
|
|
||||||
title={`Filter by ${data.app_name}`}
|
|
||||||
placement="top"
|
|
||||||
>
|
|
||||||
<Badge
|
|
||||||
badgeContent={0}
|
|
||||||
color="secondary"
|
|
||||||
style={{ fontSize: 10 }}
|
|
||||||
>
|
|
||||||
<div
|
|
||||||
style={{
|
|
||||||
height: imgSize,
|
|
||||||
width: imgSize,
|
|
||||||
position: "relative",
|
|
||||||
filter: "brightness(0.6)",
|
|
||||||
backgroundColor: "#000",
|
|
||||||
borderRadius: imgSize / 2,
|
|
||||||
zIndex: 100,
|
|
||||||
overflow: "hidden",
|
|
||||||
display: "flex",
|
|
||||||
justifyContent: "center",
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<img
|
|
||||||
style={{
|
|
||||||
height: imgSize,
|
|
||||||
width: imgSize,
|
|
||||||
position: "absolute",
|
|
||||||
top: -2,
|
|
||||||
left: -2,
|
|
||||||
cursor: "pointer",
|
|
||||||
zIndex: 99,
|
|
||||||
border: "2px solid rgba(255,255,255,0.7)",
|
|
||||||
}}
|
|
||||||
alt={data.app_name}
|
|
||||||
src={data.large_image}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</Badge>
|
|
||||||
</Tooltip>
|
|
||||||
</IconButton>
|
|
||||||
</span>
|
|
||||||
</Zoom>
|
</Zoom>
|
||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
</div>
|
</div>
|
||||||
) : null}
|
) : null}
|
||||||
{view === "grid" ? (
|
{view === "grid" ? (
|
||||||
@@ -2796,11 +2799,16 @@ const Workflows = (props) => {
|
|||||||
<Zoom in={true} style={{ transitionDelay: `${workflowDelay}ms` }}>
|
<Zoom in={true} style={{ transitionDelay: `${workflowDelay}ms` }}>
|
||||||
<NewWorkflowPaper />
|
<NewWorkflowPaper />
|
||||||
</Zoom>
|
</Zoom>
|
||||||
|
|
||||||
{filteredWorkflows.map((data, index) => {
|
{filteredWorkflows.map((data, index) => {
|
||||||
if (firstLoad) {
|
if (firstLoad) {
|
||||||
workflowDelay += 75
|
workflowDelay += 75
|
||||||
} else {
|
} else {
|
||||||
workflowDelay = 0
|
return (
|
||||||
|
<Grid item xs={4} style={{ padding: "12px 10px 12px 10px" }}>
|
||||||
|
<WorkflowPaper key={index} data={data} />
|
||||||
|
</Grid>
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|||||||
Reference in New Issue
Block a user