From 7a58953cc5fc6d8b373c9ba6867defd270b92932 Mon Sep 17 00:00:00 2001 From: Frikky Date: Fri, 31 May 2024 09:38:29 +0200 Subject: [PATCH] Merge --- frontend/src/components/Oauth2Auth.jsx | 2 + frontend/src/views/AngularWorkflow.jsx | 6 +- frontend/src/views/UpdateAuthentication.jsx | 113 +++++++++++++++----- 3 files changed, 87 insertions(+), 34 deletions(-) diff --git a/frontend/src/components/Oauth2Auth.jsx b/frontend/src/components/Oauth2Auth.jsx index 471e88b0..1ebf81dd 100755 --- a/frontend/src/components/Oauth2Auth.jsx +++ b/frontend/src/components/Oauth2Auth.jsx @@ -514,6 +514,8 @@ const AuthenticationOauth2 = (props) => { getAppAuthentication(true, true, true); } + toast("Authentication successful!") + // This is more a guess than anything // Should be handled in getAppAuthentication() // in the parent component to make it accurate, diff --git a/frontend/src/views/AngularWorkflow.jsx b/frontend/src/views/AngularWorkflow.jsx index 2275b47e..492e8ad9 100755 --- a/frontend/src/views/AngularWorkflow.jsx +++ b/frontend/src/views/AngularWorkflow.jsx @@ -8182,7 +8182,6 @@ const AngularWorkflow = (defaultprops) => { borderRadius: theme.palette.borderRadius, width: imagesize, height: imagesize, - pointerEvents: "none", // Stretch if necessary objectFit: "cover", // Center the object @@ -14938,9 +14937,6 @@ const AngularWorkflow = (defaultprops) => { top: isMobile ? 30 : appBarSize + 20, } - - - const TopCytoscapeBar = (props) => { if (workflow.public === true) { return null @@ -14956,6 +14952,7 @@ const AngularWorkflow = (defaultprops) => {
{

{workflow.name}

diff --git a/frontend/src/views/UpdateAuthentication.jsx b/frontend/src/views/UpdateAuthentication.jsx index 593eb1ee..ab78290e 100644 --- a/frontend/src/views/UpdateAuthentication.jsx +++ b/frontend/src/views/UpdateAuthentication.jsx @@ -10,6 +10,8 @@ import theme from '../theme.jsx'; //import { useAlert import { ToastContainer, toast } from "react-toastify" +//import "./CollapsibleList.css" + import AuthenticationOauth2 from "../components/Oauth2Auth.jsx"; import AuthenticationWindow from "../components/AuthenticationWindow.jsx"; import { base64_decode, appCategories } from "../views/AppCreator.jsx"; @@ -128,6 +130,12 @@ const SetAuthentication = (props) => { } }, []); + const [expandedIndex, setExpandedIndex] = useState(null); + + const handleToggle = (index) => { + setExpandedIndex(expandedIndex === index ? null : index); + }; + // Handle: // 1. Check for org_id, authentication, and app keys in queries // 2. Load the app auth info from the orgs' apps @@ -135,43 +143,90 @@ const SetAuthentication = (props) => { // Make sure to test both private and public apps const appname = app.name !== undefined ? app.name : ""; + const appLink = "/apps/" + app.id || ""; + + console.log("App: ", app) return (
{loadFail !== "" ? loadFail : -
- - Configure {appname} Authentication - - {app.authentication === undefined || app.authentication === null || app.authentication.length === 0 ? - null - : - app.authentication.type === "oauth2" || app.authentication.type === "oauth2-app" ? - + <>
+ + A Shuffle Organization has invited you to: Configure {appname} Authentication + + + {/* What does this mean box */} + + What does this mean? + + + A Shuffle Organization has invited you to configure authentication for this app so that they can use this authentication in one of their workflows. + + + + Authenticate Here: + + + + {app.authentication === undefined || app.authentication === null || app.authentication.length === 0 ? + null : - - } + app.authentication.type === "oauth2" || app.authentication.type === "oauth2-app" ? + + : + } + + + + What can they do with this? + + + + You can check the actions they want to use here. + + + + {/* Add a box below */} +
+
+ {app.actions?.map((item, index) => ( +
+
handleToggle(index)}> + {item.label} +
+ {expandedIndex === index && ( +
+ {item.description} +
+ )} +
+ ))} +
+
+
+ <> +
+ + }
)