From 0636a81053d76705f478c6e47edf107bb8e6529c Mon Sep 17 00:00:00 2001 From: "Victor F. Santos" Date: Mon, 28 Apr 2025 17:49:19 -0300 Subject: [PATCH 01/27] feat: public agents base config --- src/components/LandingPage/Templates.tsx | 138 +---------------------- src/components/PublicAgents/config.ts | 135 ++++++++++++++++++++++ src/pages/preview/[agent].astro | 15 +++ 3 files changed, 156 insertions(+), 132 deletions(-) create mode 100644 src/components/PublicAgents/config.ts create mode 100644 src/pages/preview/[agent].astro diff --git a/src/components/LandingPage/Templates.tsx b/src/components/LandingPage/Templates.tsx index 81d020d3d..de7e99da4 100644 --- a/src/components/LandingPage/Templates.tsx +++ b/src/components/LandingPage/Templates.tsx @@ -5,136 +5,10 @@ import { Text } from './Text'; import { IoChatbubbleEllipsesOutline } from 'react-icons/io5'; import { useState } from 'react'; import { cn } from '@utils/cn'; - -type Template = { - name: string; - category: string; - image: string; - author: string; - socials: { - name: string; - logo: string; - followers: number; - }[]; -}; - -const templates: Template[] = [ - { - name: 'Stephanie', - category: 'Sports', - image: '/images/landing-page/templates/stephanie.png', - author: 'Fleek', - socials: [ - { - name: 'twitter', - logo: '/images/landing-page/templates/socials/x.svg', - followers: 16200, - }, - { - name: 'instagram', - logo: '/images/landing-page/templates/socials/instagram.svg', - followers: 32700, - }, - { - name: 'tiktok', - logo: '/images/landing-page/templates/socials/tiktok.svg', - followers: 112200, - }, - ], - }, - { - name: 'Olivia', - category: 'Companion', - image: '/images/landing-page/templates/olivia.png', - author: 'Fleek', - socials: [ - { - name: 'twitter', - logo: '/images/landing-page/templates/socials/x.svg', - followers: 56600, - }, - { - name: 'instagram', - logo: '/images/landing-page/templates/socials/instagram.svg', - followers: 98200, - }, - { - name: 'tiktok', - logo: '/images/landing-page/templates/socials/tiktok.svg', - followers: 85300, - }, - ], - }, - { - name: 'Crypto Chris', - category: 'Crypto', - image: '/images/landing-page/templates/chris.png', - author: 'Fleek', - socials: [ - { - name: 'twitter', - logo: '/images/landing-page/templates/socials/x.svg', - followers: 112400, - }, - { - name: 'instagram', - logo: '/images/landing-page/templates/socials/instagram.svg', - followers: 2400, - }, - { - name: 'tiktok', - logo: '/images/landing-page/templates/socials/tiktok.svg', - followers: 1100, - }, - ], - }, - { - name: 'Kanye East', - category: 'Culture', - image: '/images/landing-page/templates/kanye.png', - author: 'Fleek', - socials: [ - { - name: 'twitter', - logo: '/images/landing-page/templates/socials/x.svg', - followers: 1500, - }, - { - name: 'instagram', - logo: '/images/landing-page/templates/socials/instagram.svg', - followers: 1100, - }, - { - name: 'tiktok', - logo: '/images/landing-page/templates/socials/tiktok.svg', - followers: 659, - }, - ], - }, - { - name: 'Kiki', - category: 'NSFW', - image: '/images/landing-page/templates/kiki.png', - author: 'Fleek', - socials: [ - { - name: 'twitter', - logo: '/images/landing-page/templates/socials/x.svg', - followers: 9240, - }, - { - name: 'instagram', - logo: '/images/landing-page/templates/socials/instagram.svg', - followers: 56700, - }, - { - name: 'tiktok', - logo: '/images/landing-page/templates/socials/tiktok.svg', - followers: 32000, - }, - ], - }, -]; +import { + publicAgents, + type PublicAgent, +} from '@components/PublicAgents/config'; const ContinuousAutoscroll: KeenSliderPlugin = (slider) => { let raf: number; @@ -249,7 +123,7 @@ export const Templates = () => { }, )} > - {templates.map((template) => ( + {publicAgents.map((template) => (
@@ -260,7 +134,7 @@ export const Templates = () => { ); }; -export const TemplateCard = ({ template }: { template: Template }) => { +export const TemplateCard = ({ template }: { template: PublicAgent }) => { function formatCompactNumber(value: number): string { return new Intl.NumberFormat('en', { notation: 'compact', diff --git a/src/components/PublicAgents/config.ts b/src/components/PublicAgents/config.ts new file mode 100644 index 000000000..a5e057b5a --- /dev/null +++ b/src/components/PublicAgents/config.ts @@ -0,0 +1,135 @@ +export type PublicAgent = { + slug: string; + name: string; + category: string; + image: string; + author: string; + socials: { + name: string; + logo: string; + followers: number; + }[]; +}; + +export const publicAgents: PublicAgent[] = [ + { + slug: 'stephanie', + name: 'Stephanie', + category: 'Sports', + image: '/images/landing-page/templates/stephanie.png', + author: 'Fleek', + socials: [ + { + name: 'twitter', + logo: '/images/landing-page/templates/socials/x.svg', + followers: 16200, + }, + { + name: 'instagram', + logo: '/images/landing-page/templates/socials/instagram.svg', + followers: 32700, + }, + { + name: 'tiktok', + logo: '/images/landing-page/templates/socials/tiktok.svg', + followers: 112200, + }, + ], + }, + { + slug: 'olivia', + name: 'Olivia', + category: 'Companion', + image: '/images/landing-page/templates/olivia.png', + author: 'Fleek', + socials: [ + { + name: 'twitter', + logo: '/images/landing-page/templates/socials/x.svg', + followers: 56600, + }, + { + name: 'instagram', + logo: '/images/landing-page/templates/socials/instagram.svg', + followers: 98200, + }, + { + name: 'tiktok', + logo: '/images/landing-page/templates/socials/tiktok.svg', + followers: 85300, + }, + ], + }, + { + slug: 'chris', + name: 'Crypto Chris', + category: 'Crypto', + image: '/images/landing-page/templates/chris.png', + author: 'Fleek', + socials: [ + { + name: 'twitter', + logo: '/images/landing-page/templates/socials/x.svg', + followers: 112400, + }, + { + name: 'instagram', + logo: '/images/landing-page/templates/socials/instagram.svg', + followers: 2400, + }, + { + name: 'tiktok', + logo: '/images/landing-page/templates/socials/tiktok.svg', + followers: 1100, + }, + ], + }, + { + slug: 'kanye', + name: 'Kanye East', + category: 'Culture', + image: '/images/landing-page/templates/kanye.png', + author: 'Fleek', + socials: [ + { + name: 'twitter', + logo: '/images/landing-page/templates/socials/x.svg', + followers: 1500, + }, + { + name: 'instagram', + logo: '/images/landing-page/templates/socials/instagram.svg', + followers: 1100, + }, + { + name: 'tiktok', + logo: '/images/landing-page/templates/socials/tiktok.svg', + followers: 659, + }, + ], + }, + { + slug: 'kiki', + name: 'Kiki', + category: 'NSFW', + image: '/images/landing-page/templates/kiki.png', + author: 'Fleek', + socials: [ + { + name: 'twitter', + logo: '/images/landing-page/templates/socials/x.svg', + followers: 9240, + }, + { + name: 'instagram', + logo: '/images/landing-page/templates/socials/instagram.svg', + followers: 56700, + }, + { + name: 'tiktok', + logo: '/images/landing-page/templates/socials/tiktok.svg', + followers: 32000, + }, + ], + }, +]; diff --git a/src/pages/preview/[agent].astro b/src/pages/preview/[agent].astro new file mode 100644 index 000000000..0cac9831c --- /dev/null +++ b/src/pages/preview/[agent].astro @@ -0,0 +1,15 @@ +--- +import { publicAgents } from '@components/PublicAgents/config'; + +export function getStaticPaths() { + return publicAgents.map(({ slug }) => ({ + params: { + agent: slug, + }, + })); +} + +const { agent } = Astro.params; +--- + +
Good dog, {agent}!
From a67ee92f8344ac2a59fc8b0943668bfc93d439d9 Mon Sep 17 00:00:00 2001 From: "Victor F. Santos" Date: Tue, 29 Apr 2025 11:52:45 -0300 Subject: [PATCH 02/27] feat: add static dashboard components --- src/components/LandingPage/Templates.tsx | 2 +- src/components/PublicAgents/Dashboard.tsx | 289 ++++++++++++++++++++++ src/components/PublicAgents/config.ts | 18 +- src/pages/preview/[agentId].astro | 20 ++ src/pages/preview/[agent].astro | 15 -- 5 files changed, 322 insertions(+), 22 deletions(-) create mode 100644 src/components/PublicAgents/Dashboard.tsx create mode 100644 src/pages/preview/[agentId].astro delete mode 100644 src/pages/preview/[agent].astro diff --git a/src/components/LandingPage/Templates.tsx b/src/components/LandingPage/Templates.tsx index de7e99da4..d0f602262 100644 --- a/src/components/LandingPage/Templates.tsx +++ b/src/components/LandingPage/Templates.tsx @@ -124,7 +124,7 @@ export const Templates = () => { )} > {publicAgents.map((template) => ( -
+
))} diff --git a/src/components/PublicAgents/Dashboard.tsx b/src/components/PublicAgents/Dashboard.tsx new file mode 100644 index 000000000..e7a7e41d2 --- /dev/null +++ b/src/components/PublicAgents/Dashboard.tsx @@ -0,0 +1,289 @@ +import { cn } from '@utils/cn'; +import type { PublicAgent } from './config'; +import { + PiArrowClockwiseBold, + PiArrowUpBold, + PiCaretDownBold, + PiChartBarBold, + PiChatCircleDotsBold, + PiCoinsBold, + PiCopyBold, + PiDotsThreeBold, + PiGlobeSimpleBold, + PiGridFourBold, + PiImageBold, + PiMagicWandBold, + PiMagnifyingGlassBold, + PiNoteBold, + PiPlusBold, + PiReceiptBold, + PiSidebarSimpleBold, + PiSlidersHorizontalBold, + PiSlideshowBold, + PiThumbsDownBold, + PiThumbsUpBold, + PiUserBold, + PiVideoBold, +} from 'react-icons/pi'; + +const Button: React.FC< + React.PropsWithChildren & React.ButtonHTMLAttributes +> = ({ children, ...props }) => { + return ( + + ); +}; + +const IconButton: React.FC< + React.PropsWithChildren & React.ButtonHTMLAttributes +> = ({ children, ...props }) => { + return ( + + ); +}; + +type SidebarProps = { + agent: PublicAgent; +}; + +const Sidebar: React.FC = ({ agent }) => { + const { name, image } = agent; + + return ( +
+
+
+ fleek logo + + + +
+
+ + + +
+
+
+ + +
+
+
+
+

$0.00

+

Buy credits

+
+
+
+
+ +
+

Guest

+
+ +
+
+
+ ); +}; + +const TabItem: React.FC< + React.PropsWithChildren & React.HTMLAttributes +> = ({ children, ...props }) => { + return ( + + ); +}; + +type ContentProps = { + agent: PublicAgent; +}; + +const Content: React.FC = ({ agent }) => { + const { name, image, greeting } = agent; + + return ( +
+
+
+
+ + +
+
+ + + + + + +
+
+
+ + + Chat + + + + Content + + + + Gallery + + + + Analytics + + + + Services + +
+
+
+
+ {name} +
+

+ {greeting} +

+
+ + + + +
+
+
+
+
+
+