diff --git a/CHANGELOG.md b/CHANGELOG.md index 0f654a7..35f8803 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,13 @@ > 3. 核验正式地址版本 → 之后才移动 `stable` / `stable-verified-<日期>` 标签、更新本 CHANGELOG、写 GitHub Release(`gh release create`)。 > 测试发现问题 → 改 → 再 `deploy:test`,正式环境不受影响。回滚点 `git reset --hard stable`。 +## v3.25.53(2026-11-20)图库面板改版:无标题 + 底部横栏(张数左 / 设定右) + +- 去掉顶部「图库」标题,顶部只留 全选 / 反选 / 下载 / 删除(「插入」移到图片悬浮操作,避免重复)。 +- 新增底部横栏 `.iwb-gal-foot`:**左侧**「N / M 张 + 已选」,**右侧**三个设定(插入尺寸 / 图幅 / 时间)右对齐。 +- 三个下拉再窄约 1/3:62px → **34–44px**(字号 10、高度 20)。 +- gallery 插件 1.1.0(已上架市场),宿主只调 `style.css` 里图库相关类。 + ## v3.25.52(2026-11-20)M5:图库改为**只由插件提供**,宿主删除第二份界面 - **宿主不再保留图库面板**(`src/ui-gallery-panel.js` / `src/ui-gallery-head.js` 删除):`app.js` 8879 行(原 8951), diff --git a/package.json b/package.json index f1aad5d..5df68be 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "image-workbench-web", "private": true, - "version": "3.25.52", + "version": "3.25.53", "description": "Browser-based node canvas image workbench", "scripts": { "build": "node scripts/build.js && node scripts/copy-plugins.js", diff --git a/plugins/index.json b/plugins/index.json index 0d6205b..777bba2 100644 --- a/plugins/index.json +++ b/plugins/index.json @@ -19,9 +19,9 @@ }, { "id": "gallery", - "file": "plugin-gallery.5da6614259fe.js", - "version": "1.0.1", - "integrity": "sha256-XaZhQln+duAUnDAkWPBQ2lwMWu5F4kghEwpqgAj7ZUc=" + "file": "plugin-gallery.04021d66c1a2.js", + "version": "1.1.0", + "integrity": "sha256-BAIdZsGiukFPKMCzf/f2aDfwzB+aZW/DkyWIJXyHuhQ=" }, { "id": "image-annotate", diff --git a/plugins/runtime/plugin-gallery.5da6614259fe.js b/plugins/runtime/plugin-gallery.04021d66c1a2.js similarity index 93% rename from plugins/runtime/plugin-gallery.5da6614259fe.js rename to plugins/runtime/plugin-gallery.04021d66c1a2.js index ef4f698..a89c0b3 100644 --- a/plugins/runtime/plugin-gallery.5da6614259fe.js +++ b/plugins/runtime/plugin-gallery.04021d66c1a2.js @@ -60,18 +60,19 @@ var raf = 0 var head = el('div', { class: 'iwb-gal-head' }) - var title = el('div', { class: 'iwb-gal-title' }, - el('span', { class: 'iwb-toolbar-title', text: '图库' }), - el('span', { class: 'iwb-hint', text: '0 / 0 张' }), - el('span', { class: 'iwb-gal-sel', text: '' })) var actions = el('div', { class: 'iwb-gal-actions' }) - var opts = el('div', { class: 'iwb-gal-opts' }) - head.appendChild(title); head.appendChild(actions); head.appendChild(opts) + head.appendChild(actions) var grid = el('div', { class: 'iwb-history-grid' }) var empty = el('div', { class: 'iwb-hint', text: '暂无图片 · 运行生图后会出现在这里' }) var more = el('div', { class: 'iwb-history-more' }) - var wrap = el('div', { class: 'iwb-history-embedded' }, [head, grid, empty, more]) + // v1.1.0:底部横栏 —— 左边张数/已选,右边三个设定(右对齐) + var countEl = el('span', { class: 'iwb-gal-count', text: '0 / 0 张' }) + var pickedEl = el('span', { class: 'iwb-gal-sel', text: '' }) + var opts = el('div', { class: 'iwb-gal-opts' }) + var foot = el('div', { class: 'iwb-gal-foot' }, + el('div', { class: 'iwb-gal-foot-left' }, countEl, pickedEl), opts) + var wrap = el('div', { class: 'iwb-history-embedded' }, [head, grid, more, empty, foot]) host.appendChild(wrap) function count () { return Object.keys(picked).length } @@ -79,8 +80,8 @@ function renderHead () { clear(actions); clear(opts) - title.childNodes[1].textContent = items.length + ' / ' + total + ' 张' - title.childNodes[2].textContent = count() ? ('已选 ' + count()) : '' + countEl.textContent = items.length + ' / ' + total + ' 张' + pickedEl.textContent = count() ? ('已选 ' + count()) : '' var n = count() function btn (label, title0, fn, need, danger) { var b = el('button', { class: 'iwb-btn iwb-btn-sm' + (danger ? ' iwb-btn-danger' : '') + (need && !n ? ' iwb-gal-off' : ''), text: label, title: need && !n ? '先选中图片' : title0 }) @@ -90,7 +91,6 @@ actions.appendChild(btn('全选', '全选当前筛选结果', function () { for (var i = 0; i < items.length; i++) picked[items[i].name] = 1; render() })) actions.appendChild(btn('反选', '反选当前筛选结果', function () { for (var i = 0; i < items.length; i++) { var k = items[i].name; if (picked[k]) delete picked[k]; else picked[k] = 1 } render() })) actions.appendChild(btn('下载', '下载选中的图片', function () { ctx.gallery.download(pickedNames()).catch(function () {}) }, true)) - actions.appendChild(btn('插入', '插入选中图片到画布', function () { ctx.gallery.insert(pickedNames()).catch(function () {}) }, true)) actions.appendChild(btn('删除', '删除选中的图片(不可恢复)', function () { var C = global.IWBUIConfirm var ask = C && C.askOrNative ? C.askOrNative('删除选中的 ' + n + ' 张图片?不可恢复。', { title: '删除图片', okText: '删除' }) : Promise.resolve(global.confirm('删除选中的 ' + n + ' 张图片?')) @@ -220,7 +220,7 @@ global.IWBPluginHost.register({ id: 'gallery', name: '图库', - version: '1.0.1', + version: '1.1.0', apiVersion: 1, capabilities: ['panels', 'gallery'], data: { schemaVersion: 1, maxBytes: 65536 }, diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lock index 17f1a63..8f9936a 100644 --- a/src-tauri/Cargo.lock +++ b/src-tauri/Cargo.lock @@ -1983,7 +1983,7 @@ dependencies = [ [[package]] name = "image-workbench" -version = "3.25.52" +version = "3.25.53" dependencies = [ "arboard", "base64 0.22.1", diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml index 3397218..5efa4f9 100644 --- a/src-tauri/Cargo.toml +++ b/src-tauri/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "image-workbench" -version = "3.25.52" +version = "3.25.53" description = "无限画布 · 生图工作台桌面版" authors = ["malongan"] license = "" diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index f525203..c86858e 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -1,7 +1,7 @@ { "$schema": "../node_modules/@tauri-apps/cli/config.schema.json", "productName": "image-workbench", - "version": "3.25.52", + "version": "3.25.53", "identifier": "com.malongan.imageworkbench", "build": { "frontendDist": "../dist", diff --git a/style.css b/style.css index 30f4120..9d56fc6 100644 --- a/style.css +++ b/style.css @@ -2119,10 +2119,14 @@ html { scrollbar-width: thin; scrollbar-color: var(--iwb-border2) color-mix(in s .iwb-gal-actions { display: flex; flex-wrap: wrap; gap: 6px; } .iwb-gal-actions .iwb-btn { flex: 0 0 auto; } .iwb-gal-actions .iwb-btn.iwb-gal-off { opacity: .45; } -.iwb-gal-opts { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; } +/* v1.1.0:底部横栏(左张数 / 右设定),下拉再窄一档 */ +.iwb-gal-foot { flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 8px; border-top: 1px solid var(--iwb-border); } +.iwb-gal-foot-left { display: flex; align-items: center; gap: 8px; min-width: 0; } +.iwb-gal-count { font-size: 11px; color: var(--iwb-text2); white-space: nowrap; } +.iwb-gal-opts { display: flex; flex-wrap: nowrap; align-items: center; gap: 4px; margin-left: auto; } .iwb-gal-opt { display: inline-flex; align-items: center; gap: 3px; } /* 三个下拉尽量窄:只留内容 + 箭头的最小宽度(0.5K / 特大 / 全部 都放得下) */ -.iwb-gal-opt select { width: auto; min-width: 46px; max-width: 60px; height: 22px; padding: 0 0 0 4px; font-size: 11px; } +.iwb-gal-opt select, .iwb-gal-opts select { width: auto; min-width: 34px; max-width: 44px; height: 20px; padding: 0 0 0 3px; font-size: 10px; } .iwb-history-grid { overscroll-behavior: contain; } .iwb-history-head .iwb-btn-sm { padding-left: 6px; padding-right: 6px; }