commit
25005ad590
3 changed files with 11 additions and 4 deletions
|
|
@ -70,7 +70,12 @@ export default function GenericNode({
|
||||||
.map((t: string, idx) => (
|
.map((t: string, idx) => (
|
||||||
<div key={idx}>
|
<div key={idx}>
|
||||||
{idx === 0 ? (
|
{idx === 0 ? (
|
||||||
<div className="px-5 py-2 mt-2 dark:text-white text-center">
|
<div
|
||||||
|
className={classNames(
|
||||||
|
"px-5 py-2 mt-2 dark:text-white text-center",
|
||||||
|
Object.keys(data.node.template).filter(key => !key.startsWith('_') && data.node.template[key].show).length === 0?"hidden":""
|
||||||
|
)}
|
||||||
|
>
|
||||||
Inputs
|
Inputs
|
||||||
</div>
|
</div>
|
||||||
) : (
|
) : (
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ import { DropDownComponentType } from "../../types/components";
|
||||||
import { classNames } from "../../utils";
|
import { classNames } from "../../utils";
|
||||||
|
|
||||||
export default function Dropdown({value, options, onSelect}:DropDownComponentType) {
|
export default function Dropdown({value, options, onSelect}:DropDownComponentType) {
|
||||||
let [internalValue,setInternalValue] = useState(value??"Choose an option")
|
let [internalValue,setInternalValue] = useState(value===""||!value?"Choose an option":value)
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Listbox value={internalValue} onChange={(value)=>{
|
<Listbox value={internalValue} onChange={(value)=>{
|
||||||
|
|
|
||||||
|
|
@ -26,6 +26,7 @@ export default function ExportModal() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const [checked,setChecked] = useState(true)
|
const [checked,setChecked] = useState(true)
|
||||||
|
const [name,setName] = useState(flows[tabIndex].name)
|
||||||
return (
|
return (
|
||||||
<Transition.Root show={open} appear={true} as={Fragment}>
|
<Transition.Root show={open} appear={true} as={Fragment}>
|
||||||
<Dialog
|
<Dialog
|
||||||
|
|
@ -100,15 +101,16 @@ export default function ExportModal() {
|
||||||
if(event.target.value!=""){
|
if(event.target.value!=""){
|
||||||
let newFlow = flows[tabIndex];
|
let newFlow = flows[tabIndex];
|
||||||
newFlow.name = event.target.value;
|
newFlow.name = event.target.value;
|
||||||
|
setName(event.target.value)
|
||||||
updateFlow(newFlow);
|
updateFlow(newFlow);
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
setErrorData({title:"Flow name can't be empty"})
|
setName(event.target.value)
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
type="text"
|
type="text"
|
||||||
name="name"
|
name="name"
|
||||||
value={flows[tabIndex].name ?? null}
|
value={name ?? null}
|
||||||
placeholder="File name"
|
placeholder="File name"
|
||||||
id="name"
|
id="name"
|
||||||
className="focus:border focus:border-blue block w-full px-3 py-2 border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-800 dark:border-gray-600 dark:focus:border-blue-500 dark:focus:ring-blue-500"
|
className="focus:border focus:border-blue block w-full px-3 py-2 border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-800 dark:border-gray-600 dark:focus:border-blue-500 dark:focus:ring-blue-500"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue