diff --git a/gallery/package.json b/gallery/package.json index 7923bcd..ac0b64c 100644 --- a/gallery/package.json +++ b/gallery/package.json @@ -1,7 +1,7 @@ { "name": "@iwb-plugin/gallery", "private": true, - "version": "1.5.0", + "version": "1.5.1", "description": "图库:右栏图片墙(筛选/多选/预览/插入画布/下载/删除),数据由宿主 gallery 能力提供", "ibwPlugin": { "id": "gallery", diff --git a/gallery/src/index.js b/gallery/src/index.js index 90d8c30..95e2c02 100644 --- a/gallery/src/index.js +++ b/gallery/src/index.js @@ -372,7 +372,7 @@ global.IWBPluginHost.register({ id: 'gallery', name: '图库', - version: '1.5.0', + version: '1.5.1', apiVersion: 1, capabilities: ['panels', 'gallery'], data: { schemaVersion: 1, maxBytes: 65536 }, diff --git a/gallery/styles.css b/gallery/styles.css index 1b997f9..0efd471 100644 --- a/gallery/styles.css +++ b/gallery/styles.css @@ -65,4 +65,5 @@ .iwb-history-actions { display: flex; gap: 4px; padding: 4px 2px 0; } .iwb-history-actions .iwb-btn-sm { padding: 1px 6px; font-size: 10px; } .iwb-history-more { display: flex; justify-content: center; padding: 4px 0 2px; } -.iwb-hint { font-size: 11px; color: var(--iwb-text2); text-align: center; padding: 12px 6px; } \ No newline at end of file +/* 只作用于图库自己的空态提示:不加前缀会泄漏到设置页等使用 .iwb-hint 的地方(文字被居中) */ +.iwb-history-embedded .iwb-hint { font-size: 11px; color: var(--iwb-text2); text-align: center; padding: 12px 6px; } \ No newline at end of file diff --git a/grouplib/package.json b/grouplib/package.json index df562bd..2c65bf2 100644 --- a/grouplib/package.json +++ b/grouplib/package.json @@ -1,7 +1,7 @@ { "name": "@iwb-plugin/grouplib", "private": true, - "version": "1.0.1", + "version": "1.0.2", "description": "节点组:左栏收藏的节点组列表(分组/改名/删除/拖入画布实例化),数据由宿主 grouplib 能力提供", "ibwPlugin": { "id": "grouplib", diff --git a/grouplib/src/index.js b/grouplib/src/index.js index a8dfc6b..dda190a 100644 --- a/grouplib/src/index.js +++ b/grouplib/src/index.js @@ -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 },