mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-08-12 22:00:57 +00:00
f6e7983890
Unify icon usage across the entire frontend by replacing 67 hardcoded SVG icons with lucide-react components across ~25 files. This improves consistency, maintainability, and reduces bundle duplication. Key replacements: - Sidebar nav: Zap, LayoutDashboard, Bot, Workflow, BookMarked, etc. - MCP forms: Loader2, XCircle, Trash2 - Monitoring: Sparkles, MessageSquare, CheckCircle2, RefreshCw, etc. - Cards: Clock, Star, Workflow, Hexagon, Puzzle, Github, etc. - Misc: Paperclip, AudioLines, CloudUpload, Layers, Heart, Smile Zero hardcoded <svg> tags remain in .tsx files.
41 lines
1.5 KiB
TypeScript
41 lines
1.5 KiB
TypeScript
import { KnowledgeBaseVO } from '@/app/home/knowledge/components/kb-card/KBCardVO';
|
|
import { useTranslation } from 'react-i18next';
|
|
import styles from './KBCard.module.css';
|
|
import { Clock } from 'lucide-react';
|
|
|
|
export default function KBCard({ kbCardVO }: { kbCardVO: KnowledgeBaseVO }) {
|
|
const { t } = useTranslation();
|
|
|
|
return (
|
|
<div className={`${styles.cardContainer}`}>
|
|
<div className={`${styles.basicInfoContainer}`}>
|
|
<div className={`${styles.iconBasicInfoContainer}`}>
|
|
<div className={`${styles.iconEmoji}`}>{kbCardVO.emoji || '📚'}</div>
|
|
<div className={`${styles.basicInfoNameContainer}`}>
|
|
<div className="flex items-center gap-2">
|
|
<div className={`${styles.basicInfoNameText} ${styles.bigText}`}>
|
|
{kbCardVO.name}
|
|
</div>
|
|
{/* Engine badge */}
|
|
<span className={styles.engineBadge}>
|
|
{kbCardVO.getEngineName()}
|
|
</span>
|
|
</div>
|
|
<div className={`${styles.basicInfoDescriptionText}`}>
|
|
{kbCardVO.description}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div className={`${styles.basicInfoLastUpdatedTimeContainer}`}>
|
|
<Clock className={`${styles.basicInfoUpdateTimeIcon}`} />
|
|
<div className={`${styles.basicInfoUpdateTimeText}`}>
|
|
{t('knowledge.updateTime')}
|
|
{kbCardVO.lastUpdatedTimeAgo}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
);
|
|
}
|