Minor UI fixes for Shuffle Tools dragging

This commit is contained in:
Frikky
2025-01-09 22:54:35 +01:00
parent 38cb469cbb
commit aab46cca61
2 changed files with 18 additions and 4 deletions
@@ -133,14 +133,18 @@ const DetectionExplorer = (props) => {
const handleConnectClick = () => { const handleConnectClick = () => {
if (detectionWorkflowId !== "") { if (detectionWorkflowId !== "") {
console.log("Already have a workflow ID for this detection")
//toast.info(`Already have a detection workflow for ${detectionInfo?.category}`)
// FIXME: Show the Usecase UI for how to fix the workflow(s) // FIXME: Show the Usecase UI for how to fix the workflow(s)
// Instead loading full workflow and showing it directly? Hmm // Instead loading full workflow and showing it directly? Hmm
//toast.warn("Please reload the UI to load the detection status") //toast.warn("Please reload the UI to load the detection status")
return //return
} }
if (isDetectionActive) { if (isDetectionActive) {
return console.log("Already connected")
//toast.info(`Connected to ${detectionInfo?.category}`)
//return
} }
if (detectionInfo.category === undefined || detectionInfo.category === null) { if (detectionInfo.category === undefined || detectionInfo.category === null) {
@@ -276,7 +280,7 @@ const DetectionExplorer = (props) => {
}} }}
> >
<Typography variant="h6" component="div"> <Typography variant="h6" component="div">
{detectionInfo?.title} {filteredRules === undefined || filteredRules === null ? null : `(${filteredRules?.length} rules)`} {detectionInfo?.title} {filteredRules === undefined || filteredRules === null ? null : `(${filteredRules?.length} rule${filteredRules?.length > 1 ? "s" : ""})`}
</Typography> </Typography>
<div style={{display: "flex", }}> <div style={{display: "flex", }}>
+10
View File
@@ -10021,6 +10021,13 @@ const releaseToConnectLabel = "Release to Connect"
const small = props.small const small = props.small
const actionString = props.action const actionString = props.action
const [hover, setHover] = React.useState(false); const [hover, setHover] = React.useState(false);
React.useEffect(() => {
if(app.name === "Shuffle Tools"){
if (app.actions !== undefined && (app.actions === null || app.actions.length === 1)) {
loadAppConfig(app.id, false)
}
}
}, [])
if (app === undefined || app === null) { if (app === undefined || app === null) {
return ( return (
@@ -10119,6 +10126,8 @@ const releaseToConnectLabel = "Release to Connect"
}} }}
key={app.id} key={app.id}
dragging={false} dragging={false}
position={{x: 0, y: 0}}
defaultPosition={{x: 0, y: 0}}
> >
<Paper <Paper
square square
@@ -10533,6 +10542,7 @@ const releaseToConnectLabel = "Release to Connect"
x: 0, x: 0,
y: 0, y: 0,
}} }}
defaultPosition={{x: 0, y: 0}}
> >
<div style={{ textDecoration: "none", color: "white", }} onClick={(event) => { <div style={{ textDecoration: "none", color: "white", }} onClick={(event) => {
clickedApp(hit) clickedApp(hit)