dsh-plugin-image-workbench 1.1.15 → 1.1.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-plugin-image-workbench",
3
- "version": "1.1.15",
3
+ "version": "1.1.16",
4
4
  "type": "module",
5
5
  "description": "Bluxe手绘工坊 · 生图工作台(图文 / 摄影):DSH 侧栏图像生成工作台,默认使用内置本地账号池,亦支持任意 OpenAI 兼容接口(Base URL / API Key / 模型);可自定义工作台名称与图片存储目录。",
6
6
  "main": "./host.js",
@@ -11,6 +11,11 @@
11
11
  --ok:#12b886; --warn:#f59f00; --err:#e03131; --chip:#f1eefe;
12
12
  }
13
13
  *{box-sizing:border-box}
14
+ /* 页面级滚动条不画出来:工作台常驻在 IDE 侧栏里,一条灰条跟着内容增减来回闪很碍眼。
15
+ 只隐藏这根条,滚轮 / 触控板 / 键盘 / scrollIntoView 都照常工作;
16
+ 栏内的横向滚动条(.strip 那类)是元素级样式,不受影响 */
17
+ html{scrollbar-width:none;-ms-overflow-style:none}
18
+ html::-webkit-scrollbar{width:0;height:0}
14
19
  body{margin:0;background:var(--bg);color:var(--ink);
15
20
  font:13px/1.6 -apple-system,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif;}
16
21
  header{display:flex;align-items:center;gap:12px;padding:12px 18px;background:#fff;
@@ -291,9 +296,13 @@
291
296
  .pill{display:inline-flex;align-items:center;gap:6px;background:#f7f5ff;border:1px solid var(--line);
292
297
  border-radius:12px;padding:3px 9px;font-size:11px;color:var(--ink-2)}
293
298
  .footer-note{margin-top:12px;font-size:10.5px;color:var(--ink-3);line-height:1.6}
294
- /* 左栏底部版本号:跟在内容正下方,不与别的栏对齐;有新版本时多一行升级提示 */
295
- .ver-foot{margin-top:16px;font-size:13px;color:var(--ink-3)}
296
- .ver-foot .up-new{margin-top:5px;font-size:12px;color:var(--primary);cursor:default}
299
+ /* 左栏底部版本号:跟在内容正下方,不与别的栏对齐。
300
+ 升级提示做成同一行的小胶囊,绝不另起一行——多一行就会把整页顶出右侧滚动条 */
301
+ .ver-foot{display:flex;align-items:center;gap:8px;margin-top:16px;font-size:13px;
302
+ color:var(--ink-3);white-space:nowrap}
303
+ .ver-foot .up-new{flex:none;font-size:11px;line-height:1.5;color:var(--primary);
304
+ background:#f3f0ff;border:1px solid #e3dcff;border-radius:9px;padding:0 7px;cursor:pointer}
305
+ .ver-foot .up-new:hover{background:#eae4ff}
297
306
  .strip-wrap{display:flex;align-items:center;gap:6px}
298
307
  .strip{position:relative;flex:1;display:flex;gap:8px;overflow-x:auto;padding:6px 2px;min-height:100px;scroll-behavior:smooth}
299
308
  .strip::-webkit-scrollbar{height:8px}
@@ -4870,16 +4879,21 @@ setInterval(refreshPool, 10000);
4870
4879
  if (el && d && d.version) el.textContent = 'v' + d.version;
4871
4880
  })
4872
4881
  .catch(function(){});
4873
- /* 有新版本就在版本号下面提示一行;查失败就当没有,不打扰使用 */
4882
+ /* 有新版本就在版本号右边挂个小胶囊;查失败就当没有,不打扰使用。
4883
+ 必须与版本号同一行:另起一行会把整页顶出右侧滚动条。 */
4874
4884
  fetch('/api/upgrade', {cache: 'no-store'})
4875
4885
  .then(function(r){ return r.ok ? r.json() : null; })
4876
4886
  .then(function(d){
4877
4887
  var el = document.getElementById('upNote');
4878
4888
  if (!el || !d || !d.has_new || !d.latest) return;
4879
4889
  el.hidden = false;
4880
- el.textContent = '发现新版本 v' + d.latest + ',建议升级 →';
4881
- el.title = '当前 v' + d.current + '。在 DSH「插件」里更新即可;'
4890
+ el.textContent = '新版本 v' + d.latest + ' →';
4891
+ var tip = '当前 v' + d.current + '。在 DSH「插件」里更新即可;'
4882
4892
  + '或在插件目录执行 npm i dsh-plugin-image-workbench@latest 后重跑 node install.mjs,装完重启 DSH。';
4893
+ el.title = tip;
4894
+ el.addEventListener('click', function(){
4895
+ if (typeof toast === 'function') toast(tip, {title: '升级到 v' + d.latest, ms: 8000});
4896
+ });
4883
4897
  })
4884
4898
  .catch(function(){});
4885
4899
  })();