fix(gallery): 去掉搜索框(用户反馈无意义)v1.6.1
This commit is contained in:
1 parent
61b279a2ca
commit
a487fd3d44
3 files changed
+4
-14
No files matched your search
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@iwb-plugin/gallery",
|
||||
"private": true,
|
||||
"version": "1.6.0",
|
||||
"version": "1.6.1",
|
||||
"description": "图库:右栏图片墙(筛选/多选/预览/插入画布/下载/删除),数据由宿主 gallery 能力提供",
|
||||
"ibwPlugin": {
|
||||
"id": "gallery",
|
||||
|
||||
+2
-11
@@ -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 },
|
||||
|
||||
+1
-2
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user