diff --git a/plugins/gallery/main.js b/plugins/gallery/main.js index c5ed9db..e371eb2 100644 --- a/plugins/gallery/main.js +++ b/plugins/gallery/main.js @@ -578,12 +578,16 @@ b.addEventListener('click', function (e) { e.stopPropagation(); fn() }) return b } - // v1.7.2:图片卡片上只留「下载」;插入仍可从顶部工具栏或右键菜单进入。 - acts.appendChild(act('下载', '下载到本地', function () { doDownload([it.name]) })) + // 2026-12-02(用户裁定):卡片上的「下载」胶囊改成右下角圆形图标 —— 矮图不再被横条压住中心; + // 只留图标不加文案(title/aria-label 兜底)。插入仍走顶部工具栏与右键菜单。 + var dlBtn = el('button', { class: 'iwb-gal-dl', title: '下载到本地', 'aria-label': '下载', text: '↓' }) + dlBtn.addEventListener('click', function (e) { e.stopPropagation(); doDownload([it.name]) }) + acts.appendChild(dlBtn) + acts.className = 'iwb-gal-dlwrap' box.appendChild(acts) // 角标/勾选最后挂:不要 z-index(插件层级闸门禁止裸值),靠 DOM 顺序盖在图片上 if (origBadge) box.appendChild(origBadge) - if (on) box.appendChild(el('span', { class: 'iwb-history-check', title: '已选中' })) + // 2026-12-02:选中只留外框,不再挂角标图标(用户裁定) box.__iwbItem = it box.__iwbBoot = boot nodeCache[it.name] = box @@ -849,7 +853,7 @@ global.IWBPluginHost.register({ id: 'gallery', name: '图库', - version: '1.9.9', + version: '1.9.10', apiVersion: 1, capabilities: ['panels', 'gallery'], data: { schemaVersion: 1, maxBytes: 65536 }, diff --git a/plugins/gallery/manifest.json b/plugins/gallery/manifest.json index e0fc782..50af19e 100644 --- a/plugins/gallery/manifest.json +++ b/plugins/gallery/manifest.json @@ -1,7 +1,7 @@ { "id": "gallery", "name": "图库", - "version": "1.9.9", + "version": "1.9.10", "apiVersion": 1, "main": "main.js", "style": "styles.css", @@ -13,7 +13,7 @@ "图库" ], "files": { - "main.js": "22b2d8aa07ec193703d57603e857a6e48e054874ef943603d2ed7b1f3c560fd9", - "styles.css": "07ca657d2e5f5d9406e6c7f7306906e34f2ee10a2fa4c2165358451f5461c6a4" + "main.js": "8e9a363e3d61a6613ac18850067684b5843d2e4564e38abb11dca03ca0ec5457", + "styles.css": "0a708ab9b76be74e47f2b03b4595351a52fe83acabd225244784e8a08d589a6b" } } diff --git a/plugins/gallery/styles.css b/plugins/gallery/styles.css index 824c942..6f8f493 100644 --- a/plugins/gallery/styles.css +++ b/plugins/gallery/styles.css @@ -84,19 +84,27 @@ min-height: 84px; padding: 8px; border-radius: 6px; border: 1px dashed var(--iwb-border); font-size: 11px; color: var(--iwb-text2); background: var(--iwb-layer2); word-break: break-all; } -/* v1.7.3:把「下载」做成卡片底部渐变的下载浮层(与输出节点同一套语义)。 - 条本身 pointer-events:none,只有悬停后按钮可点,避免挡住卡片点击/双击预览。 */ +/* 2026-12-02(用户裁定):卡片下载从「底部横条」改为「右下角圆形图标」。 + —— 矮图(宽幅)不再被横条压住中心,除按钮外整张图都能点。 + 尺寸/圆角/间距抽成 --iwb-dl-* 变量,宿主 style.css 用同名变量(同一套 token 口径,后续可提升到主题层)。 */ .iwb-history-actions { - position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: center; gap: 4px; - padding: var(--iwb-space-16) var(--iwb-space-4) var(--iwb-space-4); border-radius: 0 0 6px 6px; - background-image: linear-gradient(to top, rgba(0, 0, 0, .62), transparent); + position: absolute; right: var(--iwb-dl-inset, 8px); bottom: var(--iwb-dl-inset, 8px); + display: flex; gap: var(--iwb-dl-gap, 4px); opacity: 0; transition: opacity var(--iwb-motion-hover, .15s) var(--iwb-ease-hover, ease-out); pointer-events: none; } .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; } -.iwb-history-actions .iwb-btn-sm { padding: 2px 8px; font-size: 11px; border: none; background: var(--iwb-panel); color: var(--iwb-text); } -.iwb-history-actions .iwb-btn-sm:hover { background: var(--iwb-panel); color: var(--iwb-brand); } +.iwb-gal-dl { + width: var(--iwb-dl-size, 28px); height: var(--iwb-dl-size, 28px); + 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); } @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 f887f3d..adabd60 100644 --- a/plugins/index.json +++ b/plugins/index.json @@ -33,10 +33,10 @@ "dir": "gallery", "main": "main.js", "style": "styles.css", - "version": "1.9.9", + "version": "1.9.10", "files": { - "main.js": "22b2d8aa07ec193703d57603e857a6e48e054874ef943603d2ed7b1f3c560fd9", - "styles.css": "07ca657d2e5f5d9406e6c7f7306906e34f2ee10a2fa4c2165358451f5461c6a4" + "main.js": "8e9a363e3d61a6613ac18850067684b5843d2e4564e38abb11dca03ca0ec5457", + "styles.css": "0a708ab9b76be74e47f2b03b4595351a52fe83acabd225244784e8a08d589a6b" } }, {