plugins: gallery 1.9.12(卡片下载钮对齐输出面板:SVG 图标 / 26px / 无阴影)
This commit is contained in:
1 parent
d81c085972
commit
e996975bf9
4 files changed
+34
-11
No files matched your search
+24
-2
@@ -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 },
|
||||
|
||||
@@ -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"
|
||||
}
|
||||
}
|
||||
@@ -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; }
|
||||
|
||||
+3
-3
@@ -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"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user