chore(plugin): 同步 gallery 1.5.1 / grouplib 1.0.2 + 回归(胶囊滚动容器、.iwb-hint 作用域)

This commit is contained in:
qiqi committed 2026-11-20 13:32:00 +08:00
1 parent 1d308377a5
commit bd138b7a7e
7 files changed
+32 -17

No files matched your search

@@ -281,8 +281,11 @@
}
fixed.appendChild(topRow)
// 分类胶囊
// 分类胶囊:宿主的 .iwb-lib-chips-scroll 负责「单行 + 横向滚动 + 右侧渐隐」,
// 直接铺在 .iwb-lib-chips 里会被 nowrap 裁掉(分组多时右侧分类看不见)
var chips = el('div', { class: 'iwb-lib-chips' })
var chipsScroll = el('div', { class: 'iwb-lib-chips-scroll' })
chips.appendChild(chipsScroll)
function chip (label, value, count, extra) {
var b = el('button', { class: 'iwb-chip' + (filter === value ? ' iwb-chip-active' : '') + (extra || ''), title: value === '__none__' ? '未分组;拖拽节点组卡片到此 = 移出分组' : (value === 'all' ? '' : '拖拽节点组卡片到此 = 移动到该分组') })
b.appendChild(document.createTextNode(label))
@@ -297,15 +300,15 @@
})
return b
}
chips.appendChild(chip('全部', 'all', list.length))
chips.appendChild(chip('未分组', '__none__', countOf('__none__'), ' iwb-chip-drop'))
chipsScroll.appendChild(chip('全部', 'all', list.length))
chipsScroll.appendChild(chip('未分组', '__none__', countOf('__none__'), ' iwb-chip-drop'))
gs.forEach(function (g) { chips.appendChild(chip(g.name, g.name, countOf(g.name), ' iwb-chip-drop')) })
var addChip = el('button', { class: 'iwb-chip iwb-chip-add', title: '新建分组', text: '+' })
addChip.addEventListener('click', function () { newOpen = !newOpen; render() })
chips.appendChild(addChip)
chipsScroll.appendChild(addChip)
var mgChip = el('button', { class: 'iwb-chip iwb-chip-add', title: '管理分组(重命名 / 排序 / 删除)', text: '⚙' })
mgChip.addEventListener('click', openManager)
chips.appendChild(mgChip)
chipsScroll.appendChild(mgChip)
fixed.appendChild(chips)
if (newOpen) {
@@ -432,7 +435,7 @@
global.IWBPluginHost.register({
id: 'grouplib',
name: '节点组',
version: '1.0.1',
version: '1.0.2',
apiVersion: 1,
capabilities: ['panels', 'grouplib'],
data: { schemaVersion: 1, maxBytes: 65536 },