mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-06-02 19:55:18 +02:00
- Enhanced lambda function formatting in `_after_commit` for better clarity. - Simplified generator expression in `_match_condition` for improved readability. - Streamlined function signature in `_eligible` for consistency. - Updated imports and refactored anonymous chat routes to use a new agent creation method. - Added a new function `_load_anon_document` to handle document loading from Redis. - Improved UI components by replacing legacy structures with modern alternatives, including alerts and separators. - Refactored quota-related components to utilize new alert structures for better user feedback. - Cleaned up unused variables and optimized component states for performance.
57 lines
1.3 KiB
TypeScript
57 lines
1.3 KiB
TypeScript
"use client";
|
|
|
|
import { Lock } from "lucide-react";
|
|
import Link from "next/link";
|
|
import type { FC } from "react";
|
|
import { Button } from "@/components/ui/button";
|
|
import {
|
|
Empty,
|
|
EmptyContent,
|
|
EmptyDescription,
|
|
EmptyHeader,
|
|
EmptyMedia,
|
|
EmptyTitle,
|
|
} from "@/components/ui/empty";
|
|
|
|
interface GatedTabProps {
|
|
title: string;
|
|
description: string;
|
|
}
|
|
|
|
const GatedTab: FC<GatedTabProps> = ({ title, description }) => (
|
|
<Empty>
|
|
<EmptyHeader>
|
|
<EmptyMedia variant="icon">
|
|
<Lock />
|
|
</EmptyMedia>
|
|
<EmptyTitle>{title}</EmptyTitle>
|
|
<EmptyDescription>{description}</EmptyDescription>
|
|
</EmptyHeader>
|
|
<EmptyContent>
|
|
<Button size="sm" asChild>
|
|
<Link href="/register">Create Free Account</Link>
|
|
</Button>
|
|
</EmptyContent>
|
|
</Empty>
|
|
);
|
|
|
|
export const ReportsGatedPlaceholder: FC = () => (
|
|
<GatedTab
|
|
title="Generate Reports"
|
|
description="Create a free account to generate structured reports from your conversations."
|
|
/>
|
|
);
|
|
|
|
export const EditorGatedPlaceholder: FC = () => (
|
|
<GatedTab
|
|
title="Document Editor"
|
|
description="Create a free account to use the AI-powered document editor."
|
|
/>
|
|
);
|
|
|
|
export const HitlGatedPlaceholder: FC = () => (
|
|
<GatedTab
|
|
title="Human-in-the-Loop Editing"
|
|
description="Create a free account to collaborate with AI on document edits."
|
|
/>
|
|
);
|