Remove outer layer for projects page

This commit is contained in:
akhisud3195 2025-04-10 16:25:20 +05:30
parent d87faf4ec6
commit 72f8c6815a
4 changed files with 193 additions and 214 deletions

View file

@ -102,11 +102,6 @@ html, body {
transition-all duration-200 ease-in-out;
}
.card:hover {
@apply shadow-[0_4px_12px_rgba(0,0,0,0.06)]
transform translate-y-[-1px];
}
/* Update input styles */
input, textarea, select {
@apply rounded-lg border-[#E5E7EB] dark:border-[#2E2E30]

View file

@ -5,7 +5,7 @@ export const USE_CHAT_WIDGET = process.env.USE_CHAT_WIDGET === 'true';
export const USE_AUTH = process.env.USE_AUTH === 'true';
// Hardcoded flags
export const USE_MULTIPLE_PROJECTS = false;
export const USE_MULTIPLE_PROJECTS = true;
export const USE_TESTING_FEATURE = false;
export const USE_VOICE_FEATURE = false;
export const USE_TRANSFER_CONTROL_OPTIONS = false;

View file

@ -11,7 +11,6 @@ import { templates, starting_copilot_prompts } from "@/app/lib/project_templates
import { SectionHeading } from "@/components/ui/section-heading";
import { Textarea } from "@/components/ui/textarea";
import { SearchProjects } from "./components/search-projects";
import { CustomPromptCard } from "./components/custom-prompt-card";
import { Submit } from "./components/submit-button";
import { PageHeading } from "@/components/ui/page-heading";
import { USE_MULTIPLE_PROJECTS } from "@/app/lib/feature_flags";
@ -296,22 +295,9 @@ export default function App() {
};
return (
<div className={clsx(
"min-h-screen flex flex-col",
tokens.colors.light.background,
tokens.colors.dark.background
)}>
<div className={clsx(
"flex-1 px-12 pt-4 pb-32"
)}>
<PageHeading
title={USE_MULTIPLE_PROJECTS ? "Projects" : "Let's get started"}
description={USE_MULTIPLE_PROJECTS
? "Select an existing project or create a new one"
: "Create a multi-agent assistant in minutes"
}
/>
<div className={clsx(
USE_MULTIPLE_PROJECTS
? "grid grid-cols-1 lg:grid-cols-[1fr,2fr] gap-8 mt-8"
@ -323,8 +309,7 @@ export default function App() {
<SearchProjects
projects={projects}
isLoading={isLoading}
heading="Select an existing project"
subheading="Choose from your projects"
heading="Select an existing assistant"
className="h-full"
onClose={() => setIsProjectPaneOpen(false)}
/>
@ -343,9 +328,9 @@ export default function App() {
USE_MULTIPLE_PROJECTS && "px-8"
)}>
{USE_MULTIPLE_PROJECTS && (
<div className="pt-12 flex justify-between items-center">
<SectionHeading subheading="Set up a new AI assistant">
Create a new project
<div className="px-4 pt-4 pb-6 flex justify-between items-center">
<SectionHeading>
Create a new assistant
</SectionHeading>
{!isProjectPaneOpen && (
<Button
@ -370,7 +355,7 @@ export default function App() {
handleSubmit(formData);
}}
onKeyDown={handleKeyDown}
className="pt-12 pb-16 space-y-12"
className="pt-6 pb-16 space-y-12"
>
{/* Tab Section */}
<div>
@ -388,7 +373,7 @@ export default function App() {
onClick={() => handleTabChange(TabType.Describe)}
className={selectedTab === TabType.Describe ? selectedTabStyles : unselectedTabStyles}
>
Decsribe your assistant
Describe your assistant
</Button>
<Button
variant={selectedTab === TabType.Blank ? 'primary' : 'tertiary'}
@ -448,30 +433,6 @@ export default function App() {
</div>
</div>
{/* Name Section */}
{USE_MULTIPLE_PROJECTS && (
<div className="space-y-4">
<div className="flex flex-col gap-4">
<label className={largeSectionHeaderStyles}>
Name
</label>
<Textarea
required
name="name"
value={name}
onChange={(e) => setName(e.target.value)}
className={clsx(
textareaStyles,
"min-h-[60px]",
"text-base",
"text-gray-900 dark:text-gray-100"
)}
placeholder={defaultName}
/>
</div>
</div>
)}
{/* Custom Prompt Section - Only show when needed */}
{(selectedTab === TabType.Describe || selectedTab === TabType.Example) && (
<div className="space-y-4">
@ -519,6 +480,30 @@ export default function App() {
</div>
)}
{/* Name Section */}
{USE_MULTIPLE_PROJECTS && (
<div className="space-y-4">
<div className="flex flex-col gap-4">
<label className={largeSectionHeaderStyles}>
🏷 Name the project
</label>
<Textarea
required
name="name"
value={name}
onChange={(e) => setName(e.target.value)}
className={clsx(
textareaStyles,
"min-h-[60px]",
"text-base",
"text-gray-900 dark:text-gray-100"
)}
placeholder={defaultName}
/>
</div>
</div>
)}
{/* Submit Button */}
<div className="pt-1 w-full -mt-4">
<Submit />
@ -528,6 +513,5 @@ export default function App() {
</div>
</div>
</div>
</div>
);
}

View file

@ -10,7 +10,7 @@ interface SearchProjectsProps {
projects: z.infer<typeof Project>[];
isLoading: boolean;
heading: string;
subheading: string;
subheading?: string;
className?: string;
onClose?: () => void;
}