This commit is contained in:
parent
a3767c42a5
commit
854a09e1ff
|
|
@ -38,7 +38,7 @@ import { LogoAI } from '@/components/chat'
|
||||||
|
|
||||||
import { useState, useRef, } from "react";
|
import { useState, useRef, } from "react";
|
||||||
|
|
||||||
import { Trash2 } from "lucide-react";
|
import { Trash2, CloudDownload } from "lucide-react";
|
||||||
|
|
||||||
import { useEffect } from "react";
|
import { useEffect } from "react";
|
||||||
|
|
||||||
|
|
@ -170,7 +170,8 @@ export function DetailPageHeader({ data }: { data: any }) {
|
||||||
|
|
||||||
const { t } = useTranslation();
|
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 hasNonEmptyExtraData = data?.extra_data && typeof data.extra_data === 'object' && !Array.isArray(data.extra_data) && Object.keys(data.extra_data).length > 0 data?.model_parameter !== 0 &&
|
||||||
|
data?.model_parameter !== "";
|
||||||
|
|
||||||
const initWebSocket = async (userName: string, id: number) => {
|
const initWebSocket = async (userName: string, id: number) => {
|
||||||
if (socketRef.current) socketRef.current.close();
|
if (socketRef.current) socketRef.current.close();
|
||||||
|
|
@ -526,6 +527,22 @@ export function DetailPageHeader({ data }: { data: any }) {
|
||||||
<Trash2 size={20} />
|
<Trash2 size={20} />
|
||||||
</button>
|
</button>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
|
||||||
|
{statusLoaded && showDelete && (!data?.model_parameter || data.model_parameter === 0) && (
|
||||||
|
<button
|
||||||
|
onClick={() => {
|
||||||
|
console.log("开始下载文件...");
|
||||||
|
window.open("https://example.com/path/to/your/file.tar.gz", "_blank");
|
||||||
|
}}
|
||||||
|
className="hover:text-gray-700 transition self-end"
|
||||||
|
title="下载模型文件"
|
||||||
|
>
|
||||||
|
<CloudDownload size={20} />
|
||||||
|
</button>
|
||||||
|
)}
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue