style(settings): LLM/图片传输/尺寸/快捷键/备份/诊断改用统一分组样式
Verify (Gitea) / gate (build · unit · facts) (push) Failing after 27s
Verify (Gitea) / gate (build · unit · facts) (push) Failing after 27s
This commit is contained in:
1 parent
74790ffdef
commit
058090d60f
2 files changed
+18
-11
No files matched your search
+11
-10
@@ -720,8 +720,8 @@ function GSetGroup (props) {
|
||||
|
||||
function renderTransferSection (ctx) {
|
||||
const { comp, hostFields, ih, it, setComp, setIH, setIt } = ctx
|
||||
const transferSection = el('div', { className: 'iwb-section' },
|
||||
el('div', { className: 'iwb-section-title' }, '传输方式(参考图如何发送)'),
|
||||
const transferSection = el('div', { className: 'iwb-gset-page' },
|
||||
el(GSetGroup, { title: '传输方式' },
|
||||
el('div', { className: 'iwb-row' },
|
||||
el('span', { className: 'iwb-label' }, '参考图上限'),
|
||||
el('input', { className: 'iwb-input iwb-num', type: 'number', min: 1, max: 12, value: Number(it.maxRefs) || 3, title: '单次参考图数量上限(接口默认 1-3,自定义接口可调大)', onChange: (e) => setIt({ maxRefs: Number(e.target.value) }) }, null),
|
||||
@@ -736,7 +736,8 @@ function GSetGroup (props) {
|
||||
),
|
||||
),
|
||||
hostFields,
|
||||
el('div', { className: 'iwb-section-sub' }, '压缩(超阈值自动压缩后发送)'),
|
||||
),
|
||||
el(GSetGroup, { title: '压缩' },
|
||||
el('div', { className: 'iwb-row' },
|
||||
el('label', { className: 'iwb-check' }, el('input', { type: 'checkbox', checked: comp.enabled !== false, onChange: (e) => setComp({ enabled: e.target.checked }) }, null), ' 启用'),
|
||||
el('input', { className: 'iwb-input iwb-num', type: 'number', min: 1, value: comp.maxMB || 8, title: '超过该大小(MB)才压缩', onChange: (e) => setComp({ maxMB: Number(e.target.value) }) }, null),
|
||||
@@ -750,6 +751,7 @@ function GSetGroup (props) {
|
||||
el('select', { className: 'iwb-input iwb-grow', value: comp.format || 'keep', onChange: (e) => setComp({ format: e.target.value }) },
|
||||
el('option', { value: 'keep' }, '保持原格式'), el('option', { value: 'jpeg' }, '统一转 JPEG')),
|
||||
),
|
||||
),
|
||||
)
|
||||
return transferSection
|
||||
}
|
||||
@@ -869,9 +871,7 @@ function GSetGroup (props) {
|
||||
|
||||
function renderLlmTab (ctx) {
|
||||
const { addLlmAddr, addLlmKey, addLlmModel, addLlmProvider, api, delLlmAddr, delLlmKey, delLlmModel, delLlmProvider, draft, llmAddrInput, llmAddrRes, llmAddrTesting, llmKeyInput, llmModelInput, llmTestMsg, llmTestSel, llmTesting, llmWarn, msg, setLlm, setLlmAddr, setLlmAddrDefault, setLlmAddrInput, setLlmDefaultModel, setLlmKey, setLlmKeyInput, setLlmModelInput, setLlmProv, setLlmTestSel, testLlm, testLlmAddrs } = ctx
|
||||
const llmTab = el('div', { className: 'iwb-section' },
|
||||
el('div', { className: 'iwb-section-title' }, 'LLM 渠道(可选,用于提示词润色)'),
|
||||
el('div', { className: 'iwb-hint' }, '可选 · 用于提示词润色;润色使用「默认渠道」。'),
|
||||
const llmTab = el('div', { className: 'iwb-gset-page' },
|
||||
(draft.llm.providers || []).length
|
||||
? draft.llm.providers.map((p, pi) => {
|
||||
const isDef = p.id === draft.llm.defaultProviderId
|
||||
@@ -939,10 +939,11 @@ function GSetGroup (props) {
|
||||
el('div', { className: 'iwb-row' },
|
||||
el('button', { className: 'iwb-btn', onClick: addLlmProvider }, '+ 添加渠道'),
|
||||
),
|
||||
el('div', { className: 'iwb-label', title: '全局模板;LLM 节点内可覆盖' }, '默认润色指令'),
|
||||
el('textarea', { className: 'iwb-input iwb-hdrbox', style: { minHeight: '40px', maxHeight: '64px', overflowY: 'auto' }, value: draft.llm.defaultInstruction || '', onChange: (e) => setLlm({ defaultInstruction: e.target.value }) }, null),
|
||||
llmWarn ? el('div', { className: 'iwb-hint', style: { color: '#b91c1c' } }, llmWarn) : null,
|
||||
el('div', { className: 'iwb-hint' }, '流程可不经过 LLM(直接连生图);节点未填指令时用此模板。'),
|
||||
el(GSetGroup, { title: '默认润色指令' },
|
||||
el('textarea', { className: 'iwb-input iwb-hdrbox', style: { minHeight: '40px', maxHeight: '64px', overflowY: 'auto' }, value: draft.llm.defaultInstruction || '', onChange: (e) => setLlm({ defaultInstruction: e.target.value }) }, null),
|
||||
llmWarn ? el('div', { className: 'iwb-hint', style: { color: '#b91c1c' } }, llmWarn) : null,
|
||||
el('div', { className: 'iwb-gset-hint' }, '流程可不经过 LLM(直接连生图);节点未填指令时用此模板。'),
|
||||
),
|
||||
)
|
||||
return llmTab
|
||||
}
|
||||
|
||||
@@ -981,7 +981,7 @@ html { scrollbar-width: thin; scrollbar-color: var(--iwb-border2) color-mix(in s
|
||||
|
||||
/* LLM 多渠道设置卡片 */
|
||||
.iwb-llm-card { border: 1px solid var(--iwb-border); border-radius: 10px; padding: 10px; margin-bottom: 10px; background: var(--iwb-layer); }
|
||||
.iwb-llm-card-def { border-color: var(--iwb-border2); box-shadow: 0 0 0 1px var(--iwb-border2); }
|
||||
.iwb-llm-card-def { border-color: var(--iwb-border2); }
|
||||
.iwb-llm-cardhead { margin-bottom: 6px; }
|
||||
.iwb-llm-keyname { flex: 0 0 96px; min-width: 96px; max-width: 96px; }
|
||||
.iwb-llm-testrow { margin-top: 8px; align-items: center; }
|
||||
@@ -2385,3 +2385,9 @@ html { scrollbar-width: thin; scrollbar-color: var(--iwb-border2) color-mix(in s
|
||||
|
||||
/* 设置页统一:所有分组块间距只允许用 --iwb-set-group-gap */
|
||||
.iwb-settings-modal .iwb-provider-card{gap:var(--iwb-set-group-gap)}
|
||||
|
||||
/* 设置页通用:灰色容器内的行分隔与 LLM 渠道块 */
|
||||
.iwb-gset-group-body > .iwb-row{padding:var(--iwb-set-row-pad-y,var(--iwb-space-8)) 0;margin:0;border-top:1px solid var(--iwb-set-divider,var(--iwb-border))}
|
||||
.iwb-gset-group-body > .iwb-row:first-child{border-top:0}
|
||||
.iwb-settings-modal .iwb-llm-card{background:var(--iwb-set-group-bg);border:0;border-radius:var(--iwb-set-group-radius);padding:var(--iwb-space-16)}
|
||||
.iwb-settings-modal .iwb-llm-card + .iwb-llm-card{margin-top:var(--iwb-set-group-gap)}
|
||||
Reference in new issue
Block a user