feat(promptlib): 1.14.2 提示词模板的「封面作参考图」开关移到头部(对齐样式节点)
Verify (Gitea) / gate (build · unit · facts) (push) Failing after 1m32s

用户要求:提示词变量节点里「图片参考选择」的位置,照样式节点改造。
原来 refRow 挂在节点最底部(变量列表之后),变量一多就要滚到底才点得到;样式节点是放在标题下方。

- plugins/promptlib/main.js:buildTplSkeleton 里把 refRow 挂进 titleBox(标题 + 变量数下方),
  底部不再追加
- styles.css:.iwb-plp-nref 从「底部分隔行」改成浅色药丸(inline-flex + accent 淡底 + 圆角),
  与样式节点的「示例图作参考 1 张」一致
- 版本 1.14.2,manifest 与 plugins/index.json 哈希同步
This commit is contained in:
qiqi committed 2026-11-28 20:03:46 +08:00
1 parent 4826649b72
commit de92f0ec90
4 files changed
+13 -9

No files matched your search

+4 -4
View File
@@ -56,11 +56,11 @@
"dir": "promptlib",
"main": "main.js",
"style": "styles.css",
"version": "1.14.1",
"version": "1.14.2",
"files": {
"manifest.json": "8ab5f502ad98344170c4434f4f3f050565ca15f71c11a41055a6a83f10e98bb4",
"main.js": "e6e9ec6aad1582ae00f23c88a762e84e28ae5403d6739291dd1a44a28e3f49fe",
"styles.css": "203d61278ad98b2a07053851d0cfb42dd826564e5ae4d068ec950423cd09c46b"
"manifest.json": "fbc8fdf41a0a7cfcd77760cf117ec68ac0cc08f01b09d26910cc80fe237e8540",
"main.js": "c687ccd1134a71fc3b24582039ad55e86a6cce775998e959207b68eeb7df05ae",
"styles.css": "1711a215b3b166b13088fe933d910647932494a91bdf87fa730db5ed8ce11de9"
}
},
{
+4 -1
View File
@@ -2317,13 +2317,16 @@
titleBox.appendChild(title); titleBox.appendChild(meta)
head.appendChild(thumb); head.appendChild(titleBox)
var vars = el('div', { class: 'iwb-plp-nvars' })
// v1.14.2:参考图开关移到头部(title 下面、变量列表上面)——与样式节点位置一致。
// 原来放在节点底部,变量一多就要滚到底才点得到。
var refRow = el('label', { class: 'iwb-plp-nref' })
var refChk = el('input', { type: 'checkbox' })
var refTxt = el('span', { text: '封面作参考图' })
var refNum = el('em', { text: '0' })
refRow.appendChild(refChk); refRow.appendChild(refTxt); refRow.appendChild(refNum)
var warn = el('div', { class: 'iwb-plp-nwarn' })
root.appendChild(head); root.appendChild(vars); root.appendChild(refRow); root.appendChild(warn)
titleBox.appendChild(refRow)
root.appendChild(head); root.appendChild(vars); root.appendChild(warn)
host.appendChild(root)
var st = { root: root, thumb: thumb, title: title, meta: meta, vars: vars, warn: warn, refChk: refChk, refNum: refNum, inputs: {}, key: '' }
refChk.addEventListener('change', function () {
+3 -3
View File
@@ -1,7 +1,7 @@
{
"id": "promptlib",
"name": "提示词库",
"version": "1.14.1",
"version": "1.14.2",
"apiVersion": 1,
"main": "main.js",
"style": "styles.css",
@@ -13,7 +13,7 @@
"提示词"
],
"files": {
"main.js": "e6e9ec6aad1582ae00f23c88a762e84e28ae5403d6739291dd1a44a28e3f49fe",
"styles.css": "203d61278ad98b2a07053851d0cfb42dd826564e5ae4d068ec950423cd09c46b"
"main.js": "c687ccd1134a71fc3b24582039ad55e86a6cce775998e959207b68eeb7df05ae",
"styles.css": "1711a215b3b166b13088fe933d910647932494a91bdf87fa730db5ed8ce11de9"
}
}
+2 -1
View File
@@ -151,7 +151,8 @@
.iwb-plp-nrow{display:flex;align-items:flex-start;gap:6px;min-height:26px}
.iwb-plp-nk{flex:0 0 56px;width:56px;max-width:56px;padding-top:4px;color:var(--iwb-text2,#5b6472);font-size: 12px;line-height:1.35;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.iwb-plp-nin{flex:1 1 auto;min-width:0;height:auto;min-height:24px;padding:2px 8px;line-height:1.5;font-size: 12px;resize:none;overflow-y:hidden}
.iwb-plp-nref{display:flex;align-items:center;gap:6px;font-size: 12px;color:var(--iwb-text2,#5b6472);border-top:1px dashed var(--iwb-border,#e3e5e9);padding-top:6px}
/* v1.14.2:参考图开关移到头部(与样式节点一致)——做成浅色药丸,不再是底部分隔行 */
.iwb-plp-nref{display:inline-flex;align-items:center;gap:6px;margin-top:6px;padding:2px 8px;border-radius:6px;background:color-mix(in srgb, var(--iwb-plp-accent,#7c4dff) 10%, transparent);color:var(--iwb-plp-accent,#5a4bd0);font-size: 12px;cursor:pointer;align-self:flex-start}
.iwb-plp-nref em{font-style:normal;color:var(--iwb-text2,#8b929c)}
.iwb-plp-nprev{margin-top:2px;border-top:1px dashed var(--iwb-border,#e3e5e9);padding-top:6px;color:var(--iwb-text2,#5b6472);font-size: 12px;line-height:1.6;max-height:88px;overflow:hidden}