diff --git a/promptlib/package.json b/promptlib/package.json index 5af613e..9951c9b 100644 --- a/promptlib/package.json +++ b/promptlib/package.json @@ -1,7 +1,7 @@ { "name": "@iwb-plugin/promptlib", "private": true, - "version": "1.7.3", + "version": "1.7.4", "description": "提示词库:右栏提示词列表(搜索/分组/收藏/新建编辑/插入画布/复制/删除),数据由宿主 promptlib 能力提供", "ibwPlugin": { "id": "promptlib", diff --git a/promptlib/src/index.js b/promptlib/src/index.js index 9f7f1b9..921c9a8 100644 --- a/promptlib/src/index.js +++ b/promptlib/src/index.js @@ -919,18 +919,7 @@ var bodyEl = el('div', { class: 'iwb-plp-dbody' }) var footEl = el('div', { class: 'iwb-plp-dfooter' }) var grip2 = el('div', { class: 'iwb-plp-resize', title: '拖动调整大小' }) - var hres = el('div', { class: 'iwb-plp-hres', title: '拖动调整弹窗高度' }) - hres.addEventListener('pointerdown', function (e) { - e.preventDefault(); e.stopPropagation() - var sy = e.clientY, oh = live.h - function mv (ev) { - live.h = Math.max(420, Math.min((global.innerHeight || 900) - 40, oh + ev.clientY - sy)) - apply() - } - function up () { global.removeEventListener('pointermove', mv); global.removeEventListener('pointerup', up); saveDlg(key, live) } - global.addEventListener('pointermove', mv); global.addEventListener('pointerup', up) - }) - card.appendChild(head); card.appendChild(hres); card.appendChild(bodyEl); card.appendChild(footEl); card.appendChild(grip2) + card.appendChild(head); card.appendChild(bodyEl); card.appendChild(footEl); card.appendChild(grip2) mask.appendChild(card) document.body.appendChild(mask) var live = { x: box.x, y: box.y, w: box.w, h: box.h } @@ -1469,7 +1458,8 @@ }) delCover.addEventListener('click', function () { draft.cover = ''; dirty = true; Object.keys(coverCache).forEach(function (k) { if (k.indexOf(draft.id + '|') === 0) delete coverCache[k] }); repaint() }) left.appendChild(cov); left.appendChild(el('div', { class: 'iwb-row' }, upBtn, delCover)); left.appendChild(fileIn) - var nameIn = el('input', { class: 'iwb-input', placeholder: '名称', value: draft.name || '' }) + var nameIn = el('textarea', { class: 'iwb-input iwb-plp-namebox', placeholder: '名称', rows: '1' }) + nameIn.value = draft.name || '' var groupIn = el('input', { class: 'iwb-input', placeholder: '分组', value: draft.group || '' }) var tagsIn = el('input', { class: 'iwb-input', placeholder: '标签,逗号分隔', value: (draft.tags || []).join(', ') }) ;[nameIn, groupIn, tagsIn].forEach(function (i) { i.addEventListener('input', function () { dirty = true }) }) @@ -1713,7 +1703,7 @@ global.IWBPluginHost.register({ id: 'promptlib', name: '提示词库', - version: '1.7.3', + version: '1.7.4', apiVersion: 1, capabilities: ['panels', 'promptlib', 'nodeTypes', 'canvas', 'canvasWrite'], data: { schemaVersion: 3, maxBytes: 4 * 1024 * 1024 }, diff --git a/promptlib/styles.css b/promptlib/styles.css index 0b77275..b321963 100644 --- a/promptlib/styles.css +++ b/promptlib/styles.css @@ -450,3 +450,6 @@ body.iwb-plp-dragging, body.iwb-plp-dragging *{user-select:none!important;-webki .iwb-plp-dialog .iwb-plp-emid .iwb-plp-ewrap{flex:1 1 auto;min-height:0;position:relative;display:flex;background:#fbfcfd;border:1px solid #eef0f3;border-radius:9px} .iwb-plp-dialog .iwb-plp-emid .iwb-plp-ewrap .iwb-plp-etext{background:transparent!important;color:transparent!important;border:0!important;box-shadow:none!important;padding:10px 12px} .iwb-plp-dialog .iwb-plp-hl{padding:10px 12px;font-size:13px;line-height:1.9} +.iwb-plp-namebox{min-height:34px;height:34px;line-height:1.45;padding:7px 10px;resize:vertical;overflow:auto;font-size:12.5px} +.iwb-plp-insvar{color:#1d2129!important;background:#fff!important;border-color:#e2e6ec!important} +.iwb-plp-insvar:hover{background:#f4f6f9!important}