Minor fixes
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
import React, { useState, useEffect, useRef, useContext } from 'react';
|
import React, { useState, useEffect, useRef, useContext } from 'react';
|
||||||
|
|
||||||
import {getTheme} from '../theme.jsx';
|
import {getTheme} from '../theme.jsx';
|
||||||
import { useNavigate, Link, useParams } from "react-router-dom";
|
import { useNavigate, Link, useParams, useLocation } from "react-router-dom";
|
||||||
import { toast } from "react-toastify"
|
import { toast } from "react-toastify"
|
||||||
|
|
||||||
import {
|
import {
|
||||||
@@ -102,7 +102,8 @@ const SearchData = props => {
|
|||||||
// setModalOpen(false);
|
// setModalOpen(false);
|
||||||
const trimmedValue = inputValue.trim();
|
const trimmedValue = inputValue.trim();
|
||||||
if (trimmedValue !== '') {
|
if (trimmedValue !== '') {
|
||||||
navigate(`/search?q=${trimmedValue}`, { state: trimmedValue, replace: true });
|
// Navigate to the search page (keep modal open by passing state)
|
||||||
|
navigate(`/search`, { state: trimmedValue, replace: true });
|
||||||
setSearchBarModalOpen(false);
|
setSearchBarModalOpen(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -916,7 +917,7 @@ const SearchData = props => {
|
|||||||
</List>
|
</List>
|
||||||
</Grid>
|
</Grid>
|
||||||
<Grid style={{ textAlign: "end", width: "100%", textTransform: 'capitalize', }}>
|
<Grid style={{ textAlign: "end", width: "100%", textTransform: 'capitalize', }}>
|
||||||
<Link to="/search" style={{ textDecoration: "none", color: "#f85a3e" }}>
|
<Link to="/search" onClick={handleLinkClick} style={{ textDecoration: "none", color: "#f85a3e" }}>
|
||||||
<Button style={{ textAlign: "center", textTransform: 'capitalize' }}>
|
<Button style={{ textAlign: "center", textTransform: 'capitalize' }}>
|
||||||
See More
|
See More
|
||||||
</Button>
|
</Button>
|
||||||
|
|||||||
@@ -25249,7 +25249,7 @@ const AngularWorkflow = (defaultprops) => {
|
|||||||
elements={elements}
|
elements={elements}
|
||||||
minZoom={0.35}
|
minZoom={0.35}
|
||||||
maxZoom={2.0}
|
maxZoom={2.0}
|
||||||
wheelSensitivity={0.25}
|
userZoomingEnabled={false}
|
||||||
style={{
|
style={{
|
||||||
width: workflow?.public && !isLoggedIn ? cytoscapeWidth + 50 : cytoscapeWidth,
|
width: workflow?.public && !isLoggedIn ? cytoscapeWidth + 50 : cytoscapeWidth,
|
||||||
height: workflow?.public && !isLoggedIn ? (bodyHeight - 50) : bodyHeight - 2,
|
height: workflow?.public && !isLoggedIn ? (bodyHeight - 50) : bodyHeight - 2,
|
||||||
@@ -25264,6 +25264,33 @@ const AngularWorkflow = (defaultprops) => {
|
|||||||
// FIXME: There's something specific loading when
|
// FIXME: There's something specific loading when
|
||||||
// you do the first hover of a node. Why is this different?
|
// you do the first hover of a node. Why is this different?
|
||||||
|
|
||||||
|
// Custom wheel handler for sensitivity for same zoom in and zoom out effect with mouse and touch pad
|
||||||
|
const container = incy.container();
|
||||||
|
if (container && !container._customWheelHandler) {
|
||||||
|
container._customWheelHandler = true;
|
||||||
|
container.addEventListener('wheel', (e) => {
|
||||||
|
e.preventDefault();
|
||||||
|
const sensitivity = 0.25;
|
||||||
|
|
||||||
|
const zoomFactor = Math.pow(10, -e.deltaY * sensitivity / 500);
|
||||||
|
const currentZoom = incy.zoom();
|
||||||
|
let newZoom = currentZoom * zoomFactor;
|
||||||
|
|
||||||
|
newZoom = Math.max(0.35, Math.min(2.0, newZoom));
|
||||||
|
|
||||||
|
// Zoom towards cursor position
|
||||||
|
const rect = container.getBoundingClientRect();
|
||||||
|
const position = {
|
||||||
|
x: e.clientX - rect.left,
|
||||||
|
y: e.clientY - rect.top
|
||||||
|
};
|
||||||
|
|
||||||
|
incy.zoom({
|
||||||
|
level: newZoom,
|
||||||
|
renderedPosition: position
|
||||||
|
});
|
||||||
|
}, { passive: false });
|
||||||
|
}
|
||||||
|
|
||||||
setCy(incy);
|
setCy(incy);
|
||||||
}}
|
}}
|
||||||
|
|||||||
@@ -65,6 +65,7 @@ import { Context } from "../context/ContextApi.jsx";
|
|||||||
|
|
||||||
import {
|
import {
|
||||||
SearchBox,
|
SearchBox,
|
||||||
|
StaticRefinementList,
|
||||||
RefinementList,
|
RefinementList,
|
||||||
InstantSearch,
|
InstantSearch,
|
||||||
connectSearchBox,
|
connectSearchBox,
|
||||||
@@ -1452,11 +1453,12 @@ const buttonBackground = "linear-gradient(to right, #f86a3e, #f34079)";
|
|||||||
const index = searchClient.initIndex("appsearch");
|
const index = searchClient.initIndex("appsearch");
|
||||||
|
|
||||||
console.log("Running appsearch for: ", appname);
|
console.log("Running appsearch for: ", appname);
|
||||||
if (appname === "integration") {
|
if (appname === "integration" || appname == "singul") {
|
||||||
// Redirect to https://singul.io
|
// Redirect to https://singul.io
|
||||||
window.location.href = "https://singul.io"
|
window.location.href = "https://singul.io"
|
||||||
} else if (appname === "shuffle_agent") {
|
} else if (appname === "shuffle_agent" || appname === "agent" || appname === "agents" || appname == "shuffle-agent") {
|
||||||
navigate("/agents")
|
navigate("/agents")
|
||||||
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
index
|
index
|
||||||
|
|||||||
@@ -107,7 +107,7 @@ const SetAuthentication = (props) => {
|
|||||||
// Set the orgsession to be a cookie for __session cookie
|
// Set the orgsession to be a cookie for __session cookie
|
||||||
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
document.cookie = "__session=" + orgsession + "; path=/; max-age=1800"; // Cookie expires in 30 min
|
document.cookie = "__session=" + orgsession + "; path=/; max-age=1800; SameSite=Lax"; // Cookie expires in 30 min
|
||||||
}, 1000)
|
}, 1000)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user