大量优化修改扣积分规则
This commit is contained in:
@@ -18,9 +18,10 @@ import {
|
||||
X,
|
||||
} from "lucide-react";
|
||||
import { api } from "../api";
|
||||
import { OmniParamBar } from "../components/omni-param-bar";
|
||||
import { findCatalogModel } from "../components/omni-param-bar";
|
||||
import { modelResolutions } from "../components/free-create/constants";
|
||||
import { ConfirmModal } from "../components/overlays";
|
||||
import type { CreationConversation, CreationRef } from "../types";
|
||||
import type { CreationConversation, CreationRef, ModelConfig } from "../types";
|
||||
import type { NavigateFn } from "./route-config";
|
||||
|
||||
type OutputMode = "video" | "image";
|
||||
@@ -102,9 +103,11 @@ function formatRelativeTime(iso: string) {
|
||||
}
|
||||
|
||||
export function OmniCreatePage({
|
||||
modelConfigs,
|
||||
navigate,
|
||||
onNotify,
|
||||
}: {
|
||||
modelConfigs?: ModelConfig[];
|
||||
navigate: NavigateFn;
|
||||
onNotify?: (type: "success" | "error" | "info", text: string) => void;
|
||||
}) {
|
||||
@@ -132,19 +135,23 @@ export function OmniCreatePage({
|
||||
|
||||
useEffect(() => {
|
||||
if (outputMode === "image") {
|
||||
setModel("Seedream5.0");
|
||||
const img = findCatalogModel(modelConfigs, "", "image");
|
||||
setModel(img ? (img.display_name || img.name) : "Seedream5.0");
|
||||
setResolution("模型默认");
|
||||
setRatio("1:1");
|
||||
setDuration("1 张");
|
||||
} else {
|
||||
setModel("Seedance 2.5");
|
||||
setResolution("1080p");
|
||||
const vid = findCatalogModel(modelConfigs, "", "video");
|
||||
const label = vid ? (vid.display_name || vid.name) : "Seedance 2.5";
|
||||
const resList = modelResolutions(vid);
|
||||
setModel(label);
|
||||
setResolution(resList.includes("720p") ? "720p" : (resList[0] || "1080p"));
|
||||
setRatio("9:16");
|
||||
setDuration("智能时长");
|
||||
}
|
||||
setActiveCategory("all");
|
||||
setSelectedCase((prev) => (prev && prev.mode !== outputMode ? null : prev));
|
||||
}, [outputMode]);
|
||||
}, [outputMode, modelConfigs]);
|
||||
|
||||
useEffect(() => {
|
||||
const onDown = (event: MouseEvent) => {
|
||||
@@ -385,17 +392,6 @@ export function OmniCreatePage({
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<OmniParamBar
|
||||
isVideo={outputMode === "video"}
|
||||
model={model}
|
||||
resolution={resolution}
|
||||
ratio={ratio}
|
||||
duration={duration}
|
||||
onModel={setModel}
|
||||
onResolution={setResolution}
|
||||
onRatio={setRatio}
|
||||
onDuration={setDuration}
|
||||
/>
|
||||
</div>
|
||||
<button
|
||||
type="button"
|
||||
@@ -595,6 +591,10 @@ export function OmniHistoryPage({
|
||||
</button>
|
||||
))}
|
||||
</div>
|
||||
<button type="button" className="omni-history-new" onClick={() => navigate("omniCreate")}>
|
||||
<Plus />
|
||||
新建会话
|
||||
</button>
|
||||
</div>
|
||||
</header>
|
||||
<div className="omni-history-list">
|
||||
|
||||
Reference in New Issue
Block a user