Fix: Make chat trigger appear again and Change build position
This commit is contained in:
parent
f075104f8a
commit
abe41b2aef
2 changed files with 12 additions and 3 deletions
|
|
@ -5,7 +5,7 @@ import IconComponent from "../../genericIconComponent";
|
||||||
export default function ChatTrigger({}): JSX.Element {
|
export default function ChatTrigger({}): JSX.Element {
|
||||||
return (
|
return (
|
||||||
<Transition
|
<Transition
|
||||||
show={!open}
|
show={true}
|
||||||
appear={true}
|
appear={true}
|
||||||
enter="transition ease-out duration-300"
|
enter="transition ease-out duration-300"
|
||||||
enterFrom="translate-y-96"
|
enterFrom="translate-y-96"
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,12 @@
|
||||||
import { Transition } from "@headlessui/react";
|
import { Transition } from "@headlessui/react";
|
||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
import Loading from "../../../components/ui/loading";
|
import Loading from "../../../components/ui/loading";
|
||||||
|
import { postBuildInit } from "../../../controllers/API";
|
||||||
|
import { FlowType } from "../../../types/flow";
|
||||||
|
|
||||||
import useAlertStore from "../../../stores/alertStore";
|
import useAlertStore from "../../../stores/alertStore";
|
||||||
import useFlowStore from "../../../stores/flowStore";
|
import useFlowStore from "../../../stores/flowStore";
|
||||||
import { FlowType } from "../../../types/flow";
|
import { parsedDataType } from "../../../types/components";
|
||||||
import { validateNodes } from "../../../utils/reactflowUtils";
|
import { validateNodes } from "../../../utils/reactflowUtils";
|
||||||
import RadialProgressComponent from "../../RadialProgress";
|
import RadialProgressComponent from "../../RadialProgress";
|
||||||
import IconComponent from "../../genericIconComponent";
|
import IconComponent from "../../genericIconComponent";
|
||||||
|
|
@ -43,6 +46,7 @@ export default function BuildTrigger({
|
||||||
const startTime = Date.now();
|
const startTime = Date.now();
|
||||||
setIsBuilding(true);
|
setIsBuilding(true);
|
||||||
|
|
||||||
|
|
||||||
await enforceMinimumLoadingTime(startTime, minimumLoadingTime);
|
await enforceMinimumLoadingTime(startTime, minimumLoadingTime);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error("Error:", error);
|
console.error("Error:", error);
|
||||||
|
|
@ -51,6 +55,11 @@ export default function BuildTrigger({
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
const checkInputAndOutput = useFlowStore(
|
||||||
|
(state) => state.checkInputAndOutput
|
||||||
|
);
|
||||||
|
|
||||||
async function enforceMinimumLoadingTime(
|
async function enforceMinimumLoadingTime(
|
||||||
startTime: number,
|
startTime: number,
|
||||||
minimumLoadingTime: number
|
minimumLoadingTime: number
|
||||||
|
|
@ -74,7 +83,7 @@ export default function BuildTrigger({
|
||||||
leaveFrom="translate-y-0"
|
leaveFrom="translate-y-0"
|
||||||
leaveTo="translate-y-96"
|
leaveTo="translate-y-96"
|
||||||
>
|
>
|
||||||
<div className="fixed bottom-20 right-4">
|
<div className={checkInputAndOutput() ? "fixed bottom-20 right-4" : "fixed bottom-4 right-4"}>
|
||||||
<div
|
<div
|
||||||
className={`${eventClick} round-button-form`}
|
className={`${eventClick} round-button-form`}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue