diff --git a/backend/go-app/go.mod b/backend/go-app/go.mod index 34f91ce7..6318e789 100644 --- a/backend/go-app/go.mod +++ b/backend/go-app/go.mod @@ -2,7 +2,7 @@ module main go 1.16 -replace github.com/shuffle/shuffle-shared => ../../../shuffle-shared +//replace github.com/shuffle/shuffle-shared => ../../../shuffle-shared //replace github.com/frikky/kin-openapi => ../../../../git/kin-openapi //replace github.com/frikky/go-elasticsearch => ../../../../git/go-elasticsearch @@ -24,7 +24,7 @@ require ( github.com/h2non/filetype v1.1.3 github.com/nirasan/go-oauth-pkce-code-verifier v0.0.0-20170819232839-0fbfe93532da // indirect github.com/satori/go.uuid v1.2.0 - github.com/shuffle/shuffle-shared v0.2.68 + github.com/shuffle/shuffle-shared v0.2.69 go4.org v0.0.0-20201209231011-d4a079459e60 // indirect golang.org/x/crypto v0.0.0-20220112180741-5e0467b6c7ce google.golang.org/api v0.65.0 diff --git a/frontend/src/components/AppGrid.jsx b/frontend/src/components/AppGrid.jsx index 4a197d24..2878f570 100644 --- a/frontend/src/components/AppGrid.jsx +++ b/frontend/src/components/AppGrid.jsx @@ -301,7 +301,7 @@ const AppGrid = props => { {showSuggestion === true ? -
+
Can't find what you're looking for? diff --git a/frontend/src/components/CreatorGrid.jsx b/frontend/src/components/CreatorGrid.jsx index bc9bad64..e92153bd 100644 --- a/frontend/src/components/CreatorGrid.jsx +++ b/frontend/src/components/CreatorGrid.jsx @@ -38,7 +38,7 @@ const searchClient = algoliasearch("JNSS5CFDZZ", "db08e40265e2941b9a7d8f644b6e52 const CreatorGrid = props => { const { maxRows, showName, showSuggestion, isMobile, globalUrl, parsedXs } = props const rowHandler = maxRows === undefined || maxRows === null ? 50 : maxRows - const xs = parsedXs === undefined || parsedXs === null ? isMobile ? 6 : 2 : parsedXs + const xs = parsedXs === undefined || parsedXs === null ? isMobile ? 6 : 4 : parsedXs const theme = useTheme(); //const [apps, setApps] = React.useState([]); //const [filteredApps, setFilteredApps] = React.useState([]); @@ -153,9 +153,15 @@ const CreatorGrid = props => { {hits.map((data, index) => { workflowDelay += 50 + if (counted === 12/xs*rowHandler) { + return null + } + + counted += 1 + return ( - + @@ -188,7 +194,7 @@ const CreatorGrid = props => { {showSuggestion === true ? -
+
Can't find what you're looking for? @@ -221,7 +227,7 @@ const CreatorGrid = props => { }} color="primary" fullWidth={true} - placeholder="What apps do you want to see?" + placeholder="What are we missing?" type="" id="standard-required" margin="normal" diff --git a/frontend/src/components/DocsGrid.jsx b/frontend/src/components/DocsGrid.jsx index 4f7f75cb..706c861a 100644 --- a/frontend/src/components/DocsGrid.jsx +++ b/frontend/src/components/DocsGrid.jsx @@ -133,7 +133,6 @@ const DocsGrid = props => { var workflowDelay = -50 const Hits = ({ hits }) => { const [mouseHoverIndex, setMouseHoverIndex] = useState(-1) - var counted = 0 //console.log(hits) //var curhits = hits //if (hits.length > 0 && defaultApps.length === 0) { @@ -146,6 +145,7 @@ const DocsGrid = props => { // setInnerHits(hits) //} + var counted = 0 return ( {hits.map((data, index) => { @@ -166,21 +166,21 @@ const DocsGrid = props => { minWidth: "100%", } - //if (counted === 12/xs*rowHandler) { - // return null - //} - - console.log("DATA: ", data) + if (counted >= 12/xs*rowHandler) { + return null + } counted += 1 + var name = data.name === undefined ? data.filename.charAt(0).toUpperCase() + data.filename.slice(1).replaceAll("_", " ") + " - " + data.title : (data.name.charAt(0).toUpperCase()+data.name.slice(1)).replaceAll("_", " ") - if (name.length > 100) { - name = name.slice(0, 100)+"..." + if (name.length > 96) { + name = name.slice(0, 96)+"..." } + //const secondaryText = data.data !== undefined ? data.data.slice(0, 100)+"..." : "" const secondaryText = data.data !== undefined ? data.data.slice(0, 100)+"..." : "" const baseImage = const avatar = data.image_url === undefined ? @@ -282,7 +282,7 @@ const DocsGrid = props => { {showSuggestion === true ? -
+
Can't find what you're looking for? @@ -315,7 +315,7 @@ const DocsGrid = props => { }} color="primary" fullWidth={true} - placeholder="What apps do you want to see?" + placeholder="What are we missing?" type="" id="standard-required" margin="normal" diff --git a/frontend/src/components/WorkflowGrid.jsx b/frontend/src/components/WorkflowGrid.jsx index f639bce3..4d8a04dc 100644 --- a/frontend/src/components/WorkflowGrid.jsx +++ b/frontend/src/components/WorkflowGrid.jsx @@ -31,7 +31,7 @@ const AppGrid = props => { window.location.host === "shuffler.io"; const rowHandler = maxRows === undefined || maxRows === null ? 50 : maxRows - const xs = parsedXs === undefined || parsedXs === null ? isMobile ? 6 : 2 : parsedXs + const xs = parsedXs === undefined || parsedXs === null ? isMobile ? 6 : 4 : parsedXs const theme = useTheme(); //const [apps, setApps] = React.useState([]); //const [filteredApps, setFilteredApps] = React.useState([]); @@ -227,15 +227,20 @@ const AppGrid = props => { const [mouseHoverIndex, setMouseHoverIndex] = useState(-1) var counted = 0 - return ( {hits.map((data, index) => { workflowDelay += 50 + if (counted === 12/xs*rowHandler) { + return null + } + + counted += 1 + return ( - + @@ -287,7 +292,7 @@ const AppGrid = props => { {showSuggestion === true ? -
+
Can't find what you're looking for? diff --git a/frontend/src/views/Docs.jsx b/frontend/src/views/Docs.jsx index ef548460..74c882fc 100644 --- a/frontend/src/views/Docs.jsx +++ b/frontend/src/views/Docs.jsx @@ -25,8 +25,10 @@ import { } from "@material-ui/icons"; const Body = { - maxWidth: 1000, - minWidth: 768, + //maxWidth: 1000, + //minWidth: 768, + maxWidth: "100%", + minWidth: "100%", margin: "auto", display: "flex", height: "100%", @@ -108,8 +110,8 @@ const Docs = (defaultprops) => { }; const SideBar = { - maxWidth: 250, - flex: 1, + minWidth: 250, + maxWidth: 300, position: "sticky", top: 100, maxHeight: "83vh", @@ -346,11 +348,12 @@ const Docs = (defaultprops) => { const markdownStyle = { color: "rgba(255, 255, 255, 0.65)", - flex: "1", maxWidth: mobile ? "100%" : 750, overflow: "hidden", paddingBottom: 100, - marginLeft: mobile ? 0 : 50, + maxWidth: 750, + minWidth: 750, + margin: "auto", }; function OuterLink(props) { @@ -768,6 +771,7 @@ const Docs = (defaultprops) => { id="markdown_wrapper" escapeHtml={false} source={data} + style={{marginRight: 150}} renderers={{ link: OuterLink, image: Img, diff --git a/frontend/src/views/Search.jsx b/frontend/src/views/Search.jsx index da2e3bb5..f4e5497a 100644 --- a/frontend/src/views/Search.jsx +++ b/frontend/src/views/Search.jsx @@ -30,29 +30,29 @@ const bodyDivStyle = { overflowX: "hidden", } -const boxStyle = { - color: "white", - flex: "1", - marginLeft: 10, - marginRight: 10, - paddingLeft: 30, - paddingRight: 30, - paddingBottom: 30, - paddingTop: 30, - display: "flex", - flexDirection: "column", - overflowX: "hidden", - minHeight: 400, -} - // Should be different if logged in :| const Search = (props) => { - const { globalUrl, isLoaded, serverside, userdata } = props; + const { globalUrl, isLoaded, serverside, userdata, hidemargins, } = props; let navigate = useNavigate(); const [curTab, setCurTab] = useState(0); const iconStyle = { marginRight: 10 }; + const boxStyle = { + color: "white", + flex: "1", + marginLeft: 10, + marginRight: 10, + paddingLeft: 30, + paddingRight: 30, + paddingBottom: 30, + paddingTop: hidemargins === true ? 0 : 30, + display: "flex", + flexDirection: "column", + overflowX: "hidden", + minHeight: 400, + } + const views = { 0: "apps", 1: "workflows", @@ -62,7 +62,6 @@ const Search = (props) => { const setConfig = (event, inputValue) => { const newValue = parseInt(inputValue) - console.log("NEW: ", newValue) setCurTab(newValue) if (newValue === 0) { @@ -86,7 +85,10 @@ const Search = (props) => { extraQ = "&q="+foundQuery } - navigate(`/search?tab=${views[newValue]}`+extraQ) + + if ((serverside === false || serverside === undefined) && window.location.pathname.includes("/search")) { + navigate(`/search?tab=${views[newValue]}`+extraQ) + } } useEffect(() => { @@ -114,10 +116,10 @@ const Search = (props) => { // Random names for type & autoComplete. Didn't research :^) const landingpageDataBrowser = -
+
{ : curTab === 2 ? - + : curTab === 3 ? - + : null}