This commit is contained in:
parent
e3d6edbb84
commit
a3767c42a5
|
|
@ -11,7 +11,7 @@ import React from "react";
|
|||
import { FadeIn, FadeInStagger } from "../landing/fade-in";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { truncateString } from "@/lib/utils";
|
||||
|
||||
import { CloudDownload } from 'lucide-react';
|
||||
interface CardProps {
|
||||
image: string;
|
||||
title: string;
|
||||
|
|
@ -98,21 +98,31 @@ export const Card: React.FC<ArticleData> = (articleData) => {
|
|||
/>
|
||||
|
||||
{/* 🔥 只有当 model_parameter 没有值时显示叹号 */}
|
||||
{(!articleData.model_parameter) && (
|
||||
{/* {(!articleData.model_parameter) && (
|
||||
<div style={{
|
||||
position: 'absolute',
|
||||
bottom: '8px',
|
||||
right: '8px',
|
||||
color: 'red', // 只保留文字颜色为红色
|
||||
color: 'red',
|
||||
fontWeight: 'bold',
|
||||
fontSize: '24px', // 字体稍微大一点,更容易看到
|
||||
fontSize: '24px',
|
||||
zIndex: 2,
|
||||
}}>
|
||||
!
|
||||
</div>
|
||||
)} */}
|
||||
{(!articleData.model_parameter) && (
|
||||
<div style={{
|
||||
position: 'absolute',
|
||||
bottom: '8px',
|
||||
right: '8px',
|
||||
color: 'red',
|
||||
zIndex: 2,
|
||||
}}>
|
||||
<CloudDownload size={24} strokeWidth={2.5} />
|
||||
</div>
|
||||
)}
|
||||
|
||||
|
||||
</div>
|
||||
</figure>
|
||||
|
||||
|
|
|
|||
|
|
@ -170,6 +170,8 @@ export function DetailPageHeader({ data }: { data: any }) {
|
|||
|
||||
const { t } = useTranslation();
|
||||
|
||||
const hasNonEmptyExtraData = data?.extra_data && typeof data.extra_data === 'object' && !Array.isArray(data.extra_data) && Object.keys(data.extra_data).length > 0;
|
||||
|
||||
const initWebSocket = async (userName: string, id: number) => {
|
||||
if (socketRef.current) socketRef.current.close();
|
||||
|
||||
|
|
@ -486,11 +488,11 @@ export function DetailPageHeader({ data }: { data: any }) {
|
|||
</div>
|
||||
|
||||
<div className="flex items-center gap-[5px] self-end">
|
||||
{data?.extra_data && typeof data.extra_data === 'object' && Object.keys(data.extra_data).length > 0 && (
|
||||
{hasNonEmptyExtraData && (
|
||||
<button
|
||||
onClick={() => {
|
||||
console.log("🟢 点击了更新按钮,extra_data = ", data.extra_data);
|
||||
// TODO: future update logic here
|
||||
// TODO: 后续处理逻辑写在这里
|
||||
}}
|
||||
className="hover:text-gray-700 transition self-end text-sm border border-gray-300 rounded px-2 py-1 bg-white"
|
||||
title="更新"
|
||||
|
|
|
|||
Loading…
Reference in New Issue