Added description to pages
This commit is contained in:
parent
ddd0b05947
commit
f1f36024e9
2 changed files with 68 additions and 46 deletions
|
|
@ -67,7 +67,7 @@ export default function CommunityPage() {
|
||||||
}, []);
|
}, []);
|
||||||
return (
|
return (
|
||||||
<div className="w-full h-full flex overflow-auto flex-col bg-muted px-16">
|
<div className="w-full h-full flex overflow-auto flex-col bg-muted px-16">
|
||||||
<div className="w-full flex justify-between py-12 pb-8 px-6">
|
<div className="w-full flex justify-between py-12 pb-2 px-6">
|
||||||
<span className="text-2xl flex items-center justify-center gap-2 font-semibold">
|
<span className="text-2xl flex items-center justify-center gap-2 font-semibold">
|
||||||
<Users2 className="w-6" />
|
<Users2 className="w-6" />
|
||||||
Community Examples
|
Community Examples
|
||||||
|
|
@ -81,6 +81,9 @@ export default function CommunityPage() {
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<span className="flex pb-8 px-6 w-[70%] text-muted-foreground">
|
||||||
|
Discover and learn from shared examples by the LangFlow community. We welcome new example contributions that can help our community explore new and powerful features.
|
||||||
|
</span>
|
||||||
<div className="w-full p-4 grid gap-4 md:grid-cols-2 lg:grid-cols-4">
|
<div className="w-full p-4 grid gap-4 md:grid-cols-2 lg:grid-cols-4">
|
||||||
{!loadingExamples &&
|
{!loadingExamples &&
|
||||||
examples.map((flow, idx) => (
|
examples.map((flow, idx) => (
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,16 @@ import ExtraSidebar from "../../components/ExtraSidebarComponent";
|
||||||
import { ReactFlowProvider } from "reactflow";
|
import { ReactFlowProvider } from "reactflow";
|
||||||
import FlowPage from "../FlowPage";
|
import FlowPage from "../FlowPage";
|
||||||
import { useContext, useEffect, useState } from "react";
|
import { useContext, useEffect, useState } from "react";
|
||||||
import { SunIcon, MoonIcon, BellIcon, GithubIcon, Download, Upload, Plus, Home } from "lucide-react";
|
import {
|
||||||
|
SunIcon,
|
||||||
|
MoonIcon,
|
||||||
|
BellIcon,
|
||||||
|
GithubIcon,
|
||||||
|
Download,
|
||||||
|
Upload,
|
||||||
|
Plus,
|
||||||
|
Home,
|
||||||
|
} from "lucide-react";
|
||||||
import { TabsContext } from "../../contexts/tabsContext";
|
import { TabsContext } from "../../contexts/tabsContext";
|
||||||
import AlertDropdown from "../../alerts/alertDropDown";
|
import AlertDropdown from "../../alerts/alertDropDown";
|
||||||
import { alertContext } from "../../contexts/alertContext";
|
import { alertContext } from "../../contexts/alertContext";
|
||||||
|
|
@ -20,56 +29,66 @@ import { FaGithub } from "react-icons/fa";
|
||||||
|
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
|
|
||||||
import { updateFlowInDatabase, uploadFlowsToDatabase } from "../../controllers/API";
|
import {
|
||||||
|
updateFlowInDatabase,
|
||||||
|
uploadFlowsToDatabase,
|
||||||
|
} from "../../controllers/API";
|
||||||
import { MenuBar } from "../../components/headerComponent/components/menuBar";
|
import { MenuBar } from "../../components/headerComponent/components/menuBar";
|
||||||
import { CardComponent } from "./components/cardComponent";
|
import { CardComponent } from "./components/cardComponent";
|
||||||
import { useNavigate } from "react-router-dom";
|
import { useNavigate } from "react-router-dom";
|
||||||
export default function HomePage() {
|
export default function HomePage() {
|
||||||
const {
|
const { flows, setTabId, downloadFlows, uploadFlows, addFlow } =
|
||||||
flows,
|
useContext(TabsContext);
|
||||||
setTabId,
|
|
||||||
downloadFlows,
|
|
||||||
uploadFlows,
|
|
||||||
addFlow,
|
|
||||||
} = useContext(TabsContext);
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
setTabId("");
|
setTabId("");
|
||||||
}, [])
|
}, []);
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
return (
|
return (
|
||||||
<div
|
<div className="w-full h-full flex overflow-auto flex-col bg-muted px-16">
|
||||||
className="w-full h-full flex overflow-auto flex-col bg-muted px-16"
|
<div className="w-full flex justify-between py-12 pb-2 px-6">
|
||||||
>
|
|
||||||
<div className="w-full flex justify-between py-12 pb-8 px-6">
|
|
||||||
<span className="text-2xl flex items-center justify-center gap-2 font-semibold">
|
<span className="text-2xl flex items-center justify-center gap-2 font-semibold">
|
||||||
<Home className="w-6" />My Projects
|
<Home className="w-6" />
|
||||||
|
My Projects
|
||||||
</span>
|
</span>
|
||||||
<div className="flex gap-2">
|
<div className="flex gap-2">
|
||||||
<Button variant="primary" onClick={() => {
|
<Button
|
||||||
|
variant="primary"
|
||||||
|
onClick={() => {
|
||||||
downloadFlows();
|
downloadFlows();
|
||||||
}}>
|
}}
|
||||||
|
>
|
||||||
<Download className="w-4 mr-2" />
|
<Download className="w-4 mr-2" />
|
||||||
Download Database
|
Download Database
|
||||||
</Button>
|
</Button>
|
||||||
<Button variant="primary" onClick={() => {uploadFlows();}}>
|
<Button
|
||||||
|
variant="primary"
|
||||||
|
onClick={() => {
|
||||||
|
uploadFlows();
|
||||||
|
}}
|
||||||
|
>
|
||||||
<Upload className="w-4 mr-2" />
|
<Upload className="w-4 mr-2" />
|
||||||
Upload Database
|
Upload Database
|
||||||
</Button>
|
</Button>
|
||||||
<Button variant="primary" onClick={() => {addFlow().then((id) => {
|
<Button
|
||||||
navigate("/flow/"+id);
|
variant="primary"
|
||||||
});}}>
|
onClick={() => {
|
||||||
|
addFlow().then((id) => {
|
||||||
|
navigate("/flow/" + id);
|
||||||
|
});
|
||||||
|
}}
|
||||||
|
>
|
||||||
<Plus className="w-4 mr-2" />
|
<Plus className="w-4 mr-2" />
|
||||||
New Project
|
New Project
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<span className="flex pb-8 px-6 text-muted-foreground w-[60%]">
|
||||||
|
Manage your personal projects. Download or upload your complete project
|
||||||
|
collection.
|
||||||
|
</span>
|
||||||
<div className="w-full p-4 grid gap-4 md:grid-cols-2 lg:grid-cols-4">
|
<div className="w-full p-4 grid gap-4 md:grid-cols-2 lg:grid-cols-4">
|
||||||
{flows.map((flow, idx) => (
|
{flows.map((flow, idx) => (
|
||||||
<CardComponent
|
<CardComponent key={idx} flow={flow} id={flow.id} />
|
||||||
key={idx}
|
|
||||||
flow={flow}
|
|
||||||
id={flow.id}
|
|
||||||
/>
|
|
||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue