From 101f878643ce77c3c47b7cfa02480f306cfbbfb4 Mon Sep 17 00:00:00 2001 From: frikky Date: Wed, 1 Dec 2021 22:22:50 +0100 Subject: [PATCH] Fixed a copy bug for firefox --- docker-compose.yml | 4 +-- frontend/src/views/Admin.jsx | 10 +++----- frontend/src/views/AngularWorkflow.jsx | 35 ++++++++++++++++++++++---- frontend/src/views/Docs.jsx | 8 +++--- frontend/src/views/SettingsPage.jsx | 6 ++--- frontend/src/views/Workflows.jsx | 2 +- 6 files changed, 45 insertions(+), 20 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index b03ecd3f..1a54e2ff 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,7 +1,7 @@ version: '3' services: frontend: - #build: ./frontend + build: ./frontend image: ghcr.io/frikky/shuffle-frontend:nightly container_name: shuffle-frontend hostname: shuffle-frontend @@ -16,7 +16,7 @@ services: depends_on: - backend backend: - build: ./backend + #build: ./backend image: ghcr.io/frikky/shuffle-backend:nightly container_name: shuffle-backend hostname: ${BACKEND_HOSTNAME} diff --git a/frontend/src/views/Admin.jsx b/frontend/src/views/Admin.jsx index a4a0de47..13ee69df 100644 --- a/frontend/src/views/Admin.jsx +++ b/frontend/src/views/Admin.jsx @@ -1764,16 +1764,14 @@ const Admin = (props) => { run2FASetup(userdata); }} disabled={ - (selectedUser.role === "admin" && - selectedUser.username !== userdata.username) || - selectedUser.active === false + (selectedUser.role === "admin" && selectedUser.username !== userdata.username) } variant="outlined" color="primary" > - {selectedUser.mfa_info !== undefined && - selectedUser.mfa_info !== null && - selectedUser.mfa_info.active === true + { selectedUser.mfa_info !== undefined && + selectedUser.mfa_info !== null && + selectedUser.mfa_info.active === true ? "Disable 2FA" : "Enable 2FA"} diff --git a/frontend/src/views/AngularWorkflow.jsx b/frontend/src/views/AngularWorkflow.jsx index 2643c0ec..3c2c62c4 100644 --- a/frontend/src/views/AngularWorkflow.jsx +++ b/frontend/src/views/AngularWorkflow.jsx @@ -2983,6 +2983,16 @@ const AngularWorkflow = (props) => { } } + if ( + event.target !== undefined && + event.target !== null + ) { + if (event.target.localName !== "body") { + console.log("Skipping because body is not targeted") + return; + } + } + console.log("CTRL+C"); if (cy !== undefined) { var cydata = cy.$(":selected").jsons(); @@ -3051,18 +3061,30 @@ const AngularWorkflow = (props) => { }; const handlePaste = (event) => { - //console.log(event) + //console.log("EV: ", event) if ( event.path !== undefined && event.path !== null && event.path.length > 0 ) { - //console.log(event.path[0]) + console.log("PATH: ", event.path[0]) if (event.path[0].localName !== "body") { //console.log("Skipping because body is not targeted") return; } - } + } + + console.log("PATH2: ", event.target) + if ( + event.target !== undefined && + event.target !== null + ) { + if (event.target.localName !== "body") { + //console.log("Skipping because body is not targeted") + return; + } + } + event.preventDefault(); const clipboard = (event.originalEvent || event).clipboardData.getData( @@ -3078,6 +3100,7 @@ const AngularWorkflow = (props) => { for (var key in parsedjson) { const item = parsedjson[key]; console.log("Adding: ", item); + item.data.id = uuidv4() cy.add({ group: item.group, @@ -5025,7 +5048,7 @@ const AngularWorkflow = (props) => { : -
+
{extraMessage}
@@ -10571,7 +10594,9 @@ const AngularWorkflow = (props) => { executionData.completed_at !== null && executionData.completed_at > 0 ? (
- + { + console.log(executionData) + }}> Finished   diff --git a/frontend/src/views/Docs.jsx b/frontend/src/views/Docs.jsx index 6c3df78d..a99f39c4 100644 --- a/frontend/src/views/Docs.jsx +++ b/frontend/src/views/Docs.jsx @@ -72,13 +72,14 @@ const Docs = (props) => { position: "relative", padding: 30, paddingTop: 15, - height: "80vh", marginTop: 15, + minHeight: "50vh", + //height: "50vh", }; const SideBar = { maxWidth: 250, - flex: "1", + flex: 1, position: "fixed", }; @@ -649,8 +650,9 @@ const Docs = (props) => { // // {imageModal} + // Padding and zIndex etc set because of footer in cloud. const loadedCheck = ( -
+
{postDataBrowser} {postDataMobile}
diff --git a/frontend/src/views/SettingsPage.jsx b/frontend/src/views/SettingsPage.jsx index 7c6a4a87..7f60aef0 100644 --- a/frontend/src/views/SettingsPage.jsx +++ b/frontend/src/views/SettingsPage.jsx @@ -384,12 +384,12 @@ const Settings = (props) => { {data.name} - {data.collection.name} + {data.collection} {data.name} @@ -746,7 +746,7 @@ const Settings = (props) => { > ethereum-icon diff --git a/frontend/src/views/Workflows.jsx b/frontend/src/views/Workflows.jsx index 1bd9abf1..f717f9c5 100644 --- a/frontend/src/views/Workflows.jsx +++ b/frontend/src/views/Workflows.jsx @@ -2521,8 +2521,8 @@ const Workflows = (props) => { Learn more about Workflows