mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-07-18 13:47:21 +08:00
Feat: Modify the style of the release confirmation box. (#13542)
### What problem does this PR solve? Feat: Modify the style of the release confirmation box. ### Type of change - [x] New Feature (non-breaking change which adds functionality) --------- Co-authored-by: Yingfeng <yingfeng.zhang@gmail.com> Co-authored-by: balibabu <assassin_cike@163.com> Co-authored-by: 6ba3i <isbaaoui09@gmail.com>
This commit is contained in:
@@ -17,12 +17,11 @@ interface IProps {
|
||||
sharedBadge?: ReactNode;
|
||||
icon?: React.ReactNode;
|
||||
testId?: string;
|
||||
showReleaseTime?: boolean;
|
||||
}
|
||||
|
||||
function Time({ time }: { time: string | number | undefined }) {
|
||||
return (
|
||||
<p className="text-sm opacity-80 whitespace-nowrap">{formatDate(time)}</p>
|
||||
);
|
||||
return <p className="text-sm whitespace-nowrap">{formatDate(time)}</p>;
|
||||
}
|
||||
export function HomeCard({
|
||||
data,
|
||||
@@ -31,6 +30,7 @@ export function HomeCard({
|
||||
sharedBadge,
|
||||
icon,
|
||||
testId,
|
||||
showReleaseTime = false,
|
||||
}: IProps) {
|
||||
const { t } = useTranslation();
|
||||
|
||||
@@ -82,16 +82,18 @@ export function HomeCard({
|
||||
{data.description}
|
||||
</div>
|
||||
<div className="flex justify-between items-center">
|
||||
{data.release_time ? (
|
||||
<section>
|
||||
<div className="flex items-center gap-2 text-sm opacity-80">
|
||||
{showReleaseTime ? (
|
||||
<section className="text-sm text-text-secondary space-y-1">
|
||||
<div className="flex items-center gap-2">
|
||||
{`${t('flow.lastSavedAt')}:`}
|
||||
<Time time={data.update_time}></Time>
|
||||
</div>
|
||||
<div className="flex items-center gap-2 text-sm opacity-80">
|
||||
{`${t('flow.publishedAt')}:`}
|
||||
<Time time={data.release_time}></Time>
|
||||
</div>
|
||||
{data.release_time && (
|
||||
<div className="flex items-center gap-2">
|
||||
{`${t('flow.publishedAt')}:`}
|
||||
<Time time={data.release_time}></Time>
|
||||
</div>
|
||||
)}
|
||||
</section>
|
||||
) : (
|
||||
<Time time={data.update_time}></Time>
|
||||
|
||||
Reference in New Issue
Block a user