feat(promptlib): 1.3.2 详情插入封面图片
validate / validate (push) Canceled after 0s

This commit is contained in:
qiqi committed 2026-11-21 21:42:31 +08:00
1 parent b0258f9ab6
commit ebf277158b
2 files changed
+16 -3

No files matched your search

+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "@iwb-plugin/promptlib",
"private": true,
"version": "1.3.1",
"version": "1.3.2",
"description": "提示词库:右栏提示词列表(搜索/分组/收藏/新建编辑/插入画布/复制/删除),数据由宿主 promptlib 能力提供",
"ibwPlugin": {
"id": "promptlib",
+15 -2
View File
@@ -602,7 +602,20 @@
})
cp.addEventListener('click', function () { Promise.resolve(api.copy(p.text || '')).then(function (r) { if (r && r.ok === false) notify('复制失败', 'err'); else notify('已复制全文') }) })
ins.addEventListener('click', function () { Promise.resolve(api.insert(p.text || '', p.name || '')).then(function () { notify('已插入画布:' + (p.name || '提示词')); dlg.close() }).catch(function () { notify('插入画布失败', 'err') }) })
footEl.appendChild(del); footEl.appendChild(el('span', { class: 'iwb-drawer-spacer' })); footEl.appendChild(cp); footEl.appendChild(ins)
var insImg = null
if (p.cover) {
insImg = el('button', { class: 'iwb-btn iwb-btn-sm', title: '把这条提示词的封面作为参考图插入画布', text: '插入图片' })
insImg.addEventListener('click', function () {
Promise.resolve(api.insertImage(p.cover, p.name || '')).then(function (r) {
if (r && r.ok === false) { notify((r && r.error) || '插入封面失败', 'err'); return }
notify('已插入封面图片')
dlg.close()
}).catch(function () { notify('插入封面失败', 'err') })
})
}
footEl.appendChild(del); footEl.appendChild(el('span', { class: 'iwb-drawer-spacer' })); footEl.appendChild(cp)
if (insImg) footEl.appendChild(insImg)
footEl.appendChild(ins)
},
})
edit.addEventListener('click', function () { dlg.close(); openEditModal(p, false) })
@@ -837,7 +850,7 @@
global.IWBPluginHost.register({
id: 'promptlib',
name: '提示词库',
version: '1.3.1',
version: '1.3.2',
apiVersion: 1,
capabilities: ['panels', 'promptlib'],
data: { schemaVersion: 1, maxBytes: 65536 },