ai页面修改

This commit is contained in:
sjy
2026-07-02 18:10:56 +08:00
parent b39dae6d55
commit 9edaeb4031
9 changed files with 2185 additions and 2160 deletions
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -28,7 +28,7 @@
} }
})(); })();
</script> </script>
<script type="module" crossorigin src="/assets/index-DzSXW83p.js"></script> <script type="module" crossorigin src="/assets/index-_JKe0xeY.js"></script>
<link rel="stylesheet" crossorigin href="/assets/index-Bi8mcSs8.css"> <link rel="stylesheet" crossorigin href="/assets/index-Bi8mcSs8.css">
</head> </head>
<body> <body>
+4 -1
View File
@@ -110,7 +110,10 @@ export async function apiRequest<T>(path: string, options: RequestOptions = {}):
// Handle error responses // Handle error responses
if (!res.ok) { if (!res.ok) {
const msg = parsed?.detail || `请求失败 (${res.status})`; let msg = parsed?.detail?.message || parsed?.message || `请求失败 (${res.status})`;
if (typeof parsed?.detail === 'string') {
msg = parsed.detail;
}
if (res.status === 401 && !options.skipAuthRedirect) { if (res.status === 401 && !options.skipAuthRedirect) {
clearToken(); clearToken();
window.location.href = '/login'; window.location.href = '/login';
@@ -160,23 +160,18 @@ const StorageCard: React.FC<{ data: ResourceCapacityData | null }> = ({ data })
</div> </div>
{data.enabled && ( {data.enabled && (
<> <>
<div <div
style={{ style={{
width: '100%', marginTop: 4,
height: 20, display: 'flex',
background: '#e2e8f0', justifyContent: 'space-between',
borderRadius: 2, fontSize: 11,
overflow: 'hidden', color: isOver ? '#ef4444' : '#94a3b8',
position: 'relative',
}} }}
> >
<div style={{ <div style={{
position: 'absolute',
top: 0,
left: 0,
height: '100%', height: '100%',
background: 'transparent',
width: '100%', width: '100%',
display: 'flex', display: 'flex',
alignItems: 'center', alignItems: 'center',
@@ -202,6 +197,26 @@ const StorageCard: React.FC<{ data: ResourceCapacityData | null }> = ({ data })
)} )}
</div> </div>
{/* <span>
{isOver
? `存储超额 · 超用 ${Math.abs(available).toFixed(2)} ${unit}`
: `剩余 ${available.toFixed(2)} ${unit}`}
</span> */}
{/* <span>{rawPercent.toFixed(1)}%</span> */}
</div>
<div
style={{
width: '100%',
height: 6,
background: '#e2e8f0',
borderRadius: 50,
overflow: 'hidden',
position: 'relative',
}}
>
<div <div
style={{ style={{
@@ -219,22 +234,6 @@ const StorageCard: React.FC<{ data: ResourceCapacityData | null }> = ({ data })
/> />
</div> </div>
<div
style={{
marginTop: 4,
display: 'flex',
justifyContent: 'space-between',
fontSize: 11,
color: isOver ? '#ef4444' : '#94a3b8',
}}
>
{/* <span>
{isOver
? `存储超额 · 超用 ${Math.abs(available).toFixed(2)} ${unit}`
: `剩余 ${available.toFixed(2)} ${unit}`}
</span> */}
{/* <span>{rawPercent.toFixed(1)}%</span> */}
</div>
</> </>
)} )}
</div> </div>
@@ -896,8 +895,8 @@ const AppLayout: React.FC = () => {
fontSize: 16, fontSize: 16,
fontWeight: 500, fontWeight: 500,
letterSpacing: 0, letterSpacing: 0,
background: 'rgba(99, 102, 241, 0.08)', // background: 'rgba(99, 102, 241, 0.08)',
padding: '2px 8px', // padding: '2px 8px',
borderRadius: 6, borderRadius: 6,
display: 'inline-block', display: 'inline-block',
}}>: {user?.credits || 0}</div> }}>: {user?.credits || 0}</div>
File diff suppressed because it is too large Load Diff
+3 -3
View File
@@ -392,7 +392,7 @@ function InitialInfo() {
const createvideo = (stepId: number, engineId: string) => { const createvideo = (stepId: number, engineId: string) => {
let params = { let params = {
engine_id: engineId, engine_id: '',
} }
@@ -404,11 +404,11 @@ function InitialInfo() {
} }
const agincreatevideo = () => { const agincreatevideo = () => {
let params = { let params = {
engine_id: steps[3].engineId, engine_id: '',
} }
getfour(taskDetail.id, steps[2].id.toString(), params).then((res: any) => { getfour(taskDetail.id, steps[3].id.toString(), params).then((res: any) => {
// 重新获取任务详情以更新数据 // 重新获取任务详情以更新数据
refreshTaskDetail(); refreshTaskDetail();
}).catch((error: any) => { }).catch((error: any) => {
+3 -3
View File
@@ -397,7 +397,7 @@ function InitialInfo() {
const createvideo = (stepId: number, engineId: string) => { const createvideo = (stepId: number, engineId: string) => {
let params = { let params = {
engine_id: engineId, engine_id: '',
} }
@@ -409,11 +409,11 @@ function InitialInfo() {
} }
const agincreatevideo = () => { const agincreatevideo = () => {
let params = { let params = {
engine_id: steps[3].engineId, engine_id: '',
} }
removefour(taskDetail.id, steps[2].id.toString(), params).then((res: any) => { removefour(taskDetail.id, steps[3].id.toString(), params).then((res: any) => {
// 重新获取任务详情以更新数据 // 重新获取任务详情以更新数据
refreshTaskDetail(); refreshTaskDetail();
}).catch((error: any) => { }).catch((error: any) => {
+2 -2
View File
@@ -32,7 +32,7 @@ interface AppState {
}; };
enginesele: any; enginesele: any;
inputValue: string; inputValue: string;
currentMedia: { name: string; type: 'image' | 'video'; url: string; label: string; duration?: number }[]; currentMedia: { name: string; type: 'image' | 'video' | 'audio'; url: string; label: string; duration?: number }[];
fetchProjects: () => Promise<void>; fetchProjects: () => Promise<void>;
createProject: (name: string, industry: Industry) => Promise<Project>; createProject: (name: string, industry: Industry) => Promise<Project>;
@@ -59,7 +59,7 @@ interface AppState {
setVideoResolution: (resolution: string) => void; setVideoResolution: (resolution: string) => void;
setEnginesele: (enginesele: any) => void; setEnginesele: (enginesele: any) => void;
setInputValue: (inputValue: string) => void; setInputValue: (inputValue: string) => void;
setCurrentMedia: (currentMedia: { name: string; type: 'image' | 'video'; url: string; label: string; duration?: number }[]) => void; setCurrentMedia: (currentMedia: { name: string; type: 'image' | 'video' | 'audio'; url: string; label: string; duration?: number }[]) => void;
resetGenerationConfig: () => void; resetGenerationConfig: () => void;
} }
+1 -1
View File
@@ -71,7 +71,7 @@ export type GenerationStatus =
export interface MediaReference { export interface MediaReference {
url: string; url: string;
type: 'image' | 'video'; type: 'image' | 'video' | 'audio';
name: string; name: string;
} }