From 20bde3de2a217265da5df3d77f53851638fdeb6b Mon Sep 17 00:00:00 2001 From: frikky Date: Fri, 22 Jul 2022 01:34:02 +0200 Subject: [PATCH] Fixed more welcome pages to work better and set priorities --- backend/go-app/main.go | 1 + frontend/public/images/social/discord.png | Bin 0 -> 9763 bytes .../src/components/DetectionFramework.jsx | 2 +- frontend/src/components/Searchfield.js | 5 +- frontend/src/components/WelcomeForm.jsx | 81 ++++++++++-------- frontend/src/views/GettingStarted.jsx | 2 +- frontend/src/views/Welcome.jsx | 36 ++++---- 7 files changed, 71 insertions(+), 56 deletions(-) create mode 100644 frontend/public/images/social/discord.png diff --git a/backend/go-app/main.go b/backend/go-app/main.go index ee98591d..89732770 100644 --- a/backend/go-app/main.go +++ b/backend/go-app/main.go @@ -1389,6 +1389,7 @@ func handleLogin(resp http.ResponseWriter, request *http.Request) { Value: Userdata.Session, Expiration: expiration.Unix(), }) + loginData = fmt.Sprintf(`{"success": true, "cookies": [{"key": "session_token", "value": "%s", "expiration": %d}]}`, Userdata.Session, expiration.Unix()) newData, err := json.Marshal(returnValue) if err == nil { diff --git a/frontend/public/images/social/discord.png b/frontend/public/images/social/discord.png new file mode 100644 index 0000000000000000000000000000000000000000..c3a1b58dc3e993b4ddc36c05c25d30991a5046f1 GIT binary patch literal 9763 zcmbVyg-;yJ7cK5iaa)QODemrCinEK`!r~NLin|vpi?x&j#cgqSckALV#T`DR$m{RD z|KLqBx#yhRn|m^uWRjbS)z(tM$DzhSLPEk?nMLA2Jn^6c~3YR}e>Ih75JzoZEYx*+IJ!wxe2Zz>Lt=31RKjxd9Dx;2yd zB3BUxUX8z0yC+@L_4&L>mx>N@dRs&pim4h}5`A-`Xl(dy3q1~{&|ka1=khm@>iO9% zARjVjwYJf&AKVUoip?vx&LqJ$`s>9NCNFf1^R?W{HCeFq#lDy3OQ+n6W4W)`=SZJn zdV@PnN--|so&gMHgw&XBnpP7Wsmq3GiKKi9d zwBZP|-~OXP4@G9f^O$tg{-YmY zMv`(WG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$xm_tcD%D{X+YxaxxJZ{aY(UH^N`x6R4=CsrVz%R zD0aJwZ{)tMAjw@b6e!i}^xaPMp5zzaC%WK`mchn;Z#2w1BOB9^b6Rg1bL@EoEDPd^ zkp`XPvy$#Y1}1c>IKQp?)uyLz{5*qZM7w*dJDY^}qV=&z0NgSCrveR7@$^{<*Fj?=jWIbh^`)Bl=WayEv`Z z1~Sb3vrgDIBp7Dw)MR~4UwVo4q6aar4zYmtH}r6dbz(ij{)h>}RYFY0nm$gsi#y5p z0H;DWJAfGhsr8uQf{Lv2g1BlcEh}?6cbGN0e6`XNo-t={KKGn1kmX7J&#NQ~zK*hn zCU-JYp^XIM?_~Oj!0VyHer(0;OrymDS7}2@wL>*grQ%)Ww*9D7h_`?!B3(li}A&?%bT1siEt+J zxvE|LdN>W(C0rz;aB*Dkoc|b{E>t= z0-R_?Hl8*0Sbs09iF%PYUYcV+vuwF98rgWeE(YZr^m0p=tlM7Q4qS;M!qk#}F4`;& z9Fr=}FAOP|#kB?XgiAZNlqoqCrk4koD8;ihm|mI_M(U2iGHCR)-t8|9v=ea^U> zUkBjR3n z6IMJHp;c_)s|^EogfkiUA4Nf2VqigD+|~_@#yo#w5p4MbV)f*#J`d9h6=ys6mln3H zhSBb3E{fEDLle$zooi4DMZDdYQdKLocpu@yT+BY3peUaq@;*nI<#`KvJK#Hb{VfyU zg@88x+@!iKI)_aW#*2=k=zEB*HDW1se1Fg}3wWr-Y;a_-*mPh3qfGa6CF;5EH6_d7 zU^ngUC{wnZm29RoFrX>UzmVfgQ#GpIpp4HSAq&{ejb7%{GMC%0b+FTIuy=oGp8;!l zd6h*`WsLRIjiomym%hh)&nouwcXYhH*6ludwa5n^6J65-Ju@0JO{Ly3yEn1DNg)$r zWGxZiO_l@2q7r?}eW-R`W3--E=8Es { { Object.getOwnPropertyNames(discoveryData).length > 0 ? - + {paperTitle.length > 0 ? diff --git a/frontend/src/components/Searchfield.js b/frontend/src/components/Searchfield.js index f145cbbb..385600f7 100644 --- a/frontend/src/components/Searchfield.js +++ b/frontend/src/components/Searchfield.js @@ -54,9 +54,7 @@ const SearchField = props => { return null } - const isCloud = - window.location.host === "localhost:3002" || - window.location.host === "shuffler.io"; + const isCloud = window.location.host === "localhost:3002" || window.location.host === "shuffler.io"; if (window.location.pathname !== oldPath) { setSearchOpen(false) @@ -204,6 +202,7 @@ const SearchField = props => { const appGroup = hit.action_references === undefined || hit.action_references === null ? [] : hit.action_references const avatar = baseImage + console.log("CLOUD: ", isCloud) var parsedUrl = isCloud ? `/workflows/${hit.objectID}` : `https://shuffler.io/workflows/${hit.objectID}` parsedUrl += `?queryID=${hit.__queryID}` diff --git a/frontend/src/components/WelcomeForm.jsx b/frontend/src/components/WelcomeForm.jsx index eee12b40..ef05f66f 100644 --- a/frontend/src/components/WelcomeForm.jsx +++ b/frontend/src/components/WelcomeForm.jsx @@ -110,7 +110,7 @@ const WelcomeForm = (props) => { "user_id": userId, } - const url = `${globalUrl}/api/v1/updateuser` + const url = `${globalUrl}/api/v1/users/updateuser` fetch(url, { mode: "cors", method: "PUT", @@ -139,7 +139,7 @@ const WelcomeForm = (props) => { }); } - const sendOrgUpdate = (orgname, company_type, orgId) => { + const sendOrgUpdate = (orgname, company_type, orgId, priority) => { var data = { org_id: orgId, }; @@ -152,6 +152,10 @@ const WelcomeForm = (props) => { data.company_type = company_type } + if (priority.length > 0) { + data.priority = priority + } + const url = globalUrl + `/api/v1/orgs/${orgId}`; fetch(url, { mode: "cors", @@ -222,7 +226,7 @@ const WelcomeForm = (props) => { navigate(`/welcome?tab=2`) if (userdata.active_org !== undefined && userdata.active_org.id !== undefined && userdata.active_org.id !== null && userdata.active_org.id.length > 0) { - sendOrgUpdate(orgName, orgType, userdata.active_org.id) + sendOrgUpdate(orgName, orgType, userdata.active_org.id, "") } if (userdata.id !== undefined && userdata.id !== null && userdata.id.length > 0) { @@ -294,7 +298,7 @@ const WelcomeForm = (props) => { } const newButtonStyle = { - padding: 25, + padding: 22, flex: 1, margin: buttonMargin, minWidth: buttonWidth, @@ -306,6 +310,11 @@ const WelcomeForm = (props) => { case 0: return ( + {/*isCloud ? null : + + This data will be used within the product and NOT be shared unless cloud synchronization is configured. + + */} We need some more information in order to understand how we best can help you find relevant Usecases in Shuffle. Giving us this info is optional, but encouraged. @@ -384,8 +393,10 @@ const WelcomeForm = (props) => { return (
- Find the most relevant apps, then we'll help you find the most relevant workflows + Find your apps, then we'll help you find relevant workflows. Can't find what you're looking for? Contact support: support@shuffler.io + {/*The app framework helps us access and authenticate the most important APIs for you. */} + {/* @@ -461,27 +472,14 @@ const WelcomeForm = (props) => { ) case 2: return ( -
- - - What processes are you interested in? This will help us suggest relevant Workflows. +
+ + + What usecases are you interested in? This will help us suggest relevant Workflows. - - + - {/* - - */} {/* @@ -531,7 +545,7 @@ const WelcomeForm = (props) => { /> */} -
+
{selectionOpen === true ? { /> : null*/}
- {isCloud ? null : - - This data will be used within the product and NOT be shared unless cloud synchronization is configured. - - } {activeStep === steps.length ? (
You Will be Redirected to getting Start Page Wait for 5-sec. diff --git a/frontend/src/views/GettingStarted.jsx b/frontend/src/views/GettingStarted.jsx index c66e8daf..467fe554 100644 --- a/frontend/src/views/GettingStarted.jsx +++ b/frontend/src/views/GettingStarted.jsx @@ -2160,7 +2160,7 @@ const GettingStarted = (props) => { }) } }}> - Find relevant apps and start your automation journey + Find relevant apps and start your automation journey ), tutorial: "find_integrations", diff --git a/frontend/src/views/Welcome.jsx b/frontend/src/views/Welcome.jsx index c32c4934..c8fb7174 100644 --- a/frontend/src/views/Welcome.jsx +++ b/frontend/src/views/Welcome.jsx @@ -5,6 +5,7 @@ import { Grid, Container, Fade, + Typography, } from '@mui/material'; import theme from '../theme'; import { useNavigate, Link } from "react-router-dom"; @@ -68,21 +69,26 @@ const Welcome = (props) => {
{frameworkData === undefined || window.location.href.includes("tab=3") ? null : - - - +
+ + App Framework + + + + +
} )