Fixed multiple issues with how files are downloaded and uploaded
This commit is contained in:
@@ -37,7 +37,6 @@ import {
|
||||
PlayArrow as PlayArrowIcon,
|
||||
} from "@material-ui/icons";
|
||||
|
||||
import WorkflowPaper from "../components/WorkflowPaper.jsx"
|
||||
|
||||
const searchClient = algoliasearch("JNSS5CFDZZ", "db08e40265e2941b9a7d8f644b6e5240")
|
||||
const CreatorGrid = props => {
|
||||
@@ -174,7 +173,7 @@ const CreatorGrid = props => {
|
||||
</Typography>
|
||||
</div>
|
||||
<Typography variant="body1" color="textSecondary" style={{marginTop: 10, }}>
|
||||
<b>10</b> apps <span style={{marginLeft: 15, }}/><b>23</b> workflows
|
||||
<b>{data.apps}</b> apps <span style={{marginLeft: 15, }}/><b>{data.workflows}</b> workflows
|
||||
</Typography>
|
||||
{data.specialized_apps !== undefined && data.specialized_apps !== null && data.specialized_apps.length > 0 ?
|
||||
<AvatarGroup max={10} style={{flexDirection: "row", padding: 0, margin: 0, itemAlign: "left", textAlign: "left",}}>
|
||||
|
||||
@@ -1338,20 +1338,18 @@ const Admin = (props) => {
|
||||
const downloadFile = (file) => {
|
||||
fetch(globalUrl + "/api/v1/files/" + file.id + "/content", {
|
||||
method: "GET",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
Accept: "application/json",
|
||||
},
|
||||
credentials: "include",
|
||||
})
|
||||
.then((response) => {
|
||||
if (response.status !== 200) {
|
||||
console.log("Status not 200 for apps :O!");
|
||||
return "";
|
||||
}
|
||||
.then((response) => {
|
||||
if (response.status !== 200) {
|
||||
console.log("Status not 200 for apps :O!");
|
||||
return "";
|
||||
}
|
||||
|
||||
return response.text();
|
||||
})
|
||||
console.log("Resp: ", response)
|
||||
|
||||
return response.blob()
|
||||
})
|
||||
.then((respdata) => {
|
||||
if (respdata.length === 0) {
|
||||
alert.error("Failed getting file. Is it deleted?");
|
||||
@@ -1591,18 +1589,13 @@ const Admin = (props) => {
|
||||
document.title = "Shuffle - admin";
|
||||
}
|
||||
|
||||
console.log("NEWVALUE: ", newValue);
|
||||
|
||||
if (newValue === 6) {
|
||||
console.log("Should get apps for categories.");
|
||||
}
|
||||
|
||||
console.log("PROPS: ", props);
|
||||
|
||||
navigate(`/admin?tab=${views[newValue]}`);
|
||||
|
||||
setModalUser({});
|
||||
};
|
||||
}
|
||||
|
||||
if (firstRequest) {
|
||||
setFirstRequest(false);
|
||||
|
||||
@@ -776,7 +776,9 @@ const UsecaseListComponent = ({keys, isCloud, globalUrl, frameworkData, isLogged
|
||||
var baseTypeInfo = subcase.type !== undefined ? subcase.type : "communication"
|
||||
if (frameworkData !== undefined && frameworkData !== null) {
|
||||
if (frameworkData[baseTypeInfo] !== undefined && frameworkData[baseTypeInfo] !== null && subdata.app !== undefined && subdata.app !== null) {
|
||||
if (frameworkData[baseTypeInfo].name.toLowerCase().replaceAll("_", " ") === subdata.app.toLowerCase().replaceAll("_", " ")) {
|
||||
console.log("Name: ", frameworkData[baseTypeInfo], baseTypeInfo)
|
||||
console.log("Name2: ", subdata.app)
|
||||
if (frameworkData[baseTypeInfo].name !== undefined && frameworkData[baseTypeInfo].name.toLowerCase().replaceAll("_", " ") === subdata.app.toLowerCase().replaceAll("_", " ")) {
|
||||
highlight = true
|
||||
}
|
||||
}
|
||||
|
||||
@@ -164,7 +164,7 @@ const Search = (props) => {
|
||||
<DocsGrid maxRows={6} parsedXs={12} showSuggestion={true} globalUrl={globalUrl} isMobile={isMobile} userdata={userdata} />
|
||||
:
|
||||
curTab === 3 ?
|
||||
<CreatorGrid maxRows={3} parsedXs={4} showSuggestion={true} globalUrl={globalUrl} isMobile={isMobile} userdata={userdata} />
|
||||
<CreatorGrid parsedXs={4} showSuggestion={true} globalUrl={globalUrl} isMobile={isMobile} userdata={userdata} />
|
||||
:
|
||||
null}
|
||||
</div>
|
||||
|
||||
@@ -2949,9 +2949,7 @@ const Workflows = (props) => {
|
||||
|
||||
const WorkflowView = () => {
|
||||
if (workflows.length === 0) {
|
||||
console.log("USER: ", userdata)
|
||||
console.log("PROPS: ", props)
|
||||
if (userdata.tutorials !== undefined && userdata.tutorials !== null && !userdata.tutorials.includes("getting-started")) {
|
||||
if ((userdata.tutorials !== undefined && userdata.tutorials !== null && !userdata.tutorials.includes("getting-started")) || userdata.tutorials === null) {
|
||||
return <Navigate to="/getting-started" replace />;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user