mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-01-30 23:26:36 +08:00
### What problem does this PR solve? This PR updates and extends the german language support in the frontend. Additionally two more elements are handled dynamically now. The interactive Agent is also titled and described in german now. ### Type of change - [x] New Feature (non-breaking change which adds functionality) Co-authored-by: Jakob <16180662+hauberj@users.noreply.github.com>
59 lines
1.7 KiB
TypeScript
59 lines
1.7 KiB
TypeScript
import { RAGFlowAvatar } from '@/components/ragflow-avatar';
|
|
import { Card, CardContent } from '@/components/ui/card';
|
|
import { formatDate } from '@/utils/date';
|
|
import { t } from 'i18next';
|
|
import { ChevronRight } from 'lucide-react';
|
|
|
|
type ApplicationCardProps = {
|
|
app: {
|
|
avatar?: string;
|
|
title: string;
|
|
update_time: number;
|
|
};
|
|
onClick?(): void;
|
|
moreDropdown: React.ReactNode;
|
|
};
|
|
|
|
export function ApplicationCard({
|
|
app,
|
|
onClick,
|
|
moreDropdown,
|
|
}: ApplicationCardProps) {
|
|
return (
|
|
<Card className="w-[264px]" onClick={onClick}>
|
|
<CardContent className="p-2.5 group flex justify-between w-full">
|
|
<div className="flex items-center gap-2.5 w-full">
|
|
<RAGFlowAvatar
|
|
className="size-14 rounded-lg"
|
|
avatar={app.avatar}
|
|
name={app.title || 'CN'}
|
|
></RAGFlowAvatar>
|
|
<div className="flex-1">
|
|
<h3 className="text-sm font-normal line-clamp-1 mb-1 text-ellipsis w-[160px] overflow-hidden">
|
|
{app.title}
|
|
</h3>
|
|
<p className="text-xs font-normal text-text-secondary">
|
|
{formatDate(app.update_time)}
|
|
</p>
|
|
</div>
|
|
</div>
|
|
{moreDropdown}
|
|
</CardContent>
|
|
</Card>
|
|
);
|
|
}
|
|
|
|
export type SeeAllAppCardProps = {
|
|
click(): void;
|
|
};
|
|
|
|
export function SeeAllAppCard({ click }: SeeAllAppCardProps) {
|
|
return (
|
|
<Card className="w-full min-h-[76px] cursor-pointer" onClick={click}>
|
|
<CardContent className="p-2.5 pt-1 w-full h-full flex items-center justify-center gap-1.5 text-text-secondary">
|
|
{t('common.seeAll')} <ChevronRight className="size-4" />
|
|
</CardContent>
|
|
</Card>
|
|
);
|
|
}
|