feat: 提示词详细化 + 模型配置统一到设置 (v1.4.9)
- 40条图片预设扩写为完整出图提示词(主体+场景+光线+风格+质量, 平均200+字符) - 预设卡片显示两行详细描述预览, 点击填入完整提示词(修复原先只填名称) - 6条视频脚本提示词扩为含镜头语言与节奏的完整框架 - AI生图弹窗移除与设置重复的模型/通道下拉, 统一在设置-AI生图配置 - 设置-AI生图新增默认模型下拉, 存imagegen.newapi.model - 修复翻译调用早于effUrl/effKey声明的TDZ错误 - 弹窗全屏显示, 仅关闭按钮可关闭(遮罩点击不关闭) - 版本号4处同步升至1.4.9, CHANGELOG补齐v1.4.9条目
This commit is contained in:
1 parent
67f8a8f708
commit
4dcc908eaa
11 files changed
+126
-143
No files matched your search
@@ -23,7 +23,8 @@ const DEFAULTS = {
|
||||
provider: 'newapi', // 'newapi' | 'custom'
|
||||
newapi: {
|
||||
url: 'http://192.168.68.19:3099/v1',
|
||||
apiKey: '' // 留空则用服务器环境变量 NEWAPI_KEY
|
||||
apiKey: '', // 留空则用服务器环境变量 NEWAPI_KEY
|
||||
model: 'flux-schnell' // 默认生图模型(弹窗不再选模型,统一在设置里配)
|
||||
},
|
||||
custom: {
|
||||
url: '',
|
||||
@@ -67,6 +68,7 @@ function getSettings() {
|
||||
provider: (data.imagegen && data.imagegen.provider) === 'custom' ? 'custom' : 'newapi',
|
||||
newapi: {
|
||||
url: (data.imagegen && data.imagegen.newapi && data.imagegen.newapi.url) || DEFAULTS.imagegen.newapi.url,
|
||||
model: (data.imagegen && data.imagegen.newapi && data.imagegen.newapi.model) || DEFAULTS.imagegen.newapi.model,
|
||||
apiKey: (data.imagegen && data.imagegen.newapi && data.imagegen.newapi.apiKey) || ''
|
||||
},
|
||||
custom: {
|
||||
@@ -111,6 +113,7 @@ function saveSettings(settings) {
|
||||
if (ig.provider === 'custom' || ig.provider === 'newapi') merged.imagegen.provider = ig.provider;
|
||||
if (ig.newapi) {
|
||||
if (typeof ig.newapi.url === 'string') merged.imagegen.newapi.url = ig.newapi.url.trim();
|
||||
if (typeof ig.newapi.model === 'string') merged.imagegen.newapi.model = ig.newapi.model.trim() || 'flux-schnell';
|
||||
const k = ig.newapi.apiKey;
|
||||
// 空串/掩码 = 保持原值(与 OCR 行为一致)
|
||||
if (typeof k === 'string' && k.trim() && !k.includes('***')) {
|
||||
|
||||
Reference in new issue
Block a user