ai页面修改
This commit is contained in:
+7
-7
File diff suppressed because one or more lines are too long
Vendored
+1
-1
@@ -28,7 +28,7 @@
|
||||
}
|
||||
})();
|
||||
</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">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
@@ -110,7 +110,10 @@ export async function apiRequest<T>(path: string, options: RequestOptions = {}):
|
||||
|
||||
// Handle error responses
|
||||
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) {
|
||||
clearToken();
|
||||
window.location.href = '/login';
|
||||
|
||||
@@ -160,23 +160,18 @@ const StorageCard: React.FC<{ data: ResourceCapacityData | null }> = ({ data })
|
||||
</div>
|
||||
{data.enabled && (
|
||||
<>
|
||||
|
||||
<div
|
||||
style={{
|
||||
width: '100%',
|
||||
height: 20,
|
||||
background: '#e2e8f0',
|
||||
borderRadius: 2,
|
||||
overflow: 'hidden',
|
||||
position: 'relative',
|
||||
|
||||
marginTop: 4,
|
||||
display: 'flex',
|
||||
justifyContent: 'space-between',
|
||||
fontSize: 11,
|
||||
color: isOver ? '#ef4444' : '#94a3b8',
|
||||
}}
|
||||
>
|
||||
<div style={{
|
||||
position: 'absolute',
|
||||
top: 0,
|
||||
left: 0,
|
||||
height: '100%',
|
||||
background: 'transparent',
|
||||
width: '100%',
|
||||
display: 'flex',
|
||||
alignItems: 'center',
|
||||
@@ -202,6 +197,26 @@ const StorageCard: React.FC<{ data: ResourceCapacityData | null }> = ({ data })
|
||||
)}
|
||||
|
||||
</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
|
||||
style={{
|
||||
@@ -219,22 +234,6 @@ const StorageCard: React.FC<{ data: ResourceCapacityData | null }> = ({ data })
|
||||
/>
|
||||
|
||||
</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>
|
||||
@@ -896,8 +895,8 @@ const AppLayout: React.FC = () => {
|
||||
fontSize: 16,
|
||||
fontWeight: 500,
|
||||
letterSpacing: 0,
|
||||
background: 'rgba(99, 102, 241, 0.08)',
|
||||
padding: '2px 8px',
|
||||
// background: 'rgba(99, 102, 241, 0.08)',
|
||||
// padding: '2px 8px',
|
||||
borderRadius: 6,
|
||||
display: 'inline-block',
|
||||
}}>积分: {user?.credits || 0}</div>
|
||||
|
||||
+2136
-2113
File diff suppressed because it is too large
Load Diff
@@ -392,7 +392,7 @@ function InitialInfo() {
|
||||
|
||||
const createvideo = (stepId: number, engineId: string) => {
|
||||
let params = {
|
||||
engine_id: engineId,
|
||||
engine_id: '',
|
||||
}
|
||||
|
||||
|
||||
@@ -404,11 +404,11 @@ function InitialInfo() {
|
||||
}
|
||||
const agincreatevideo = () => {
|
||||
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();
|
||||
}).catch((error: any) => {
|
||||
|
||||
@@ -397,7 +397,7 @@ function InitialInfo() {
|
||||
|
||||
const createvideo = (stepId: number, engineId: string) => {
|
||||
let params = {
|
||||
engine_id: engineId,
|
||||
engine_id: '',
|
||||
}
|
||||
|
||||
|
||||
@@ -409,11 +409,11 @@ function InitialInfo() {
|
||||
}
|
||||
const agincreatevideo = () => {
|
||||
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();
|
||||
}).catch((error: any) => {
|
||||
|
||||
@@ -32,7 +32,7 @@ interface AppState {
|
||||
};
|
||||
enginesele: any;
|
||||
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>;
|
||||
createProject: (name: string, industry: Industry) => Promise<Project>;
|
||||
@@ -59,7 +59,7 @@ interface AppState {
|
||||
setVideoResolution: (resolution: string) => void;
|
||||
setEnginesele: (enginesele: any) => 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;
|
||||
}
|
||||
|
||||
|
||||
@@ -71,7 +71,7 @@ export type GenerationStatus =
|
||||
|
||||
export interface MediaReference {
|
||||
url: string;
|
||||
type: 'image' | 'video';
|
||||
type: 'image' | 'video' | 'audio';
|
||||
name: string;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user