您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

application-card.tsx 1.5KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. import { MoreButton } from '@/components/more-button';
  2. import { RAGFlowAvatar } from '@/components/ragflow-avatar';
  3. import { Card, CardContent } from '@/components/ui/card';
  4. import { formatDate } from '@/utils/date';
  5. import { ChevronRight } from 'lucide-react';
  6. type ApplicationCardProps = {
  7. app: {
  8. avatar?: string;
  9. title: string;
  10. update_time: number;
  11. };
  12. };
  13. export function ApplicationCard({ app }: ApplicationCardProps) {
  14. return (
  15. <Card className="w-[264px]">
  16. <CardContent className="p-2.5 group flex justify-between">
  17. <div className="flex items-center gap-2.5">
  18. <RAGFlowAvatar
  19. className="size-14 rounded-lg"
  20. avatar={app.avatar}
  21. name={app.title || 'CN'}
  22. ></RAGFlowAvatar>
  23. <div className="flex-1">
  24. <h3 className="text-sm font-normal line-clamp-1 mb-1">
  25. {app.title}
  26. </h3>
  27. <p className="text-xs font-normal text-text-secondary">
  28. {formatDate(app.update_time)}
  29. </p>
  30. </div>
  31. </div>
  32. <MoreButton className=""></MoreButton>
  33. </CardContent>
  34. </Card>
  35. );
  36. }
  37. export type SeeAllAppCardProps = {
  38. click(): void;
  39. };
  40. export function SeeAllAppCard({ click }: SeeAllAppCardProps) {
  41. return (
  42. <Card className="w-64 min-h-[76px]" onClick={click}>
  43. <CardContent className="p-2.5 pt-1 w-full h-full flex items-center justify-center gap-1.5 text-text-secondary">
  44. See All <ChevronRight className="size-4" />
  45. </CardContent>
  46. </Card>
  47. );
  48. }