-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
romansharapov19
committed
Nov 12, 2023
1 parent
6486ee5
commit ef2f721
Showing
8 changed files
with
150 additions
and
104 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,30 @@ | ||
import { shallow } from "zustand/shallow"; | ||
import useStore from "../store"; | ||
import { shallow } from 'zustand/shallow'; | ||
import useStore from '../store'; | ||
|
||
const selector = (store) => ({ | ||
outputString: store.outputString, | ||
completionType: store.completionType | ||
outputString: store.outputString, | ||
completionType: store.completionType, | ||
}); | ||
export default function Display() { | ||
const store = useStore(selector, shallow); | ||
|
||
const store = useStore(selector, shallow); | ||
|
||
|
||
return ( | ||
<div className="flex flex-col rounded-md bg-white shadow-xl border w-[600px] z-[999999]"> | ||
<p className={"rounded-t-md px-2 py-1 bg-purple-500 text-white text-sm"}> | ||
Output | ||
</p> | ||
<label className="flex px-2 py-1 w-full items-center justify-center"> | ||
{store.completionType !== "openAIImages" ? <p className=" text-lg font-bold">{store.outputString}</p> : <img src={store.outputString} alt="output" width="1024" height="1024"></img> } | ||
</label> | ||
</div> | ||
); | ||
} | ||
return ( | ||
<div className="flex flex-col rounded-md bg-white shadow-xl border w-[600px] z-[100]"> | ||
<p className="rounded-t-md px-2 py-1 bg-purple-500 text-white text-sm"> | ||
Output | ||
</p> | ||
<label className="flex px-2 py-1 w-full items-center justify-center"> | ||
{store.completionType !== 'openAIImages' ? ( | ||
<p className=" text-lg font-bold">{store.outputString}</p> | ||
) : ( | ||
<img | ||
src={store.outputString} | ||
alt="output" | ||
width="1024" | ||
height="1024" | ||
/> | ||
)} | ||
</label> | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,19 @@ | ||
import React from "react"; | ||
import { Handle } from "reactflow"; | ||
import CustomHandle from "../components/Handler"; | ||
import React from 'react'; | ||
import CustomHandle from '../components/Handler'; | ||
|
||
export default function End() { | ||
return ( | ||
<div className="flex rounded-md bg-white shadow-xl border w-20"> | ||
<label className="flex px-2 py-1 w-full items-center justify-center"> | ||
<p className="text-lg font-bold">🛑</p> | ||
</label> | ||
<CustomHandle className="w-2 h-2" type="target" position="top" isConnectable={1} /> | ||
</div> | ||
); | ||
return ( | ||
<div className="flex rounded-md bg-white shadow-xl b border-2 border-red-400"> | ||
<label className="flex gap-4 m-2 px-2 py-1 w-full items-center justify-center"> | ||
<p className="text-lg font-bold">🛑</p> | ||
<p className="text-lg font-bold">End</p> | ||
</label> | ||
<CustomHandle | ||
className="w-2 h-2" | ||
type="target" | ||
position="top" | ||
isConnectable={1} | ||
/> | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,19 @@ | ||
import React from "react"; | ||
import { Handle } from "reactflow"; | ||
import CustomHandle from "../components/Handler"; | ||
import React from 'react'; | ||
import CustomHandle from '../components/Handler'; | ||
|
||
export default function Start() { | ||
return ( | ||
<div className="flex rounded-md bg-white shadow-xl border w-20"> | ||
<label className="flex px-2 py-1 w-full items-center justify-center"> | ||
<p className=" text-lg font-bold">🟢</p> | ||
</label> | ||
<CustomHandle className="w-2 h-2" type="source" position="bottom" isConnectable={1} /> | ||
</div> | ||
); | ||
return ( | ||
<div className="flex rounded-md bg-white shadow-xl border-2 border-green-400"> | ||
<label className="flex gap-4 m-2 px-2 py-1 w-full items-center justify-center"> | ||
<p className="text-lg font-bold">🟢</p> | ||
<p className="text-lg font-bold">Start</p> | ||
</label> | ||
<CustomHandle | ||
className="w-2 h-2" | ||
type="source" | ||
position="bottom" | ||
isConnectable={1} | ||
/> | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
export default function Tutorial() { | ||
return ( | ||
<div className="rounded-md bg-white shadow-xl border-2 p-2 w-96"> | ||
<p> | ||
Here is <strong>VisualChain</strong>, to start please drag the AI | ||
components from the sidebar. | ||
</p> | ||
<p> | ||
Then you want and connect the nodes and if all the connections are | ||
correct just hit the <strong>Run</strong> button and you will see magic | ||
happen. | ||
</p> | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters