feat: Implement rating prompt feature across tools

- Added a rating prompt dispatch mechanism to various tools (ChatPdf, PdfFlowchart, QrCodeGenerator, SummarizePdf, TranslatePdf, TableExtractor) to encourage user feedback after tool usage.
- Introduced a new utility for handling rating prompts, including event dispatching and current tool identification.
- Updated the ToolRating component to manage user feedback submission, including UI enhancements and state management.
- Enhanced the sitemap generation script to include new routes for pricing and blog pages.
- Removed hardcoded API key in pdf_ai_service.py for improved security.
- Added a project status report documenting current implementation against the roadmap.
- Updated translations for rating prompts in Arabic, English, and French.
- Ensured consistency in frontend route registry and backend task processing.
This commit is contained in:
Your Name
2026-03-10 23:52:56 +02:00
parent a14c31c594
commit d4c7195eeb
19 changed files with 628 additions and 119 deletions

View File

@@ -7,6 +7,7 @@ import FAQSection from './FAQSection';
import RelatedTools from './RelatedTools';
import ToolRating from '@/components/shared/ToolRating';
import { useToolRating } from '@/hooks/useToolRating';
import { dispatchRatingPrompt } from '@/utils/ratingPrompt';
interface SEOFAQ {
q: string;
@@ -84,6 +85,20 @@ export default function ToolLandingPage({ slug, children }: ToolLandingPageProps
{/* Tool Interface */}
{children}
<div className="mx-auto mt-6 flex max-w-3xl items-center justify-center px-4">
<button
type="button"
onClick={() => dispatchRatingPrompt(slug, { forceOpen: true })}
className="inline-flex items-center gap-2 rounded-full border border-slate-300 bg-white px-4 py-2 text-sm font-medium text-slate-700 transition-colors hover:border-primary-300 hover:text-primary-700 dark:border-slate-600 dark:bg-slate-800 dark:text-slate-200 dark:hover:border-primary-600 dark:hover:text-primary-300"
>
<span>{t('pages.rating.cta', 'Rate this tool')}</span>
<span className="text-slate-400 dark:text-slate-500"></span>
<span className="text-slate-500 dark:text-slate-400">
{t('pages.rating.ctaHint', 'Help us improve it faster')}
</span>
</button>
</div>
{/* SEO Content Below Tool */}
<div className="mx-auto mt-16 max-w-3xl">
{/* What this tool does */}