style(settings): 模型行删除收进「⋯」菜单,描边再调淡;更新基线
Verify (Gitea) / gate (build · unit · facts) (push) Failing after 2m59s
No files matched your search
@@ -1075,9 +1075,14 @@ function GSetGroup (props) {
|
||||
el('option', { value: 'doubao' }, 'doubao'),
|
||||
el('option', { value: 'custom' }, 'custom'),
|
||||
),
|
||||
m.source !== 'builtin'
|
||||
? el('button', { className: 'iwb-btn iwb-btn-xs iwb-btn-danger', title: '删除模型', 'aria-label': '删除模型 ' + m.name, onClick: () => delModel(pi, m.name) }, I('trash'))
|
||||
: el('span', { className: 'iwb-hint', title: '内置模型只能隐藏,不能删除' }, '内置'),
|
||||
el('details', { className: 'iwb-model-more' },
|
||||
el('summary', { className: 'iwb-model-more-btn', title: '更多操作', 'aria-label': '更多操作 ' + m.name }, '⋯'),
|
||||
el('div', { className: 'iwb-ctxmenu iwb-model-more-menu' },
|
||||
m.source !== 'builtin'
|
||||
? el('button', { className: 'iwb-model-more-del', title: '删除模型', 'aria-label': '删除模型 ' + m.name, onClick: () => delModel(pi, m.name) }, '删除模型')
|
||||
: el('div', { className: 'iwb-model-more-hint' }, '内置模型不可删除'),
|
||||
),
|
||||
),
|
||||
))
|
||||
// 分层模型行:结构与生图模型行一致(同一套 .iwb-modellist/.iwb-modelrow 样式);
|
||||
// 内置项既不能删也不能隐藏(隐藏会让分层节点没有模型可选)。
|
||||
@@ -1086,9 +1091,14 @@ function GSetGroup (props) {
|
||||
el('input', { type: 'checkbox', checked: true, disabled: m.source === 'builtin', onChange: (e) => toggleLayerModel(pi, m.name, e.target.checked) }, null),
|
||||
el('span', null, m.name),
|
||||
),
|
||||
m.source !== 'builtin'
|
||||
? el('button', { className: 'iwb-btn iwb-btn-xs iwb-btn-danger', title: '删除分层模型', 'aria-label': '删除分层模型 ' + m.name, onClick: () => delLayerModel(pi, m.name) }, I('trash'))
|
||||
: el('span', { className: 'iwb-hint', title: '内置分层模型:唯一实测可用的图层分离模型,不可删除也不可隐藏' }, '内置'),
|
||||
el('details', { className: 'iwb-model-more' },
|
||||
el('summary', { className: 'iwb-model-more-btn', title: '更多操作', 'aria-label': '更多操作 ' + m.name }, '⋯'),
|
||||
el('div', { className: 'iwb-ctxmenu iwb-model-more-menu' },
|
||||
m.source !== 'builtin'
|
||||
? el('button', { className: 'iwb-model-more-del', title: '删除分层模型', 'aria-label': '删除分层模型 ' + m.name, onClick: () => delLayerModel(pi, m.name) }, '删除分层模型')
|
||||
: el('div', { className: 'iwb-model-more-hint' }, '内置分层模型不可删除'),
|
||||
),
|
||||
),
|
||||
))
|
||||
provCards.push(el('div', { key: p.id, className: 'iwb-provider-card' },
|
||||
el(GSetGroup, { title: '服务' },
|
||||
|
||||
@@ -2369,6 +2369,16 @@ html { scrollbar-width: thin; scrollbar-color: var(--iwb-border2) color-mix(in s
|
||||
.iwb-provider-card .iwb-gset-group-body > .iwb-row .iwb-addr-tag{min-width:42px}
|
||||
|
||||
/* 设置页控件描边:比常规 border 更淡,避免框线抢视线 */
|
||||
.iwb-settings-modal{--iwb-set-input-border:color-mix(in srgb, var(--iwb-border) 55%, var(--iwb-panel))}
|
||||
.iwb-settings-modal{--iwb-set-input-border:color-mix(in srgb, var(--iwb-border) 40%, var(--iwb-panel))}
|
||||
.iwb-settings-modal .iwb-input,.iwb-settings-modal .iwb-textarea{border-color:var(--iwb-set-input-border)}
|
||||
.iwb-settings-modal .iwb-input:focus,.iwb-settings-modal .iwb-textarea:focus{border-color:var(--iwb-brand)}
|
||||
|
||||
/* 模型行:删除收进「⋯」更多菜单,防误触 */
|
||||
.iwb-model-more{position:relative;display:inline-flex;flex:0 0 auto}
|
||||
.iwb-model-more>summary{list-style:none;cursor:pointer;width:24px;height:24px;display:inline-flex;align-items:center;justify-content:center;border-radius:var(--iwb-radius-control);color:var(--iwb-text2);font-size:var(--iwb-font-lg);line-height:1}
|
||||
.iwb-model-more>summary::-webkit-details-marker{display:none}
|
||||
.iwb-model-more>summary:hover{background:var(--iwb-hover)}
|
||||
.iwb-model-more-menu{position:absolute!important;right:0;left:auto;top:calc(100% + var(--iwb-space-4));min-width:132px;max-width:none;max-height:none;overflow:visible;padding:var(--iwb-space-4);border-radius:var(--iwb-radius-control)}
|
||||
.iwb-model-more-del{width:100%;text-align:left;border:0;background:transparent;color:var(--iwb-err);font-size:var(--iwb-font-sm);padding:var(--iwb-space-6) var(--iwb-space-8);border-radius:var(--iwb-radius-chip);cursor:pointer}
|
||||
.iwb-model-more-del:hover{background:color-mix(in srgb,var(--iwb-err) 10%,transparent)}
|
||||
.iwb-model-more-hint{padding:var(--iwb-space-6) var(--iwb-space-8);font-size:var(--iwb-font-xs);color:var(--iwb-text2)}
|
||||
|
Before Width: | Height: | Size: 87 KiB After Width: | Height: | Size: 86 KiB |
|
Before Width: | Height: | Size: 89 KiB After Width: | Height: | Size: 89 KiB |
|
Before Width: | Height: | Size: 93 KiB After Width: | Height: | Size: 93 KiB |
|
Before Width: | Height: | Size: 95 KiB After Width: | Height: | Size: 95 KiB |
@@ -103,6 +103,7 @@ test('② 模型可新增与删除,且改动会写入配置', async ({ page })
|
||||
await expect(rows).toHaveCount(2, { timeout: 8000 })
|
||||
|
||||
// 删除刚加的 → 回到 1 行
|
||||
await card.locator('.iwb-model-more-btn').last().click()
|
||||
await card.locator('[title="删除模型"]').last().click()
|
||||
await expect(rows).toHaveCount(1, { timeout: 8000 })
|
||||
|
||||
|
||||