From e996975bf9b6c0a30aa69e34b58f635f4bfe2d06 Mon Sep 17 00:00:00 2001 From: qiqi Date: Thu, 3 Dec 2026 07:10:51 +0800 Subject: [PATCH] =?UTF-8?q?plugins:=20gallery=201.9.12=EF=BC=88=E5=8D=A1?= =?UTF-8?q?=E7=89=87=E4=B8=8B=E8=BD=BD=E9=92=AE=E5=AF=B9=E9=BD=90=E8=BE=93?= =?UTF-8?q?=E5=87=BA=E9=9D=A2=E6=9D=BF=EF=BC=9ASVG=20=E5=9B=BE=E6=A0=87=20?= =?UTF-8?q?/=2026px=20/=20=E6=97=A0=E9=98=B4=E5=BD=B1=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/gallery/main.js | 26 ++++++++++++++++++++++++-- plugins/gallery/manifest.json | 6 +++--- plugins/gallery/styles.css | 7 ++++--- plugins/index.json | 6 +++--- 4 files changed, 34 insertions(+), 11 deletions(-) diff --git a/plugins/gallery/main.js b/plugins/gallery/main.js index 3fe3840..8248b88 100644 --- a/plugins/gallery/main.js +++ b/plugins/gallery/main.js @@ -76,6 +76,28 @@ svg.appendChild(p) return p } + // 2026-12-03:卡片下载图标与输出面板同款(同一组 path / 线宽 / 14px)。 + // 之前是文本 '↓',字形随字体渲染,和宿主按钮对不齐。 + function dlGlyph () { + var svg = document.createElementNS(SVG_NS, 'svg') + svg.setAttribute('viewBox', '0 0 24 24') + svg.setAttribute('width', '14') + svg.setAttribute('height', '14') + svg.setAttribute('fill', 'none') + svg.setAttribute('stroke', 'currentColor') + svg.setAttribute('stroke-width', '2') + svg.setAttribute('stroke-linecap', 'round') + svg.setAttribute('stroke-linejoin', 'round') + svg.setAttribute('aria-hidden', 'true') + svgPath(svg, 'M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4') + var pl = document.createElementNS(SVG_NS, 'polyline') + pl.setAttribute('points', '7 10 12 15 17 10') + svg.appendChild(pl) + var ln = document.createElementNS(SVG_NS, 'line') + ln.setAttribute('x1', '12'); ln.setAttribute('x2', '12'); ln.setAttribute('y1', '15'); ln.setAttribute('y2', '3') + svg.appendChild(ln) + return svg + } function sel (options, value) { var s = el('select', { class: 'iwb-input iwb-select-compact' }) for (var i = 0; i < options.length; i++) { @@ -580,7 +602,7 @@ } // 2026-12-02(用户裁定):卡片上的「下载」胶囊改成右下角圆形图标 —— 矮图不再被横条压住中心; // 只留图标不加文案(title/aria-label 兜底)。插入仍走顶部工具栏与右键菜单。 - var dlBtn = el('button', { class: 'iwb-gal-dl', title: '下载到本地', 'aria-label': '下载', text: '↓' }) + var dlBtn = el('button', { class: 'iwb-gal-dl', title: '下载到本地', 'aria-label': '下载' }, dlGlyph()) dlBtn.addEventListener('click', function (e) { e.stopPropagation(); doDownload([it.name]) }) acts.appendChild(dlBtn) // 不要再改 class:定位样式挂在 .iwb-history-actions 上,改名会让按钮掉出卡片 @@ -853,7 +875,7 @@ global.IWBPluginHost.register({ id: 'gallery', name: '图库', - version: '1.9.11', + version: '1.9.12', apiVersion: 1, capabilities: ['panels', 'gallery'], data: { schemaVersion: 1, maxBytes: 65536 }, diff --git a/plugins/gallery/manifest.json b/plugins/gallery/manifest.json index c947165..0deee1e 100644 --- a/plugins/gallery/manifest.json +++ b/plugins/gallery/manifest.json @@ -1,7 +1,7 @@ { "id": "gallery", "name": "图库", - "version": "1.9.11", + "version": "1.9.12", "apiVersion": 1, "main": "main.js", "style": "styles.css", @@ -13,7 +13,7 @@ "图库" ], "files": { - "main.js": "5c3ff8cd7a612dcc38825949946dcbfbaae31eba4a6620adab8282fca10dfb8c", - "styles.css": "0a708ab9b76be74e47f2b03b4595351a52fe83acabd225244784e8a08d589a6b" + "main.js": "017277118b96545cd7cae386b37dca9b23a44593f53e0e858aedf901b994a153", + "styles.css": "d0479dad661370dfa23d85e4470c5885cbe38fb3b4de9097ad084c952e16d516" } } diff --git a/plugins/gallery/styles.css b/plugins/gallery/styles.css index 6f8f493..b21cac0 100644 --- a/plugins/gallery/styles.css +++ b/plugins/gallery/styles.css @@ -95,16 +95,17 @@ } .iwb-history-embedded .iwb-history-item:hover .iwb-history-actions, .iwb-history-embedded .iwb-history-item:focus-within .iwb-history-actions { opacity: 1; pointer-events: auto; } +/* 2026-12-03:与输出面板的圆钮完全对齐(26px / 无阴影 / SVG 14px / hover 只变底色)。 */ .iwb-gal-dl { - width: var(--iwb-dl-size, 28px); height: var(--iwb-dl-size, 28px); + width: var(--iwb-dl-size, 26px); height: var(--iwb-dl-size, 26px); border-radius: var(--iwb-dl-radius, 999px); border: 1px solid var(--iwb-border2); background: var(--iwb-panel); color: var(--iwb-text); display: grid; place-items: center; padding: 0; cursor: pointer; font-size: var(--iwb-font-xs); line-height: 1; - box-shadow: var(--iwb-elevation-1, 0 1px 2px rgba(0,0,0,.18)); } -.iwb-gal-dl:hover { background: var(--iwb-hover); color: var(--iwb-brand); } +.iwb-gal-dl svg { width: 14px; height: 14px; } +.iwb-gal-dl:hover { background: var(--iwb-hover); color: var(--iwb-text); } @media (prefers-reduced-motion: reduce) { .iwb-history-embedded .iwb-history-item img { transition: none; } .iwb-history-embedded .iwb-history-item:hover img { transform: none; } diff --git a/plugins/index.json b/plugins/index.json index 1f33bf8..d50fb8a 100644 --- a/plugins/index.json +++ b/plugins/index.json @@ -33,10 +33,10 @@ "dir": "gallery", "main": "main.js", "style": "styles.css", - "version": "1.9.11", + "version": "1.9.12", "files": { - "main.js": "5c3ff8cd7a612dcc38825949946dcbfbaae31eba4a6620adab8282fca10dfb8c", - "styles.css": "0a708ab9b76be74e47f2b03b4595351a52fe83acabd225244784e8a08d589a6b" + "main.js": "017277118b96545cd7cae386b37dca9b23a44593f53e0e858aedf901b994a153", + "styles.css": "d0479dad661370dfa23d85e4470c5885cbe38fb3b4de9097ad084c952e16d516" } }, {