From a487fd3d440eb5eb2fdf8f4e7398939957fa6371 Mon Sep 17 00:00:00 2001 From: qiqi Date: Fri, 20 Nov 2026 14:56:39 +0800 Subject: [PATCH] =?UTF-8?q?fix(gallery):=20=E5=8E=BB=E6=8E=89=E6=90=9C?= =?UTF-8?q?=E7=B4=A2=E6=A1=86=EF=BC=88=E7=94=A8=E6=88=B7=E5=8F=8D=E9=A6=88?= =?UTF-8?q?=E6=97=A0=E6=84=8F=E4=B9=89=EF=BC=89v1.6.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gallery/package.json | 2 +- gallery/src/index.js | 13 ++----------- gallery/styles.css | 3 +-- 3 files changed, 4 insertions(+), 14 deletions(-) diff --git a/gallery/package.json b/gallery/package.json index 99230e1..713b692 100644 --- a/gallery/package.json +++ b/gallery/package.json @@ -1,7 +1,7 @@ { "name": "@iwb-plugin/gallery", "private": true, - "version": "1.6.0", + "version": "1.6.1", "description": "图库:右栏图片墙(筛选/多选/预览/插入画布/下载/删除),数据由宿主 gallery 能力提供", "ibwPlugin": { "id": "gallery", diff --git a/gallery/src/index.js b/gallery/src/index.js index be4eab5..be12e2c 100644 --- a/gallery/src/index.js +++ b/gallery/src/index.js @@ -83,18 +83,9 @@ var picked = {} var gridW = 320 var raf = 0 - var query = '' // v1.6.0:搜索(名称/标签),不持久化,重开面板即清空 var failed = {} // v1.6.0:缩略图仍失败的 name 集合(据此显示「N 张失败」+ 全部重试) var head = el('div', { class: 'iwb-gal-head' }) - var searchIn = el('input', { class: 'iwb-input iwb-gal-search', placeholder: '搜索图片名…', value: '' }) - var searchTimer = 0 - searchIn.addEventListener('input', function () { - query = searchIn.value - clearTimeout(searchTimer) - searchTimer = setTimeout(function () { limit = 100; load() }, 220) - }) - head.appendChild(searchIn) var actions = el('div', { class: 'iwb-gal-actions' }) head.appendChild(actions) @@ -429,7 +420,7 @@ function load (force) { if (force) setStatus('刷新中…') - return Promise.resolve(ctx.gallery.list({ query: query, range: cfg.range, limit: limit })).then(function (r) { + return Promise.resolve(ctx.gallery.list({ range: cfg.range, limit: limit })).then(function (r) { items = (r && r.items) || [] total = (r && r.total) || items.length lastLoadAt = Date.now() @@ -492,7 +483,7 @@ global.IWBPluginHost.register({ id: 'gallery', name: '图库', - version: '1.6.0', + version: '1.6.1', apiVersion: 1, capabilities: ['panels', 'gallery'], data: { schemaVersion: 1, maxBytes: 65536 }, diff --git a/gallery/styles.css b/gallery/styles.css index fe2f804..c779f0e 100644 --- a/gallery/styles.css +++ b/gallery/styles.css @@ -67,9 +67,8 @@ .iwb-history-more { display: flex; justify-content: center; padding: 4px 0 2px; } /* 只作用于图库自己的空态提示:不加前缀会泄漏到设置页等使用 .iwb-hint 的地方(文字被居中) */ .iwb-history-embedded .iwb-hint { font-size: 11px; color: var(--iwb-text2); text-align: center; padding: 12px 6px; } -/* ---- v1.6.0:搜索框 / 失败统计 / 右键菜单标题 ---- */ +/* ---- v1.6.0:失败统计 / 右键菜单标题(v1.6.1 去掉搜索框)---- */ .iwb-gal-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; } -.iwb-gal-search { flex: 1 1 90px; min-width: 60px; height: 24px; font-size: 12px; } .iwb-gal-fail { font-size: 11px; color: var(--iwb-err); cursor: pointer; white-space: nowrap; text-decoration: underline dotted; text-underline-offset: 2px;